@angular/build 18.2.5 → 18.2.6
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.
|
|
3
|
+
"version": "18.2.6",
|
|
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.
|
|
26
|
+
"@angular-devkit/architect": "0.1802.6",
|
|
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",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"parse5-html-rewriting-stream": "7.0.0",
|
|
43
43
|
"picomatch": "4.0.2",
|
|
44
44
|
"piscina": "4.6.1",
|
|
45
|
-
"rollup": "4.
|
|
45
|
+
"rollup": "4.22.4",
|
|
46
46
|
"sass": "1.77.6",
|
|
47
47
|
"semver": "7.6.3",
|
|
48
48
|
"vite": "5.4.6",
|
|
@@ -9,15 +9,31 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.angularHtmlFallbackMiddleware = angularHtmlFallbackMiddleware;
|
|
11
11
|
const utils_1 = require("../utils");
|
|
12
|
+
const ALLOWED_FALLBACK_METHODS = Object.freeze(['GET', 'HEAD']);
|
|
12
13
|
function angularHtmlFallbackMiddleware(req, res, next) {
|
|
13
14
|
// Similar to how it is handled in vite
|
|
14
15
|
// https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/middlewares/htmlFallback.ts#L15C19-L15C45
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
if (!req.method || !ALLOWED_FALLBACK_METHODS.includes(req.method)) {
|
|
17
|
+
// No fallback for unsupported request methods
|
|
18
|
+
next();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (req.url) {
|
|
22
|
+
const mimeType = (0, utils_1.lookupMimeTypeFromRequest)(req.url);
|
|
23
|
+
if (mimeType === 'text/html' || mimeType === 'application/xhtml+xml') {
|
|
24
|
+
// eslint-disable-next-line no-console
|
|
25
|
+
console.warn(`Request for HTML file "${req.url}" was received but no asset found. Asset may be missing from build.`);
|
|
26
|
+
}
|
|
27
|
+
else if (mimeType) {
|
|
28
|
+
// No fallback for request of asset-like files
|
|
29
|
+
next();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (!req.headers.accept ||
|
|
34
|
+
req.headers.accept.includes('text/html') ||
|
|
35
|
+
req.headers.accept.includes('text/*') ||
|
|
36
|
+
req.headers.accept.includes('*/*')) {
|
|
21
37
|
req.url = '/index.html';
|
|
22
38
|
}
|
|
23
39
|
next();
|
|
@@ -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.
|
|
13
|
+
const VERSION = '18.2.6';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|