1121 Commits

Author SHA1 Message Date
Charles Lyding
cb18da3917 fix(@angular/cli): change update guide link to angular.dev
References to the Angular update guide now use the new angular.dev site.
2024-05-17 12:44:40 -04:00
Angular Robot
0154af9afa build: update all non-major dependencies 2024-05-14 14:29:10 +02:00
Charles Lyding
0ead36d213 fix(@angular/cli): clarify optional migration instructions during ng update
The instructions for when optional migrations are present within an updated
package have been adjusted. A sentence has been added to mention that
optional migrations can be executed after the update process if preferred
and can be skipped for now.
2024-05-13 08:00:13 -04:00
Angular Robot
8b97d80aaa build: update all non-major dependencies 2024-05-08 08:54:52 +02:00
Angular Robot
6953b4bb13 build: update all non-major dependencies 2024-05-07 12:26:51 +02:00
Angular Robot
fe392626c1 build: update all non-major dependencies 2024-05-06 10:30:11 +02:00
Alan Agius
abf18a64e3 build: update all non-major dependencies
(cherry picked from commit 807718f133489e8938a909bbb2204df6918d2c7e)
2024-05-02 10:19:09 -04:00
Charles Lyding
15ab9020b3 fix(@angular/cli): add @angular/build package to update group list
The ng update package group list now contains the newly introduced
`@angular/build` package which contains the esbuild/Vite-based
build system. The group list ensures that all relevant direct
project dependencies are update as group when `@angular/cli` itself
is updated.
2024-05-01 14:17:59 -04:00
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