Skip to content

Commit 067b226

Browse files
author
Angular Builds
committed
69477fa test: add --disable-dev-shm-usage to address WebDriverError: unknown error: Chrome failed to start: crashed
1 parent fa6707a commit 067b226

File tree

7 files changed

+20
-24
lines changed

7 files changed

+20
-24
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@angular-devkit/build-angular",
3-
"version": "17.3.11+sha-29c6b0d",
3+
"version": "17.3.11+sha-69477fa",
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#29c6b0d",
11-
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#29c6b0d",
12-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#29c6b0d",
10+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#69477fa",
11+
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#69477fa",
12+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#69477fa",
1313
"@babel/core": "7.24.0",
1414
"@babel/generator": "7.23.6",
1515
"@babel/helper-annotate-as-pure": "7.22.5",
@@ -20,7 +20,7 @@
2020
"@babel/preset-env": "7.24.0",
2121
"@babel/runtime": "7.24.0",
2222
"@discoveryjs/json-ext": "0.5.7",
23-
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#29c6b0d",
23+
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#69477fa",
2424
"@vitejs/plugin-basic-ssl": "1.1.0",
2525
"ansi-colors": "4.1.3",
2626
"autoprefixer": "10.4.18",
@@ -62,7 +62,7 @@
6262
"tree-kill": "1.2.2",
6363
"tslib": "2.6.2",
6464
"undici": "6.11.1",
65-
"vite": "5.1.8",
65+
"vite": "5.4.14",
6666
"watchpack": "2.4.0",
6767
"webpack": "5.94.0",
6868
"webpack-dev-middleware": "6.1.2",

src/builders/dev-server/builder.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ function execute(options, context, transforms = {}, extensions) {
6767
if (options.prebundle && !normalizedOptions.cacheOptions.enabled) {
6868
context.logger.warn(`Prebundling has been configured but will not be used because caching has been disabled.`);
6969
}
70-
if (options.allowedHosts?.length) {
71-
context.logger.warn(`The "allowedHosts" option will not be used because it is not supported by the "${builderName}" builder.`);
72-
}
7370
if (options.publicHost) {
7471
context.logger.warn(`The "publicHost" option will not be used because it is not supported by the "${builderName}" builder.`);
7572
}

src/builders/dev-server/schema.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
*/
44
export interface Schema {
55
/**
6-
* List of hosts that are allowed to access the dev server. This option has no effect when
7-
* using the 'application' or other esbuild-based builders.
6+
* List of hosts that are allowed to access the dev server.
87
*/
98
allowedHosts?: string[];
109
/**

src/builders/dev-server/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
},
7474
"allowedHosts": {
7575
"type": "array",
76-
"description": "List of hosts that are allowed to access the dev server. This option has no effect when using the 'application' or other esbuild-based builders.",
76+
"description": "List of hosts that are allowed to access the dev server.",
7777
"default": [],
7878
"items": {
7979
"type": "string"

src/builders/dev-server/vite-server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks,
359359
strictPort: true,
360360
host: serverOptions.host,
361361
open: serverOptions.open,
362+
allowedHosts: serverOptions.allowedHosts,
362363
headers: serverOptions.headers,
363364
proxy,
364365
cors: {

src/tools/vite/angular-memory-plugin.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ function createAngularMemoryPlugin(options) {
4848
const codeContents = outputFiles.get(relativeFile)?.contents;
4949
if (codeContents === undefined) {
5050
if (relativeFile.endsWith('/node_modules/vite/dist/client/client.mjs')) {
51-
return {
52-
code: await loadViteClientCode(file),
53-
map: await (0, promises_1.readFile)(file + '.map', 'utf-8'),
54-
};
51+
return await loadViteClientCode(file);
5552
}
5653
return;
5754
}
@@ -232,13 +229,15 @@ exports.createAngularMemoryPlugin = createAngularMemoryPlugin;
232229
*/
233230
async function loadViteClientCode(file) {
234231
const originalContents = await (0, promises_1.readFile)(file, 'utf-8');
235-
const firstUpdate = originalContents.replace('You can also disable this overlay by setting', '');
236-
(0, node_assert_1.default)(originalContents !== firstUpdate, 'Failed to update Vite client error overlay text. (1)');
237-
const secondUpdate = firstUpdate.replace(
238-
// eslint-disable-next-line max-len
239-
'<code part="config-option-name">server.hmr.overlay</code> to <code part="config-option-value">false</code> in <code part="config-file-name">${hmrConfigName}.</code>', '');
240-
(0, node_assert_1.default)(firstUpdate !== secondUpdate, 'Failed to update Vite client error overlay text. (2)');
241-
return secondUpdate;
232+
const updatedContents = originalContents.replace(`"You can also disable this overlay by setting ",
233+
h("code", { part: "config-option-name" }, "server.hmr.overlay"),
234+
" to ",
235+
h("code", { part: "config-option-value" }, "false"),
236+
" in ",
237+
h("code", { part: "config-file-name" }, hmrConfigName),
238+
"."`, '');
239+
(0, node_assert_1.default)(originalContents !== updatedContents, 'Failed to update Vite client error overlay text.');
240+
return updatedContents;
242241
}
243242
function pathnameWithoutBasePath(url, basePath) {
244243
const parsedUrl = new URL(url, 'http://localhost');

uniqueId

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Thu Dec 05 2024 15:25:48 GMT+0000 (Coordinated Universal Time)
1+
Wed Feb 12 2025 16:38:50 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)