@angular-devkit/build-angular 17.2.0-rc.0 → 17.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "17.2.0-rc.0",
3
+ "version": "17.2.1",
4
4
  "description": "Angular Webpack Build Facade",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
7
7
  "builders": "builders.json",
8
8
  "dependencies": {
9
9
  "@ampproject/remapping": "2.2.1",
10
- "@angular-devkit/architect": "0.1702.0-rc.0",
11
- "@angular-devkit/build-webpack": "0.1702.0-rc.0",
12
- "@angular-devkit/core": "17.2.0-rc.0",
10
+ "@angular-devkit/architect": "0.1702.1",
11
+ "@angular-devkit/build-webpack": "0.1702.1",
12
+ "@angular-devkit/core": "17.2.1",
13
13
  "@babel/core": "7.23.9",
14
14
  "@babel/generator": "7.23.6",
15
15
  "@babel/helper-annotate-as-pure": "7.22.5",
@@ -20,14 +20,14 @@
20
20
  "@babel/preset-env": "7.23.9",
21
21
  "@babel/runtime": "7.23.9",
22
22
  "@discoveryjs/json-ext": "0.5.7",
23
- "@ngtools/webpack": "17.2.0-rc.0",
23
+ "@ngtools/webpack": "17.2.1",
24
24
  "@vitejs/plugin-basic-ssl": "1.1.0",
25
25
  "ansi-colors": "4.1.3",
26
26
  "autoprefixer": "10.4.17",
27
27
  "babel-loader": "9.1.3",
28
28
  "babel-plugin-istanbul": "6.1.1",
29
29
  "browserslist": "^4.21.5",
30
- "copy-webpack-plugin": "12.0.2",
30
+ "copy-webpack-plugin": "11.0.0",
31
31
  "critters": "0.0.20",
32
32
  "css-loader": "6.10.0",
33
33
  "esbuild-wasm": "0.20.0",
@@ -74,16 +74,16 @@
74
74
  "esbuild": "0.20.0"
75
75
  },
