@angular/build 18.2.11 → 18.2.12

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.2.11",
3
+ "version": "18.2.12",
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.1802.11",
26
+ "@angular-devkit/architect": "0.1802.12",
27
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",
@@ -333,12 +333,20 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
333
333
  };
334
334
  });
335
335
  build.onLoad({ filter: /\.[cm]?js$/ }, (0, load_result_cache_1.createCachedLoad)(pluginOptions.loadResultCache, async (args) => {
336
+ let request = args.path;
337
+ if (pluginOptions.fileReplacements) {
338
+ const replacement = pluginOptions.fileReplacements[path.normalize(args.path)];
339
+ if (replacement) {
340
+ request = path.normalize(replacement);
341
+ }
342
+ }
336
343
  return (0, profiling_1.profileAsync)('NG_EMIT_JS*', async () => {
337
- const sideEffects = await hasSideEffects(args.path);
338
- const contents = await javascriptTransformer.transformFile(args.path, pluginOptions.jit, sideEffects);
344
+ const sideEffects = await hasSideEffects(request);
345
+ const contents = await javascriptTransformer.transformFile(request, pluginOptions.jit, sideEffects);
339
346
  return {
340
347
  contents,
341
348
  loader: 'js',
349
+ watchFiles: request !== args.path ? [request] : undefined,
342
350
  };
343
351
  }, true);
344
352
  }));
@@ -65,7 +65,7 @@ class UrlRebasingImporter {
65
65
  continue;
66
66
  }
67
67
  // Sass variable usage either starts with a `$` or contains a namespace and a `.$`
68
- const valueNormalized = value[0] === '$' || /^\w+\.\$/.test(value) ? `#{${value}}` : value;
68
+ const valueNormalized = value[0] === '$' || /^\w[\w_-]*\.\$/.test(value) ? `#{${value}}` : value;
69
69
  const rebasedPath = (0, node_path_1.relative)(this.entryDirectory, stylesheetDirectory);
70
70
  // Normalize path separators and escape characters
71
71
  // https://developer.mozilla.org/en-US/docs/Web/CSS/url#syntax
@@ -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.11';
13
+ const VERSION = '18.2.12';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&