1113 Commits

Author SHA1 Message Date
Angular Robot
1d7531b88f build: update all non-major dependencies 2024-04-29 06:54:11 -04:00
Alan Agius
4087728c3e feat(@angular/cli): support for Node.js v22
Add support for Node.js v22
2024-04-25 14:04:43 +02:00
Angular Robot
ffb5428565 build: update all non-major dependencies 2024-04-25 09:51:33 +02:00
Charles Lyding
0b03829bce feat(@angular-devkit/build-angular): move i18n extraction for application builder to new build system package
With the `application` builder already within the new `@angular/build` package,
the `extract-i18n` builder with application builder support is now also contained within this package.
Only the application builder aspects of `extract-i18n` have been moved.
The compatibility builder `browser-esbuild` is not supported with `@angular/build:extract-i18n`.
The existing `extract-i18n` builder found within `@angular-devkit/build-angular` should continue to be used for both the
Webpack-based `browser` builder and the esbuild-based compatibility `browser-esbuild`
builder. To maintain backwards compatibility, the existing `@angular-devkit/build-angular:extract-i18n`
builder continues to support builders it has previously.

No change to existing applications is required.
2024-04-24 07:06:38 -04:00
Charles Lyding
810d213e18 feat(@angular/build): introduce new official build system package
The `@angular/build` package has been introduced to house the esbuild/Vite-based
build system that was newly introduced as stable in v17. The existing
`@angular-devkit/build-angular` package will continue to contain the Webpack-based
build system and to ensure backwards compatibility it will also provide aliases
for the esbuild/Vite-based build system. The changes here are the first stage
of the builder transition and moves the `application` builder into the new package.
The application builder can now be accessed when this package is installed directly
via `@angular/build:application`.

No changes are required for existing projects.
2024-04-18 17:24:23 +02:00
Alan Agius
53c319aaa9 feat(@angular-devkit/build-angular): add support for the poll option in the library builder
This commit adds support for polling when using the ng-packagr builder

Closes #27420
2024-04-18 16:40:36 +02:00
Angular Robot
8843188080 build: update all non-major dependencies 2024-04-17 20:01:54 +02:00
Angular Robot
0398392f2c build: update dependency pacote to v18 2024-04-16 11:52:59 +02:00
Angular Robot
b250831598 build: update all non-major dependencies 2024-04-15 12:34:09 +02:00
Matthieu Riegler
d482c65dae docs: fix image url for completion command 2024-04-10 09:53:56 -04:00
Matthieu Riegler
422edd70fd docs: replace links links to aio with links to adev
Currently those are handled by a custom link remapper (in dev-infra) which should be removed.
2024-04-09 12:23:33 -04:00
Alan Agius
03eee05450 refactor(@angular/cli): remove ng doc command
This command lacked practical utility.

BREAKING CHANGE: The `ng doc` command has been removed without a replacement. To perform searches, please visit www.angular.dev
2024-04-08 11:01:41 -04:00
Angular Robot
3860fb3e42 build: update all non-major dependencies
(cherry picked from commit 7da0965ce3856cfc99158db8510ae339d3dc8fad)
2024-04-02 10:07:07 -07:00
Charles Lyding
c452531828 refactor(@angular/cli): remove unneeded devkit core tag helper usage
Direct string usage can be leveraged to remove the need for the helpers
and reduce imports of `@angular-devkit/core`.
2024-03-15 14:10:32 -04:00
Alan Agius
ac30195709 feat(@angular/cli): add ng dev alias to ng serve
This commit adds an alias to `ng serve`
2024-03-14 16:11:57 +01:00
Alan Agius
a88bc7c91f build: remove the need to bootstrap-local
This commit removes the need for the bootstrap-local logic and moves the scripts to` mts`
2024-03-14 15:46:54 +01:00
Angular Robot
8374dc6df1 build: update all non-major dependencies 2024-03-14 10:53:31 +01:00
Alan Agius
c7b208555e refactor(@angular/cli): remove support for Node.js versions <18.19.1 and <20.11.1
BREAKING CHANGE: Node.js support for versions <18.19.1 and <20.11.1 has been removed.
2024-03-12 16:51:03 +01:00
Angular Robot
ab4f98596c build: update all non-major dependencies 2024-03-06 11:37:15 +01:00
Angular Robot
30f182c7ad build: update all non-major dependencies 2024-02-26 14:29:44 -05:00
Alan Agius
782c7185c5 fix(@angular/cli): prevent BOM errors in package.json during ng update
To prevent `JSON.parse` errors triggered by Byte Order Marks (BOMs) in package.json files, the `readJson` tree method is now utilized for more reliable BOM handling.

