@angular/build 18.2.0-next.2 → 18.2.0-next.3
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 +8 -8
- package/src/builders/extract-i18n/builder.js +6 -0
- package/src/tools/esbuild/stylesheets/bundle-options.js +1 -1
- package/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.js +1 -1
- package/src/utils/index-file/index-html-generator.js +1 -0
- package/src/utils/normalize-cache.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/build",
|
|
3
|
-
"version": "18.2.0-next.
|
|
3
|
+
"version": "18.2.0-next.3",
|
|
4
4
|
"description": "Official build system for Angular",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Angular CLI",
|
|
@@ -23,29 +23,29 @@
|
|
|
23
23
|
"builders": "builders.json",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ampproject/remapping": "2.3.0",
|
|
26
|
-
"@angular-devkit/architect": "0.1802.0-next.
|
|
27
|
-
"@babel/core": "7.
|
|
26
|
+
"@angular-devkit/architect": "0.1802.0-next.3",
|
|
27
|
+
"@babel/core": "7.25.2",
|
|
28
28
|
"@babel/helper-annotate-as-pure": "7.24.7",
|
|
29
29
|
"@babel/helper-split-export-declaration": "7.24.7",
|
|
30
30
|
"@babel/plugin-syntax-import-attributes": "7.24.7",
|
|
31
|
-
"@inquirer/confirm": "3.1.
|
|
31
|
+
"@inquirer/confirm": "3.1.19",
|
|
32
32
|
"@vitejs/plugin-basic-ssl": "1.1.0",
|
|
33
33
|
"browserslist": "^4.23.0",
|
|
34
34
|
"critters": "0.0.24",
|
|
35
35
|
"esbuild": "0.23.0",
|
|
36
36
|
"fast-glob": "3.3.2",
|
|
37
37
|
"https-proxy-agent": "7.0.5",
|
|
38
|
-
"listr2": "8.2.
|
|
38
|
+
"listr2": "8.2.4",
|
|
39
39
|
"lmdb": "3.0.12",
|
|
40
|
-
"magic-string": "0.30.
|
|
40
|
+
"magic-string": "0.30.11",
|
|
41
41
|
"mrmime": "2.0.0",
|
|
42
42
|
"parse5-html-rewriting-stream": "7.0.0",
|
|
43
43
|
"picomatch": "4.0.2",
|
|
44
44
|
"piscina": "4.6.1",
|
|
45
|
-
"rollup": "4.19.
|
|
45
|
+
"rollup": "4.19.1",
|
|
46
46
|
"sass": "1.77.8",
|
|
47
47
|
"semver": "7.6.3",
|
|
48
|
-
"vite": "5.3.
|
|
48
|
+
"vite": "5.3.5",
|
|
49
49
|
"watchpack": "2.4.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
@@ -50,6 +50,12 @@ async function execute(options, context, extensions) {
|
|
|
50
50
|
context.logger.error(`The 'extract-i18n' builder requires a target to be specified.`);
|
|
51
51
|
return { success: false };
|
|
52
52
|
}
|
|
53
|
+
const { projectType } = (await context.getProjectMetadata(projectName));
|
|
54
|
+
if (projectType !== 'application') {
|
|
55
|
+
context.logger.error(`Tried to extract from ${projectName} with 'projectType' ${projectType}, which is not supported.` +
|
|
56
|
+
` The 'extract-i18n' builder can only extract from applications.`);
|
|
57
|
+
return { success: false };
|
|
58
|
+
}
|
|
53
59
|
// Check Angular version.
|
|
54
60
|
(0, version_1.assertCompatibleAngularVersion)(context.workspaceRoot);
|
|
55
61
|
// Load the Angular localize package.
|
|
@@ -35,7 +35,7 @@ function createStylesheetBundleOptions(options, cache, inlineComponentData) {
|
|
|
35
35
|
(0, css_resource_plugin_1.createCssResourcePlugin)(cache),
|
|
36
36
|
];
|
|
37
37
|
if (options.inlineFonts) {
|
|
38
|
-
plugins.
|
|
38
|
+
plugins.unshift((0, css_inline_fonts_plugin_1.createCssInlineFontsPlugin)({ cache, cacheOptions: options.cacheOptions }));
|
|
39
39
|
}
|
|
40
40
|
return {
|
|
41
41
|
absWorkingDir: options.workspaceRoot,
|
|
@@ -112,7 +112,7 @@ class StylesheetPluginFactory {
|
|
|
112
112
|
return processStylesheet(language, data, filename, format, options, build, postcssProcessor);
|
|
113
113
|
}));
|
|
114
114
|
// Add a load callback to support files from disk
|
|
115
|
-
build.onLoad({ filter: language.fileFilter }, (0, load_result_cache_1.createCachedLoad)(cache, async (args) => {
|
|
115
|
+
build.onLoad({ filter: language.fileFilter, namespace: 'file' }, (0, load_result_cache_1.createCachedLoad)(cache, async (args) => {
|
|
116
116
|
const data = await (0, promises_1.readFile)(args.path, 'utf-8');
|
|
117
117
|
return processStylesheet(language, data, args.path, (0, node_path_1.extname)(args.path).toLowerCase().slice(1), options, build, postcssProcessor);
|
|
118
118
|
}));
|
|
@@ -32,6 +32,7 @@ class IndexHtmlGenerator {
|
|
|
32
32
|
if (options?.optimization?.styles?.inlineCritical) {
|
|
33
33
|
this.csrPlugins.push(inlineCriticalCssPlugin(this));
|
|
34
34
|
}
|
|
35
|
+
this.csrPlugins.push(addNoncePlugin());
|
|
35
36
|
// SSR plugins
|
|
36
37
|
if (options.generateDedicatedSSRContent) {
|
|
37
38
|
this.ssrPlugins.push(addEventDispatchContractPlugin(), addNoncePlugin());
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.normalizeCacheOptions = normalizeCacheOptions;
|
|
11
11
|
const node_path_1 = require("node:path");
|
|
12
12
|
/** Version placeholder is replaced during the build process with actual package version */
|
|
13
|
-
const VERSION = '18.2.0-next.
|
|
13
|
+
const VERSION = '18.2.0-next.3';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|