Skip to content

Commit 114d323

Browse files
Merge pull request #1126 from angular/main
Create a new pull request by comparing changes across two branches
2 parents f443b1b + c48d694 commit 114d323

File tree

67 files changed

+1598
-1699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1598
-1699
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ jobs:
170170
./scripts/saucelabs/wait-for-tunnel.sh
171171
yarn bazel test --config=saucelabs //tests/legacy-cli:e2e.saucelabs
172172
./scripts/saucelabs/stop-tunnel.sh
173-
- uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
173+
- uses: actions/upload-artifact@84480863f228bb9747b473957fcc9e309aa96097 # v4.4.2
174174
if: ${{ failure() }}
175175
with:
176176
name: sauce-connect-log

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Initialize environment
3737
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@46771fcd70e08e7ba3c30f4ee9ebf9971b7fdb5c
3838
- name: Setup ESLint Caching
39-
uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
39+
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
4040
with:
4141
path: .eslintcache
4242
key: ${{ runner.os }}-${{ hashFiles('.eslintrc.json') }}
@@ -80,7 +80,7 @@ jobs:
8080
- name: Build release targets
8181
run: yarn ng-dev release build
8282
- name: Store PR release packages
83-
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
83+
uses: actions/upload-artifact@84480863f228bb9747b473957fcc9e309aa96097 # v4.4.2
8484
with:
8585
name: packages
8686
path: dist/releases/*.tgz

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
# Upload the results as artifacts.
4040
- name: 'Upload artifact'
41-
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
41+
uses: actions/upload-artifact@84480863f228bb9747b473957fcc9e309aa96097 # v4.4.2
4242
with:
4343
name: SARIF file
4444
path: results.sarif

CHANGELOG.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,60 @@
1+
<a name="19.0.0-next.10"></a>
2+
3+
# 19.0.0-next.10 (2024-10-09)
4+
5+
## Breaking Changes
6+
7+
### @schematics/angular
8+
9+
- The app-shell schematic is no longer compatible with Webpack-based builders.
10+
11+
### @schematics/angular
12+
13+
| Commit | Type | Description |
14+
| --------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------------------------------- |
15+
| [292a4b7c2](https://github.com/angular/angular-cli/commit/292a4b7c2f62828606c42258db524341f4a6391e) | feat | update app-shell and ssr schematics to adopt new Server Rendering API |
16+
| [6dbfc770b](https://github.com/angular/angular-cli/commit/6dbfc770b2d2f72dbc73e39e763f0773435825c6) | fix | add validation for component and directive class name |
17+
| [7de93e593](https://github.com/angular/angular-cli/commit/7de93e593a9b6439b2f33d0c25c371e14a0e9e38) | fix | include `index.csr.html` in resources asset group |
18+
19+
### @angular-devkit/build-angular
20+
21+
| Commit | Type | Description |
22+
| --------------------------------------------------------------------------------------------------- | ---- | ----------------- |
23+
| [ab6e19e1f](https://github.com/angular/angular-cli/commit/ab6e19e1f9a8781334821048522abe86b149c9c3) | fix | handle main field |
24+
25+
### @angular/build
26+
27+
| Commit | Type | Description |
28+
| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------------------------------- |
29+
| [549c20a93](https://github.com/angular/angular-cli/commit/549c20a9396b33ae2e6708a8a9a7c77f0167b276) | fix | `Ctrl + C` not terminating dev-server with SSR |
30+
| [1d9db138f](https://github.com/angular/angular-cli/commit/1d9db138f34132f62fd008c9b8597489b08018e6) | fix | always generate a new hash for optimized chunk |
31+
| [7c50ba9e2](https://github.com/angular/angular-cli/commit/7c50ba9e2faca445c196c69e972ac313547dda54) | fix | ensure `index.csr.html` is always generated when prerendering or SSR are enabled |
32+
| [1bb68ba68](https://github.com/angular/angular-cli/commit/1bb68ba6812236a135c1599031bf7e1b7e0d1d79) | fix | move lmdb to optionalDependencies |
33+
| [9233e5ef4](https://github.com/angular/angular-cli/commit/9233e5ef471e851a173827df7f74a581381c6373) | fix | show error message when error stack is undefined |
34+
| [6c618d495](https://github.com/angular/angular-cli/commit/6c618d495c54394eb2b87aee36ba5436c06557bd) | fix | update logic to support both internal and external SSR middlewares |
35+
36+
<!-- CHANGELOG SPLIT MARKER -->
37+
38+
<a name="18.2.8"></a>
39+
40+
# 18.2.8 (2024-10-09)
41+
42+
### @schematics/angular
43+
44+
| Commit | Type | Description |
45+
| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------- |
46+
| [b522002ff](https://github.com/angular/angular-cli/commit/b522002fff763cda2ae1c746efcb2638d0099184) | fix | add validation for component and directive class name |
47+
| [dfd2d5c05](https://github.com/angular/angular-cli/commit/dfd2d5c0500777fa5aea91519f6657aed7f3b7d7) | fix | include `index.csr.html` in resources asset group |
48+
49+
### @angular/build
50+
51+
| Commit | Type | Description |
52+
| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------- |
53+
| [9445916f9](https://github.com/angular/angular-cli/commit/9445916f9b5b9da69623bf86735264d8a5f26fb3) | fix | `Ctrl + C` not terminating dev-server with SSR |
54+
| [9b5cfaa8c](https://github.com/angular/angular-cli/commit/9b5cfaa8ce9d12bf450e7527d479ce7a879ea1b8) | fix | always generate a new hash for optimized chunk |
55+
56+
<!-- CHANGELOG SPLIT MARKER -->
57+
158
<a name="19.0.0-next.9"></a>
259

360
# 19.0.0-next.9 (2024-10-02)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.dev/license
7+
*/
8+
9+
import { BuilderHarness } from './builder-harness';
10+
11+
export const GOOD_TARGET = './src/good.js';
12+
export const BAD_TARGET = './src/bad.js';
13+
14+
/** Setup project for use of conditional imports. */
15+
export async function setupConditionImport(harness: BuilderHarness<unknown>) {
16+
// Files that can be used as targets for the conditional import.
17+
await harness.writeFile('src/good.ts', `export const VALUE = 'good-value';`);
18+
await harness.writeFile('src/bad.ts', `export const VALUE = 'bad-value';`);
19+
20+
// Simple application file that accesses conditional code.
21+
await harness.writeFile(
22+
'src/main.ts',
23+
`import {VALUE} from '#target';
24+
console.log(VALUE);
25+
export default 42 as any;
26+
`,
27+
);
28+
29+
// Ensure that good/bad can be resolved from tsconfig.
30+
const tsconfig = JSON.parse(harness.readFile('src/tsconfig.app.json')) as TypeScriptConfig;
31+
tsconfig.compilerOptions.moduleResolution = 'bundler';
32+
tsconfig.files.push('good.ts', 'bad.ts');
33+
await harness.writeFile('src/tsconfig.app.json', JSON.stringify(tsconfig));
34+
}
35+
36+
/** Update package.json with the given mapping for #target. */
37+
export async function setTargetMapping(harness: BuilderHarness<unknown>, mapping: unknown) {
38+
await harness.writeFile(
39+
'package.json',
40+
JSON.stringify({
41+
name: 'ng-test-app',
42+
imports: {
43+
'#target': mapping,
44+
},
45+
}),
46+
);
47+
}
48+
49+
interface TypeScriptConfig {
50+
compilerOptions: {
51+
moduleResolution: string;
52+
};
53+
files: string[];
54+
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/devkit-repo",
3-
"version": "19.0.0-next.9",
3+
"version": "19.0.0-next.10",
44
"private": true,
55
"description": "Software Development Kit for Angular",
66
"keywords": [
@@ -138,7 +138,7 @@
138138
"eslint-config-prettier": "9.1.0",
139139
"eslint-plugin-header": "3.1.1",
140140
"eslint-plugin-import": "2.31.0",
141-
"express": "4.21.0",
141+
"express": "4.21.1",
142142
"fast-glob": "3.3.2",
143143
"http-proxy": "^1.18.1",
144144
"http-proxy-middleware": "3.0.3",
@@ -199,8 +199,8 @@
199199
"tree-kill": "1.2.2",
200200
"ts-node": "^10.9.1",
201201
"tslib": "2.7.0",
202-
"typescript": "5.6.2",
203-
"undici": "6.19.8",
202+
"typescript": "5.6.3",
203+
"undici": "6.20.0",
204204
"unenv": "^1.10.0",
205205
"verdaccio": "6.0.0",
206206
"verdaccio-auth-memory": "^10.0.0",
@@ -225,6 +225,6 @@
225225
},
226226
"resolutions": {
227227
"@bazel/concatjs@npm:5.8.1": "patch:@bazel/concatjs@npm%3A5.8.1#~/.yarn/patches/@bazel-concatjs-npm-5.8.1-1bf81df846.patch",
228-
"@microsoft/api-extractor/typescript": "5.6.2"
228+
"@microsoft/api-extractor/typescript": "5.6.3"
229229
}
230230
}