76
76
  "peerDependencies": {
77
- "@angular/compiler-cli": "^17.0.0 || ^17.2.0-next.0",
78
- "@angular/localize": "^17.0.0 || ^17.2.0-next.0",
79
- "@angular/platform-server": "^17.0.0 || ^17.2.0-next.0",
80
- "@angular/service-worker": "^17.0.0 || ^17.2.0-next.0",
77
+ "@angular/compiler-cli": "^17.0.0",
78
+ "@angular/localize": "^17.0.0",
79
+ "@angular/platform-server": "^17.0.0",
80
+ "@angular/service-worker": "^17.0.0",
81
81
  "@web/test-runner": "^0.18.0",
82
82
  "browser-sync": "^3.0.2",
83
83
  "jest": "^29.5.0",
84
84
  "jest-environment-jsdom": "^29.5.0",
85
85
  "karma": "^6.3.0",
86
- "ng-packagr": "^17.0.0 || ^17.2.0-next.0",
86
+ "ng-packagr": "^17.0.0",
87
87
  "protractor": "^7.0.0",
88
88
  "tailwindcss": "^2.0.0 || ^3.0.0",
89
89
  "typescript": ">=5.2 <5.4"
@@ -572,11 +572,11 @@
572
572
  "properties": {
573
573
  "replace": {
574
574
  "type": "string",
575
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
575
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
576
576
  },
577
577
  "with": {
578
578
  "type": "string",
579
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
579
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
580
580
  }
581
581
  },
582
582
  "additionalProperties": false,
@@ -473,11 +473,11 @@
473
473
  "properties": {
474
474
  "src": {
475
475
  "type": "string",
476
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
476
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
477
477
  },
478
478
  "replaceWith": {
479
479
  "type": "string",
480
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
480
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
481
481
  }
482
482
  },
483
483
  "additionalProperties": false,
@@ -488,11 +488,11 @@
488
488
  "properties": {
489
489
  "replace": {
490
490
  "type": "string",
491
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
491
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
492
492
  },
493
493
  "with": {
494
494
  "type": "string",
495
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
495
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
496
496
  }
497
497
  },
498
498
  "additionalProperties": false,
@@ -483,11 +483,11 @@
483
483
  "properties": {
484
484
  "replace": {
485
485
  "type": "string",
486
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
486
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
487
487
  },
488
488
  "with": {
489
489
  "type": "string",
490
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
490
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
491
491
  }
492
492
  },
493
493
  "additionalProperties": false,
@@ -163,8 +163,9 @@ async function* serveWithVite(serverOptions, builderName, context, transformers,
163
163
  externalMetadata.implicitServer.length = 0;
164
164
  externalMetadata.implicitBrowser.length = 0;
165
165
  externalMetadata.explicit.push(...explicit);
166
- externalMetadata.implicitServer.push(...implicitServer);
167
- externalMetadata.implicitBrowser.push(...implicitBrowser);
166
+ // Remove any absolute URLs (http://, https://, //) to avoid Vite's prebundling from processing them as files
167
+ externalMetadata.implicitServer.push(...implicitServer.filter((value) => !/^(?:https?:)?\/\//.test(value)));
168
+ externalMetadata.implicitBrowser.push(...implicitBrowser.filter((value) => !/^(?:https?:)?\/\//.test(value)));
168
169
  // The below needs to be sorted as Vite uses these options are part of the hashing invalidation algorithm.
169
170
  // See: https://github.com/vitejs/vite/blob/0873bae0cfe0f0718ad2f5743dd34a17e4ab563d/packages/vite/src/node/optimizer/index.ts#L1203-L1239
170
171
  externalMetadata.explicit.sort();
@@ -270,11 +270,11 @@
270
270
  "properties": {
271
271
  "src": {
272
272
  "type": "string",
273
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
273
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
274
274
  },
275
275
  "replaceWith": {
276
276
  "type": "string",
277
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
277
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
278
278
  }
279
279
  },
280
280
  "additionalProperties": false,
@@ -285,11 +285,11 @@
285
285
  "properties": {
286
286
  "replace": {
287
287
  "type": "string",
288
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
288
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
289
289
  },
290
290
  "with": {
291
291
  "type": "string",
292
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
292
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
293
293
  }
294
294
  },
295
295
  "additionalProperties": false,
@@ -42,13 +42,16 @@ function createAngularMemoryPlugin(options) {
42
42
  return (0, node_path_1.join)(virtualProjectRoot, source);
43
43
  }
44
44
  },
45
- load(id) {
45
+ async load(id) {
46
46
  const [file] = id.split('?', 1);
47
47
  const relativeFile = '/' + normalizePath((0, node_path_1.relative)(virtualProjectRoot, file));
48
48
  const codeContents = outputFiles.get(relativeFile)?.contents;
49
49
  if (codeContents === undefined) {
50
50
  if (relativeFile.endsWith('/node_modules/vite/dist/client/client.mjs')) {
51
- return loadViteClientCode(file);
51
+ return {
52
+ code: await loadViteClientCode(file),
53
+ map: await (0, promises_1.readFile)(file + '.map', 'utf-8'),
54
+ };
52
55
  }
53
56
  return;
54
57
  }
@@ -6,6 +6,6 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  export interface PostcssConfiguration {
9
- plugins: [name: string, options?: object][];
9
+ plugins: [name: string, options?: object | string][];
10
10
  }
11
11
  export declare function loadPostcssConfiguration(workspaceRoot: string, projectRoot: string): Promise<PostcssConfiguration | undefined>;
@@ -67,7 +67,7 @@ async function loadPostcssConfiguration(workspaceRoot, projectRoot) {
67
67
  }
68
68
  const config = { plugins: [] };
69
69
  for (const [name, options] of entries) {
70
- if (!options || typeof options !== 'object') {
70
+ if (!options || (typeof options !== 'object' && typeof options !== 'string')) {
71
71
  continue;
72
72
  }
73
73
  config.plugins.push([name, options]);