@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
|
@@ -241,6 +241,11 @@ function stripAnsi(string) {
|
|
|
241
241
|
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
+
// Fast path: ANSI codes require ESC (7-bit) or CSI (8-bit) introducer
|
|
245
|
+
if (!string.includes('\u001B') && !string.includes('\u009B')) {
|
|
246
|
+
return string;
|
|
247
|
+
}
|
|
248
|
+
|
|
244
249
|
// Even though the regex is global, we don't need to reset the `.lastIndex`
|
|
245
250
|
// because unlike `.exec()` and `.test()`, `.replace()` does it automatically
|
|
246
251
|
// and doing it manually has a performance penalty.
|
|
@@ -251,371 +256,119 @@ const r = String.raw,
|
|
|
251
256
|
e = r`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`;
|
|
252
257
|
const emojiRegex = () => new RegExp(r`\p{RI}{2}|(?)${e}(?:\u200D${e})*`, 'gu');
|
|
253
258
|
|
|
254
|
-
// Generated
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|| x === 0x126
|
|
287
|
-
|| x === 0x127
|
|
288
|
-
|| x === 0x12B
|
|
289
|
-
|| x >= 0x131 && x <= 0x133
|
|
290
|
-
|| x === 0x138
|
|
291
|
-
|| x >= 0x13F && x <= 0x142
|
|
292
|
-
|| x === 0x144
|
|
293
|
-
|| x >= 0x148 && x <= 0x14B
|
|
294
|
-
|| x === 0x14D
|
|
295
|
-
|| x === 0x152
|
|
296
|
-
|| x === 0x153
|
|
297
|
-
|| x === 0x166
|
|
298
|
-
|| x === 0x167
|
|
299
|
-
|| x === 0x16B
|
|
300
|
-
|| x === 0x1CE
|
|
301
|
-
|| x === 0x1D0
|
|
302
|
-
|| x === 0x1D2
|
|
303
|
-
|| x === 0x1D4
|
|
304
|
-
|| x === 0x1D6
|
|
305
|
-
|| x === 0x1D8
|
|
306
|
-
|| x === 0x1DA
|
|
307
|
-
|| x === 0x1DC
|
|
308
|
-
|| x === 0x251
|
|
309
|
-
|| x === 0x261
|
|
310
|
-
|| x === 0x2C4
|
|
311
|
-
|| x === 0x2C7
|
|
312
|
-
|| x >= 0x2C9 && x <= 0x2CB
|
|
313
|
-
|| x === 0x2CD
|
|
314
|
-
|| x === 0x2D0
|
|
315
|
-
|| x >= 0x2D8 && x <= 0x2DB
|
|
316
|
-
|| x === 0x2DD
|
|
317
|
-
|| x === 0x2DF
|
|
318
|
-
|| x >= 0x300 && x <= 0x36F
|
|
319
|
-
|| x >= 0x391 && x <= 0x3A1
|
|
320
|
-
|| x >= 0x3A3 && x <= 0x3A9
|
|
321
|
-
|| x >= 0x3B1 && x <= 0x3C1
|
|
322
|
-
|| x >= 0x3C3 && x <= 0x3C9
|
|
323
|
-
|| x === 0x401
|
|
324
|
-
|| x >= 0x410 && x <= 0x44F
|
|
325
|
-
|| x === 0x451
|
|
326
|
-
|| x === 0x2010
|
|
327
|
-
|| x >= 0x2013 && x <= 0x2016
|
|
328
|
-
|| x === 0x2018
|
|
329
|
-
|| x === 0x2019
|
|
330
|
-
|| x === 0x201C
|
|
331
|
-
|| x === 0x201D
|
|
332
|
-
|| x >= 0x2020 && x <= 0x2022
|
|
333
|
-
|| x >= 0x2024 && x <= 0x2027
|
|
334
|
-
|| x === 0x2030
|
|
335
|
-
|| x === 0x2032
|
|
336
|
-
|| x === 0x2033
|
|
337
|
-
|| x === 0x2035
|
|
338
|
-
|| x === 0x203B
|
|
339
|
-
|| x === 0x203E
|
|
340
|
-
|| x === 0x2074
|
|
341
|
-
|| x === 0x207F
|
|
342
|
-
|| x >= 0x2081 && x <= 0x2084
|
|
343
|
-
|| x === 0x20AC
|
|
344
|
-
|| x === 0x2103
|
|
345
|
-
|| x === 0x2105
|
|
346
|
-
|| x === 0x2109
|
|
347
|
-
|| x === 0x2113
|
|
348
|
-
|| x === 0x2116
|
|
349
|
-
|| x === 0x2121
|
|
350
|
-
|| x === 0x2122
|
|
351
|
-
|| x === 0x2126
|
|
352
|
-
|| x === 0x212B
|
|
353
|
-
|| x === 0x2153
|
|
354
|
-
|| x === 0x2154
|
|
355
|
-
|| x >= 0x215B && x <= 0x215E
|
|
356
|
-
|| x >= 0x2160 && x <= 0x216B
|
|
357
|
-
|| x >= 0x2170 && x <= 0x2179
|
|
358
|
-
|| x === 0x2189
|
|
359
|
-
|| x >= 0x2190 && x <= 0x2199
|
|
360
|
-
|| x === 0x21B8
|
|
361
|
-
|| x === 0x21B9
|
|
362
|
-
|| x === 0x21D2
|
|
363
|
-
|| x === 0x21D4
|
|
364
|
-
|| x === 0x21E7
|
|
365
|
-
|| x === 0x2200
|
|
366
|
-
|| x === 0x2202
|
|
367
|
-
|| x === 0x2203
|
|
368
|
-
|| x === 0x2207
|
|
369
|
-
|| x === 0x2208
|
|
370
|
-
|| x === 0x220B
|
|
371
|
-
|| x === 0x220F
|
|
372
|
-
|| x === 0x2211
|
|
373
|
-
|| x === 0x2215
|
|
374
|
-
|| x === 0x221A
|
|
375
|
-
|| x >= 0x221D && x <= 0x2220
|
|
376
|
-
|| x === 0x2223
|
|
377
|
-
|| x === 0x2225
|
|
378
|
-
|| x >= 0x2227 && x <= 0x222C
|
|
379
|
-
|| x === 0x222E
|
|
380
|
-
|| x >= 0x2234 && x <= 0x2237
|
|
381
|
-
|| x === 0x223C
|
|
382
|
-
|| x === 0x223D
|
|
383
|
-
|| x === 0x2248
|
|
384
|
-
|| x === 0x224C
|
|
385
|
-
|| x === 0x2252
|
|
386
|
-
|| x === 0x2260
|
|
387
|
-
|| x === 0x2261
|
|
388
|
-
|| x >= 0x2264 && x <= 0x2267
|
|
389
|
-
|| x === 0x226A
|
|
390
|
-
|| x === 0x226B
|
|
391
|
-
|| x === 0x226E
|
|
392
|
-
|| x === 0x226F
|
|
393
|
-
|| x === 0x2282
|
|
394
|
-
|| x === 0x2283
|
|
395
|
-
|| x === 0x2286
|
|
396
|
-
|| x === 0x2287
|
|
397
|
-
|| x === 0x2295
|
|
398
|
-
|| x === 0x2299
|
|
399
|
-
|| x === 0x22A5
|
|
400
|
-
|| x === 0x22BF
|
|
401
|
-
|| x === 0x2312
|
|
402
|
-
|| x >= 0x2460 && x <= 0x24E9
|
|
403
|
-
|| x >= 0x24EB && x <= 0x254B
|
|
404
|
-
|| x >= 0x2550 && x <= 0x2573
|
|
405
|
-
|| x >= 0x2580 && x <= 0x258F
|
|
406
|
-
|| x >= 0x2592 && x <= 0x2595
|
|
407
|
-
|| x === 0x25A0
|
|
408
|
-
|| x === 0x25A1
|
|
409
|
-
|| x >= 0x25A3 && x <= 0x25A9
|
|
410
|
-
|| x === 0x25B2
|
|
411
|
-
|| x === 0x25B3
|
|
412
|
-
|| x === 0x25B6
|
|
413
|
-
|| x === 0x25B7
|
|
414
|
-
|| x === 0x25BC
|
|
415
|
-
|| x === 0x25BD
|
|
416
|
-
|| x === 0x25C0
|
|
417
|
-
|| x === 0x25C1
|
|
418
|
-
|| x >= 0x25C6 && x <= 0x25C8
|
|
419
|
-
|| x === 0x25CB
|
|
420
|
-
|| x >= 0x25CE && x <= 0x25D1
|
|
421
|
-
|| x >= 0x25E2 && x <= 0x25E5
|
|
422
|
-
|| x === 0x25EF
|
|
423
|
-
|| x === 0x2605
|
|
424
|
-
|| x === 0x2606
|
|
425
|
-
|| x === 0x2609
|
|
426
|
-
|| x === 0x260E
|
|
427
|
-
|| x === 0x260F
|
|
428
|
-
|| x === 0x261C
|
|
429
|
-
|| x === 0x261E
|
|
430
|
-
|| x === 0x2640
|
|
431
|
-
|| x === 0x2642
|
|
432
|
-
|| x === 0x2660
|
|
433
|
-
|| x === 0x2661
|
|
434
|
-
|| x >= 0x2663 && x <= 0x2665
|
|
435
|
-
|| x >= 0x2667 && x <= 0x266A
|
|
436
|
-
|| x === 0x266C
|
|
437
|
-
|| x === 0x266D
|
|
438
|
-
|| x === 0x266F
|
|
439
|
-
|| x === 0x269E
|
|
440
|
-
|| x === 0x269F
|
|
441
|
-
|| x === 0x26BF
|
|
442
|
-
|| x >= 0x26C6 && x <= 0x26CD
|
|
443
|
-
|| x >= 0x26CF && x <= 0x26D3
|
|
444
|
-
|| x >= 0x26D5 && x <= 0x26E1
|
|
445
|
-
|| x === 0x26E3
|
|
446
|
-
|| x === 0x26E8
|
|
447
|
-
|| x === 0x26E9
|
|
448
|
-
|| x >= 0x26EB && x <= 0x26F1
|
|
449
|
-
|| x === 0x26F4
|
|
450
|
-
|| x >= 0x26F6 && x <= 0x26F9
|
|
451
|
-
|| x === 0x26FB
|
|
452
|
-
|| x === 0x26FC
|
|
453
|
-
|| x === 0x26FE
|
|
454
|
-
|| x === 0x26FF
|
|
455
|
-
|| x === 0x273D
|
|
456
|
-
|| x >= 0x2776 && x <= 0x277F
|
|
457
|
-
|| x >= 0x2B56 && x <= 0x2B59
|
|
458
|
-
|| x >= 0x3248 && x <= 0x324F
|
|
459
|
-
|| x >= 0xE000 && x <= 0xF8FF
|
|
460
|
-
|| x >= 0xFE00 && x <= 0xFE0F
|
|
461
|
-
|| x === 0xFFFD
|
|
462
|
-
|| x >= 0x1F100 && x <= 0x1F10A
|
|
463
|
-
|| x >= 0x1F110 && x <= 0x1F12D
|
|
464
|
-
|| x >= 0x1F130 && x <= 0x1F169
|
|
465
|
-
|| x >= 0x1F170 && x <= 0x1F18D
|
|
466
|
-
|| x === 0x1F18F
|
|
467
|
-
|| x === 0x1F190
|
|
468
|
-
|| x >= 0x1F19B && x <= 0x1F1AC
|
|
469
|
-
|| x >= 0xE0100 && x <= 0xE01EF
|
|
470
|
-
|| x >= 0xF0000 && x <= 0xFFFFD
|
|
471
|
-
|| x >= 0x100000 && x <= 0x10FFFD;
|
|
472
|
-
}
|
|
259
|
+
// Generated by scripts/build.js
|
|
260
|
+
|
|
261
|
+
// prettier-ignore
|
|
262
|
+
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];
|
|
263
|
+
|
|
264
|
+
// prettier-ignore
|
|
265
|
+
const fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
266
|
+
|
|
267
|
+
// prettier-ignore
|
|
268
|
+
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];
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
Binary search on a sorted flat array of [start, end] pairs.
|
|
272
|
+
|
|
273
|
+
@param {number[]} ranges - Flat array of inclusive [start, end] range pairs, e.g. [0, 5, 10, 20].
|
|
274
|
+
@param {number} codePoint - The value to search for.
|
|
275
|
+
@returns {boolean} Whether the value falls within any of the ranges.
|
|
276
|
+
*/
|
|
277
|
+
const isInRange = (ranges, codePoint) => {
|
|
278
|
+
let low = 0;
|
|
279
|
+
let high = Math.floor(ranges.length / 2) - 1;
|
|
280
|
+
while (low <= high) {
|
|
281
|
+
const mid = Math.floor((low + high) / 2);
|
|
282
|
+
const i = mid * 2;
|
|
283
|
+
if (codePoint < ranges[i]) {
|
|
284
|
+
high = mid - 1;
|
|
285
|
+
} else if (codePoint > ranges[i + 1]) {
|
|
286
|
+
low = mid + 1;
|
|
287
|
+
} else {
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
473
291
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
292
|
+
return false;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
const minimumAmbiguousCodePoint = ambiguousRanges[0];
|
|
296
|
+
const maximumAmbiguousCodePoint = ambiguousRanges.at(-1);
|
|
297
|
+
const minimumFullWidthCodePoint = fullwidthRanges[0];
|
|
298
|
+
const maximumFullWidthCodePoint = fullwidthRanges.at(-1);
|
|
299
|
+
const minimumWideCodePoint = wideRanges[0];
|
|
300
|
+
const maximumWideCodePoint = wideRanges.at(-1);
|
|
301
|
+
|
|
302
|
+
const commonCjkCodePoint = 0x4E_00;
|
|
303
|
+
const [wideFastPathStart, wideFastPathEnd] = findWideFastPathRange(wideRanges);
|
|
304
|
+
|
|
305
|
+
// Use a hot-path range so common `isWide` calls can skip binary search.
|
|
306
|
+
// The range containing U+4E00 covers common CJK ideographs;
|
|
307
|
+
// fallback to the largest range for resilience to Unicode table changes.
|
|
308
|
+
function findWideFastPathRange(ranges) {
|
|
309
|
+
let fastPathStart = ranges[0];
|
|
310
|
+
let fastPathEnd = ranges[1];
|
|
311
|
+
|
|
312
|
+
for (let index = 0; index < ranges.length; index += 2) {
|
|
313
|
+
const start = ranges[index];
|
|
314
|
+
const end = ranges[index + 1];
|
|
479
315
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|| x >= 0x2648 && x <= 0x2653
|
|
495
|
-
|| x === 0x267F
|
|
496
|
-
|| x >= 0x268A && x <= 0x268F
|
|
497
|
-
|| x === 0x2693
|
|
498
|
-
|| x === 0x26A1
|
|
499
|
-
|| x === 0x26AA
|
|
500
|
-
|| x === 0x26AB
|
|
501
|
-
|| x === 0x26BD
|
|
502
|
-
|| x === 0x26BE
|
|
503
|
-
|| x === 0x26C4
|
|
504
|
-
|| x === 0x26C5
|
|
505
|
-
|| x === 0x26CE
|
|
506
|
-
|| x === 0x26D4
|
|
507
|
-
|| x === 0x26EA
|
|
508
|
-
|| x === 0x26F2
|
|
509
|
-
|| x === 0x26F3
|
|
510
|
-
|| x === 0x26F5
|
|
511
|
-
|| x === 0x26FA
|
|
512
|
-
|| x === 0x26FD
|
|
513
|
-
|| x === 0x2705
|
|
514
|
-
|| x === 0x270A
|
|
515
|
-
|| x === 0x270B
|
|
516
|
-
|| x === 0x2728
|
|
517
|
-
|| x === 0x274C
|
|
518
|
-
|| x === 0x274E
|
|
519
|
-
|| x >= 0x2753 && x <= 0x2755
|
|
520
|
-
|| x === 0x2757
|
|
521
|
-
|| x >= 0x2795 && x <= 0x2797
|
|
522
|
-
|| x === 0x27B0
|
|
523
|
-
|| x === 0x27BF
|
|
524
|
-
|| x === 0x2B1B
|
|
525
|
-
|| x === 0x2B1C
|
|
526
|
-
|| x === 0x2B50
|
|
527
|
-
|| x === 0x2B55
|
|
528
|
-
|| x >= 0x2E80 && x <= 0x2E99
|
|
529
|
-
|| x >= 0x2E9B && x <= 0x2EF3
|
|
530
|
-
|| x >= 0x2F00 && x <= 0x2FD5
|
|
531
|
-
|| x >= 0x2FF0 && x <= 0x2FFF
|
|
532
|
-
|| x >= 0x3001 && x <= 0x303E
|
|
533
|
-
|| x >= 0x3041 && x <= 0x3096
|
|
534
|
-
|| x >= 0x3099 && x <= 0x30FF
|
|
535
|
-
|| x >= 0x3105 && x <= 0x312F
|
|
536
|
-
|| x >= 0x3131 && x <= 0x318E
|
|
537
|
-
|| x >= 0x3190 && x <= 0x31E5
|
|
538
|
-
|| x >= 0x31EF && x <= 0x321E
|
|
539
|
-
|| x >= 0x3220 && x <= 0x3247
|
|
540
|
-
|| x >= 0x3250 && x <= 0xA48C
|
|
541
|
-
|| x >= 0xA490 && x <= 0xA4C6
|
|
542
|
-
|| x >= 0xA960 && x <= 0xA97C
|
|
543
|
-
|| x >= 0xAC00 && x <= 0xD7A3
|
|
544
|
-
|| x >= 0xF900 && x <= 0xFAFF
|
|
545
|
-
|| x >= 0xFE10 && x <= 0xFE19
|
|
546
|
-
|| x >= 0xFE30 && x <= 0xFE52
|
|
547
|
-
|| x >= 0xFE54 && x <= 0xFE66
|
|
548
|
-
|| x >= 0xFE68 && x <= 0xFE6B
|
|
549
|
-
|| x >= 0x16FE0 && x <= 0x16FE4
|
|
550
|
-
|| x >= 0x16FF0 && x <= 0x16FF6
|
|
551
|
-
|| x >= 0x17000 && x <= 0x18CD5
|
|
552
|
-
|| x >= 0x18CFF && x <= 0x18D1E
|
|
553
|
-
|| x >= 0x18D80 && x <= 0x18DF2
|
|
554
|
-
|| x >= 0x1AFF0 && x <= 0x1AFF3
|
|
555
|
-
|| x >= 0x1AFF5 && x <= 0x1AFFB
|
|
556
|
-
|| x === 0x1AFFD
|
|
557
|
-
|| x === 0x1AFFE
|
|
558
|
-
|| x >= 0x1B000 && x <= 0x1B122
|
|
559
|
-
|| x === 0x1B132
|
|
560
|
-
|| x >= 0x1B150 && x <= 0x1B152
|
|
561
|
-
|| x === 0x1B155
|
|
562
|
-
|| x >= 0x1B164 && x <= 0x1B167
|
|
563
|
-
|| x >= 0x1B170 && x <= 0x1B2FB
|
|
564
|
-
|| x >= 0x1D300 && x <= 0x1D356
|
|
565
|
-
|| x >= 0x1D360 && x <= 0x1D376
|
|
566
|
-
|| x === 0x1F004
|
|
567
|
-
|| x === 0x1F0CF
|
|
568
|
-
|| x === 0x1F18E
|
|
569
|
-
|| x >= 0x1F191 && x <= 0x1F19A
|
|
570
|
-
|| x >= 0x1F200 && x <= 0x1F202
|
|
571
|
-
|| x >= 0x1F210 && x <= 0x1F23B
|
|
572
|
-
|| x >= 0x1F240 && x <= 0x1F248
|
|
573
|
-
|| x === 0x1F250
|
|
574
|
-
|| x === 0x1F251
|
|
575
|
-
|| x >= 0x1F260 && x <= 0x1F265
|
|
576
|
-
|| x >= 0x1F300 && x <= 0x1F320
|
|
577
|
-
|| x >= 0x1F32D && x <= 0x1F335
|
|
578
|
-
|| x >= 0x1F337 && x <= 0x1F37C
|
|
579
|
-
|| x >= 0x1F37E && x <= 0x1F393
|
|
580
|
-
|| x >= 0x1F3A0 && x <= 0x1F3CA
|
|
581
|
-
|| x >= 0x1F3CF && x <= 0x1F3D3
|
|
582
|
-
|| x >= 0x1F3E0 && x <= 0x1F3F0
|
|
583
|
-
|| x === 0x1F3F4
|
|
584
|
-
|| x >= 0x1F3F8 && x <= 0x1F43E
|
|
585
|
-
|| x === 0x1F440
|
|
586
|
-
|| x >= 0x1F442 && x <= 0x1F4FC
|
|
587
|
-
|| x >= 0x1F4FF && x <= 0x1F53D
|
|
588
|
-
|| x >= 0x1F54B && x <= 0x1F54E
|
|
589
|
-
|| x >= 0x1F550 && x <= 0x1F567
|
|
590
|
-
|| x === 0x1F57A
|
|
591
|
-
|| x === 0x1F595
|
|
592
|
-
|| x === 0x1F596
|
|
593
|
-
|| x === 0x1F5A4
|
|
594
|
-
|| x >= 0x1F5FB && x <= 0x1F64F
|
|
595
|
-
|| x >= 0x1F680 && x <= 0x1F6C5
|
|
596
|
-
|| x === 0x1F6CC
|
|
597
|
-
|| x >= 0x1F6D0 && x <= 0x1F6D2
|
|
598
|
-
|| x >= 0x1F6D5 && x <= 0x1F6D8
|
|
599
|
-
|| x >= 0x1F6DC && x <= 0x1F6DF
|
|
600
|
-
|| x === 0x1F6EB
|
|
601
|
-
|| x === 0x1F6EC
|
|
602
|
-
|| x >= 0x1F6F4 && x <= 0x1F6FC
|
|
603
|
-
|| x >= 0x1F7E0 && x <= 0x1F7EB
|
|
604
|
-
|| x === 0x1F7F0
|
|
605
|
-
|| x >= 0x1F90C && x <= 0x1F93A
|
|
606
|
-
|| x >= 0x1F93C && x <= 0x1F945
|
|
607
|
-
|| x >= 0x1F947 && x <= 0x1F9FF
|
|
608
|
-
|| x >= 0x1FA70 && x <= 0x1FA7C
|
|
609
|
-
|| x >= 0x1FA80 && x <= 0x1FA8A
|
|
610
|
-
|| x >= 0x1FA8E && x <= 0x1FAC6
|
|
611
|
-
|| x === 0x1FAC8
|
|
612
|
-
|| x >= 0x1FACD && x <= 0x1FADC
|
|
613
|
-
|| x >= 0x1FADF && x <= 0x1FAEA
|
|
614
|
-
|| x >= 0x1FAEF && x <= 0x1FAF8
|
|
615
|
-
|| x >= 0x20000 && x <= 0x2FFFD
|
|
616
|
-
|| x >= 0x30000 && x <= 0x3FFFD;
|
|
316
|
+
if (
|
|
317
|
+
commonCjkCodePoint >= start
|
|
318
|
+
&& commonCjkCodePoint <= end
|
|
319
|
+
) {
|
|
320
|
+
return [start, end];
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if ((end - start) > (fastPathEnd - fastPathStart)) {
|
|
324
|
+
fastPathStart = start;
|
|
325
|
+
fastPathEnd = end;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
return [fastPathStart, fastPathEnd];
|
|
617
330
|
}
|
|
618
331
|
|
|
332
|
+
const isAmbiguous = codePoint => {
|
|
333
|
+
if (
|
|
334
|
+
codePoint < minimumAmbiguousCodePoint
|
|
335
|
+
|| codePoint > maximumAmbiguousCodePoint
|
|
336
|
+
) {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
return isInRange(ambiguousRanges, codePoint);
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
const isFullWidth = codePoint => {
|
|
344
|
+
if (
|
|
345
|
+
codePoint < minimumFullWidthCodePoint
|
|
346
|
+
|| codePoint > maximumFullWidthCodePoint
|
|
347
|
+
) {
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
return isInRange(fullwidthRanges, codePoint);
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
const isWide = codePoint => {
|
|
355
|
+
if (
|
|
356
|
+
codePoint >= wideFastPathStart
|
|
357
|
+
&& codePoint <= wideFastPathEnd
|
|
358
|
+
) {
|
|
359
|
+
return true;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
if (
|
|
363
|
+
codePoint < minimumWideCodePoint
|
|
364
|
+
|| codePoint > maximumWideCodePoint
|
|
365
|
+
) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
return isInRange(wideRanges, codePoint);
|
|
370
|
+
};
|
|
371
|
+
|
|
619
372
|
function validate(codePoint) {
|
|
620
373
|
if (!Number.isSafeInteger(codePoint)) {
|
|
621
374
|
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
@@ -5510,6 +5510,10 @@ const applyNodeEsmResolution = ({
|
|
|
5510
5510
|
return resolution;
|
|
5511
5511
|
};
|
|
5512
5512
|
|
|
5513
|
+
const createResolutionResult = (data) => {
|
|
5514
|
+
return data;
|
|
5515
|
+
};
|
|
5516
|
+
|
|
5513
5517
|
const applyPackageSpecifierResolution = (specifier, resolutionContext) => {
|
|
5514
5518
|
const { parentUrl } = resolutionContext;
|
|
5515
5519
|
// relative specifier
|
|
@@ -5527,10 +5531,10 @@ const applyPackageSpecifierResolution = (specifier, resolutionContext) => {
|
|
|
5527
5531
|
return browserFieldResolution;
|
|
5528
5532
|
}
|
|
5529
5533
|
}
|
|
5530
|
-
return {
|
|
5534
|
+
return createResolutionResult({
|
|
5531
5535
|
type: "relative_specifier",
|
|
5532
5536
|
url: new URL(specifier, parentUrl).href,
|
|
5533
|
-
};
|
|
5537
|
+
});
|
|
5534
5538
|
}
|
|
5535
5539
|
if (specifier[0] === "#") {
|
|
5536
5540
|
return applyPackageImportsResolution(specifier, resolutionContext);
|
|
@@ -5538,15 +5542,15 @@ const applyPackageSpecifierResolution = (specifier, resolutionContext) => {
|
|
|
5538
5542
|
try {
|
|
5539
5543
|
const urlObject = new URL(specifier);
|
|
5540
5544
|
if (specifier.startsWith("node:")) {
|
|
5541
|
-
return {
|
|
5545
|
+
return createResolutionResult({
|
|
5542
5546
|
type: "node_builtin_specifier",
|
|
5543
5547
|
url: specifier,
|
|
5544
|
-
};
|
|
5548
|
+
});
|
|
5545
5549
|
}
|
|
5546
|
-
return {
|
|
5550
|
+
return createResolutionResult({
|
|
5547
5551
|
type: "absolute_specifier",
|
|
5548
5552
|
url: urlObject.href,
|
|
5549
|
-
};
|
|
5553
|
+
});
|
|
5550
5554
|
} catch {
|
|
5551
5555
|
// bare specifier
|
|
5552
5556
|
const browserFieldResolution = applyBrowserFieldResolution(
|
|
@@ -5607,13 +5611,13 @@ const applyBrowserFieldResolution = (specifier, resolutionContext) => {
|
|
|
5607
5611
|
}
|
|
5608
5612
|
}
|
|
5609
5613
|
if (url) {
|
|
5610
|
-
return {
|
|
5614
|
+
return createResolutionResult({
|
|
5611
5615
|
type: "field:browser",
|
|
5612
5616
|
isMain: true,
|
|
5613
5617
|
packageDirectoryUrl,
|
|
5614
5618
|
packageJson,
|
|
5615
5619
|
url,
|
|
5616
|
-
};
|
|
5620
|
+
});
|
|
5617
5621
|
}
|
|
5618
5622
|
return null;
|
|
5619
5623
|
};
|
|
@@ -5662,10 +5666,10 @@ const applyPackageResolve = (packageSpecifier, resolutionContext) => {
|
|
|
5662
5666
|
conditions.includes("node") &&
|
|
5663
5667
|
isSpecifierForNodeBuiltin(packageSpecifier)
|
|
5664
5668
|
) {
|
|
5665
|
-
return {
|
|
5669
|
+
return createResolutionResult({
|
|
5666
5670
|
type: "node_builtin_specifier",
|
|
5667
5671
|
url: `node:${packageSpecifier}`,
|
|
5668
|
-
};
|
|
5672
|
+
});
|
|
5669
5673
|
}
|
|
5670
5674
|
let { packageName, packageSubpath } = parsePackageSpecifier(packageSpecifier);
|
|
5671
5675
|
if (
|
|
@@ -5858,7 +5862,7 @@ const applyPackageTargetResolution = (target, resolutionContext) => {
|
|
|
5858
5862
|
resolutionContext,
|
|
5859
5863
|
);
|
|
5860
5864
|
}
|
|
5861
|
-
return {
|
|
5865
|
+
return createResolutionResult({
|
|
5862
5866
|
type: isImport ? "field:imports" : "field:exports",
|
|
5863
5867
|
isMain: subpath === "" || subpath === ".",
|
|
5864
5868
|
packageDirectoryUrl,
|
|
@@ -5866,7 +5870,7 @@ const applyPackageTargetResolution = (target, resolutionContext) => {
|
|
|
5866
5870
|
url: pattern
|
|
5867
5871
|
? targetUrl.replaceAll("*", subpath)
|
|
5868
5872
|
: new URL(subpath, targetUrl).href,
|
|
5869
|
-
};
|
|
5873
|
+
});
|
|
5870
5874
|
}
|
|
5871
5875
|
if (!isImport || target.startsWith("../") || isValidUrl(target)) {
|
|
5872
5876
|
throw createInvalidPackageTargetError(
|
|
@@ -6087,13 +6091,13 @@ const applyLegacySubpathResolution = (packageSubpath, resolutionContext) => {
|
|
|
6087
6091
|
if (browserFieldResolution) {
|
|
6088
6092
|
return browserFieldResolution;
|
|
6089
6093
|
}
|
|
6090
|
-
return {
|
|
6094
|
+
return createResolutionResult({
|
|
6091
6095
|
type: "subpath",
|
|
6092
6096
|
isMain: packageSubpath === ".",
|
|
6093
6097
|
packageDirectoryUrl,
|
|
6094
6098
|
packageJson,
|
|
6095
6099
|
url: new URL(packageSubpath, packageDirectoryUrl).href,
|
|
6096
|
-
};
|
|
6100
|
+
});
|
|
6097
6101
|
};
|
|
6098
6102
|
|
|
6099
6103
|
const applyLegacyMainResolution = (packageSubpath, resolutionContext) => {
|
|
@@ -6105,22 +6109,22 @@ const applyLegacyMainResolution = (packageSubpath, resolutionContext) => {
|
|
|
6105
6109
|
}
|
|
6106
6110
|
const resolved = conditionResolver(resolutionContext);
|
|
6107
6111
|
if (resolved) {
|
|
6108
|
-
return {
|
|
6112
|
+
return createResolutionResult({
|
|
6109
6113
|
type: resolved.type,
|
|
6110
6114
|
isMain: resolved.isMain,
|
|
6111
6115
|
packageDirectoryUrl,
|
|
6112
6116
|
packageJson,
|
|
6113
6117
|
url: new URL(resolved.path, packageDirectoryUrl).href,
|
|
6114
|
-
};
|
|
6118
|
+
});
|
|
6115
6119
|
}
|
|
6116
6120
|
}
|
|
6117
|
-
return {
|
|
6121
|
+
return createResolutionResult({
|
|
6118
6122
|
type: "field:main", // the absence of "main" field
|
|
6119
6123
|
isMain: true,
|
|
6120
6124
|
packageDirectoryUrl,
|
|
6121
6125
|
packageJson,
|
|
6122
6126
|
url: new URL("index.js", packageDirectoryUrl).href,
|
|
6123
|
-
};
|
|
6127
|
+
});
|
|
6124
6128
|
};
|
|
6125
6129
|
const mainLegacyResolvers = {
|
|
6126
6130
|
import: ({ packageJson }) => {
|
|
@@ -10984,4 +10988,4 @@ const escapeRegexpSpecialChars = (string) => {
|
|
|
10984
10988
|
});
|
|
10985
10989
|
};
|
|
10986
10990
|
|
|
10987
|
-
export { ANSI, Abort, CONTENT_TYPE, DATA_URL, JS_QUOTES, RUNTIME_COMPAT, UNICODE, URL_META, applyFileSystemMagicResolution, applyNodeEsmResolution, asSpecifierWithoutSearch, asUrlWithoutSearch, assertAndNormalizeDirectoryUrl, browserDefaultRuntimeCompat, bufferToEtag, clearDirectorySync, compareFileUrls, comparePathnames, composeTwoImportMaps, createDetailedMessage$1 as createDetailedMessage, createDynamicLog, createLogger, createLookupPackageDirectory, createTaskLog,
|
|
10991
|
+
export { ANSI, Abort, CONTENT_TYPE, DATA_URL, JS_QUOTES, RUNTIME_COMPAT, UNICODE, URL_META, applyFileSystemMagicResolution, applyNodeEsmResolution, asSpecifierWithoutSearch, asUrlWithoutSearch, assertAndNormalizeDirectoryUrl, browserDefaultRuntimeCompat, bufferToEtag, clearDirectorySync, compareFileUrls, comparePathnames, composeTwoImportMaps, createDetailedMessage$1 as createDetailedMessage, createDynamicLog, createLogger, createLookupPackageDirectory, createTaskLog, distributePercentages, ensureEmptyDirectory, ensurePathnameTrailingSlash, ensureWindowsDriveLetter, errorToHTML, escapeRegexpSpecialChars, generateContentFrame, getCallerPosition, getExtensionsToTry, humanizeDuration, humanizeFileSize, humanizeMemory, inferRuntimeCompatFromClosestPackage, injectQueryParamIntoSpecifierWithoutEncoding, injectQueryParams, injectQueryParamsIntoSpecifier, isFileSystemPath, isSpecifierForNodeBuiltin, lookupPackageDirectory, moveUrl, nodeDefaultRuntimeCompat, normalizeImportMap, normalizeUrl, raceProcessTeardownEvents, readCustomConditionsFromProcessArgs, readEntryStatSync, readPackageAtOrNull, registerDirectoryLifecycle, renderBigSection, renderDetails, renderTable, renderUrlOrRelativeUrlFilename, resolveImport, setUrlBasename, setUrlExtension, setUrlFilename, startMonitoringCpuUsage, startMonitoringMemoryUsage, stringifyUrlSite, updateJsonFileSync, urlIsOrIsInsideOf, urlToBasename, urlToExtension$1 as urlToExtension, urlToFileSystemPath, urlToFilename$1 as urlToFilename, urlToPathname$1 as urlToPathname, urlToRelativeUrl, validateResponseIntegrity, writeFileSync };
|