@jsenv/core 38.2.1 → 38.2.2
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/dist/babel_helpers/applyDecs2305/applyDecs2305.js +39 -10
- package/dist/babel_helpers/importDeferProxy/importDeferProxy.js +31 -0
- package/dist/babel_helpers/nullishReceiverError/nullishReceiverError.js +3 -0
- package/dist/js/ws.js +36 -5
- package/dist/jsenv_core.js +4 -3
- package/package.json +11 -11
|
@@ -45,7 +45,8 @@ function memberDec(
|
|
|
45
45
|
isStatic,
|
|
46
46
|
isPrivate,
|
|
47
47
|
value,
|
|
48
|
-
hasPrivateBrand
|
|
48
|
+
hasPrivateBrand,
|
|
49
|
+
metadata
|
|
49
50
|
) {
|
|
50
51
|
var kindStr;
|
|
51
52
|
|
|
@@ -71,6 +72,7 @@ function memberDec(
|
|
|
71
72
|
name: isPrivate ? "#" + name : name,
|
|
72
73
|
static: isStatic,
|
|
73
74
|
private: isPrivate,
|
|
75
|
+
metadata: metadata,
|
|
74
76
|
};
|
|
75
77
|
|
|
76
78
|
var decoratorFinishedRef = { v: false };
|
|
@@ -211,7 +213,8 @@ function applyMemberDec(
|
|
|
211
213
|
isStatic,
|
|
212
214
|
isPrivate,
|
|
213
215
|
initializers,
|
|
214
|
-
hasPrivateBrand
|
|
216
|
+
hasPrivateBrand,
|
|
217
|
+
metadata
|
|
215
218
|
) {
|
|
216
219
|
var decs = decInfo[0];
|
|
217
220
|
|
|
@@ -276,7 +279,8 @@ function applyMemberDec(
|
|
|
276
279
|
isStatic,
|
|
277
280
|
isPrivate,
|
|
278
281
|
value,
|
|
279
|
-
hasPrivateBrand
|
|
282
|
+
hasPrivateBrand,
|
|
283
|
+
metadata
|
|
280
284
|
);
|
|
281
285
|
|
|
282
286
|
if (newValue !== void 0) {
|
|
@@ -369,7 +373,7 @@ function applyMemberDec(
|
|
|
369
373
|
}
|
|
370
374
|
}
|
|
371
375
|
|
|
372
|
-
function applyMemberDecs(Class, decInfos, instanceBrand) {
|
|
376
|
+
function applyMemberDecs(Class, decInfos, instanceBrand, metadata) {
|
|
373
377
|
var ret = [];
|
|
374
378
|
var protoInitializers;
|
|
375
379
|
var staticInitializers;
|
|
@@ -451,7 +455,8 @@ function applyMemberDecs(Class, decInfos, instanceBrand) {
|
|
|
451
455
|
isStatic,
|
|
452
456
|
isPrivate,
|
|
453
457
|
initializers,
|
|
454
|
-
hasPrivateBrand
|
|
458
|
+
hasPrivateBrand,
|
|
459
|
+
metadata
|
|
455
460
|
);
|
|
456
461
|
}
|
|
457
462
|
|
|
@@ -471,7 +476,7 @@ function pushInitializers(ret, initializers) {
|
|
|
471
476
|
}
|
|
472
477
|
}
|
|
473
478
|
|
|
474
|
-
function applyClassDecs(targetClass, classDecs, decoratorsHaveThis) {
|
|
479
|
+
function applyClassDecs(targetClass, classDecs, decoratorsHaveThis, metadata) {
|
|
475
480
|
if (classDecs.length) {
|
|
476
481
|
var initializers = [];
|
|
477
482
|
var newClass = targetClass;
|
|
@@ -493,6 +498,7 @@ function applyClassDecs(targetClass, classDecs, decoratorsHaveThis) {
|
|
|
493
498
|
initializers,
|
|
494
499
|
decoratorFinishedRef
|
|
495
500
|
),
|
|
501
|
+
metadata,
|
|
496
502
|
}
|
|
497
503
|
);
|
|
498
504
|
} finally {
|
|
@@ -506,7 +512,7 @@ function applyClassDecs(targetClass, classDecs, decoratorsHaveThis) {
|
|
|
506
512
|
}
|
|
507
513
|
|
|
508
514
|
return [
|
|
509
|
-
newClass,
|
|
515
|
+
defineMetadata(newClass, metadata),
|
|
510
516
|
function () {
|
|
511
517
|
for (var i = 0; i < initializers.length; i++) {
|
|
512
518
|
initializers[i].call(newClass);
|
|
@@ -518,6 +524,14 @@ function applyClassDecs(targetClass, classDecs, decoratorsHaveThis) {
|
|
|
518
524
|
// so we don't have to return an empty array here.
|
|
519
525
|
}
|
|
520
526
|
|
|
527
|
+
function defineMetadata(Class, metadata) {
|
|
528
|
+
return Object.defineProperty(
|
|
529
|
+
Class,
|
|
530
|
+
Symbol.metadata || Symbol.for("Symbol.metadata"),
|
|
531
|
+
{ configurable: true, enumerable: true, value: metadata }
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
|
|
521
535
|
/**
|
|
522
536
|
Basic usage:
|
|
523
537
|
|
|
@@ -669,13 +683,28 @@ export default function applyDecs2305(
|
|
|
669
683
|
memberDecs,
|
|
670
684
|
classDecs,
|
|
671
685
|
classDecsHaveThis,
|
|
672
|
-
instanceBrand
|
|
686
|
+
instanceBrand,
|
|
687
|
+
parentClass
|
|
673
688
|
) {
|
|
689
|
+
if (arguments.length >= 6) {
|
|
690
|
+
var parentMetadata =
|
|
691
|
+
parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
692
|
+
}
|
|
693
|
+
var metadata = Object.create(
|
|
694
|
+
parentMetadata === void 0 ? null : parentMetadata
|
|
695
|
+
);
|
|
696
|
+
var e = applyMemberDecs(targetClass, memberDecs, instanceBrand, metadata);
|
|
697
|
+
if (!classDecs.length) defineMetadata(targetClass, metadata);
|
|
674
698
|
return {
|
|
675
|
-
e:
|
|
699
|
+
e: e,
|
|
676
700
|
// Lazily apply class decorations so that member init locals can be properly bound.
|
|
677
701
|
get c() {
|
|
678
|
-
return applyClassDecs(
|
|
702
|
+
return applyClassDecs(
|
|
703
|
+
targetClass,
|
|
704
|
+
classDecs,
|
|
705
|
+
classDecsHaveThis,
|
|
706
|
+
metadata
|
|
707
|
+
);
|
|
679
708
|
},
|
|
680
709
|
};
|
|
681
710
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* @minVersion 7.23.0 */
|
|
2
|
+
export default function _importDeferProxy(init) {
|
|
3
|
+
var ns = null;
|
|
4
|
+
var constValue = function (v) {
|
|
5
|
+
return function () {
|
|
6
|
+
return v;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
var proxy = function (run) {
|
|
10
|
+
return function (arg1, arg2, arg3) {
|
|
11
|
+
if (ns === null) ns = init();
|
|
12
|
+
return run(ns, arg2, arg3);
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
return new Proxy(
|
|
16
|
+
{},
|
|
17
|
+
{
|
|
18
|
+
defineProperty: constValue(false),
|
|
19
|
+
deleteProperty: constValue(false),
|
|
20
|
+
get: proxy(Reflect.get),
|
|
21
|
+
getOwnPropertyDescriptor: proxy(Reflect.getOwnPropertyDescriptor),
|
|
22
|
+
getPrototypeOf: constValue(null),
|
|
23
|
+
isExtensible: constValue(false),
|
|
24
|
+
has: proxy(Reflect.has),
|
|
25
|
+
ownKeys: proxy(Reflect.ownKeys),
|
|
26
|
+
preventExtensions: constValue(true),
|
|
27
|
+
set: constValue(false),
|
|
28
|
+
setPrototypeOf: constValue(false),
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
package/dist/js/ws.js
CHANGED
|
@@ -878,6 +878,12 @@ const { isValidStatusCode: isValidStatusCode$1, isValidUTF8 } = validationExport
|
|
|
878
878
|
const FastBuffer = Buffer[Symbol.species];
|
|
879
879
|
const promise = Promise.resolve();
|
|
880
880
|
|
|
881
|
+
//
|
|
882
|
+
// `queueMicrotask()` is not available in Node.js < 11.
|
|
883
|
+
//
|
|
884
|
+
const queueTask =
|
|
885
|
+
typeof queueMicrotask === 'function' ? queueMicrotask : queueMicrotaskShim;
|
|
886
|
+
|
|
881
887
|
const GET_INFO = 0;
|
|
882
888
|
const GET_PAYLOAD_LENGTH_16 = 1;
|
|
883
889
|
const GET_PAYLOAD_LENGTH_64 = 2;
|
|
@@ -1032,11 +1038,7 @@ let Receiver$1 = class Receiver extends Writable {
|
|
|
1032
1038
|
//
|
|
1033
1039
|
this._loop = false;
|
|
1034
1040
|
|
|
1035
|
-
|
|
1036
|
-
// `queueMicrotask()` is not available in Node.js < 11 and is no
|
|
1037
|
-
// better anyway.
|
|
1038
|
-
//
|
|
1039
|
-
promise.then(() => {
|
|
1041
|
+
queueTask(() => {
|
|
1040
1042
|
this._state = GET_INFO;
|
|
1041
1043
|
this.startLoop(cb);
|
|
1042
1044
|
});
|
|
@@ -1510,6 +1512,35 @@ function error(ErrorCtor, message, prefix, statusCode, errorCode) {
|
|
|
1510
1512
|
return err;
|
|
1511
1513
|
}
|
|
1512
1514
|
|
|
1515
|
+
/**
|
|
1516
|
+
* A shim for `queueMicrotask()`.
|
|
1517
|
+
*
|
|
1518
|
+
* @param {Function} cb Callback
|
|
1519
|
+
*/
|
|
1520
|
+
function queueMicrotaskShim(cb) {
|
|
1521
|
+
promise.then(cb).catch(throwErrorNextTick);
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
/**
|
|
1525
|
+
* Throws an error.
|
|
1526
|
+
*
|
|
1527
|
+
* @param {Error} err The error to throw
|
|
1528
|
+
* @private
|
|
1529
|
+
*/
|
|
1530
|
+
function throwError(err) {
|
|
1531
|
+
throw err;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* Throws an error in the next tick.
|
|
1536
|
+
*
|
|
1537
|
+
* @param {Error} err The error to throw
|
|
1538
|
+
* @private
|
|
1539
|
+
*/
|
|
1540
|
+
function throwErrorNextTick(err) {
|
|
1541
|
+
process.nextTick(throwError, err);
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1513
1544
|
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex" }] */
|
|
1514
1545
|
const { randomFillSync } = require$$1;
|
|
1515
1546
|
|
package/dist/jsenv_core.js
CHANGED
|
@@ -7751,9 +7751,10 @@ const getCompressedResponse = async ({ sourceUrl, headers }) => {
|
|
|
7751
7751
|
}
|
|
7752
7752
|
|
|
7753
7753
|
const fileReadableStream = fileUrlToReadableStream(sourceUrl);
|
|
7754
|
-
const body =
|
|
7755
|
-
|
|
7756
|
-
|
|
7754
|
+
const body =
|
|
7755
|
+
await availableCompressionFormats[acceptedCompressionFormat](
|
|
7756
|
+
fileReadableStream,
|
|
7757
|
+
);
|
|
7757
7758
|
|
|
7758
7759
|
return {
|
|
7759
7760
|
status: 200,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "38.2.
|
|
3
|
+
"version": "38.2.2",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -61,20 +61,20 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@financial-times/polyfill-useragent-normaliser": "1.10.2",
|
|
63
63
|
"@jsenv/abort": "4.2.4",
|
|
64
|
-
"@jsenv/ast": "5.1.
|
|
64
|
+
"@jsenv/ast": "5.1.4",
|
|
65
65
|
"@jsenv/filesystem": "4.2.6",
|
|
66
66
|
"@jsenv/importmap": "1.2.1",
|
|
67
67
|
"@jsenv/integrity": "0.0.1",
|
|
68
68
|
"@jsenv/log": "3.4.0",
|
|
69
69
|
"@jsenv/node-esm-resolution": "1.0.1",
|
|
70
|
-
"@jsenv/js-module-fallback": "1.3.
|
|
70
|
+
"@jsenv/js-module-fallback": "1.3.5",
|
|
71
71
|
"@jsenv/runtime-compat": "1.2.0",
|
|
72
|
-
"@jsenv/server": "15.1.
|
|
73
|
-
"@jsenv/sourcemap": "1.2.
|
|
74
|
-
"@jsenv/plugin-bundling": "2.5.
|
|
75
|
-
"@jsenv/plugin-minification": "1.5.
|
|
76
|
-
"@jsenv/plugin-transpilation": "1.3.
|
|
77
|
-
"@jsenv/plugin-supervisor": "1.3.
|
|
72
|
+
"@jsenv/server": "15.1.2",
|
|
73
|
+
"@jsenv/sourcemap": "1.2.3",
|
|
74
|
+
"@jsenv/plugin-bundling": "2.5.4",
|
|
75
|
+
"@jsenv/plugin-minification": "1.5.2",
|
|
76
|
+
"@jsenv/plugin-transpilation": "1.3.4",
|
|
77
|
+
"@jsenv/plugin-supervisor": "1.3.4",
|
|
78
78
|
"@jsenv/url-meta": "8.1.0",
|
|
79
79
|
"@jsenv/urls": "2.2.1",
|
|
80
80
|
"@jsenv/utils": "2.0.1"
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
"@jsenv/performance-impact": "4.1.1",
|
|
93
93
|
"@jsenv/plugin-as-js-classic": "./packages/related/plugin-as-js-classic/",
|
|
94
94
|
"@jsenv/test": "./packages/related/test/",
|
|
95
|
-
"eslint": "8.
|
|
95
|
+
"eslint": "8.50.0",
|
|
96
96
|
"eslint-plugin-html": "7.1.0",
|
|
97
97
|
"eslint-plugin-import": "2.28.1",
|
|
98
98
|
"eslint-plugin-react": "7.33.2",
|
|
99
99
|
"open": "9.1.0",
|
|
100
|
-
"playwright": "1.
|
|
100
|
+
"playwright": "1.38.1",
|
|
101
101
|
"prettier": "3.0.3"
|
|
102
102
|
}
|
|
103
103
|
}
|