@angular/build 18.2.8 → 18.2.9
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.9",
|
|
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.9",
|
|
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",
|
|
@@ -314,9 +314,22 @@ function createCompilerPlugin(pluginOptions, styleOptions) {
|
|
|
314
314
|
// Store as the returned Uint8Array to allow caching the fully transformed code
|
|
315
315
|
typeScriptFileCache.set(request, contents);
|
|
316
316
|
}
|
|
317
|
+
let loader;
|
|
318
|
+
if (useTypeScriptTranspilation || isJS) {
|
|
319
|
+
// TypeScript has transpiled to JS or is already JS
|
|
320
|
+
loader = 'js';
|
|
321
|
+
}
|
|
322
|
+
else if (request.at(-1) === 'x') {
|
|
323
|
+
// TSX and TS have different syntax rules. Only set if input is a TSX file.
|
|
324
|
+
loader = 'tsx';
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
// Otherwise, directly bundle TS
|
|
328
|
+
loader = 'ts';
|
|
329
|
+
}
|
|
317
330
|
return {
|
|
318
331
|
contents,
|
|
319
|
-
loader
|
|
332
|
+
loader,
|
|
320
333
|
};
|
|
321
334
|
});
|
|
322
335
|
build.onLoad({ filter: /\.[cm]?js$/ }, (0, load_result_cache_1.createCachedLoad)(pluginOptions.loadResultCache, async (args) => {
|
package/src/tools/sass/worker.js
CHANGED
|
@@ -40,6 +40,25 @@ async function renderSassStylesheet(request) {
|
|
|
40
40
|
containingUrl: containingUrl ? (0, node_url_1.fileURLToPath)(containingUrl) : null,
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
|
+
// Wait for the main thread to set the signal to 1 and notify, which tells
|
|
44
|
+
// us that a message can be received on the port.
|
|
45
|
+
// If the main thread is fast, the signal will already be set to 1, and no
|
|
46
|
+
// sleep/notify is necessary.
|
|
47
|
+
// However, there can be a race condition here:
|
|
48
|
+
// - the main thread sets the signal to 1, but does not get to the notify instruction yet
|
|
49
|
+
// - the worker does not pause because the signal is set to 1
|
|
50
|
+
// - the worker very soon enters this method again
|
|
51
|
+
// - this method sets the signal to 0 and sends the message
|
|
52
|
+
// - the signal is 0 and so the `Atomics.wait` call blocks
|
|
53
|
+
// - only now the main thread runs the `notify` from the first invocation, so the
|
|
54
|
+
// worker continues.
|
|
55
|
+
// - but there is no message yet in the port, because the thread should not have been
|
|
56
|
+
// waken up yet.
|
|
57
|
+
// To combat this, wait for a non-0 value _twice_.
|
|
58
|
+
// Almost every time, this immediately continues with "not-equal", because
|
|
59
|
+
// the signal is still set to 1, except during the race condition, when the second
|
|
60
|
+
// wait will wait for the correct notify.
|
|
61
|
+
Atomics.wait(importerChannel.signal, 0, 0);
|
|
43
62
|
Atomics.wait(importerChannel.signal, 0, 0);
|
|
44
63
|
const result = (0, node_worker_threads_1.receiveMessageOnPort)(importerChannel.port)?.message;
|
|
45
64
|
return result ? (0, node_url_1.pathToFileURL)(result) : null;
|
|
@@ -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.9';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|