@angular-devkit/build-angular 14.0.0-next.4 → 14.0.0-next.5
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/README.md +10 -10
- package/package.json +14 -14
- package/src/builders/browser/schema.d.ts +0 -1
- package/src/builders/browser/schema.json +2 -3
- package/src/builders/server/schema.json +1 -2
- package/src/utils/delete-output-dir.js +1 -8
- package/src/utils/i18n-options.js +1 -8
- package/src/utils/purge-cache.js +1 -5
- package/src/webpack/plugins/named-chunks-plugin.js +5 -0
package/README.md
CHANGED
|
@@ -4,16 +4,16 @@ This package contains [Architect builders](/packages/angular_devkit/architect/RE
|
|
|
4
4
|
|
|
5
5
|
## Builders
|
|
6
6
|
|
|
7
|
-
| Name | Description
|
|
8
|
-
| ------------ |
|
|
9
|
-
| app-shell | Build an Angular [App shell](https://angular.io/guide/app-shell).
|
|
10
|
-
| browser | Build an Angular application targeting a browser environment.
|
|
11
|
-
| dev-server | A development server that provides live reloading.
|
|
12
|
-
| extract-i18n | Extract i18n messages from an Angular application.
|
|
13
|
-
| karma | Execute unit tests using [Karma](https://github.com/karma-runner/karma) test runner.
|
|
14
|
-
| ng-packagr | Build and package an Angular library in [Angular Package Format (APF)](https://
|
|
15
|
-
| server | Build an Angular application targeting a [Node.js](https://nodejs.org) environment.
|
|
16
|
-
| protractor | **Deprecated** - Run end-to-end tests using [Protractor](https://www.protractortest.org/) framework.
|
|
7
|
+
| Name | Description |
|
|
8
|
+
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| app-shell | Build an Angular [App shell](https://angular.io/guide/app-shell). |
|
|
10
|
+
| browser | Build an Angular application targeting a browser environment. |
|
|
11
|
+
| dev-server | A development server that provides live reloading. |
|
|
12
|
+
| extract-i18n | Extract i18n messages from an Angular application. |
|
|
13
|
+
| karma | Execute unit tests using [Karma](https://github.com/karma-runner/karma) test runner. |
|
|
14
|
+
| ng-packagr | Build and package an Angular library in [Angular Package Format (APF)](https://angular.io/guide/angular-package-format) format using [ng-packagr](https://github.com/ng-packagr/ng-packagr). |
|
|
15
|
+
| server | Build an Angular application targeting a [Node.js](https://nodejs.org) environment. |
|
|
16
|
+
| protractor | **Deprecated** - Run end-to-end tests using [Protractor](https://www.protractortest.org/) framework. |
|
|
17
17
|
|
|
18
18
|
## Disclaimer
|
|
19
19
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "14.0.0-next.
|
|
3
|
+
"version": "14.0.0-next.5",
|
|
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.1.2",
|
|
10
|
-
"@angular-devkit/architect": "0.1400.0-next.
|
|
11
|
-
"@angular-devkit/build-webpack": "0.1400.0-next.
|
|
12
|
-
"@angular-devkit/core": "14.0.0-next.
|
|
10
|
+
"@angular-devkit/architect": "0.1400.0-next.5",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.1400.0-next.5",
|
|
12
|
+
"@angular-devkit/core": "14.0.0-next.5",
|
|
13
13
|
"@babel/core": "7.17.5",
|
|
14
14
|
"@babel/generator": "7.17.3",
|
|
15
15
|
"@babel/helper-annotate-as-pure": "7.16.7",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@babel/runtime": "7.17.2",
|
|
21
21
|
"@babel/template": "7.16.7",
|
|
22
22
|
"@discoveryjs/json-ext": "0.5.6",
|
|
23
|
-
"@ngtools/webpack": "14.0.0-next.
|
|
23
|
+
"@ngtools/webpack": "14.0.0-next.5",
|
|
24
24
|
"ansi-colors": "4.1.1",
|
|
25
25
|
"babel-loader": "8.2.3",
|
|
26
26
|
"babel-plugin-istanbul": "6.1.1",
|
|
@@ -29,27 +29,27 @@
|
|
|
29
29
|
"copy-webpack-plugin": "10.2.4",
|
|
30
30
|
"core-js": "3.21.1",
|
|
31
31
|
"critters": "0.0.16",
|
|
32
|
-
"css-loader": "6.
|
|
33
|
-
"esbuild-wasm": "0.14.
|
|
32
|
+
"css-loader": "6.7.1",
|
|
33
|
+
"esbuild-wasm": "0.14.25",
|
|
34
34
|
"glob": "7.2.0",
|
|
35
35
|
"https-proxy-agent": "5.0.0",
|
|
36
|
-
"inquirer": "8.2.
|
|
36
|
+
"inquirer": "8.2.1",
|
|
37
37
|
"jsonc-parser": "3.0.0",
|
|
38
38
|
"karma-source-map-support": "1.4.0",
|
|
39
39
|
"less": "4.1.2",
|
|
40
40
|
"less-loader": "10.2.0",
|
|
41
41
|
"license-webpack-plugin": "4.0.2",
|
|
42
42
|
"loader-utils": "3.2.0",
|
|
43
|
-
"mini-css-extract-plugin": "2.
|
|
43
|
+
"mini-css-extract-plugin": "2.6.0",
|
|
44
44
|
"minimatch": "5.0.1",
|
|
45
45
|
"open": "8.4.0",
|
|
46
46
|
"ora": "5.4.1",
|
|
47
47
|
"parse5-html-rewriting-stream": "6.0.1",
|
|
48
48
|
"piscina": "3.2.0",
|
|
49
|
-
"postcss": "8.4.
|
|
49
|
+
"postcss": "8.4.8",
|
|
50
50
|
"postcss-import": "14.0.2",
|
|
51
51
|
"postcss-loader": "6.2.1",
|
|
52
|
-
"postcss-preset-env": "7.4.
|
|
52
|
+
"postcss-preset-env": "7.4.2",
|
|
53
53
|
"regenerator-runtime": "0.13.9",
|
|
54
54
|
"resolve-url-loader": "5.0.0",
|
|
55
55
|
"rxjs": "6.6.7",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"text-table": "0.2.0",
|
|
65
65
|
"tree-kill": "1.2.2",
|
|
66
66
|
"tslib": "2.3.1",
|
|
67
|
-
"webpack": "5.
|
|
67
|
+
"webpack": "5.70.0",
|
|
68
68
|
"webpack-dev-middleware": "5.3.1",
|
|
69
69
|
"webpack-dev-server": "4.7.4",
|
|
70
70
|
"webpack-merge": "5.8.0",
|
|
71
71
|
"webpack-subresource-integrity": "5.1.0"
|
|
72
72
|
},
|
|
73
73
|
"optionalDependencies": {
|
|
74
|
-
"esbuild": "0.14.
|
|
74
|
+
"esbuild": "0.14.25"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@angular/compiler-cli": "^14.0.0 || ^14.0.0-next",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"url": "https://github.com/angular/angular-cli.git"
|
|
116
116
|
},
|
|
117
117
|
"engines": {
|
|
118
|
-
"node": "^
|
|
118
|
+
"node": "^14.15.0 || >=16.10.0",
|
|
119
119
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
120
120
|
"yarn": ">= 1.13.0"
|
|
121
121
|
},
|
|
@@ -98,7 +98,6 @@ export interface Schema {
|
|
|
98
98
|
outputHashing?: OutputHashing;
|
|
99
99
|
/**
|
|
100
100
|
* The full path for the new output directory, relative to the current workspace.
|
|
101
|
-
*
|
|
102
101
|
* By default, writes output to a folder named dist/ in the current project.
|
|
103
102
|
*/
|
|
104
103
|
outputPath: string;
|
|
@@ -193,12 +193,11 @@
|
|
|
193
193
|
},
|
|
194
194
|
"outputPath": {
|
|
195
195
|
"type": "string",
|
|
196
|
-
"description": "The full path for the new output directory, relative to the current workspace.\
|
|
196
|
+
"description": "The full path for the new output directory, relative to the current workspace.\nBy default, writes output to a folder named dist/ in the current project."
|
|
197
197
|
},
|
|
198
198
|
"resourcesOutputPath": {
|
|
199
199
|
"type": "string",
|
|
200
|
-
"description": "The path where style resources will be placed, relative to outputPath."
|
|
201
|
-
"default": ""
|
|
200
|
+
"description": "The path where style resources will be placed, relative to outputPath."
|
|
202
201
|
},
|
|
203
202
|
"aot": {
|
|
204
203
|
"type": "boolean",
|
|
@@ -74,8 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"resourcesOutputPath": {
|
|
76
76
|
"type": "string",
|
|
77
|
-
"description": "The path where style resources will be placed, relative to outputPath."
|
|
78
|
-
"default": ""
|
|
77
|
+
"description": "The path where style resources will be placed, relative to outputPath."
|
|
79
78
|
},
|
|
80
79
|
"sourceMap": {
|
|
81
80
|
"description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
|
|
@@ -37,13 +37,6 @@ function deleteOutputDir(root, outputPath) {
|
|
|
37
37
|
if (resolvedOutputPath === root) {
|
|
38
38
|
throw new Error('Output path MUST not be project root directory!');
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
const { rmSync, rmdirSync } = fs;
|
|
42
|
-
if (rmSync) {
|
|
43
|
-
rmSync(resolvedOutputPath, { force: true, recursive: true, maxRetries: 3 });
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
rmdirSync(resolvedOutputPath, { recursive: true, maxRetries: 3 });
|
|
47
|
-
}
|
|
40
|
+
fs.rmSync(resolvedOutputPath, { force: true, recursive: true, maxRetries: 3 });
|
|
48
41
|
}
|
|
49
42
|
exports.deleteOutputDir = deleteOutputDir;
|
|
@@ -203,15 +203,8 @@ function findLocaleDataPath(locale, resolver) {
|
|
|
203
203
|
}
|
|
204
204
|
/** Remove temporary directory used for i18n processing. */
|
|
205
205
|
function deleteTempDirectory(tempPath) {
|
|
206
|
-
// The below should be removed and replaced with just `rmSync` when support for Node.Js 12 is removed.
|
|
207
|
-
const { rmSync, rmdirSync } = fs_1.default;
|
|
208
206
|
try {
|
|
209
|
-
|
|
210
|
-
rmSync(tempPath, { force: true, recursive: true, maxRetries: 3 });
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
rmdirSync(tempPath, { recursive: true, maxRetries: 3 });
|
|
214
|
-
}
|
|
207
|
+
fs_1.default.rmSync(tempPath, { force: true, recursive: true, maxRetries: 3 });
|
|
215
208
|
}
|
|
216
209
|
catch { }
|
|
217
210
|
}
|
package/src/utils/purge-cache.js
CHANGED
|
@@ -23,16 +23,12 @@ async function purgeStaleBuildCache(context) {
|
|
|
23
23
|
if (!enabled || !(0, fs_1.existsSync)(basePath)) {
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
// The below should be removed and replaced with just `rm` when support for Node.Js 12 is removed.
|
|
27
|
-
const { rm, rmdir } = fs_1.promises;
|
|
28
26
|
const entriesToDelete = (await fs_1.promises.readdir(basePath, { withFileTypes: true }))
|
|
29
27
|
.filter((d) => (0, path_1.join)(basePath, d.name) !== path && d.isDirectory())
|
|
30
28
|
.map((d) => {
|
|
31
29
|
const subPath = (0, path_1.join)(basePath, d.name);
|
|
32
30
|
try {
|
|
33
|
-
return rm
|
|
34
|
-
? rm(subPath, { force: true, recursive: true, maxRetries: 3 })
|
|
35
|
-
: rmdir(subPath, { recursive: true, maxRetries: 3 });
|
|
31
|
+
return fs_1.promises.rm(subPath, { force: true, recursive: true, maxRetries: 3 });
|
|
36
32
|
}
|
|
37
33
|
catch { }
|
|
38
34
|
});
|
|
@@ -24,6 +24,11 @@ class NamedChunksPlugin {
|
|
|
24
24
|
if (chunk.name) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
+
if ([...chunk.files.values()].every((f) => f.endsWith('.css'))) {
|
|
28
|
+
// If all chunk files are CSS files skip.
|
|
29
|
+
// This happens when using `import('./styles.css')` in a lazy loaded module.
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
27
32
|
const name = this.generateName(chunk);
|
|
28
33
|
if (name) {
|
|
29
34
|
chunk.name = name;
|