Skip to content

Commit 71c4652

Browse files
author
Angular Builds
committed
d89c2cb refactor: use platformBrowser instead of platformBrowserTesting
1 parent 9939af1 commit 71c4652

File tree

6 files changed

+26
-25
lines changed

6 files changed

+26
-25
lines changed

package.json

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "@angular-devkit/build-angular",
3-
"version": "20.0.0-next.2+sha-5169f21",
3+
"version": "20.0.0-next.2+sha-d89c2cb",
44
"description": "Angular Webpack Build Facade",
55
"main": "src/index.js",
66
"typings": "src/index.d.ts",
77
"builders": "builders.json",
88
"dependencies": {
99
"@ampproject/remapping": "2.3.0",
10-
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#5169f21",
11-
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#5169f21",
12-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#5169f21",
13-
"@angular/build": "github:angular/angular-build-builds#5169f21",
10+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#d89c2cb",
11+
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#d89c2cb",
12+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#d89c2cb",
13+
"@angular/build": "github:angular/angular-build-builds#d89c2cb",
1414
"@babel/core": "7.26.10",
1515
"@babel/generator": "7.26.10",
1616
"@babel/helper-annotate-as-pure": "7.25.9",
@@ -21,7 +21,7 @@
2121
"@babel/preset-env": "7.26.9",
2222
"@babel/runtime": "7.26.10",
2323
"@discoveryjs/json-ext": "0.6.3",
24-
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#5169f21",
24+
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#d89c2cb",
2525
"@vitejs/plugin-basic-ssl": "2.0.0",
2626
"ansi-colors": "4.1.3",
2727
"autoprefixer": "10.4.21",
@@ -68,9 +68,10 @@
6868
"peerDependencies": {
6969
"@angular/compiler-cli": "^20.0.0 || ^20.0.0-next.0",
7070
"@angular/localize": "^20.0.0 || ^20.0.0-next.0",
71+
"@angular/platform-browser": "^20.0.0 || ^20.0.0-next.0",
7172
"@angular/platform-server": "^20.0.0 || ^20.0.0-next.0",
7273
"@angular/service-worker": "^20.0.0 || ^20.0.0-next.0",
73-
"@angular/ssr": "github:angular/angular-ssr-builds#5169f21",
74+
"@angular/ssr": "github:angular/angular-ssr-builds#d89c2cb",
7475
"@web/test-runner": "^0.20.0",
7576
"browser-sync": "^3.0.2",
7677
"jest": "^29.5.0",
@@ -85,13 +86,16 @@
8586
"@angular/localize": {
8687
"optional": true
8788
},
89+
"@angular/platform-browser": {
90+
"optional": true
91+
},
8892
"@angular/platform-server": {
8993
"optional": true
9094
},
9195
"@angular/service-worker": {
9296
"optional": true
9397
},
94-
"@angular/ssr": "github:angular/angular-ssr-builds#5169f21",
98+
"@angular/ssr": "github:angular/angular-ssr-builds#d89c2cb",
9599
"@web/test-runner": {
96100
"optional": true
97101
},

src/builders/jest/init-test-bed.mjs

+4-5
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
// `@angular-devkit/build-angular` rather than the user's workspace. Should look into virtual modules to support those use cases.
1111

1212
import { getTestBed } from '@angular/core/testing';
13-
import {
14-
BrowserDynamicTestingModule,
15-
platformBrowserDynamicTesting,
16-
} from '@angular/platform-browser-dynamic/testing';
13+
import { platformBrowser } from '@angular/platform-browser';
14+
import { BrowserTestingModule } from '@angular/platform-browser/testing';
1715

18-
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
16+
// TODO(alanagius): replace with `platformBrowserTesting` once https://github.com/angular/angular/pull/60480 is released.
17+
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowser(), {
1918
errorOnUnknownElements: true,
2019
errorOnUnknownProperties: true,
2120
});

src/builders/karma/browser_builder.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,12 @@ async function initializeBrowser(options, context, webpackConfigurationTransform
132132
function getBuiltInMainFile() {
133133
const content = Buffer.from(`
134134
import { getTestBed } from '@angular/core/testing';
135-
import {
136-
BrowserDynamicTestingModule,
137-
platformBrowserDynamicTesting,
138-
} from '@angular/platform-browser-dynamic/testing';
135+
import { platformBrowser } from '@angular/platform-browser';
136+
import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
139137
138+
// TODO(alanagius): replace with \`platformBrowserTesting\` once https://github.com/angular/angular/pull/60480 is released.
140139
// Initialize the Angular testing environment.
141-
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
140+
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowser(), {
142141
errorOnUnknownElements: true,
143142
errorOnUnknownProperties: true
144143
});

src/builders/web-test-runner/jasmine_runner.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
*/
88

99
import { getTestBed } from '@angular/core/testing';
10-
import {
11-
BrowserDynamicTestingModule,
12-
platformBrowserDynamicTesting,
13-
} from '@angular/platform-browser-dynamic/testing';
10+
import { platformBrowser } from '@angular/platform-browser';
11+
import { BrowserTestingModule } from '@angular/platform-browser/testing';
1412
import {
1513
getConfig,
1614
sessionFailed,
@@ -67,7 +65,8 @@ export async function runJasmineTests(jasmineEnv) {
6765
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.defaultTimeoutInterval;
6866

6967
// Initialize `TestBed` automatically for users. This assumes we already evaluated `zone.js/testing`.
70-
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
68+
// TODO(alanagius): replace with `platformBrowserTesting` once https://github.com/angular/angular/pull/60480 is released.
69+
getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowser(), {
7170
errorOnUnknownElements: true,
7271
errorOnUnknownProperties: true,
7372
});

src/utils/normalize-cache.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
1010
exports.normalizeCacheOptions = normalizeCacheOptions;
1111
const node_path_1 = require("node:path");
1212
/** Version placeholder is replaced during the build process with actual package version */
13-
const VERSION = '20.0.0-next.2+sha-5169f21';
13+
const VERSION = '20.0.0-next.2+sha-d89c2cb';
1414
function hasCacheMetadata(value) {
1515
return (!!value &&
1616
typeof value === 'object' &&

uniqueId

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Thu Mar 20 2025 12:53:37 GMT+0000 (Coordinated Universal Time)
1+
Thu Mar 20 2025 13:18:30 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)