Alan Agius
137e8e0ceb
fix(@angular/build): add warning when --prerendering
or --app-shell
are no-ops
...
Both options are ineffective when used with `outputMode`, so a warning is now issued.
2024-10-28 16:08:06 +01:00
Angular Robot
1890fe4e94
build: update all non-major dependencies
2024-10-24 08:29:52 -07:00
Angular Robot
ff88c3f6a1
build: update all non-major dependencies
2024-10-23 11:49:20 +02:00
Alan Agius
b893a6ae9d
refactor: remove workarounds for Safari 14 and 15
...
Both of these versions are no longer supported by Angular and thus these workers are no longer required.
2024-10-22 19:18:12 +02:00
Doug Parker
03d4bd2b09
test: rename @angular-devkit/build-angular:protractor
usages to :private-protractor
2024-10-21 14:50:18 -07:00
Doug Parker
62877bdf2b
refactor(@angular-devkit/build-angular): remove Protractor builder and schematics
...
BREAKING CHANGE: Protractor is no longer supported.
Protractor was marked end-of-life in August 2023 (see https://protractortest.org/ ). Projects still relying on Protractor should consider migrating to another E2E testing framework, several support solid migration paths from Protractor.
* https://angular.dev/tools/cli/end-to-end
* https://blog.angular.dev/the-state-of-end-to-end-testing-with-angular-d175f751cb9c
2024-10-21 14:50:18 -07:00
Angular Robot
1128773122
build: update all non-major dependencies
2024-10-21 14:32:48 -07:00
Angular Robot
c38ff43473
build: update all non-major dependencies
2024-10-18 19:54:45 +00:00
Angular Robot
1f4428f0b3
build: update all non-major dependencies
2024-10-17 14:27:54 +00:00
Alan Agius
3cbbf456c1
refactor: handle standalone by default change
...
In tests, add `standalone: false` where it's missing.
Note: In the future, we should update our integration tests to use a standalone app.
2024-10-17 14:20:52 +00:00
Angular Robot
74b237c18f
build: update all non-major dependencies
...
Closes #28644 as a pr takeover
2024-10-17 09:03:51 +02:00
Angular Robot
e448cf6ee9
build: update all non-major dependencies
2024-10-15 09:30:59 -07:00
Angular Robot
d4c17520b1
build: update schematics dependencies to ~5.4.0
2024-10-14 09:33:51 -07:00
Angular Robot
fba1978af2
build: update dependency magic-string to v0.30.12
2024-10-11 08:45:51 -07:00
Alan Agius
b0aa88f427
refactor(@angular-devkit/build-angular): remove unused dependencies
...
These dependencies are no longer utilized within the `@angular-devkit/build-angular` package.
2024-10-11 13:17:37 +02:00
Angular Robot
7b994e49ea
build: update all non-major dependencies
2024-10-11 10:03:29 +02:00
Angular Robot
73b567a5f6
build: update all non-major dependencies
2024-10-10 10:21:38 -07:00
Alan Agius
292a4b7c2f
feat(@schematics/angular): update app-shell and ssr schematics to adopt new Server Rendering API
...
This commit revises the app-shell and ssr schematics to incorporate the new Server Rendering API, along with the integration of server-side routes.
BREAKING CHANGE: The app-shell schematic is no longer compatible with Webpack-based builders.
2024-10-09 18:07:33 +02:00
Angular Robot
2a1107d998
build: update all non-major dependencies
2024-10-09 11:28:56 +02:00
Angular Robot
4656c541d2
build: update all non-major dependencies
2024-10-08 10:10:55 -07:00
Angular Robot
5c57e1da36
build: update dependency @inquirer/prompts to v7
2024-10-07 09:44:53 -07:00
Jan Martin
ab6e19e1f9
fix(@angular-devkit/build-angular): handle main field
2024-10-07 09:43:57 -07:00
Alan Agius
4941725f9e
refactor: remove unused methods and locals
2024-10-04 13:16:13 +02:00
Angular Robot
523c2c9e52
build: update all non-major dependencies
2024-10-03 09:21:55 +02:00
Charles Lyding
62a99b70b8
refactor(@angular-devkit/schematics): avoid for await...of with promise arrays
...
The upcoming version of typescript Eslint rules will fail the `await-thenable`
rule for cases of for await...of that use promise arrays. This change
removes the usage to avoid lint failures during the version update.
Ref: https://typescript-eslint.io/rules/await-thenable/#async-iteration-for-awaitof-loops
2024-10-02 16:06:35 -04:00
Charles Lyding
909cfacf8a
refactor(@angular-devkit/build-angular): avoid for await...of with promise arrays
...
The upcoming version of typescript Eslint rules will fail the `await-thenable`
rule for cases of for await...of that use promise arrays. This change
removes the usage to avoid lint failures during the version update.
Ref: https://typescript-eslint.io/rules/await-thenable/#async-iteration-for-awaitof-loops
2024-10-02 16:06:35 -04:00
Jan Martin
dcbdca85c7
feat(@angular-devkit/build-angular): karma+esbuild+watch
...
This introduces support for `--watch` when using the application
builder. It's tested as far as the relevant test case is concerned.
But I wouldn't be surprised if there's still some rough corners.
2024-09-30 14:43:25 -07:00
Angular Robot
a896b74ac1
build: update all non-major dependencies
2024-09-30 09:53:17 +02:00
Jan Martin
9d7613db9b
fix(@angular-devkit/build-angular): zone.js/testing + karma + esbuild
...
Previously, the testing module was split into its own entrypoint but
then never loaded. Now it's just left in the overall polyfill bundle.
The bug wasn't caught by the existing test coverage, so this adds a
new test that ensures that fakeAsync works.
Cleaning up the Karma `files` list also removes the noisy "no file
matched the pattern worker-*.js" warnings that were previously generated
for test suites that don't include web worker sources.
2024-09-27 15:29:14 -07:00
Jan Martin
0a4ef30263
feat(@angular-devkit/build-angular): karma-coverage w/ app builder
2024-09-27 12:06:52 -07:00
Alan Agius
422e847a39
build: update all non-major dependencies
2024-09-27 14:49:44 -04:00
Jan Martin
8f038de751
refactor(@angular-devkit/build-angular): remove implicit localize polyfill
...
In the v19 application builder, the localize polyfill should not be added
implicitly.
See: d6a34034d7
2024-09-26 13:30:24 -07:00
Jan Martin
54594b5abf
feat(@angular-devkit/build-angular): support karma with esbuild
...
Adds a new "builderMode" setting for Karma that can be used to switch
between webpack ("browser") and esbuild ("application"). It supports a
third value "detect" that will use the same bundler that's also used for
development builds.
The detect mode is modelled after the logic used for the dev-server builder.
This initial implementation doesn't properly support `--watch` mode or code
coverage.
2024-09-26 09:35:18 -07:00
Jan Martin
25c4584210
test(@angular-devkit/build-angular): mark server tests as large
...
These tests appear to be timing out after 300s somewhat often.
2024-09-26 09:35:18 -07:00
Jan Martin
3020571b68
test: allow Chrome sandbox opt-out (--no-sandbox
)
...
In some environments, e.g. containers or in some cases macOS,
headless Chrome may not work with the sandbox enabled. This exposes
an escape hatch to run tests in those environments.
Example use:
```sh
yarn bazel test \
//packages/angular_devkit/build_angular:build_angular_karma_test \
--test_env=PUPPETEER_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
--test_env=CHROME_NO_SANDBOX=1
```
2024-09-26 09:35:18 -07:00
Jan Martin
66c55df468
test(@angular-devkit/build-angular): add application/browser test runs
...
Runs all existing karma tests twice: Once in an environment that uses the
application builder and once in one that uses the browser builder. The
general approach is taken from the dev server tests.
This is in preparation for supporting the application builder for karma tests.
2024-09-25 09:16:53 -07:00
Angular Robot
df46657df7
build: update all non-major dependencies
2024-09-25 09:13:04 -04:00
Angular Robot
1434d621f9
build: update all non-major dependencies
2024-09-23 08:57:37 -04:00
Angular Robot
b65ef44cbe
build: update all non-major dependencies
2024-09-20 15:05:14 -07:00
Angular Robot
bd782dbe36
build: update all non-major dependencies
2024-09-18 11:16:50 -07:00
Kristiyan Kostadinov
a3bbe0e585
refactor(@angular-devkit/core): fix up internal typings
...
Resolves some type errors that showed up internally.
2024-09-18 11:16:11 -07:00
Angular Robot
93542bfc6d
build: update dependency @inquirer/prompts to v6
2024-09-16 08:19:49 +02:00
Angular Robot
c9324e7ee8
build: update all non-major dependencies
2024-09-16 08:19:09 +02:00
Angular Robot
ac71ce121e
build: update dependency chokidar to v4
2024-09-13 07:48:51 +02:00
Alan Agius
d66aaa3ca4
feat(@angular/ssr): add server routing configuration API
...
This commit introduces a new server routing configuration API, as discussed in RFC https://github.com/angular/angular/discussions/56785 . The new API provides several enhancements:
```ts
const serverRoutes: ServerRoute[] = [
{
path: '/error',
renderMode: RenderMode.Server,
status: 404,
headers: {
'Cache-Control': 'no-cache'
}
}
];
```
```ts
const serverRoutes: ServerRoute[] = [
{
path: '/product/:id',
renderMode: RenderMode.Prerender,
async getPrerenderPaths() {
const dataService = inject(ProductService);
const ids = await dataService.getIds(); // Assuming this returns ['1', '2', '3']
return ids.map(id => ({ id })); // Generates paths like: [{ id: '1' }, { id: '2' }, { id: '3' }]
}
}
];
```
```ts
const serverRoutes: ServerRoute[] = [
{
path: '/product/:id',
renderMode: RenderMode.Prerender,
fallback: PrerenderFallback.Server, // Can be Server, Client, or None
async getPrerenderPaths() {
}
}
];
```
```ts
const serverRoutes: ServerRoute[] = [
{
path: '/product/:id',
renderMode: RenderMode.Server,
},
{
path: '/error',
renderMode: RenderMode.Client,
},
{
path: '/**',
renderMode: RenderMode.Prerender,
},
];
```
These additions aim to provide greater flexibility and control over server-side rendering configurations and prerendering behaviors.
2024-09-12 19:59:05 +02:00
Angular Robot
5bba61db24
build: update all non-major dependencies
2024-09-12 12:07:56 +02:00
Jan Martin
78f76485fe
feat(@angular-devkit/architect): merge object options from CLI
...
We recently introduced the ability to pass object values from the
command line (#28362 ). @clydin noticed that the initial behavior
didn't work well for `--define`: It completely replaced all values
even if just one of multiple defines is specified.
This updates the architect to support merging of object options.
If both the base option (e.g. from `angular.json`) and the override
(e.g. from a CLI `--flag`) are objects, the objects are merged.
See: https://github.com/angular/angular-cli/pull/28362
2024-09-12 09:50:05 +02:00
Alan Agius
743188ba62
refactor: Add lines-around-comment
rule
...
I often struggle with spacing around block comments, so I've decided to add the `lines-around-comment` lint rule to help manage this.
For more details, see the https://eslint.style/rules/js/lines-around-comment
2024-09-11 12:10:54 +02:00
Kristiyan Kostadinov
8f051a49e6
build: update all remaining places to TypeScript 5.6
...
Updates a few leftover places to the TypeScript 5.6 final version.
2024-09-10 09:25:11 +02:00
Angular Robot
27c1c77896
build: update all non-major dependencies
2024-09-09 19:36:13 +02:00