@angular/build 18.0.2 → 18.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/build",
3
- "version": "18.0.2",
3
+ "version": "18.1.0-next.0",
4
4
  "description": "Official build system for Angular",
5
5
  "keywords": [
6
6
  "Angular CLI",
@@ -23,36 +23,36 @@
23
23
  "builders": "builders.json",
24
24
  "dependencies": {
25
25
  "@ampproject/remapping": "2.3.0",
26
- "@angular-devkit/architect": "0.1800.2",
27
- "@babel/core": "7.24.5",
28
- "@babel/helper-annotate-as-pure": "7.22.5",
29
- "@babel/helper-split-export-declaration": "7.24.5",
26
+ "@angular-devkit/architect": "0.1801.0-next.0",
27
+ "@babel/core": "7.24.6",
28
+ "@babel/helper-annotate-as-pure": "7.24.6",
29
+ "@babel/helper-split-export-declaration": "7.24.6",
30
30
  "@vitejs/plugin-basic-ssl": "1.1.0",
31
31
  "ansi-colors": "4.1.3",
32
32
  "browserslist": "^4.23.0",
33
33
  "critters": "0.0.22",
34
- "esbuild": "0.21.3",
34
+ "esbuild": "0.21.4",
35
35
  "fast-glob": "3.3.2",
36
36
  "https-proxy-agent": "7.0.4",
37
37
  "inquirer": "9.2.22",
38
- "lmdb": "3.0.8",
38
+ "lmdb": "3.0.11",
39
39
  "magic-string": "0.30.10",
40
40
  "mrmime": "2.0.0",
41
41
  "ora": "5.4.1",
42
42
  "picomatch": "4.0.2",
43
- "piscina": "4.5.0",
43
+ "piscina": "4.5.1",
44
44
  "parse5-html-rewriting-stream": "7.0.0",
45
45
  "sass": "1.77.2",
46
46
  "semver": "7.6.2",
47
- "undici": "6.18.0",
48
- "vite": "5.2.11",
47
+ "undici": "6.18.1",
48
+ "vite": "5.2.12",
49
49
  "watchpack": "2.4.1"
50
50
  },
51
51
  "peerDependencies": {
52
- "@angular/compiler-cli": "^18.0.0",
53
- "@angular/localize": "^18.0.0",
54
- "@angular/platform-server": "^18.0.0",
55
- "@angular/service-worker": "^18.0.0",
52
+ "@angular/compiler-cli": "^18.0.0 || ^18.1.0-next.0",
53
+ "@angular/localize": "^18.0.0 || ^18.1.0-next.0",
54
+ "@angular/platform-server": "^18.0.0 || ^18.1.0-next.0",
55
+ "@angular/service-worker": "^18.0.0 || ^18.1.0-next.0",
56
56
  "less": "^4.2.0",
57
57
  "postcss": "^8.4.0",
58
58
  "tailwindcss": "^2.0.0 || ^3.0.0",
@@ -45,9 +45,20 @@ function* findUrls(contents) {
45
45
  };
46
46
  // Based on https://www.w3.org/TR/css-syntax-3/#consume-ident-like-token
47
47
  while ((pos = contents.indexOf('url(', pos)) !== -1) {
48
+ width = 1;
49
+ // Ensure whitespace, comma, or colon before `url(`
50
+ if (pos > 0) {
51
+ pos -= 2;
52
+ next();
53
+ if (!isWhitespace(current) && current !== 0x0027 && current !== 0x003a) {
54
+ // Skip - not a url token
55
+ pos += 3;
56
+ continue;
57
+ }
58
+ pos += 1;
59
+ }
48
60
  // Set to position of the (
49
61
  pos += 3;
50
- width = 1;
51
62
  // Consume all leading whitespace
52
63
  while (isWhitespace(next())) {
53
64
  /* empty */
@@ -17,25 +17,6 @@ const node_path_1 = require("node:path");
17
17
  const node_url_1 = require("node:url");
18
18
  const error_1 = require("../../utils/error");
19
19
  const lexer_1 = require("./lexer");
20
- /**
21
- * Ensures that a bare specifier URL path that is intended to be treated as
22
- * a relative path has a leading `./` or `../` prefix.
23
- *
24
- * @param url A bare specifier URL path that should be considered relative.
25
- * @returns
26
- */
27
- function ensureRelative(url) {
28
- // Empty
29
- if (!url) {
30
- return url;
31
- }
32
- // Already relative
33
- if (url[0] === '.' && (url[1] === '/' || (url[1] === '.' && url[2] === '/'))) {
34
- return url;
35
- }
36
- // Needs prefix
37
- return './' + url;
38
- }
39
20
  /**
40
21
  * A Sass Importer base class that provides the load logic to rebase all `url()` functions
41
22
  * within a stylesheet. The rebasing will ensure that the URLs in the output of the Sass compiler
@@ -84,13 +65,13 @@ class UrlRebasingImporter {
84
65
  }
85
66
  // Sass variable usage either starts with a `$` or contains a namespace and a `.$`
86
67
  const valueNormalized = value[0] === '$' || /^\w+\.\$/.test(value) ? `#{${value}}` : value;
87
- const rebasedPath = (0, node_path_1.relative)(this.entryDirectory, stylesheetDirectory) + '||file:' + valueNormalized;
68
+ const rebasedPath = (0, node_path_1.relative)(this.entryDirectory, stylesheetDirectory);
88
69
  // Normalize path separators and escape characters
89
70
  // https://developer.mozilla.org/en-US/docs/Web/CSS/url#syntax
90
- const rebasedUrl = ensureRelative(rebasedPath.replace(/\\/g, '/').replace(/[()\s'"]/g, '\\$&'));
71
+ const rebasedUrl = rebasedPath.replace(/\\/g, '/').replace(/[()\s'"]/g, '\\$&');
91
72
  updatedContents ??= new magic_string_1.default(contents);
92
73
  // Always quote the URL to avoid potential downstream parsing problems
93
- updatedContents.update(start, end, `"${rebasedUrl}"`);
74
+ updatedContents.update(start, end, `"${rebasedUrl}||file:${valueNormalized}"`);
94
75
  }
95
76
  if (updatedContents) {
96
77
  contents = updatedContents.toString();
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.normalizeCacheOptions = void 0;
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.0.2';
13
+ const VERSION = '18.1.0-next.0';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&