Closes #27052
2024-02-09 15:36:15 +01:00
Angular Robot
ccdaed4e49 build: update all non-major dependencies 2024-02-06 08:42:54 -05:00
Angular Robot
8515c6bb54 build: update all non-major dependencies 2024-01-29 15:27:28 -08:00
Alan Agius
b3e206741c feat(@angular/cli): add support to bun package manager
This commit adds support to use `bun` as a package manager.

Closes #26837
2024-01-25 18:02:35 +01:00
Alan Agius
7717dba907 docs: remove ngx-deploy-npm from missing deploy targets
This package will no longer support Angular CLI workspaces in the next major version. Instead they will soley support NX.

See: https://dev.to/dianjuar/whats-coming-to-ngx-deploy-npm-v8-23gn and https://github.com/angular/angular/pull/53999
2024-01-25 13:51:54 +01:00
Angular Robot
248b4c9a75 build: update all non-major dependencies 2024-01-23 10:52:36 +01:00
harshlakhara
efa1a19a78 fix(@angular/cli): update regex to validate the project-name 2024-01-23 10:52:24 +01:00
Angular Robot
8eab5aa912 build: update all non-major dependencies 2024-01-18 09:58:07 -05:00
Alan Agius
640a76aa74 fix(@angular/cli): retain existing EOL when updating JSON files
This commit updates the JSON utility to retain the existing EOF when updating files.
2024-01-05 16:30:06 +01:00
Alan Agius
68dae539ad feat(@angular-devkit/build-angular): initial experimental implementation of @web/test-runner builder
This is a new `@angular-devkit/build-angular:web-test-runner` builder which invokes Web Test Runner to execute unit tests in a real browser.

The implementation calls `application` builder under the hood with some option overrides build the application to a temporary directory and then runs Web Test Runner on the output. This set up is still minimal, but sufficient to run and pass tests in the generated `ng new` application.

The `schema.json` file is directly copied from the `karma` builder, since this is intended to serve as a migration target for users coming from Karma. Most of the options don't actually work yet, which is logged when they are used.

The most interesting part of this change is configuring Jasmine to execute in Web Test Runner. This is done through the `testRunnerHtml` option which allows us to control the HTML page tests are executed on. We use `test_page.html` which very carefully controls the loading process. I opted to make a single `<script type="module">` which dynamic imports all the relevant pieces so the ordering can be directly controlled more easily. This is better than trying to manage multiple `<script>` tags and pass data between them. Ideally everything would be bundled into a single entry point, however this is not feasible due to the way that ordering requirements do not align with typical `import` structure. Jasmine must come before polyfills which must come before the runner which invokes user code. In an ideal world, this ordering relationship would be represented in `import` statements, but this is not practically feasible because Angular CLI doesn't own all the files (`./polyfills.js` is user-defined) and Jasmine's loading must be split into two places so Zone.js can properly patch it.

`jasmine_runner.js` serves the purpose of executing Jasmine tests and reporting their results to Web Test Runner. I tried to write `jasmine_runner.js` in TypeScript and compile it with a `ts_library`. Unfortunately I don't think this is feasible because it needs to import `@web/test-runner-core` at runtime. This dependency has some code generated at runtime in Web Test Runner, meaning we cannot bundle this dependency and must mark it as external and dynamic `import()` the package at runtime. This works fine in native ESM, but compiling with TypeScript outputs CommonJS code by default (and I don't believe our `@build_bazel_rules_nodejs` setup can easily change that), so any `import('@web/test-runner-core')` becomes `require('@web/test-runner-core')` which fails because that package is ESM-only. The `loadEsmModule` trick does work here either because Web Test Runner is applying Node module resolution at serve time, meaning it looks for `import('@web/test-runner-core')` and rewrites it to something like `import('/node_modules/@web/test-runner-core')`. In short, there is no easy syntax which circumvents the TypeScript compiler while also being statically analyzable to Web Test Runner.
2024-01-03 18:52:58 +01:00
Alan Agius
602d0166c4 fix(@angular/cli): add prerender and ssr-dev-server schemas in angular.json schema
Add missing schemas to improve IDE DX
2024-01-03 16:18:08 +01:00
Alan Agius
fc7aa22462 refactor(@angular/cli): use process.versions.pnp to determine if PNP is used in warnOnMissingNodeModules
Instead of checking for existence of PNP config files we now use `process.versions.pnp`. See https://yarnpkg.com/advanced/pnpapi#processversionspnp
2023-12-21 16:37:55 +01:00
Alan Agius
a391b5f0c2 fix(@angular/cli): ng e2e and ng lint prompt requires to hit Enter twice to proceed on Windows
This fixes an issue where prompts in nested child processes on Windows require multiple keystrokes to proceed.

