File tree 5 files changed +2
-34
lines changed
5 files changed +2
-34
lines changed Original file line number Diff line number Diff line change 8
8
9
9
import type { CompilerOptions } from '@angular/compiler-cli' ;
10
10
import type { PartialMessage } from 'esbuild' ;
11
- import { createRequire , getCompileCacheDir } from 'node:module' ;
11
+ import { createRequire } from 'node:module' ;
12
12
import { MessageChannel } from 'node:worker_threads' ;
13
13
import Piscina from 'piscina' ;
14
14
import type { SourceFile } from 'typescript' ;
@@ -41,11 +41,6 @@ export class ParallelCompilation extends AngularCompilation {
41
41
useAtomics : ! process . versions . webcontainer ,
42
42
filename : localRequire . resolve ( './parallel-worker' ) ,
43
43
recordTiming : false ,
44
- env : {
45
- ...process . env ,
46
- // Enable compile code caching if enabled for the main process (only exists on Node.js v22.8+)
47
- 'NODE_COMPILE_CACHE' : getCompileCacheDir ?.( ) ,
48
- } ,
49
44
} ) ;
50
45
}
51
46
Original file line number Diff line number Diff line change 8
8
9
9
import { createHash } from 'node:crypto' ;
10
10
import { readFile } from 'node:fs/promises' ;
11
- import { getCompileCacheDir } from 'node:module' ;
12
11
import Piscina from 'piscina' ;
13
12
import { Cache } from './cache' ;
14
13
@@ -63,11 +62,6 @@ export class JavaScriptTransformer {
63
62
// Shutdown idle threads after 1 second of inactivity
64
63
idleTimeout : 1000 ,
65
64
recordTiming : false ,
66
- env : {
67
- ...process . env ,
68
- // Enable compile code caching if enabled for the main process (only exists on Node.js v22.8+)
69
- 'NODE_COMPILE_CACHE' : getCompileCacheDir ?.( ) ,
70
- } ,
71
65
} ) ;
72
66
73
67
return this . #workerPool;
Original file line number Diff line number Diff line change 7
7
*/
8
8
9
9
import assert from 'node:assert' ;
10
- import { getCompileCacheDir } from 'node:module' ;
11
10
import { fileURLToPath , pathToFileURL } from 'node:url' ;
12
11
import { MessageChannel } from 'node:worker_threads' ;
13
12
import { Piscina } from 'piscina' ;
@@ -103,11 +102,6 @@ export class SassWorkerImplementation {
103
102
// Shutdown idle threads after 1 second of inactivity
104
103
idleTimeout : 1000 ,
105
104
recordTiming : false ,
106
- env : {
107
- ...process . env ,
108
- // Enable compile code caching if enabled for the main process (only exists on Node.js v22.8+)
109
- 'NODE_COMPILE_CACHE' : getCompileCacheDir ?.( ) ,
110
- } ,
111
105
} ) ;
112
106
113
107
return this . #workerPool;
Original file line number Diff line number Diff line change 17
17
declare module 'esbuild' {
18
18
export * from 'esbuild-wasm' ;
19
19
}
20
-
21
- /**
22
- * Augment the Node.js module builtin types to support the v22.8+ compile cache functions
23
- */
24
- declare module 'node:module' {
25
- function getCompileCacheDir ( ) : string | undefined ;
26
- }
Original file line number Diff line number Diff line change 18
18
* range.
19
19
*/
20
20
21
- // Enable on-disk code caching if available (Node.js 22.8+)
22
- try {
23
- const { enableCompileCache } = require ( 'node:module' ) ;
24
-
25
- enableCompileCache ?. ( ) ;
26
- } catch { }
27
-
28
- // Initialize the Angular CLI
29
- void import ( '../lib/init.js' ) ;
21
+ import ( '../lib/init.js' ) ;
You can’t perform that action at this time.
0 commit comments