packages/angular/build/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"https-proxy-agent": "7.0.5",
3434
"istanbul-lib-instrument": "6.0.3",
3535
"listr2": "8.2.5",
36-
"lmdb": "3.1.3",
3736
"magic-string": "0.30.11",
3837
"mrmime": "2.0.0",
3938
"parse5-html-rewriting-stream": "7.0.0",
@@ -45,6 +44,9 @@
4544
"vite": "5.4.8",
4645
"watchpack": "2.4.2"
4746
},
47+
"optionalDependencies": {
48+
"lmdb": "3.1.3"
49+
},
4850
"peerDependencies": {
4951
"@angular/compiler": "^19.0.0-next.0",
5052
"@angular/compiler-cli": "^19.0.0-next.0",

packages/angular/build/src/builders/application/execute-post-bundle.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
} from '../../utils/server-rendering/models';
3030
import { prerenderPages } from '../../utils/server-rendering/prerender';
3131
import { augmentAppWithServiceWorkerEsbuild } from '../../utils/service-worker';
32-
import { INDEX_HTML_SERVER, NormalizedApplicationBuildOptions } from './options';
32+
import { INDEX_HTML_CSR, INDEX_HTML_SERVER, NormalizedApplicationBuildOptions } from './options';
3333
import { OutputMode } from './schema';
3434

