@angular/build 18.0.0-rc.3 → 18.0.1
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.
|
|
3
|
+
"version": "18.0.1",
|
|
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.1800.
|
|
26
|
+
"@angular-devkit/architect": "0.1800.1",
|
|
27
27
|
"@babel/core": "7.24.5",
|
|
28
28
|
"@babel/helper-annotate-as-pure": "7.22.5",
|
|
29
29
|
"@babel/helper-split-export-declaration": "7.24.5",
|
|
@@ -49,10 +49,10 @@
|
|
|
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",
|
|
53
|
+
"@angular/localize": "^18.0.0",
|
|
54
|
+
"@angular/platform-server": "^18.0.0",
|
|
55
|
+
"@angular/service-worker": "^18.0.0",
|
|
56
56
|
"less": "^4.2.0",
|
|
57
57
|
"postcss": "^8.4.0",
|
|
58
58
|
"tailwindcss": "^2.0.0 || ^3.0.0",
|
|
@@ -194,8 +194,12 @@ async function* serveWithVite(serverOptions, builderName, builderAction, context
|
|
|
194
194
|
const projectRoot = (0, node_path_1.join)(context.workspaceRoot, root);
|
|
195
195
|
const browsers = (0, internal_1.getSupportedBrowsers)(projectRoot, context.logger);
|
|
196
196
|
const target = (0, internal_1.transformSupportedBrowsersToTargets)(browsers);
|
|
197
|
+
// Needed for browser-esbuild as polyfills can be a string.
|
|
198
|
+
const polyfills = Array.isArray((browserOptions.polyfills ??= []))
|
|
199
|
+
? browserOptions.polyfills
|
|
200
|
+
: [browserOptions.polyfills];
|
|
197
201
|
// Setup server and start listening
|
|
198
|
-
const serverConfiguration = await setupServer(serverOptions, generatedFiles, assetFiles, browserOptions.preserveSymlinks, externalMetadata, !!browserOptions.ssr, prebundleTransformer, target, (0, internal_1.isZonelessApp)(
|
|
202
|
+
const serverConfiguration = await setupServer(serverOptions, generatedFiles, assetFiles, browserOptions.preserveSymlinks, externalMetadata, !!browserOptions.ssr, prebundleTransformer, target, (0, internal_1.isZonelessApp)(polyfills), browserOptions.loader, extensions?.middleware, transformers?.indexHtml, thirdPartySourcemaps);
|
|
199
203
|
server = await createServer(serverConfiguration);
|
|
200
204
|
await server.listen();
|
|
201
205
|
if (serverConfiguration.ssr?.optimizeDeps?.disabled === false) {
|
|
@@ -38,7 +38,6 @@ const node_assert_1 = __importDefault(require("node:assert"));
|
|
|
38
38
|
const path = __importStar(require("node:path"));
|
|
39
39
|
const environment_options_1 = require("../../../utils/environment-options");
|
|
40
40
|
const javascript_transformer_1 = require("../javascript-transformer");
|
|
41
|
-
const lmdb_cache_store_1 = require("../lmdb-cache-store");
|
|
42
41
|
const load_result_cache_1 = require("../load-result-cache");
|
|
43
42
|
const profiling_1 = require("../profiling");
|
|
44
43
|
const compilation_1 = require("./compilation");
|
|
@@ -57,7 +56,8 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
|
|
|
57
56
|
// Initialize a worker pool for JavaScript transformations
|
|
58
57
|
let cacheStore;
|
|
59
58
|
if (pluginOptions.sourceFileCache?.persistentCachePath) {
|
|
60
|
-
|
|
59
|
+
const { LmbdCacheStore } = await Promise.resolve().then(() => __importStar(require('../lmdb-cache-store')));
|
|
60
|
+
cacheStore = new LmbdCacheStore(path.join(pluginOptions.sourceFileCache.persistentCachePath, 'angular-compiler.db'));
|
|
61
61
|
}
|
|
62
62
|
const javascriptTransformer = new javascript_transformer_1.JavaScriptTransformer(pluginOptions, environment_options_1.maxWorkers, cacheStore?.createCache('jstransformer'));
|
|
63
63
|
// Setup defines based on the values used by the Angular compiler-cli
|
|
@@ -78,6 +78,10 @@ class UrlRebasingImporter {
|
|
|
78
78
|
if (value[0] === '#' && value[1] !== '{') {
|
|
79
79
|
continue;
|
|
80
80
|
}
|
|
81
|
+
// Skip if value is value contains a function call
|
|
82
|
+
if (/#\{.+\(.+\)\}/.test(value)) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
81
85
|
// Sass variable usage either starts with a `$` or contains a namespace and a `.$`
|
|
82
86
|
const valueNormalized = value[0] === '$' || /^\w+\.\$/.test(value) ? `#{${value}}` : value;
|
|
83
87
|
const rebasedPath = (0, node_path_1.relative)(this.entryDirectory, stylesheetDirectory) + '||file:' + valueNormalized;
|
|
@@ -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.
|
|
13
|
+
const VERSION = '18.0.1';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|
|
@@ -21,7 +21,9 @@ function hasCacheMetadata(value) {
|
|
|
21
21
|
}
|
|
22
22
|
function normalizeCacheOptions(projectMetadata, worspaceRoot) {
|
|
23
23
|
const cacheMetadata = hasCacheMetadata(projectMetadata) ? projectMetadata.cli.cache : {};
|
|
24
|
-
const {
|
|
24
|
+
const {
|
|
25
|
+
// Webcontainers do not currently benefit from persistent disk caching and can lead to increased browser memory usage
|
|
26
|
+
enabled = !process.versions.webcontainer, environment = 'local', path = '.angular/cache', } = cacheMetadata;
|
|
25
27
|
const isCI = process.env['CI'] === '1' || process.env['CI']?.toLowerCase() === 'true';
|
|
26
28
|
let cacheEnabled = enabled;
|
|
27
29
|
if (cacheEnabled) {
|