nx 19.2.0-alpha.3 → 19.2.0-beta.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 +27 -27
- package/src/command-line/init/implementation/add-nx-to-monorepo.js +8 -0
- package/src/command-line/init/implementation/add-nx-to-nest.js +4 -0
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +4 -0
- package/src/command-line/init/implementation/angular/index.js +4 -0
- package/src/command-line/init/init-v2.js +4 -0
- package/src/command-line/show/project.js +7 -1
- package/src/command-line/yargs-utils/shared-options.js +9 -1
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.css +1 -1
- package/src/daemon/client/client.js +1 -3
- package/src/daemon/server/server.js +1 -0
- package/src/native/index.d.ts +135 -175
- package/src/native/native-bindings.js +238 -352
- package/src/plugins/js/index.js +6 -2
- package/src/plugins/js/lock-file/pnpm-parser.js +219 -88
- package/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +7 -25
- package/src/plugins/js/lock-file/utils/pnpm-normalizer.js +567 -287
- package/src/plugins/js/project-graph/affected/lock-file-changes.js +1 -0
- package/src/plugins/package-json-workspaces/create-nodes.js +1 -0
- package/src/plugins/project-json/build-nodes/package-json-next-to-project-json.js +1 -0
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -3
- package/src/tasks-runner/create-task-graph.d.ts +3 -3
- package/src/tasks-runner/create-task-graph.js +5 -5
- package/src/tasks-runner/pseudo-terminal.js +0 -3
- package/src/tasks-runner/run-command.js +3 -4
- package/src/tasks-runner/utils.d.ts +1 -2
- package/src/tasks-runner/utils.js +4 -8
- package/src/utils/package-json.d.ts +2 -1
- package/src/utils/package-json.js +11 -1
- package/src/utils/params.d.ts +1 -1
- package/src/utils/params.js +5 -4
- package/src/utils/print-help.js +1 -1
- package/src/native/browser.js +0 -1
- package/src/native/nx.debug.wasm32-wasi.wasm +0 -0
- package/src/native/nx.wasi-browser.js +0 -108
- package/src/native/nx.wasi.cjs +0 -139
- package/src/native/nx.wasm32-wasi.wasm +0 -0
|
@@ -1,382 +1,268 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* auto-generated by NAPI-RS */
|
|
1
|
+
const { existsSync, readFileSync } = require('fs')
|
|
2
|
+
const { join } = require('path')
|
|
4
3
|
|
|
5
|
-
const {
|
|
4
|
+
const { platform, arch } = process
|
|
6
5
|
|
|
7
6
|
let nativeBinding = null
|
|
8
|
-
|
|
7
|
+
let localFileExisted = false
|
|
8
|
+
let loadError = null
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (process.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
if (musl === null) {
|
|
18
|
-
musl = isMuslFromChildProcess()
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return musl
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
|
|
25
|
-
|
|
26
|
-
const isMuslFromFilesystem = () => {
|
|
27
|
-
try {
|
|
28
|
-
return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
|
|
29
|
-
} catch {
|
|
30
|
-
return null
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const isMuslFromReport = () => {
|
|
35
|
-
const report = typeof process.report.getReport === 'function' ? process.report.getReport() : null
|
|
36
|
-
if (!report) {
|
|
37
|
-
return null
|
|
38
|
-
}
|
|
39
|
-
if (report.header && report.header.glibcVersionRuntime) {
|
|
40
|
-
return false
|
|
41
|
-
}
|
|
42
|
-
if (Array.isArray(report.sharedObjects)) {
|
|
43
|
-
if (report.sharedObjects.some(isFileMusl)) {
|
|
10
|
+
function isMusl() {
|
|
11
|
+
// For Node 10
|
|
12
|
+
if (!process.report || typeof process.report.getReport !== 'function') {
|
|
13
|
+
try {
|
|
14
|
+
const lddPath = require('child_process').execSync('which ldd').toString().trim();
|
|
15
|
+
return readFileSync(lddPath, 'utf8').includes('musl')
|
|
16
|
+
} catch (e) {
|
|
44
17
|
return true
|
|
45
18
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const isMuslFromChildProcess = () => {
|
|
51
|
-
try {
|
|
52
|
-
return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
|
|
53
|
-
} catch (e) {
|
|
54
|
-
// If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
|
|
55
|
-
return false
|
|
19
|
+
} else {
|
|
20
|
+
const { glibcVersionRuntime } = process.report.getReport().header
|
|
21
|
+
return !glibcVersionRuntime
|
|
56
22
|
}
|
|
57
23
|
}
|
|
58
24
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
} catch (e) {
|
|
65
|
-
loadErrors.push(e)
|
|
66
|
-
}
|
|
67
|
-
try {
|
|
68
|
-
return require('@nx/nx-android-arm64')
|
|
69
|
-
} catch (e) {
|
|
70
|
-
loadErrors.push(e)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
} else if (process.arch === 'arm') {
|
|
74
|
-
try {
|
|
75
|
-
return require('./nx.android-arm-eabi.node')
|
|
76
|
-
} catch (e) {
|
|
77
|
-
loadErrors.push(e)
|
|
78
|
-
}
|
|
79
|
-
try {
|
|
80
|
-
return require('@nx/nx-android-arm-eabi')
|
|
81
|
-
} catch (e) {
|
|
82
|
-
loadErrors.push(e)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
} else {
|
|
86
|
-
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
|
|
87
|
-
}
|
|
88
|
-
} else if (process.platform === 'win32') {
|
|
89
|
-
if (process.arch === 'x64') {
|
|
90
|
-
try {
|
|
91
|
-
return require('./nx.win32-x64-msvc.node')
|
|
92
|
-
} catch (e) {
|
|
93
|
-
loadErrors.push(e)
|
|
94
|
-
}
|
|
95
|
-
try {
|
|
96
|
-
return require('@nx/nx-win32-x64-msvc')
|
|
97
|
-
} catch (e) {
|
|
98
|
-
loadErrors.push(e)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
} else if (process.arch === 'ia32') {
|
|
102
|
-
try {
|
|
103
|
-
return require('./nx.win32-ia32-msvc.node')
|
|
104
|
-
} catch (e) {
|
|
105
|
-
loadErrors.push(e)
|
|
106
|
-
}
|
|
107
|
-
try {
|
|
108
|
-
return require('@nx/nx-win32-ia32-msvc')
|
|
109
|
-
} catch (e) {
|
|
110
|
-
loadErrors.push(e)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
} else if (process.arch === 'arm64') {
|
|
114
|
-
try {
|
|
115
|
-
return require('./nx.win32-arm64-msvc.node')
|
|
116
|
-
} catch (e) {
|
|
117
|
-
loadErrors.push(e)
|
|
118
|
-
}
|
|
119
|
-
try {
|
|
120
|
-
return require('@nx/nx-win32-arm64-msvc')
|
|
121
|
-
} catch (e) {
|
|
122
|
-
loadErrors.push(e)
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
} else {
|
|
126
|
-
loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
|
|
127
|
-
}
|
|
128
|
-
} else if (process.platform === 'darwin') {
|
|
129
|
-
try {
|
|
130
|
-
return require('./nx.darwin-universal.node')
|
|
131
|
-
} catch (e) {
|
|
132
|
-
loadErrors.push(e)
|
|
133
|
-
}
|
|
134
|
-
try {
|
|
135
|
-
return require('@nx/nx-darwin-universal')
|
|
136
|
-
} catch (e) {
|
|
137
|
-
loadErrors.push(e)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (process.arch === 'x64') {
|
|
141
|
-
try {
|
|
142
|
-
return require('./nx.darwin-x64.node')
|
|
143
|
-
} catch (e) {
|
|
144
|
-
loadErrors.push(e)
|
|
145
|
-
}
|
|
146
|
-
try {
|
|
147
|
-
return require('@nx/nx-darwin-x64')
|
|
148
|
-
} catch (e) {
|
|
149
|
-
loadErrors.push(e)
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
} else if (process.arch === 'arm64') {
|
|
153
|
-
try {
|
|
154
|
-
return require('./nx.darwin-arm64.node')
|
|
155
|
-
} catch (e) {
|
|
156
|
-
loadErrors.push(e)
|
|
157
|
-
}
|
|
158
|
-
try {
|
|
159
|
-
return require('@nx/nx-darwin-arm64')
|
|
160
|
-
} catch (e) {
|
|
161
|
-
loadErrors.push(e)
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
} else {
|
|
165
|
-
loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
|
|
166
|
-
}
|
|
167
|
-
} else if (process.platform === 'freebsd') {
|
|
168
|
-
if (process.arch === 'x64') {
|
|
169
|
-
try {
|
|
170
|
-
return require('./nx.freebsd-x64.node')
|
|
171
|
-
} catch (e) {
|
|
172
|
-
loadErrors.push(e)
|
|
173
|
-
}
|
|
174
|
-
try {
|
|
175
|
-
return require('@nx/nx-freebsd-x64')
|
|
176
|
-
} catch (e) {
|
|
177
|
-
loadErrors.push(e)
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
} else if (process.arch === 'arm64') {
|
|
181
|
-
try {
|
|
182
|
-
return require('./nx.freebsd-arm64.node')
|
|
183
|
-
} catch (e) {
|
|
184
|
-
loadErrors.push(e)
|
|
185
|
-
}
|
|
186
|
-
try {
|
|
187
|
-
return require('@nx/nx-freebsd-arm64')
|
|
188
|
-
} catch (e) {
|
|
189
|
-
loadErrors.push(e)
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
} else {
|
|
193
|
-
loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
|
|
194
|
-
}
|
|
195
|
-
} else if (process.platform === 'linux') {
|
|
196
|
-
if (process.arch === 'x64') {
|
|
197
|
-
if (isMusl()) {
|
|
25
|
+
switch (platform) {
|
|
26
|
+
case 'android':
|
|
27
|
+
switch (arch) {
|
|
28
|
+
case 'arm64':
|
|
29
|
+
localFileExisted = existsSync(join(__dirname, 'nx.android-arm64.node'))
|
|
198
30
|
try {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
31
|
+
if (localFileExisted) {
|
|
32
|
+
nativeBinding = require('./nx.android-arm64.node')
|
|
33
|
+
} else {
|
|
34
|
+
nativeBinding = require('@nx/nx-android-arm64')
|
|
35
|
+
}
|
|
36
|
+
} catch (e) {
|
|
37
|
+
loadError = e
|
|
38
|
+
}
|
|
39
|
+
break
|
|
40
|
+
case 'arm':
|
|
41
|
+
localFileExisted = existsSync(join(__dirname, 'nx.android-arm-eabi.node'))
|
|
210
42
|
try {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
|
|
43
|
+
if (localFileExisted) {
|
|
44
|
+
nativeBinding = require('./nx.android-arm-eabi.node')
|
|
45
|
+
} else {
|
|
46
|
+
nativeBinding = require('@nx/nx-android-arm-eabi')
|
|
47
|
+
}
|
|
48
|
+
} catch (e) {
|
|
49
|
+
loadError = e
|
|
50
|
+
}
|
|
51
|
+
break
|
|
52
|
+
default:
|
|
53
|
+
throw new Error(`Unsupported architecture on Android ${arch}`)
|
|
54
|
+
}
|
|
55
|
+
break
|
|
56
|
+
case 'win32':
|
|
57
|
+
switch (arch) {
|
|
58
|
+
case 'x64':
|
|
59
|
+
localFileExisted = existsSync(
|
|
60
|
+
join(__dirname, 'nx.win32-x64-msvc.node')
|
|
61
|
+
)
|
|
224
62
|
try {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
63
|
+
if (localFileExisted) {
|
|
64
|
+
nativeBinding = require('./nx.win32-x64-msvc.node')
|
|
65
|
+
} else {
|
|
66
|
+
nativeBinding = require('@nx/nx-win32-x64-msvc')
|
|
67
|
+
}
|
|
68
|
+
} catch (e) {
|
|
69
|
+
loadError = e
|
|
70
|
+
}
|
|
71
|
+
break
|
|
72
|
+
case 'ia32':
|
|
73
|
+
localFileExisted = existsSync(
|
|
74
|
+
join(__dirname, 'nx.win32-ia32-msvc.node')
|
|
75
|
+
)
|
|
236
76
|
try {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
77
|
+
if (localFileExisted) {
|
|
78
|
+
nativeBinding = require('./nx.win32-ia32-msvc.node')
|
|
79
|
+
} else {
|
|
80
|
+
nativeBinding = require('@nx/nx-win32-ia32-msvc')
|
|
81
|
+
}
|
|
82
|
+
} catch (e) {
|
|
83
|
+
loadError = e
|
|
84
|
+
}
|
|
85
|
+
break
|
|
86
|
+
case 'arm64':
|
|
87
|
+
localFileExisted = existsSync(
|
|
88
|
+
join(__dirname, 'nx.win32-arm64-msvc.node')
|
|
89
|
+
)
|
|
250
90
|
try {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
91
|
+
if (localFileExisted) {
|
|
92
|
+
nativeBinding = require('./nx.win32-arm64-msvc.node')
|
|
93
|
+
} else {
|
|
94
|
+
nativeBinding = require('@nx/nx-win32-arm64-msvc')
|
|
95
|
+
}
|
|
96
|
+
} catch (e) {
|
|
97
|
+
loadError = e
|
|
98
|
+
}
|
|
99
|
+
break
|
|
100
|
+
default:
|
|
101
|
+
throw new Error(`Unsupported architecture on Windows: ${arch}`)
|
|
102
|
+
}
|
|
103
|
+
break
|
|
104
|
+
case 'darwin':
|
|
105
|
+
localFileExisted = existsSync(join(__dirname, 'nx.darwin-universal.node'))
|
|
106
|
+
try {
|
|
107
|
+
if (localFileExisted) {
|
|
108
|
+
nativeBinding = require('./nx.darwin-universal.node')
|
|
261
109
|
} else {
|
|
262
|
-
|
|
263
|
-
return require('./nx.linux-arm-gnueabihf.node')
|
|
264
|
-
} catch (e) {
|
|
265
|
-
loadErrors.push(e)
|
|
266
|
-
}
|
|
267
|
-
try {
|
|
268
|
-
return require('@nx/nx-linux-arm-gnueabihf')
|
|
269
|
-
} catch (e) {
|
|
270
|
-
loadErrors.push(e)
|
|
271
|
-
}
|
|
272
|
-
|
|
110
|
+
nativeBinding = require('@nx/nx-darwin-universal')
|
|
273
111
|
}
|
|
274
|
-
|
|
275
|
-
|
|
112
|
+
break
|
|
113
|
+
} catch {}
|
|
114
|
+
switch (arch) {
|
|
115
|
+
case 'x64':
|
|
116
|
+
localFileExisted = existsSync(join(__dirname, 'nx.darwin-x64.node'))
|
|
276
117
|
try {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
118
|
+
if (localFileExisted) {
|
|
119
|
+
nativeBinding = require('./nx.darwin-x64.node')
|
|
120
|
+
} else {
|
|
121
|
+
nativeBinding = require('@nx/nx-darwin-x64')
|
|
122
|
+
}
|
|
123
|
+
} catch (e) {
|
|
124
|
+
loadError = e
|
|
125
|
+
}
|
|
126
|
+
break
|
|
127
|
+
case 'arm64':
|
|
128
|
+
localFileExisted = existsSync(
|
|
129
|
+
join(__dirname, 'nx.darwin-arm64.node')
|
|
130
|
+
)
|
|
288
131
|
try {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
} else if (process.arch === 'ppc64') {
|
|
301
|
-
try {
|
|
302
|
-
return require('./nx.linux-ppc64-gnu.node')
|
|
303
|
-
} catch (e) {
|
|
304
|
-
loadErrors.push(e)
|
|
305
|
-
}
|
|
306
|
-
try {
|
|
307
|
-
return require('@nx/nx-linux-ppc64-gnu')
|
|
308
|
-
} catch (e) {
|
|
309
|
-
loadErrors.push(e)
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
} else if (process.arch === 's390x') {
|
|
313
|
-
try {
|
|
314
|
-
return require('./nx.linux-s390x-gnu.node')
|
|
315
|
-
} catch (e) {
|
|
316
|
-
loadErrors.push(e)
|
|
317
|
-
}
|
|
318
|
-
try {
|
|
319
|
-
return require('@nx/nx-linux-s390x-gnu')
|
|
320
|
-
} catch (e) {
|
|
321
|
-
loadErrors.push(e)
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
} else {
|
|
325
|
-
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
|
|
132
|
+
if (localFileExisted) {
|
|
133
|
+
nativeBinding = require('./nx.darwin-arm64.node')
|
|
134
|
+
} else {
|
|
135
|
+
nativeBinding = require('@nx/nx-darwin-arm64')
|
|
136
|
+
}
|
|
137
|
+
} catch (e) {
|
|
138
|
+
loadError = e
|
|
139
|
+
}
|
|
140
|
+
break
|
|
141
|
+
default:
|
|
142
|
+
throw new Error(`Unsupported architecture on macOS: ${arch}`)
|
|
326
143
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
nativeBinding = requireNative()
|
|
333
|
-
|
|
334
|
-
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
335
|
-
try {
|
|
336
|
-
nativeBinding = require('./nx.wasi.cjs')
|
|
337
|
-
} catch (err) {
|
|
338
|
-
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
339
|
-
console.error(err)
|
|
144
|
+
break
|
|
145
|
+
case 'freebsd':
|
|
146
|
+
if (arch !== 'x64') {
|
|
147
|
+
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
|
|
340
148
|
}
|
|
341
|
-
|
|
342
|
-
if (!nativeBinding) {
|
|
149
|
+
localFileExisted = existsSync(join(__dirname, 'nx.freebsd-x64.node'))
|
|
343
150
|
try {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
151
|
+
if (localFileExisted) {
|
|
152
|
+
nativeBinding = require('./nx.freebsd-x64.node')
|
|
153
|
+
} else {
|
|
154
|
+
nativeBinding = require('@nx/nx-freebsd-x64')
|
|
348
155
|
}
|
|
156
|
+
} catch (e) {
|
|
157
|
+
loadError = e
|
|
349
158
|
}
|
|
350
|
-
|
|
159
|
+
break
|
|
160
|
+
case 'linux':
|
|
161
|
+
switch (arch) {
|
|
162
|
+
case 'x64':
|
|
163
|
+
if (isMusl()) {
|
|
164
|
+
localFileExisted = existsSync(
|
|
165
|
+
join(__dirname, 'nx.linux-x64-musl.node')
|
|
166
|
+
)
|
|
167
|
+
try {
|
|
168
|
+
if (localFileExisted) {
|
|
169
|
+
nativeBinding = require('./nx.linux-x64-musl.node')
|
|
170
|
+
} else {
|
|
171
|
+
nativeBinding = require('@nx/nx-linux-x64-musl')
|
|
172
|
+
}
|
|
173
|
+
} catch (e) {
|
|
174
|
+
loadError = e
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
localFileExisted = existsSync(
|
|
178
|
+
join(__dirname, 'nx.linux-x64-gnu.node')
|
|
179
|
+
)
|
|
180
|
+
try {
|
|
181
|
+
if (localFileExisted) {
|
|
182
|
+
nativeBinding = require('./nx.linux-x64-gnu.node')
|
|
183
|
+
} else {
|
|
184
|
+
nativeBinding = require('@nx/nx-linux-x64-gnu')
|
|
185
|
+
}
|
|
186
|
+
} catch (e) {
|
|
187
|
+
loadError = e
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
break
|
|
191
|
+
case 'arm64':
|
|
192
|
+
if (isMusl()) {
|
|
193
|
+
localFileExisted = existsSync(
|
|
194
|
+
join(__dirname, 'nx.linux-arm64-musl.node')
|
|
195
|
+
)
|
|
196
|
+
try {
|
|
197
|
+
if (localFileExisted) {
|
|
198
|
+
nativeBinding = require('./nx.linux-arm64-musl.node')
|
|
199
|
+
} else {
|
|
200
|
+
nativeBinding = require('@nx/nx-linux-arm64-musl')
|
|
201
|
+
}
|
|
202
|
+
} catch (e) {
|
|
203
|
+
loadError = e
|
|
204
|
+
}
|
|
205
|
+
} else {
|
|
206
|
+
localFileExisted = existsSync(
|
|
207
|
+
join(__dirname, 'nx.linux-arm64-gnu.node')
|
|
208
|
+
)
|
|
209
|
+
try {
|
|
210
|
+
if (localFileExisted) {
|
|
211
|
+
nativeBinding = require('./nx.linux-arm64-gnu.node')
|
|
212
|
+
} else {
|
|
213
|
+
nativeBinding = require('@nx/nx-linux-arm64-gnu')
|
|
214
|
+
}
|
|
215
|
+
} catch (e) {
|
|
216
|
+
loadError = e
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
break
|
|
220
|
+
case 'arm':
|
|
221
|
+
localFileExisted = existsSync(
|
|
222
|
+
join(__dirname, 'nx.linux-arm-gnueabihf.node')
|
|
223
|
+
)
|
|
224
|
+
try {
|
|
225
|
+
if (localFileExisted) {
|
|
226
|
+
nativeBinding = require('./nx.linux-arm-gnueabihf.node')
|
|
227
|
+
} else {
|
|
228
|
+
nativeBinding = require('@nx/nx-linux-arm-gnueabihf')
|
|
229
|
+
}
|
|
230
|
+
} catch (e) {
|
|
231
|
+
loadError = e
|
|
232
|
+
}
|
|
233
|
+
break
|
|
234
|
+
default:
|
|
235
|
+
throw new Error(`Unsupported architecture on Linux: ${arch}`)
|
|
236
|
+
}
|
|
237
|
+
break
|
|
238
|
+
default:
|
|
239
|
+
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
|
|
351
240
|
}
|
|
352
241
|
|
|
353
242
|
if (!nativeBinding) {
|
|
354
|
-
if (
|
|
355
|
-
|
|
356
|
-
// - The package owner could build/publish bindings for this arch
|
|
357
|
-
// - The user may need to bundle the correct files
|
|
358
|
-
// - The user may need to re-install node_modules to get new packages
|
|
359
|
-
throw new Error('Failed to load native binding', { cause: loadErrors })
|
|
243
|
+
if (loadError) {
|
|
244
|
+
throw loadError
|
|
360
245
|
}
|
|
361
246
|
throw new Error(`Failed to load native binding`)
|
|
362
247
|
}
|
|
363
248
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
module.exports.
|
|
367
|
-
module.exports.
|
|
368
|
-
module.exports.
|
|
369
|
-
module.exports.
|
|
370
|
-
module.exports.
|
|
371
|
-
module.exports.
|
|
372
|
-
module.exports.
|
|
373
|
-
module.exports.
|
|
374
|
-
module.exports.
|
|
375
|
-
module.exports.
|
|
376
|
-
module.exports.
|
|
377
|
-
module.exports.
|
|
378
|
-
module.exports.
|
|
379
|
-
module.exports.
|
|
380
|
-
module.exports.
|
|
381
|
-
module.exports.
|
|
382
|
-
module.exports.WorkspaceErrors =
|
|
249
|
+
const { expandOutputs, getFilesForOutputs, remove, copy, hashArray, hashFile, ImportResult, findImports, transferProjectGraph, ChildProcess, RustPseudoTerminal, HashPlanner, TaskHasher, EventType, Watcher, WorkspaceContext, WorkspaceErrors, testOnlyTransferFileMap } = nativeBinding
|
|
250
|
+
|
|
251
|
+
module.exports.expandOutputs = expandOutputs
|
|
252
|
+
module.exports.getFilesForOutputs = getFilesForOutputs
|
|
253
|
+
module.exports.remove = remove
|
|
254
|
+
module.exports.copy = copy
|
|
255
|
+
module.exports.hashArray = hashArray
|
|
256
|
+
module.exports.hashFile = hashFile
|
|
257
|
+
module.exports.ImportResult = ImportResult
|
|
258
|
+
module.exports.findImports = findImports
|
|
259
|
+
module.exports.transferProjectGraph = transferProjectGraph
|
|
260
|
+
module.exports.ChildProcess = ChildProcess
|
|
261
|
+
module.exports.RustPseudoTerminal = RustPseudoTerminal
|
|
262
|
+
module.exports.HashPlanner = HashPlanner
|
|
263
|
+
module.exports.TaskHasher = TaskHasher
|
|
264
|
+
module.exports.EventType = EventType
|
|
265
|
+
module.exports.Watcher = Watcher
|
|
266
|
+
module.exports.WorkspaceContext = WorkspaceContext
|
|
267
|
+
module.exports.WorkspaceErrors = WorkspaceErrors
|
|
268
|
+
module.exports.testOnlyTransferFileMap = testOnlyTransferFileMap
|
package/src/plugins/js/index.js
CHANGED
|
@@ -33,7 +33,9 @@ exports.createNodes = [
|
|
|
33
33
|
const lockFilePath = (0, path_1.join)(workspace_root_1.workspaceRoot, lockFile);
|
|
34
34
|
const lockFileContents = packageManager !== 'bun'
|
|
35
35
|
? (0, fs_1.readFileSync)(lockFilePath).toString()
|
|
36
|
-
: (0, child_process_1.execSync)(`bun ${lockFilePath}
|
|
36
|
+
: (0, child_process_1.execSync)(`bun ${lockFilePath}`, {
|
|
37
|
+
maxBuffer: 1024 * 1024 * 10,
|
|
38
|
+
}).toString();
|
|
37
39
|
const lockFileHash = getLockFileHash(lockFileContents);
|
|
38
40
|
if (!lockFileNeedsReprocessing(lockFileHash)) {
|
|
39
41
|
const nodes = readCachedParsedLockFile().externalNodes;
|
|
@@ -60,7 +62,9 @@ const createDependencies = (_, ctx) => {
|
|
|
60
62
|
const lockFilePath = (0, path_1.join)(workspace_root_1.workspaceRoot, (0, lock_file_1.getLockFileName)(packageManager));
|
|
61
63
|
const lockFileContents = packageManager !== 'bun'
|
|
62
64
|
? (0, fs_1.readFileSync)(lockFilePath).toString()
|
|
63
|
-
: (0, child_process_1.execSync)(`bun ${lockFilePath}
|
|
65
|
+
: (0, child_process_1.execSync)(`bun ${lockFilePath}`, {
|
|
66
|
+
maxBuffer: 1024 * 1024 * 10,
|
|
67
|
+
}).toString();
|
|
64
68
|
const lockFileHash = getLockFileHash(lockFileContents);
|
|
65
69
|
if (!lockFileNeedsReprocessing(lockFileHash)) {
|
|
66
70
|
lockfileDependencies = readCachedParsedLockFile().dependencies ?? [];
|