@jsenv/core 40.12.7 → 40.12.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/README.md +1 -1
- package/dist/build/browserslist_index/browserslist_index.js +109 -3
- package/dist/build/build.js +276 -73
- package/dist/build/jsenv_core_node_modules.js +114 -361
- package/dist/build/jsenv_core_packages.js +23 -19
- package/dist/start_build_server/jsenv_core_node_modules.js +109 -361
- package/dist/start_dev_server/jsenv_core_node_modules.js +109 -361
- package/dist/start_dev_server/jsenv_core_packages.js +24 -20
- package/dist/start_dev_server/start_dev_server.js +336 -121
- package/package.json +14 -12
- package/src/build/build.js +8 -9
- package/src/dev/start_dev_server.js +68 -58
- package/src/kitchen/errors.js +8 -0
- package/src/kitchen/package_directory.js +22 -0
- package/src/kitchen/url_graph/url_graph.js +33 -19
- package/src/plugins/plugins.js +11 -4
- package/src/plugins/resolution_node_esm/jsenv_plugin_node_esm_resolution.js +6 -3
- package/src/plugins/resolution_node_esm/node_esm_resolver.js +75 -39
- package/src/plugins/workspace_bundle/jsenv_plugin_workspace_bundle.js +119 -0
|
@@ -223,371 +223,119 @@ const r = String.raw,
|
|
|
223
223
|
e = r`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`;
|
|
224
224
|
const emojiRegex = () => new RegExp(r`\p{RI}{2}|(?)${e}(?:\u200D${e})*`, 'gu');
|
|
225
225
|
|
|
226
|
-
// Generated
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|| x === 0x126
|
|
259
|
-
|| x === 0x127
|
|
260
|
-
|| x === 0x12B
|
|
261
|
-
|| x >= 0x131 && x <= 0x133
|
|
262
|
-
|| x === 0x138
|
|
263
|
-
|| x >= 0x13F && x <= 0x142
|
|
264
|
-
|| x === 0x144
|
|
265
|
-
|| x >= 0x148 && x <= 0x14B
|
|
266
|
-
|| x === 0x14D
|
|
267
|
-
|| x === 0x152
|
|
268
|
-
|| x === 0x153
|
|
269
|
-
|| x === 0x166
|
|
270
|
-
|| x === 0x167
|
|
271
|
-
|| x === 0x16B
|
|
272
|
-
|| x === 0x1CE
|
|
273
|
-
|| x === 0x1D0
|
|
274
|
-
|| x === 0x1D2
|
|
275
|
-
|| x === 0x1D4
|
|
276
|
-
|| x === 0x1D6
|
|
277
|
-
|| x === 0x1D8
|
|
278
|
-
|| x === 0x1DA
|
|
279
|
-
|| x === 0x1DC
|
|
280
|
-
|| x === 0x251
|
|
281
|
-
|| x === 0x261
|
|
282
|
-
|| x === 0x2C4
|
|
283
|
-
|| x === 0x2C7
|
|
284
|
-
|| x >= 0x2C9 && x <= 0x2CB
|
|
285
|
-
|| x === 0x2CD
|
|
286
|
-
|| x === 0x2D0
|
|
287
|
-
|| x >= 0x2D8 && x <= 0x2DB
|
|
288
|
-
|| x === 0x2DD
|
|
289
|
-
|| x === 0x2DF
|
|
290
|
-
|| x >= 0x300 && x <= 0x36F
|
|
291
|
-
|| x >= 0x391 && x <= 0x3A1
|
|
292
|
-
|| x >= 0x3A3 && x <= 0x3A9
|
|
293
|
-
|| x >= 0x3B1 && x <= 0x3C1
|
|
294
|
-
|| x >= 0x3C3 && x <= 0x3C9
|
|
295
|
-
|| x === 0x401
|
|
296
|
-
|| x >= 0x410 && x <= 0x44F
|
|
297
|
-
|| x === 0x451
|
|
298
|
-
|| x === 0x2010
|
|
299
|
-
|| x >= 0x2013 && x <= 0x2016
|
|
300
|
-
|| x === 0x2018
|
|
301
|
-
|| x === 0x2019
|
|
302
|
-
|| x === 0x201C
|
|
303
|
-
|| x === 0x201D
|
|
304
|
-
|| x >= 0x2020 && x <= 0x2022
|
|
305
|
-
|| x >= 0x2024 && x <= 0x2027
|
|
306
|
-
|| x === 0x2030
|
|
307
|
-
|| x === 0x2032
|
|
308
|
-
|| x === 0x2033
|
|
309
|
-
|| x === 0x2035
|
|
310
|
-
|| x === 0x203B
|
|
311
|
-
|| x === 0x203E
|
|
312
|
-
|| x === 0x2074
|
|
313
|
-
|| x === 0x207F
|
|
314
|
-
|| x >= 0x2081 && x <= 0x2084
|
|
315
|
-
|| x === 0x20AC
|
|
316
|
-
|| x === 0x2103
|
|
317
|
-
|| x === 0x2105
|
|
318
|
-
|| x === 0x2109
|
|
319
|
-
|| x === 0x2113
|
|
320
|
-
|| x === 0x2116
|
|
321
|
-
|| x === 0x2121
|
|
322
|
-
|| x === 0x2122
|
|
323
|
-
|| x === 0x2126
|
|
324
|
-
|| x === 0x212B
|
|
325
|
-
|| x === 0x2153
|
|
326
|
-
|| x === 0x2154
|
|
327
|
-
|| x >= 0x215B && x <= 0x215E
|
|
328
|
-
|| x >= 0x2160 && x <= 0x216B
|
|
329
|
-
|| x >= 0x2170 && x <= 0x2179
|
|
330
|
-
|| x === 0x2189
|
|
331
|
-
|| x >= 0x2190 && x <= 0x2199
|
|
332
|
-
|| x === 0x21B8
|
|
333
|
-
|| x === 0x21B9
|
|
334
|
-
|| x === 0x21D2
|
|
335
|
-
|| x === 0x21D4
|
|
336
|
-
|| x === 0x21E7
|
|
337
|
-
|| x === 0x2200
|
|
338
|
-
|| x === 0x2202
|
|
339
|
-
|| x === 0x2203
|
|
340
|
-
|| x === 0x2207
|
|
341
|
-
|| x === 0x2208
|
|
342
|
-
|| x === 0x220B
|
|
343
|
-
|| x === 0x220F
|
|
344
|
-
|| x === 0x2211
|
|
345
|
-
|| x === 0x2215
|
|
346
|
-
|| x === 0x221A
|
|
347
|
-
|| x >= 0x221D && x <= 0x2220
|
|
348
|
-
|| x === 0x2223
|
|
349
|
-
|| x === 0x2225
|
|
350
|
-
|| x >= 0x2227 && x <= 0x222C
|
|
351
|
-
|| x === 0x222E
|
|
352
|
-
|| x >= 0x2234 && x <= 0x2237
|
|
353
|
-
|| x === 0x223C
|
|
354
|
-
|| x === 0x223D
|
|
355
|
-
|| x === 0x2248
|
|
356
|
-
|| x === 0x224C
|
|
357
|
-
|| x === 0x2252
|
|
358
|
-
|| x === 0x2260
|
|
359
|
-
|| x === 0x2261
|
|
360
|
-
|| x >= 0x2264 && x <= 0x2267
|
|
361
|
-
|| x === 0x226A
|
|
362
|
-
|| x === 0x226B
|
|
363
|
-
|| x === 0x226E
|
|
364
|
-
|| x === 0x226F
|
|
365
|
-
|| x === 0x2282
|
|
366
|
-
|| x === 0x2283
|
|
367
|
-
|| x === 0x2286
|
|
368
|
-
|| x === 0x2287
|
|
369
|
-
|| x === 0x2295
|
|
370
|
-
|| x === 0x2299
|
|
371
|
-
|| x === 0x22A5
|
|
372
|
-
|| x === 0x22BF
|
|
373
|
-
|| x === 0x2312
|
|
374
|
-
|| x >= 0x2460 && x <= 0x24E9
|
|
375
|
-
|| x >= 0x24EB && x <= 0x254B
|
|
376
|
-
|| x >= 0x2550 && x <= 0x2573
|
|
377
|
-
|| x >= 0x2580 && x <= 0x258F
|
|
378
|
-
|| x >= 0x2592 && x <= 0x2595
|
|
379
|
-
|| x === 0x25A0
|
|
380
|
-
|| x === 0x25A1
|
|
381
|
-
|| x >= 0x25A3 && x <= 0x25A9
|
|
382
|
-
|| x === 0x25B2
|
|
383
|
-
|| x === 0x25B3
|
|
384
|
-
|| x === 0x25B6
|
|
385
|
-
|| x === 0x25B7
|
|
386
|
-
|| x === 0x25BC
|
|
387
|
-
|| x === 0x25BD
|
|
388
|
-
|| x === 0x25C0
|
|
389
|
-
|| x === 0x25C1
|
|
390
|
-
|| x >= 0x25C6 && x <= 0x25C8
|
|
391
|
-
|| x === 0x25CB
|
|
392
|
-
|| x >= 0x25CE && x <= 0x25D1
|
|
393
|
-
|| x >= 0x25E2 && x <= 0x25E5
|
|
394
|
-
|| x === 0x25EF
|
|
395
|
-
|| x === 0x2605
|
|
396
|
-
|| x === 0x2606
|
|
397
|
-
|| x === 0x2609
|
|
398
|
-
|| x === 0x260E
|
|
399
|
-
|| x === 0x260F
|
|
400
|
-
|| x === 0x261C
|
|
401
|
-
|| x === 0x261E
|
|
402
|
-
|| x === 0x2640
|
|
403
|
-
|| x === 0x2642
|
|
404
|
-
|| x === 0x2660
|
|
405
|
-
|| x === 0x2661
|
|
406
|
-
|| x >= 0x2663 && x <= 0x2665
|
|
407
|
-
|| x >= 0x2667 && x <= 0x266A
|
|
408
|
-
|| x === 0x266C
|
|
409
|
-
|| x === 0x266D
|
|
410
|
-
|| x === 0x266F
|
|
411
|
-
|| x === 0x269E
|
|
412
|
-
|| x === 0x269F
|
|
413
|
-
|| x === 0x26BF
|
|
414
|
-
|| x >= 0x26C6 && x <= 0x26CD
|
|
415
|
-
|| x >= 0x26CF && x <= 0x26D3
|
|
416
|
-
|| x >= 0x26D5 && x <= 0x26E1
|
|
417
|
-
|| x === 0x26E3
|
|
418
|
-
|| x === 0x26E8
|
|
419
|
-
|| x === 0x26E9
|
|
420
|
-
|| x >= 0x26EB && x <= 0x26F1
|
|
421
|
-
|| x === 0x26F4
|
|
422
|
-
|| x >= 0x26F6 && x <= 0x26F9
|
|
423
|
-
|| x === 0x26FB
|
|
424
|
-
|| x === 0x26FC
|
|
425
|
-
|| x === 0x26FE
|
|
426
|
-
|| x === 0x26FF
|
|
427
|
-
|| x === 0x273D
|
|
428
|
-
|| x >= 0x2776 && x <= 0x277F
|
|
429
|
-
|| x >= 0x2B56 && x <= 0x2B59
|
|
430
|
-
|| x >= 0x3248 && x <= 0x324F
|
|
431
|
-
|| x >= 0xE000 && x <= 0xF8FF
|
|
432
|
-
|| x >= 0xFE00 && x <= 0xFE0F
|
|
433
|
-
|| x === 0xFFFD
|
|
434
|
-
|| x >= 0x1F100 && x <= 0x1F10A
|
|
435
|
-
|| x >= 0x1F110 && x <= 0x1F12D
|
|
436
|
-
|| x >= 0x1F130 && x <= 0x1F169
|
|
437
|
-
|| x >= 0x1F170 && x <= 0x1F18D
|
|
438
|
-
|| x === 0x1F18F
|
|
439
|
-
|| x === 0x1F190
|
|
440
|
-
|| x >= 0x1F19B && x <= 0x1F1AC
|
|
441
|
-
|| x >= 0xE0100 && x <= 0xE01EF
|
|
442
|
-
|| x >= 0xF0000 && x <= 0xFFFFD
|
|
443
|
-
|| x >= 0x100000 && x <= 0x10FFFD;
|
|
444
|
-
}
|
|
226
|
+
// Generated by scripts/build.js
|
|
227
|
+
|
|
228
|
+
// prettier-ignore
|
|
229
|
+
const ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
230
|
+
|
|
231
|
+
// prettier-ignore
|
|
232
|
+
const fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
233
|
+
|
|
234
|
+
// prettier-ignore
|
|
235
|
+
const wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
Binary search on a sorted flat array of [start, end] pairs.
|
|
239
|
+
|
|
240
|
+
@param {number[]} ranges - Flat array of inclusive [start, end] range pairs, e.g. [0, 5, 10, 20].
|
|
241
|
+
@param {number} codePoint - The value to search for.
|
|
242
|
+
@returns {boolean} Whether the value falls within any of the ranges.
|
|
243
|
+
*/
|
|
244
|
+
const isInRange = (ranges, codePoint) => {
|
|
245
|
+
let low = 0;
|
|
246
|
+
let high = Math.floor(ranges.length / 2) - 1;
|
|
247
|
+
while (low <= high) {
|
|
248
|
+
const mid = Math.floor((low + high) / 2);
|
|
249
|
+
const i = mid * 2;
|
|
250
|
+
if (codePoint < ranges[i]) {
|
|
251
|
+
high = mid - 1;
|
|
252
|
+
} else if (codePoint > ranges[i + 1]) {
|
|
253
|
+
low = mid + 1;
|
|
254
|
+
} else {
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
445
258
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
259
|
+
return false;
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
const minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
263
|
+
const maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
264
|
+
const minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
265
|
+
const maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
266
|
+
const minimumWideCodePoint = wideRanges[0];
|
|
267
|
+
const maximumWideCodePoint = wideRanges.at(-1);
|
|
268
|
+
|
|
269
|
+
const commonCjkCodePoint = 0x4E_00;
|
|
270
|
+
const [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
271
|
+
|
|
272
|
+
// Use a hot-path range so common `isWide` calls can skip binary search.
|
|
273
|
+
// The range containing U+4E00 covers common CJK ideographs;
|
|
274
|
+
// fallback to the largest range for resilience to Unicode table changes.
|
|
275
|
+
function findWideFastPathRange(ranges) {
|
|
276
|
+
let fastPathStart = ranges[0];
|
|
277
|
+
let fastPathEnd = ranges[1];
|
|
278
|
+
|
|
279
|
+
for (let index = 0; index < ranges.length; index += 2) {
|
|
280
|
+
const start = ranges[index];
|
|
281
|
+
const end = ranges[index + 1];
|
|
282
|
+
|
|
283
|
+
if (
|
|
284
|
+
commonCjkCodePoint >= start
|
|
285
|
+
&& commonCjkCodePoint <= end
|
|
286
|
+
) {
|
|
287
|
+
return [start, end];
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if ((end - start) > (fastPathEnd - fastPathStart)) {
|
|
291
|
+
fastPathStart = start;
|
|
292
|
+
fastPathEnd = end;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
451
295
|
|
|
452
|
-
|
|
453
|
-
return x >= 0x1100 && x <= 0x115F
|
|
454
|
-
|| x === 0x231A
|
|
455
|
-
|| x === 0x231B
|
|
456
|
-
|| x === 0x2329
|
|
457
|
-
|| x === 0x232A
|
|
458
|
-
|| x >= 0x23E9 && x <= 0x23EC
|
|
459
|
-
|| x === 0x23F0
|
|
460
|
-
|| x === 0x23F3
|
|
461
|
-
|| x === 0x25FD
|
|
462
|
-
|| x === 0x25FE
|
|
463
|
-
|| x === 0x2614
|
|
464
|
-
|| x === 0x2615
|
|
465
|
-
|| x >= 0x2630 && x <= 0x2637
|
|
466
|
-
|| x >= 0x2648 && x <= 0x2653
|
|
467
|
-
|| x === 0x267F
|
|
468
|
-
|| x >= 0x268A && x <= 0x268F
|
|
469
|
-
|| x === 0x2693
|
|
470
|
-
|| x === 0x26A1
|
|
471
|
-
|| x === 0x26AA
|
|
472
|
-
|| x === 0x26AB
|
|
473
|
-
|| x === 0x26BD
|
|
474
|
-
|| x === 0x26BE
|
|
475
|
-
|| x === 0x26C4
|
|
476
|
-
|| x === 0x26C5
|
|
477
|
-
|| x === 0x26CE
|
|
478
|
-
|| x === 0x26D4
|
|
479
|
-
|| x === 0x26EA
|
|
480
|
-
|| x === 0x26F2
|
|
481
|
-
|| x === 0x26F3
|
|
482
|
-
|| x === 0x26F5
|
|
483
|
-
|| x === 0x26FA
|
|
484
|
-
|| x === 0x26FD
|
|
485
|
-
|| x === 0x2705
|
|
486
|
-
|| x === 0x270A
|
|
487
|
-
|| x === 0x270B
|
|
488
|
-
|| x === 0x2728
|
|
489
|
-
|| x === 0x274C
|
|
490
|
-
|| x === 0x274E
|
|
491
|
-
|| x >= 0x2753 && x <= 0x2755
|
|
492
|
-
|| x === 0x2757
|
|
493
|
-
|| x >= 0x2795 && x <= 0x2797
|
|
494
|
-
|| x === 0x27B0
|
|
495
|
-
|| x === 0x27BF
|
|
496
|
-
|| x === 0x2B1B
|
|
497
|
-
|| x === 0x2B1C
|
|
498
|
-
|| x === 0x2B50
|
|
499
|
-
|| x === 0x2B55
|
|
500
|
-
|| x >= 0x2E80 && x <= 0x2E99
|
|
501
|
-
|| x >= 0x2E9B && x <= 0x2EF3
|
|
502
|
-
|| x >= 0x2F00 && x <= 0x2FD5
|
|
503
|
-
|| x >= 0x2FF0 && x <= 0x2FFF
|
|
504
|
-
|| x >= 0x3001 && x <= 0x303E
|
|
505
|
-
|| x >= 0x3041 && x <= 0x3096
|
|
506
|
-
|| x >= 0x3099 && x <= 0x30FF
|
|
507
|
-
|| x >= 0x3105 && x <= 0x312F
|
|
508
|
-
|| x >= 0x3131 && x <= 0x318E
|
|
509
|
-
|| x >= 0x3190 && x <= 0x31E5
|
|
510
|
-
|| x >= 0x31EF && x <= 0x321E
|
|
511
|
-
|| x >= 0x3220 && x <= 0x3247
|
|
512
|
-
|| x >= 0x3250 && x <= 0xA48C
|
|
513
|
-
|| x >= 0xA490 && x <= 0xA4C6
|
|
514
|
-
|| x >= 0xA960 && x <= 0xA97C
|
|
515
|
-
|| x >= 0xAC00 && x <= 0xD7A3
|
|
516
|
-
|| x >= 0xF900 && x <= 0xFAFF
|
|
517
|
-
|| x >= 0xFE10 && x <= 0xFE19
|
|
518
|
-
|| x >= 0xFE30 && x <= 0xFE52
|
|
519
|
-
|| x >= 0xFE54 && x <= 0xFE66
|
|
520
|
-
|| x >= 0xFE68 && x <= 0xFE6B
|
|
521
|
-
|| x >= 0x16FE0 && x <= 0x16FE4
|
|
522
|
-
|| x >= 0x16FF0 && x <= 0x16FF6
|
|
523
|
-
|| x >= 0x17000 && x <= 0x18CD5
|
|
524
|
-
|| x >= 0x18CFF && x <= 0x18D1E
|
|
525
|
-
|| x >= 0x18D80 && x <= 0x18DF2
|
|
526
|
-
|| x >= 0x1AFF0 && x <= 0x1AFF3
|
|
527
|
-
|| x >= 0x1AFF5 && x <= 0x1AFFB
|
|
528
|
-
|| x === 0x1AFFD
|
|
529
|
-
|| x === 0x1AFFE
|
|
530
|
-
|| x >= 0x1B000 && x <= 0x1B122
|
|
531
|
-
|| x === 0x1B132
|
|
532
|
-
|| x >= 0x1B150 && x <= 0x1B152
|
|
533
|
-
|| x === 0x1B155
|
|
534
|
-
|| x >= 0x1B164 && x <= 0x1B167
|
|
535
|
-
|| x >= 0x1B170 && x <= 0x1B2FB
|
|
536
|
-
|| x >= 0x1D300 && x <= 0x1D356
|
|
537
|
-
|| x >= 0x1D360 && x <= 0x1D376
|
|
538
|
-
|| x === 0x1F004
|
|
539
|
-
|| x === 0x1F0CF
|
|
540
|
-
|| x === 0x1F18E
|
|
541
|
-
|| x >= 0x1F191 && x <= 0x1F19A
|
|
542
|
-
|| x >= 0x1F200 && x <= 0x1F202
|
|
543
|
-
|| x >= 0x1F210 && x <= 0x1F23B
|
|
544
|
-
|| x >= 0x1F240 && x <= 0x1F248
|
|
545
|
-
|| x === 0x1F250
|
|
546
|
-
|| x === 0x1F251
|
|
547
|
-
|| x >= 0x1F260 && x <= 0x1F265
|
|
548
|
-
|| x >= 0x1F300 && x <= 0x1F320
|
|
549
|
-
|| x >= 0x1F32D && x <= 0x1F335
|
|
550
|
-
|| x >= 0x1F337 && x <= 0x1F37C
|
|
551
|
-
|| x >= 0x1F37E && x <= 0x1F393
|
|
552
|
-
|| x >= 0x1F3A0 && x <= 0x1F3CA
|
|
553
|
-
|| x >= 0x1F3CF && x <= 0x1F3D3
|
|
554
|
-
|| x >= 0x1F3E0 && x <= 0x1F3F0
|
|
555
|
-
|| x === 0x1F3F4
|
|
556
|
-
|| x >= 0x1F3F8 && x <= 0x1F43E
|
|
557
|
-
|| x === 0x1F440
|
|
558
|
-
|| x >= 0x1F442 && x <= 0x1F4FC
|
|
559
|
-
|| x >= 0x1F4FF && x <= 0x1F53D
|
|
560
|
-
|| x >= 0x1F54B && x <= 0x1F54E
|
|
561
|
-
|| x >= 0x1F550 && x <= 0x1F567
|
|
562
|
-
|| x === 0x1F57A
|
|
563
|
-
|| x === 0x1F595
|
|
564
|
-
|| x === 0x1F596
|
|
565
|
-
|| x === 0x1F5A4
|
|
566
|
-
|| x >= 0x1F5FB && x <= 0x1F64F
|
|
567
|
-
|| x >= 0x1F680 && x <= 0x1F6C5
|
|
568
|
-
|| x === 0x1F6CC
|
|
569
|
-
|| x >= 0x1F6D0 && x <= 0x1F6D2
|
|
570
|
-
|| x >= 0x1F6D5 && x <= 0x1F6D8
|
|
571
|
-
|| x >= 0x1F6DC && x <= 0x1F6DF
|
|
572
|
-
|| x === 0x1F6EB
|
|
573
|
-
|| x === 0x1F6EC
|
|
574
|
-
|| x >= 0x1F6F4 && x <= 0x1F6FC
|
|
575
|
-
|| x >= 0x1F7E0 && x <= 0x1F7EB
|
|
576
|
-
|| x === 0x1F7F0
|
|
577
|
-
|| x >= 0x1F90C && x <= 0x1F93A
|
|
578
|
-
|| x >= 0x1F93C && x <= 0x1F945
|
|
579
|
-
|| x >= 0x1F947 && x <= 0x1F9FF
|
|
580
|
-
|| x >= 0x1FA70 && x <= 0x1FA7C
|
|
581
|
-
|| x >= 0x1FA80 && x <= 0x1FA8A
|
|
582
|
-
|| x >= 0x1FA8E && x <= 0x1FAC6
|
|
583
|
-
|| x === 0x1FAC8
|
|
584
|
-
|| x >= 0x1FACD && x <= 0x1FADC
|
|
585
|
-
|| x >= 0x1FADF && x <= 0x1FAEA
|
|
586
|
-
|| x >= 0x1FAEF && x <= 0x1FAF8
|
|
587
|
-
|| x >= 0x20000 && x <= 0x2FFFD
|
|
588
|
-
|| x >= 0x30000 && x <= 0x3FFFD;
|
|
296
|
+
return [fastPathStart, fastPathEnd];
|
|
589
297
|
}
|
|
590
298
|
|
|
299
|
+
const isAmbiguous = codePoint => {
|
|
300
|
+
if (
|
|
301
|
+
codePoint < minimumAmbiguousCodePoint
|
|
302
|
+
|| codePoint > maximumAmbiguousCodePoint
|
|
303
|
+
) {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
return isInRange(ambiguousRanges, codePoint);
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
const isFullWidth = codePoint => {
|
|
311
|
+
if (
|
|
312
|
+
codePoint < minimumFullWidthCodePoint
|
|
313
|
+
|| codePoint > maximumFullWidthCodePoint
|
|
314
|
+
) {
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
return isInRange(fullwidthRanges, codePoint);
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
const isWide = codePoint => {
|
|
322
|
+
if (
|
|
323
|
+
codePoint >= wideFastPathStart
|
|
324
|
+
&& codePoint <= wideFastPathEnd
|
|
325
|
+
) {
|
|
326
|
+
return true;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (
|
|
330
|
+
codePoint < minimumWideCodePoint
|
|
331
|
+
|| codePoint > maximumWideCodePoint
|
|
332
|
+
) {
|
|
333
|
+
return false;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
return isInRange(wideRanges, codePoint);
|
|
337
|
+
};
|
|
338
|
+
|
|
591
339
|
function validate(codePoint) {
|
|
592
340
|
if (!Number.isSafeInteger(codePoint)) {
|
|
593
341
|
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSupportsColor, isUnicodeSupported, emojiRegex, eastAsianWidth, clearTerminal, eraseLines } from "./jsenv_core_node_modules.js";
|
|
2
2
|
import { stripVTControlCharacters } from "node:util";
|
|
3
|
-
import {
|
|
3
|
+
import { readFileSync, existsSync, chmodSync, statSync, lstatSync, readdirSync, openSync, closeSync, unlinkSync, rmdirSync, mkdirSync, writeFileSync as writeFileSync$1, watch, realpathSync } from "node:fs";
|
|
4
4
|
import { extname } from "node:path";
|
|
5
5
|
import crypto, { createHash } from "node:crypto";
|
|
6
6
|
import { pathToFileURL, fileURLToPath } from "node:url";
|
|
@@ -4140,6 +4140,10 @@ const applyNodeEsmResolution = ({
|
|
|
4140
4140
|
return resolution;
|
|
4141
4141
|
};
|
|
4142
4142
|
|
|
4143
|
+
const createResolutionResult = (data) => {
|
|
4144
|
+
return data;
|
|
4145
|
+
};
|
|
4146
|
+
|
|
4143
4147
|
const applyPackageSpecifierResolution = (specifier, resolutionContext) => {
|
|
4144
4148
|
const { parentUrl } = resolutionContext;
|
|
4145
4149
|
// relative specifier
|
|
@@ -4157,10 +4161,10 @@ const applyPackageSpecifierResolution = (specifier, resolutionContext) => {
|
|
|
4157
4161
|
return browserFieldResolution;
|
|
4158
4162
|
}
|
|
4159
4163
|
}
|
|
4160
|
-
return {
|
|
4164
|
+
return createResolutionResult({
|
|
4161
4165
|
type: "relative_specifier",
|
|
4162
4166
|
url: new URL(specifier, parentUrl).href,
|
|
4163
|
-
};
|
|
4167
|
+
});
|
|
4164
4168
|
}
|
|
4165
4169
|
if (specifier[0] === "#") {
|
|
4166
4170
|
return applyPackageImportsResolution(specifier, resolutionContext);
|
|
@@ -4168,15 +4172,15 @@ const applyPackageSpecifierResolution = (specifier, resolutionContext) => {
|
|
|
4168
4172
|
try {
|
|
4169
4173
|
const urlObject = new URL(specifier);
|
|
4170
4174
|
if (specifier.startsWith("node:")) {
|
|
4171
|
-
return {
|
|
4175
|
+
return createResolutionResult({
|
|
4172
4176
|
type: "node_builtin_specifier",
|
|
4173
4177
|
url: specifier,
|
|
4174
|
-
};
|
|
4178
|
+
});
|
|
4175
4179
|
}
|
|
4176
|
-
return {
|
|
4180
|
+
return createResolutionResult({
|
|
4177
4181
|
type: "absolute_specifier",
|
|
4178
4182
|
url: urlObject.href,
|
|
4179
|
-
};
|
|
4183
|
+
});
|
|
4180
4184
|
} catch {
|
|
4181
4185
|
// bare specifier
|
|
4182
4186
|
const browserFieldResolution = applyBrowserFieldResolution(
|
|
@@ -4237,13 +4241,13 @@ const applyBrowserFieldResolution = (specifier, resolutionContext) => {
|
|
|
4237
4241
|
}
|
|
4238
4242
|
}
|
|
4239
4243
|
if (url) {
|
|
4240
|
-
return {
|
|
4244
|
+
return createResolutionResult({
|
|
4241
4245
|
type: "field:browser",
|
|
4242
4246
|
isMain: true,
|
|
4243
4247
|
packageDirectoryUrl,
|
|
4244
4248
|
packageJson,
|
|
4245
4249
|
url,
|
|
4246
|
-
};
|
|
4250
|
+
});
|
|
4247
4251
|
}
|
|
4248
4252
|
return null;
|
|
4249
4253
|
};
|
|
@@ -4292,10 +4296,10 @@ const applyPackageResolve = (packageSpecifier, resolutionContext) => {
|
|
|
4292
4296
|
conditions.includes("node") &&
|
|
4293
4297
|
isSpecifierForNodeBuiltin(packageSpecifier)
|
|
4294
4298
|
) {
|
|
4295
|
-
return {
|
|
4299
|
+
return createResolutionResult({
|
|
4296
4300
|
type: "node_builtin_specifier",
|
|
4297
4301
|
url: `node:${packageSpecifier}`,
|
|
4298
|
-
};
|
|
4302
|
+
});
|
|
4299
4303
|
}
|
|
4300
4304
|
let { packageName, packageSubpath } = parsePackageSpecifier(packageSpecifier);
|
|
4301
4305
|
if (
|
|
@@ -4488,7 +4492,7 @@ const applyPackageTargetResolution = (target, resolutionContext) => {
|
|
|
4488
4492
|
resolutionContext,
|
|
4489
4493
|
);
|
|
4490
4494
|
}
|
|
4491
|
-
return {
|
|
4495
|
+
return createResolutionResult({
|
|
4492
4496
|
type: isImport ? "field:imports" : "field:exports",
|
|
4493
4497
|
isMain: subpath === "" || subpath === ".",
|
|
4494
4498
|
packageDirectoryUrl,
|
|
@@ -4496,7 +4500,7 @@ const applyPackageTargetResolution = (target, resolutionContext) => {
|
|
|
4496
4500
|
url: pattern
|
|
4497
4501
|
? targetUrl.replaceAll("*", subpath)
|
|
4498
4502
|
: new URL(subpath, targetUrl).href,
|
|
4499
|
-
};
|
|
4503
|
+
});
|
|
4500
4504
|
}
|
|
4501
4505
|
if (!isImport || target.startsWith("../") || isValidUrl(target)) {
|
|
4502
4506
|
throw createInvalidPackageTargetError(
|
|
@@ -4717,13 +4721,13 @@ const applyLegacySubpathResolution = (packageSubpath, resolutionContext) => {
|
|
|
4717
4721
|
if (browserFieldResolution) {
|
|
4718
4722
|
return browserFieldResolution;
|
|
4719
4723
|
}
|
|
4720
|
-
return {
|
|
4724
|
+
return createResolutionResult({
|
|
4721
4725
|
type: "subpath",
|
|
4722
4726
|
isMain: packageSubpath === ".",
|
|
4723
4727
|
packageDirectoryUrl,
|
|
4724
4728
|
packageJson,
|
|
4725
4729
|
url: new URL(packageSubpath, packageDirectoryUrl).href,
|
|
4726
|
-
};
|
|
4730
|
+
});
|
|
4727
4731
|
};
|
|
4728
4732
|
|
|
4729
4733
|
const applyLegacyMainResolution = (packageSubpath, resolutionContext) => {
|
|
@@ -4735,22 +4739,22 @@ const applyLegacyMainResolution = (packageSubpath, resolutionContext) => {
|
|
|
4735
4739
|
}
|
|
4736
4740
|
const resolved = conditionResolver(resolutionContext);
|
|
4737
4741
|
if (resolved) {
|
|
4738
|
-
return {
|
|
4742
|
+
return createResolutionResult({
|
|
4739
4743
|
type: resolved.type,
|
|
4740
4744
|
isMain: resolved.isMain,
|
|
4741
4745
|
packageDirectoryUrl,
|
|
4742
4746
|
packageJson,
|
|
4743
4747
|
url: new URL(resolved.path, packageDirectoryUrl).href,
|
|
4744
|
-
};
|
|
4748
|
+
});
|
|
4745
4749
|
}
|
|
4746
4750
|
}
|
|
4747
|
-
return {
|
|
4751
|
+
return createResolutionResult({
|
|
4748
4752
|
type: "field:main", // the absence of "main" field
|
|
4749
4753
|
isMain: true,
|
|
4750
4754
|
packageDirectoryUrl,
|
|
4751
4755
|
packageJson,
|
|
4752
4756
|
url: new URL("index.js", packageDirectoryUrl).href,
|
|
4753
|
-
};
|
|
4757
|
+
});
|
|
4754
4758
|
};
|
|
4755
4759
|
const mainLegacyResolvers = {
|
|
4756
4760
|
import: ({ packageJson }) => {
|
|
@@ -6302,4 +6306,4 @@ const memoizeByFirstArgument = (compute) => {
|
|
|
6302
6306
|
return fnWithMemoization;
|
|
6303
6307
|
};
|
|
6304
6308
|
|
|
6305
|
-
export { ANSI, CONTENT_TYPE, DATA_URL, JS_QUOTES, RUNTIME_COMPAT, URL_META, applyFileSystemMagicResolution, applyNodeEsmResolution, asSpecifierWithoutSearch, asUrlWithoutSearch, assertAndNormalizeDirectoryUrl, bufferToEtag, compareFileUrls, composeTwoImportMaps, createDetailedMessage$1 as createDetailedMessage, createLogger, createTaskLog,
|
|
6309
|
+
export { ANSI, CONTENT_TYPE, DATA_URL, JS_QUOTES, RUNTIME_COMPAT, URL_META, applyFileSystemMagicResolution, applyNodeEsmResolution, asSpecifierWithoutSearch, asUrlWithoutSearch, assertAndNormalizeDirectoryUrl, bufferToEtag, compareFileUrls, composeTwoImportMaps, createDetailedMessage$1 as createDetailedMessage, createLogger, createTaskLog, ensurePathnameTrailingSlash, ensureWindowsDriveLetter, errorToHTML, formatError, generateContentFrame, getCallerPosition, getExtensionsToTry, injectQueryParams, injectQueryParamsIntoSpecifier, isFileSystemPath, isSpecifierForNodeBuiltin, lookupPackageDirectory, memoizeByFirstArgument, moveUrl, normalizeImportMap, normalizeUrl, readCustomConditionsFromProcessArgs, readEntryStatSync, readPackageAtOrNull, registerDirectoryLifecycle, resolveImport, setUrlBasename, setUrlExtension, setUrlFilename, stringifyUrlSite, urlIsOrIsInsideOf, urlToBasename, urlToExtension$1 as urlToExtension, urlToFileSystemPath, urlToFilename$1 as urlToFilename, urlToPathname$1 as urlToPathname, urlToRelativeUrl, validateResponseIntegrity, writeFileSync };
|