@angular/build 18.1.1 → 18.1.2
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.
|
|
3
|
+
"version": "18.1.2",
|
|
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.
|
|
26
|
+
"@angular-devkit/architect": "0.1801.2",
|
|
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",
|
package/src/tools/sass/lexer.js
CHANGED
|
@@ -50,7 +50,7 @@ function* findUrls(contents) {
|
|
|
50
50
|
if (pos > 0) {
|
|
51
51
|
pos -= 2;
|
|
52
52
|
next();
|
|
53
|
-
if (!isWhitespace(current) && current !==
|
|
53
|
+
if (!isWhitespace(current) && current !== 0x002c && current !== 0x003a) {
|
|
54
54
|
// Skip - not a url token
|
|
55
55
|
pos += 3;
|
|
56
56
|
continue;
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.createRemoveIdPrefixPlugin = void 0;
|
|
11
11
|
// NOTE: the implementation for this Vite plugin is roughly based on:
|
|
12
12
|
// https://github.com/MilanKovacic/vite-plugin-externalize-dependencies
|
|
13
|
-
const VITE_ID_PREFIX = '
|
|
13
|
+
const VITE_ID_PREFIX = '@id/';
|
|
14
14
|
const escapeRegexSpecialChars = (inputString) => {
|
|
15
15
|
return inputString.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
|
16
16
|
};
|
|
@@ -23,7 +23,7 @@ const createRemoveIdPrefixPlugin = (externals) => ({
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
const escapedExternals = externals.map(escapeRegexSpecialChars);
|
|
26
|
-
const prefixedExternalRegex = new RegExp(`${VITE_ID_PREFIX}(${escapedExternals.join('|')})`, 'g');
|
|
26
|
+
const prefixedExternalRegex = new RegExp(`${resolvedConfig.base}${VITE_ID_PREFIX}(${escapedExternals.join('|')})`, 'g');
|
|
27
27
|
// @ts-expect-error: Property 'push' does not exist on type 'readonly Plugin<any>[]'
|
|
28
28
|
// Reasoning:
|
|
29
29
|
// since the /@id/ prefix is added by Vite's import-analysis plugin,
|
|
@@ -69,7 +69,8 @@ function createAngularAssetsMiddleware(server, assets, outputFiles) {
|
|
|
69
69
|
if (!pathnameHasTrailingSlash) {
|
|
70
70
|
for (const assetPath of assets.keys()) {
|
|
71
71
|
if (pathname === assetPath.substring(0, assetPath.lastIndexOf('/'))) {
|
|
72
|
-
const
|
|
72
|
+
const { pathname, search, hash } = new URL(req.url, 'http://localhost');
|
|
73
|
+
const location = [pathname, '/', search, hash].join('');
|
|
73
74
|
res.statusCode = 301;
|
|
74
75
|
res.setHeader('Content-Type', 'text/html');
|
|
75
76
|
res.setHeader('Location', location);
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.createAngularIndexHtmlMiddleware = createAngularIndexHtmlMiddleware;
|
|
11
|
+
const node_path_1 = require("node:path");
|
|
11
12
|
const utils_1 = require("../utils");
|
|
12
13
|
function createAngularIndexHtmlMiddleware(server, outputFiles, indexHtmlTransformer) {
|
|
13
14
|
return function (req, res, next) {
|
|
@@ -18,11 +19,12 @@ function createAngularIndexHtmlMiddleware(server, outputFiles, indexHtmlTransfor
|
|
|
18
19
|
// Parse the incoming request.
|
|
19
20
|
// The base of the URL is unused but required to parse the URL.
|
|
20
21
|
const pathname = (0, utils_1.pathnameWithoutBasePath)(req.url, server.config.base);
|
|
21
|
-
|
|
22
|
+
const extension = (0, node_path_1.extname)(pathname);
|
|
23
|
+
if (extension !== '.html') {
|
|
22
24
|
next();
|
|
23
25
|
return;
|
|
24
26
|
}
|
|
25
|
-
const rawHtml = outputFiles.get(
|
|
27
|
+
const rawHtml = outputFiles.get(pathname)?.contents;
|
|
26
28
|
if (!rawHtml) {
|
|
27
29
|
next();
|
|
28
30
|
return;
|
|
@@ -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.
|
|
13
|
+
const VERSION = '18.1.2';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|