@angular/build 18.1.0-rc.1 → 18.2.0-next.0
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 +11 -12
- package/src/tools/angular/compilation/aot-compilation.js +3 -1
- package/src/tools/angular/compilation/parallel-worker.d.ts +1 -0
- package/src/tools/angular/compilation/parallel-worker.js +2 -1
- package/src/tools/esbuild/angular/compiler-plugin.js +3 -1
- package/src/tools/esbuild/application-code-bundle.js +2 -1
- package/src/tools/esbuild/wasm-plugin.js +2 -1
- package/src/utils/normalize-cache.js +1 -1
- package/src/utils/server-rendering/fetch-patch.js +4 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/build",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0-next.0",
|
|
4
4
|
"description": "Official build system for Angular",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Angular CLI",
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"builders": "builders.json",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ampproject/remapping": "2.3.0",
|
|
26
|
-
"@angular-devkit/architect": "0.
|
|
26
|
+
"@angular-devkit/architect": "0.1802.0-next.0",
|
|
27
27
|
"@babel/core": "7.24.7",
|
|
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.14",
|
|
32
32
|
"@vitejs/plugin-basic-ssl": "1.1.0",
|
|
33
33
|
"ansi-colors": "4.1.3",
|
|
34
34
|
"browserslist": "^4.23.0",
|
|
35
35
|
"critters": "0.0.24",
|
|
36
|
-
"esbuild": "0.
|
|
36
|
+
"esbuild": "0.23.0",
|
|
37
37
|
"fast-glob": "3.3.2",
|
|
38
38
|
"https-proxy-agent": "7.0.5",
|
|
39
39
|
"lmdb": "3.0.12",
|
|
@@ -43,18 +43,17 @@
|
|
|
43
43
|
"parse5-html-rewriting-stream": "7.0.0",
|
|
44
44
|
"picomatch": "4.0.2",
|
|
45
45
|
"piscina": "4.6.1",
|
|
46
|
-
"rollup": "4.18.
|
|
47
|
-
"sass": "1.77.
|
|
46
|
+
"rollup": "4.18.1",
|
|
47
|
+
"sass": "1.77.7",
|
|
48
48
|
"semver": "7.6.2",
|
|
49
|
-
"
|
|
50
|
-
"vite": "5.3.2",
|
|
49
|
+
"vite": "5.3.3",
|
|
51
50
|
"watchpack": "2.4.1"
|
|
52
51
|
},
|
|
53
52
|
"peerDependencies": {
|
|
54
|
-
"@angular/compiler-cli": "^18.0.0 || ^18.
|
|
55
|
-
"@angular/localize": "^18.0.0 || ^18.
|
|
56
|
-
"@angular/platform-server": "^18.0.0 || ^18.
|
|
57
|
-
"@angular/service-worker": "^18.0.0 || ^18.
|
|
53
|
+
"@angular/compiler-cli": "^18.0.0 || ^18.2.0-next.0",
|
|
54
|
+
"@angular/localize": "^18.0.0 || ^18.2.0-next.0",
|
|
55
|
+
"@angular/platform-server": "^18.0.0 || ^18.2.0-next.0",
|
|
56
|
+
"@angular/service-worker": "^18.0.0 || ^18.2.0-next.0",
|
|
58
57
|
"less": "^4.2.0",
|
|
59
58
|
"postcss": "^8.4.0",
|
|
60
59
|
"tailwindcss": "^2.0.0 || ^3.0.0",
|
|
@@ -136,7 +136,9 @@ class AotCompilation extends angular_compilation_1.AngularCompilation {
|
|
|
136
136
|
const { affectedFiles, angularCompiler, compilerHost, typeScriptProgram, webWorkerTransform } = this.#state;
|
|
137
137
|
const compilerOptions = typeScriptProgram.getCompilerOptions();
|
|
138
138
|
const buildInfoFilename = compilerOptions.tsBuildInfoFile ?? '.tsbuildinfo';
|
|
139
|
-
const useTypeScriptTranspilation = !compilerOptions.isolatedModules ||
|
|
139
|
+
const useTypeScriptTranspilation = !compilerOptions.isolatedModules ||
|
|
140
|
+
!!compilerOptions.sourceMap ||
|
|
141
|
+
!!compilerOptions.inlineSourceMap;
|
|
140
142
|
const emittedFiles = new Map();
|
|
141
143
|
const writeFileCallback = (filename, contents, _a, _b, sourceFiles) => {
|
|
142
144
|
if (!sourceFiles?.length && filename.endsWith(buildInfoFilename)) {
|
|
@@ -24,6 +24,7 @@ export declare function initialize(request: InitRequest): Promise<{
|
|
|
24
24
|
allowJs: boolean | undefined;
|
|
25
25
|
isolatedModules: boolean | undefined;
|
|
26
26
|
sourceMap: boolean | undefined;
|
|
27
|
+
inlineSourceMap: boolean | undefined;
|
|
27
28
|
};
|
|
28
29
|
}>;
|
|
29
30
|
export declare function diagnose(modes: DiagnosticModes): Promise<{
|
|
@@ -70,11 +70,12 @@ async function initialize(request) {
|
|
|
70
70
|
});
|
|
71
71
|
return {
|
|
72
72
|
referencedFiles,
|
|
73
|
-
// TODO: Expand? `allowJs`, `isolatedModules`, `sourceMap` are the only fields needed currently.
|
|
73
|
+
// TODO: Expand? `allowJs`, `isolatedModules`, `sourceMap`, `inlineSourceMap` are the only fields needed currently.
|
|
74
74
|
compilerOptions: {
|
|
75
75
|
allowJs: compilerOptions.allowJs,
|
|
76
76
|
isolatedModules: compilerOptions.isolatedModules,
|
|
77
77
|
sourceMap: compilerOptions.sourceMap,
|
|
78
|
+
inlineSourceMap: compilerOptions.inlineSourceMap,
|
|
78
79
|
},
|
|
79
80
|
};
|
|
80
81
|
}
|
|
@@ -206,7 +206,8 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
|
|
|
206
206
|
// Typescript printing support for sourcemaps is not yet integrated.
|
|
207
207
|
useTypeScriptTranspilation =
|
|
208
208
|
!initializationResult.compilerOptions.isolatedModules ||
|
|
209
|
-
!!initializationResult.compilerOptions.sourceMap
|
|
209
|
+
!!initializationResult.compilerOptions.sourceMap ||
|
|
210
|
+
!!initializationResult.compilerOptions.inlineSourceMap;
|
|
210
211
|
referencedFiles = initializationResult.referencedFiles;
|
|
211
212
|
}
|
|
212
213
|
catch (error) {
|
|
@@ -425,6 +426,7 @@ function createCompilerOptionsTransformer(setupWarnings, pluginOptions, preserve
|
|
|
425
426
|
noEmitOnError: false,
|
|
426
427
|
inlineSources: !!pluginOptions.sourcemap,
|
|
427
428
|
inlineSourceMap: !!pluginOptions.sourcemap,
|
|
429
|
+
sourceMap: undefined,
|
|
428
430
|
mapRoot: undefined,
|
|
429
431
|
sourceRoot: undefined,
|
|
430
432
|
preserveSymlinks,
|
|
@@ -249,8 +249,9 @@ function getEsBuildCommonOptions(options) {
|
|
|
249
249
|
}
|
|
250
250
|
return {
|
|
251
251
|
absWorkingDir: workspaceRoot,
|
|
252
|
-
bundle: true,
|
|
253
252
|
format: 'esm',
|
|
253
|
+
bundle: true,
|
|
254
|
+
packages: 'bundle',
|
|
254
255
|
assetNames: outputNames.media,
|
|
255
256
|
conditions: ['es2020', 'es2015', 'module'],
|
|
256
257
|
resolveExtensions: ['.ts', '.tsx', '.mjs', '.js', '.cjs'],
|
|
@@ -100,7 +100,8 @@ function createWasmPlugin(options) {
|
|
|
100
100
|
// Read from the file system when on Node.js (SSR) and not inline
|
|
101
101
|
if (!inlineWasm && build.initialOptions.platform === 'node') {
|
|
102
102
|
initContents += 'import { readFile } from "node:fs/promises";\n';
|
|
103
|
-
initContents +=
|
|
103
|
+
initContents +=
|
|
104
|
+
'const wasmData = await readFile(new URL(wasmPath, import.meta.url));\n';
|
|
104
105
|
}
|
|
105
106
|
// Create initialization function
|
|
106
107
|
initContents += generateInitHelper(!inlineWasm && build.initialOptions.platform !== 'node', wasmContents);
|
|
@@ -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.
|
|
13
|
+
const VERSION = '18.2.0-next.0';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|
|
@@ -12,7 +12,6 @@ const mrmime_1 = require("mrmime");
|
|
|
12
12
|
const promises_1 = require("node:fs/promises");
|
|
13
13
|
const node_path_1 = require("node:path");
|
|
14
14
|
const node_worker_threads_1 = require("node:worker_threads");
|
|
15
|
-
const undici_1 = require("undici");
|
|
16
15
|
/**
|
|
17
16
|
* This is passed as workerData when setting up the worker via the `piscina` package.
|
|
18
17
|
*/
|
|
@@ -20,8 +19,7 @@ const { assetFiles } = node_worker_threads_1.workerData;
|
|
|
20
19
|
const assetsCache = new Map();
|
|
21
20
|
const RESOLVE_PROTOCOL = 'resolve:';
|
|
22
21
|
function patchFetchToLoadInMemoryAssets() {
|
|
23
|
-
const
|
|
24
|
-
const originalFetch = global.fetch;
|
|
22
|
+
const originalFetch = globalThis.fetch;
|
|
25
23
|
const patchedFetch = async (input, init) => {
|
|
26
24
|
let url;
|
|
27
25
|
if (input instanceof URL) {
|
|
@@ -45,7 +43,7 @@ function patchFetchToLoadInMemoryAssets() {
|
|
|
45
43
|
const cachedAsset = assetsCache.get(pathname);
|
|
46
44
|
if (cachedAsset) {
|
|
47
45
|
const { content, headers } = cachedAsset;
|
|
48
|
-
return new
|
|
46
|
+
return new Response(content, {
|
|
49
47
|
headers,
|
|
50
48
|
});
|
|
51
49
|
}
|
|
@@ -58,9 +56,9 @@ function patchFetchToLoadInMemoryAssets() {
|
|
|
58
56
|
}
|
|
59
57
|
: undefined;
|
|
60
58
|
assetsCache.set(pathname, { headers, content });
|
|
61
|
-
return new
|
|
59
|
+
return new Response(content, {
|
|
62
60
|
headers,
|
|
63
61
|
});
|
|
64
62
|
};
|
|
65
|
-
|
|
63
|
+
globalThis.fetch = patchedFetch;
|
|
66
64
|
}
|