diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c63493016fc7..4907adfb2132 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,30 +97,30 @@ jobs: - name: Run CLI E2E tests run: pnpm bazel test --test_env=E2E_SHARD_TOTAL=6 --test_env=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }} - e2e_windows: - strategy: - fail-fast: false - matrix: - os: [windows-2025] - node: [22] - subset: [npm, esbuild] - shard: [0, 1, 2, 3, 4, 5] - runs-on: ${{ matrix.os }} - steps: - - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1f047e7dbae43ea969c2cafb53b33207e86b800f - - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@1f047e7dbae43ea969c2cafb53b33207e86b800f - with: - allow_windows_rbe: true - google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }} - - name: Run CLI E2E tests - uses: ./.github/shared-actions/windows-bazel-test - with: - test_target_name: e2e.${{ matrix.subset }}_node${{ matrix.node }} - env: - E2E_SHARD_TOTAL: 6 - E2E_SHARD_INDEX: ${{ matrix.shard }} + # e2e_windows: + # strategy: + # fail-fast: false + # matrix: + # os: [windows-2025] + # node: [22] + # subset: [npm, esbuild] + # shard: [0, 1, 2, 3, 4, 5] + # runs-on: ${{ matrix.os }} + # steps: + # - name: Initialize environment + # uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1f047e7dbae43ea969c2cafb53b33207e86b800f + # - name: Setup Bazel RBE + # uses: angular/dev-infra/github-actions/bazel/configure-remote@1f047e7dbae43ea969c2cafb53b33207e86b800f + # with: + # allow_windows_rbe: true + # google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }} + # - name: Run CLI E2E tests + # uses: ./.github/shared-actions/windows-bazel-test + # with: + # test_target_name: e2e.${{ matrix.subset }}_node${{ matrix.node }} + # env: + # E2E_SHARD_TOTAL: 6 + # E2E_SHARD_INDEX: ${{ matrix.shard }} e2e-package-managers: needs: test diff --git a/.github/workflows/dev-infra.yml b/.github/workflows/dev-infra.yml index 158ea1779ef2..0a5c67972e8f 100644 --- a/.github/workflows/dev-infra.yml +++ b/.github/workflows/dev-infra.yml @@ -12,14 +12,14 @@ jobs: labels: runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: angular/dev-infra/github-actions/commit-message-based-labels@1f047e7dbae43ea969c2cafb53b33207e86b800f + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - uses: angular/dev-infra/github-actions/pull-request-labeling@3186a078ec23edea6e2f6192ed013ec57bd95f87 with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} post_approval_changes: runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: angular/dev-infra/github-actions/post-approval-changes@1f047e7dbae43ea969c2cafb53b33207e86b800f + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - uses: angular/dev-infra/github-actions/post-approval-changes@3186a078ec23edea6e2f6192ed013ec57bd95f87 with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 1c91c8c65948..2821a53e0eb4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -125,21 +125,21 @@ jobs: - name: Run CLI E2E tests run: pnpm bazel test --test_env=E2E_SHARD_TOTAL=6 --test_env=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }} - e2e-windows-subset: - needs: build - runs-on: windows-2025 - steps: - - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1f047e7dbae43ea969c2cafb53b33207e86b800f - - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@1f047e7dbae43ea969c2cafb53b33207e86b800f - with: - allow_windows_rbe: true - - name: Run CLI E2E tests - uses: ./.github/shared-actions/windows-bazel-test - with: - test_target_name: e2e_node22 - test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts" + # e2e-windows-subset: + # needs: build + # runs-on: windows-2025 + # steps: + # - name: Initialize environment + # uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@1f047e7dbae43ea969c2cafb53b33207e86b800f + # - name: Setup Bazel RBE + # uses: angular/dev-infra/github-actions/bazel/configure-remote@1f047e7dbae43ea969c2cafb53b33207e86b800f + # with: + # allow_windows_rbe: true + # - name: Run CLI E2E tests + # uses: ./.github/shared-actions/windows-bazel-test + # with: + # test_target_name: e2e_node22 + # test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts" e2e-package-managers: needs: build diff --git a/packages/angular/build/src/builders/application/tests/options/sourcemap_spec.ts b/packages/angular/build/src/builders/application/tests/options/sourcemap_spec.ts index a65df5eb8d32..b3e2e9731d6e 100644 --- a/packages/angular/build/src/builders/application/tests/options/sourcemap_spec.ts +++ b/packages/angular/build/src/builders/application/tests/options/sourcemap_spec.ts @@ -12,10 +12,7 @@ import { APPLICATION_BUILDER_INFO, BASE_OPTIONS, describeBuilder } from '../setu describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { describe('Option: "sourceMap"', () => { it('should not generate script sourcemap files by default', async () => { - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: undefined, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: undefined }); const { result } = await harness.executeOnce(); @@ -25,10 +22,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { }); it('should not generate script sourcemap files when false', async () => { - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: false, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: false }); const { result } = await harness.executeOnce(); @@ -38,10 +32,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { }); it('should not generate script sourcemap files when scripts suboption is false', async () => { - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: { scripts: false }, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: { scripts: false } }); const { result } = await harness.executeOnce(); @@ -51,10 +42,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { }); it('should generate script sourcemap files when true', async () => { - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: true, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: true }); const { result } = await harness.executeOnce(); @@ -64,10 +52,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { }); it('should generate script sourcemap files when scripts suboption is true', async () => { - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: { scripts: true }, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: { scripts: true } }); const { result } = await harness.executeOnce(); @@ -79,10 +64,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { it('should not include third-party sourcemaps when true', async () => { await harness.writeFile('src/polyfills.js', `console.log('main');`); - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: true, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: true }); const { result } = await harness.executeOnce(); @@ -95,10 +77,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { it('should not include third-party sourcemaps when vendor suboption is false', async () => { await harness.writeFile('src/polyfills.js', `console.log('main');`); - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: { scripts: true, vendor: false }, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: { scripts: true, vendor: false } }); const { result } = await harness.executeOnce(); @@ -111,17 +90,18 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { it('should include third-party sourcemaps when vendor suboption is true', async () => { await harness.writeFile('src/polyfills.js', `console.log('main');`); - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: { scripts: true, vendor: true }, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: { scripts: true, vendor: true } }); const { result } = await harness.executeOnce(); expect(result?.success).toBe(true); - harness.expectFile('dist/browser/main.js.map').content.toContain('/core/index.ts'); - harness.expectFile('dist/browser/main.js.map').content.toContain('/common/index.ts'); + harness + .expectFile('dist/browser/main.js.map') + .content.toContain('/core/src/application/application_ref.ts'); + harness + .expectFile('dist/browser/main.js.map') + .content.toContain('/common/src/directives/ng_if.ts'); }); it(`should not include 'sourceMappingURL' sourcemaps when hidden suboption is true`, async () => { @@ -193,10 +173,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { }); it('should add "x_google_ignoreList" extension to script sourcemap files when true', async () => { - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: true, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: true }); const { result } = await harness.executeOnce(); @@ -208,10 +185,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { it('should generate component sourcemaps when sourcemaps when true', async () => { await harness.writeFile('src/app/app.component.css', `* { color: red}`); - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: true, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: true }); const { result } = await harness.executeOnce(); @@ -226,10 +200,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => { it('should not generate component sourcemaps when sourcemaps when false', async () => { await harness.writeFile('src/app/app.component.css', `* { color: red}`); - harness.useTarget('build', { - ...BASE_OPTIONS, - sourceMap: false, - }); + harness.useTarget('build', { ...BASE_OPTIONS, sourceMap: false }); const { result } = await harness.executeOnce(); diff --git a/packages/angular_devkit/build_angular/src/builders/browser/specs/vendor-source-map_spec.ts b/packages/angular_devkit/build_angular/src/builders/browser/specs/vendor-source-map_spec.ts index e824b04d3406..3c0997b94b0e 100644 --- a/packages/angular_devkit/build_angular/src/builders/browser/specs/vendor-source-map_spec.ts +++ b/packages/angular_devkit/build_angular/src/builders/browser/specs/vendor-source-map_spec.ts @@ -25,13 +25,7 @@ describe('Browser Builder external source map', () => { afterEach(async () => host.restore().toPromise()); it('works', async () => { - const overrides = { - sourceMap: { - scripts: true, - styles: true, - vendor: true, - }, - }; + const overrides = { sourceMap: { scripts: true, styles: true, vendor: true } }; const { files } = await browserBuild(architect, host, target, overrides); const sourcePaths: string[] = JSON.parse(await files['vendor.js.map']).sources; @@ -40,13 +34,7 @@ describe('Browser Builder external source map', () => { }); it('does not map sourcemaps from external library when disabled', async () => { - const overrides = { - sourceMap: { - scripts: true, - styles: true, - vendor: false, - }, - }; + const overrides = { sourceMap: { scripts: true, styles: true, vendor: false } }; const { files } = await browserBuild(architect, host, target, overrides); const sourcePaths: string[] = JSON.parse(await files['vendor.js.map']).sources; @@ -71,12 +59,7 @@ describe('Identifying third-party code in source maps', () => { afterEach(async () => host.restore().toPromise()); it('specifies which sources are third party when vendor processing is disabled', async () => { - const overrides = { - sourceMap: { - scripts: true, - vendor: false, - }, - }; + const overrides = { sourceMap: { scripts: true, vendor: false } }; const { files } = await browserBuild(architect, host, target, overrides); const mainMap: SourceMap = JSON.parse(await files['main.js.map']); @@ -104,11 +87,14 @@ describe('Identifying third-party code in source maps', () => { expect(thirdPartyInVendor).toBe(true, `vendor.js.map should include some node modules`); // All sources in the main map are first-party. - expect(mainMap.sources.filter((_, i) => !mainMap[IGNORE_LIST].includes(i))).toEqual([ + const sources = mainMap.sources.filter((_, i) => !mainMap[IGNORE_LIST].includes(i)); + sources.sort(); + + expect(sources).toEqual([ + './src/app/app.component.css', './src/app/app.component.ts', './src/app/app.module.ts', './src/main.ts', - './src/app/app.component.css', ]); // Only some sources in the polyfills map are first-party. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 80b57f10f0c0..515ee7394612 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -235,7 +235,7 @@ importers: version: 3.0.3(debug@4.4.0) browserslist: specifier: ^4.21.5 - version: 4.24.4 + version: 4.25.4 buffer: specifier: 6.0.3 version: 6.0.3 @@ -561,7 +561,7 @@ importers: version: 0.3.2 browserslist: specifier: ^4.23.0 - version: 4.24.4 + version: 4.25.4 esbuild: specifier: 0.25.4 version: 0.25.4 @@ -817,7 +817,7 @@ importers: version: 9.2.1(@babel/core@7.26.10)(webpack@5.98.0(esbuild@0.25.4)) browserslist: specifier: ^4.21.5 - version: 4.24.4 + version: 4.25.4 copy-webpack-plugin: specifier: 12.0.2 version: 12.0.2(webpack@5.98.0(esbuild@0.25.4)) @@ -3837,8 +3837,8 @@ packages: browserify-zlib@0.1.4: resolution: {integrity: sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==} - browserslist@4.24.4: - resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} + browserslist@4.25.4: + resolution: {integrity: sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -3907,8 +3907,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001703: - resolution: {integrity: sha512-kRlAGTRWgPsOj7oARC9m1okJEXdL/8fekFVcxA8Hl7GH4r/sN4OJn/i6Flde373T50KS7Y37oFbMwlE8+F42kQ==} + caniuse-lite@1.0.30001741: + resolution: {integrity: sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -4461,8 +4461,8 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.114: - resolution: {integrity: sha512-DFptFef3iktoKlFQK/afbo274/XNWD00Am0xa7M8FZUepHlHT8PEuiNBoRfFHbH1okqN58AlhbJ4QTkcnXorjA==} + electron-to-chromium@1.5.217: + resolution: {integrity: sha512-Pludfu5iBxp9XzNl0qq2G87hdD17ZV7h5T4n6rQXDi3nCyloBV3jreE9+8GC6g4X/5yxqVgXEURpcLtM0WS4jA==} emoji-regex@10.4.0: resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} @@ -6932,7 +6932,7 @@ packages: puppeteer@18.2.1: resolution: {integrity: sha512-7+UhmYa7wxPh2oMRwA++k8UGVDxh3YdWFB52r9C3tM81T6BU7cuusUSxImz0GEYSOYUKk/YzIhkQ6+vc0gHbxQ==} engines: {node: '>=14.1.0'} - deprecated: < 22.8.2 is no longer supported + deprecated: < 24.10.2 is no longer supported q@1.4.1: resolution: {integrity: sha512-/CdEdaw49VZVmyIDGUQKDDT53c7qBkO6g5CefWz91Ae+l4+cRtcDYwMTXh6me4O8TMldeGHG3N2Bl84V78Ywbg==} @@ -8695,7 +8695,7 @@ snapshots: dependencies: '@babel/compat-data': 7.26.8 '@babel/helper-validator-option': 7.25.9 - browserslist: 4.24.4 + browserslist: 4.25.4 lru-cache: 5.1.1 semver: 6.3.1 @@ -11695,8 +11695,8 @@ snapshots: autoprefixer@10.4.20(postcss@8.5.2): dependencies: - browserslist: 4.24.4 - caniuse-lite: 1.0.30001703 + browserslist: 4.25.4 + caniuse-lite: 1.0.30001741 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.1.1 @@ -11917,12 +11917,12 @@ snapshots: dependencies: pako: 0.2.9 - browserslist@4.24.4: + browserslist@4.25.4: dependencies: - caniuse-lite: 1.0.30001703 - electron-to-chromium: 1.5.114 + caniuse-lite: 1.0.30001741 + electron-to-chromium: 1.5.217 node-releases: 2.0.19 - update-browserslist-db: 1.1.3(browserslist@4.24.4) + update-browserslist-db: 1.1.3(browserslist@4.25.4) browserstack@1.6.1: dependencies: @@ -11999,7 +11999,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001703: {} + caniuse-lite@1.0.30001741: {} caseless@0.12.0: {} @@ -12259,7 +12259,7 @@ snapshots: core-js-compat@3.41.0: dependencies: - browserslist: 4.24.4 + browserslist: 4.25.4 core-js@3.37.1: {} @@ -12556,7 +12556,7 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.114: {} + electron-to-chromium@1.5.217: {} emoji-regex@10.4.0: {} @@ -14653,7 +14653,7 @@ snapshots: '@rollup/wasm-node': 4.35.0 ajv: 8.17.1 ansi-colors: 4.1.3 - browserslist: 4.24.4 + browserslist: 4.25.4 chokidar: 4.0.3 commander: 13.1.0 convert-source-map: 2.0.0 @@ -16611,9 +16611,9 @@ snapshots: unpipe@1.0.0: {} - update-browserslist-db@1.1.3(browserslist@4.24.4): + update-browserslist-db@1.1.3(browserslist@4.25.4): dependencies: - browserslist: 4.24.4 + browserslist: 4.25.4 escalade: 3.2.0 picocolors: 1.1.1 @@ -16871,7 +16871,7 @@ snapshots: '@webassemblyjs/wasm-edit': 1.14.1 '@webassemblyjs/wasm-parser': 1.14.1 acorn: 8.14.1 - browserslist: 4.24.4 + browserslist: 4.25.4 chrome-trace-event: 1.0.4 enhanced-resolve: 5.18.1 es-module-lexer: 1.6.0