@angular/build 18.1.0-rc.1 → 18.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/build",
3
- "version": "18.1.0-rc.1",
3
+ "version": "18.1.0",
4
4
  "description": "Official build system for Angular",
5
5
  "keywords": [
6
6
  "Angular CLI",
@@ -23,7 +23,7 @@
23
23
  "builders": "builders.json",
24
24
  "dependencies": {
25
25
  "@ampproject/remapping": "2.3.0",
26
- "@angular-devkit/architect": "0.1801.0-rc.1",
26
+ "@angular-devkit/architect": "0.1801.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",
@@ -51,10 +51,10 @@
51
51
  "watchpack": "2.4.1"
52
52
  },
53
53
  "peerDependencies": {
54
- "@angular/compiler-cli": "^18.0.0 || ^18.1.0-next.0",
55
- "@angular/localize": "^18.0.0 || ^18.1.0-next.0",
56
- "@angular/platform-server": "^18.0.0 || ^18.1.0-next.0",
57
- "@angular/service-worker": "^18.0.0 || ^18.1.0-next.0",
54
+ "@angular/compiler-cli": "^18.0.0",
55
+ "@angular/localize": "^18.0.0",
56
+ "@angular/platform-server": "^18.0.0",
57
+ "@angular/service-worker": "^18.0.0",
58
58
  "less": "^4.2.0",
59
59
  "postcss": "^8.4.0",
60
60
  "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 || !!compilerOptions.sourceMap;
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,
@@ -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 += 'const wasmData = await readFile(wasmPath);\n';
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.1.0-rc.1';
13
+ const VERSION = '18.1.0';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&