Closes #26724
2023-12-21 16:37:25 +01:00
Alan Agius
f7d538903a fix(@angular/cli): re-add -d alias for --dry-run
This got accidentally deleted during the transition to yargs.

Closes #26496
2023-12-15 16:34:08 +01:00
Alan Agius
30efb76c46 refactor(@angular/cli): remove no longer relevant regexps from ng version checks
Bazel and NgUniversal packages information is not needed in version 17.
2023-12-15 16:30:07 +01:00
Angular Robot
60b40cb3e3 build: update all non-major dependencies 2023-12-04 09:35:46 +01:00
Alan Agius
bec9458b6e fix(@angular/cli): handle packages with no version
In some cases pacote will return undefined as `version` which resulted in `Cannot convert undefined or null to object`.

Closes #26337
2023-11-15 16:47:42 +01:00
Angular Robot
cb0c22ee9b build: update all non-major dependencies 2023-11-08 15:04:56 +01:00
水上 皓登
fac706047a docs: the node.js's link fix. 2023-11-04 11:35:21 +01:00
Charles Lyding
6d8d948ad0 refactor(@angular-devkit/build-angular): cache compiled load ESM file helper
The dynamically compiled ESM import helper is now cached to prevent the need
to recompile the helper function everytime a load ESM helper call is made.
This helper is currently used to workaround dynamic import limitations with
the TypeScript compilation output. Once the build process is updated, it will
no longer be required.
2023-11-03 10:36:27 +01:00
Alan Agius
11420667f9 build: use single Node.js toolchain to run unit tests
E2E tests are used to run tests on multiple platforms and node.js versions.
2023-10-30 17:50:47 +01:00
Alan Agius
91dcae16d1 fix(@angular/cli): add Node.js 20 as supported version
Prior to this Node.js 20 was incorrectly being listed as unsupported.

Closes #26114
2023-10-30 12:28:00 +01:00
Charles Lyding
6161e3e031 fix(@angular/cli): ignore peer mismatch when updating @nguniversal/builders
When updating to v17, the `@nguniversal/builders` is now ignored when checking peer
dependency ranges. The `@nguniversal/builders` is no longer used and will be removed
in a migration during the update process.
2023-10-30 09:00:31 +01:00
Alan Agius
a0f8fac4b3 refactor: update inquirer to version 9.0.6
Update the mentioned package.
2023-10-26 16:11:36 +02:00
Alan Agius
842c2045d1 fix(@angular/cli): remove Node.js 16 from supported checks
Node.js support was removed, but it appears that this got through the cracks.
2023-10-24 16:12:09 +02:00
Alan Agius
2c1c676245 fix(@angular/cli): remove the need to specify --migrate-only when --name is used during ng update
This commit updates the behaviour of `ng update --migrate-only` to remove the need for `--migrate-only` option to be specified. `--migrate-only` will be set internally.

Before
```
ng update @angular/cli --migrate-only --name=migration-name
```

Now
```
ng update @angular/cli --name=migration-name
```
2023-10-20 23:11:50 +02:00
Alan Agius
70099af5be docs(@angular/cli): update build description
Replace webpack with esbuild.
2023-10-19 18:15:23 +02:00
Angular Robot
bcdfe534bd build: update dependency resolve to v1.22.8 2023-10-11 09:37:37 +02:00
Alan Agius
6b5c469a42 build: update all non-major dependencies 2023-09-27 14:08:41 +02:00
Alan Agius
741cca73c1 feat(@schematics/angular): add ng new --ssr
This commit enabled users to opt-in adding SSR and SSG to their application during the `ng new` experience. This can be done either by using the `--ssr` option or answer `Yes` when prompted.
2023-09-25 20:17:01 +02:00