3535
/**
@@ -154,7 +154,15 @@ export async function executePostBundleSteps(
154154
// Update the index contents with the app shell under these conditions:
155155
// - Replace 'index.html' with the app shell only if it hasn't been prerendered yet.
156156
// - Always replace 'index.csr.html' with the app shell.
157-
const filePath = appShellRoute && !indexHasBeenPrerendered ? indexHtmlOptions.output : path;
157+
let filePath = path;
158+
if (appShellRoute && !indexHasBeenPrerendered) {
159+
if (outputMode !== OutputMode.Server && indexHtmlOptions.output === INDEX_HTML_CSR) {
160+
filePath = 'index.html';
161+
} else {
162+
filePath = indexHtmlOptions.output;
163+
}
164+
}
165+
158166
additionalHtmlOutputFiles.set(
159167
filePath,
160168
createOutputFile(filePath, content, BuildOutputFileType.Browser),

packages/angular/build/src/builders/application/options.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
import { urlJoin } from '../../utils/url';
2828
import {
2929
Schema as ApplicationBuilderOptions,
30+
ExperimentalPlatform,
3031
I18NTranslation,
3132
OutputHashing,
3233
OutputMode,
@@ -264,10 +265,11 @@ export async function normalizeOptions(
264265
if (options.ssr === true) {
265266
ssrOptions = {};
266267
} else if (typeof options.ssr === 'object') {
267-
const { entry } = options.ssr;
268+
const { entry, experimentalPlatform = ExperimentalPlatform.Node } = options.ssr;
268269

269270
ssrOptions = {
270271
entry: entry && path.join(workspaceRoot, entry),
272+
platform: experimentalPlatform,
271273
};
272274
}
273275

packages/angular/build/src/builders/application/schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,11 @@
518518
"entry": {
519519
"type": "string",
520520
"description": "The server entry-point that when executed will spawn the web server."
521+
},
522+
"experimentalPlatform": {
523+
"description": "Specifies the platform for which the server bundle is generated. This affects the APIs and modules available in the server-side code. \n\n- `node`: (Default) Generates a bundle optimized for Node.js environments. \n- `neutral`: Generates a platform-neutral bundle suitable for environments like edge workers, and other serverless platforms. This option avoids using Node.js-specific APIs, making the bundle more portable. \n\nPlease note that this feature does not provide polyfills for Node.js modules. Additionally, it is experimental, and the schematics may undergo changes in future versions.",
524+
"default": "node",
525+
"enum": ["node", "neutral"]
521526
}
522527
},
523528
"additionalProperties": false

0 commit comments

Comments
 (0)