@jsenv/core 38.3.11 → 38.4.0
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 +17 -18
- package/dist/babel_helpers/AsyncGenerator/AsyncGenerator.js +3 -3
- package/dist/babel_helpers/AwaitValue/AwaitValue.js +2 -2
- package/dist/babel_helpers/{overloadYield/overloadYield.js → OverloadYield/OverloadYield.js} +1 -1
- package/dist/babel_helpers/applyDecoratedDescriptor/applyDecoratedDescriptor.js +23 -14
- package/dist/babel_helpers/applyDecs/applyDecs.js +32 -21
- package/dist/babel_helpers/applyDecs2203/applyDecs2203.js +549 -549
- package/dist/babel_helpers/applyDecs2203R/applyDecs2203R.js +27 -15
- package/dist/babel_helpers/applyDecs2301/applyDecs2301.js +29 -18
- package/dist/babel_helpers/applyDecs2305/applyDecs2305.js +362 -541
- package/dist/babel_helpers/arrayLikeToArray/arrayLikeToArray.js +4 -4
- package/dist/babel_helpers/arrayWithHoles/arrayWithHoles.js +2 -2
- package/dist/babel_helpers/arrayWithoutHoles/arrayWithoutHoles.js +3 -3
- package/dist/babel_helpers/assertThisInitialized/assertThisInitialized.js +5 -3
- package/dist/babel_helpers/asyncGeneratorDelegate/asyncGeneratorDelegate.js +2 -2
- package/dist/babel_helpers/asyncIterator/asyncIterator.js +1 -1
- package/dist/babel_helpers/asyncToGenerator/asyncToGenerator.js +17 -17
- package/dist/babel_helpers/awaitAsyncGenerator/awaitAsyncGenerator.js +2 -2
- package/dist/babel_helpers/callSuper/callSuper.js +25 -0
- package/dist/babel_helpers/checkInRHS/checkInRHS.js +10 -8
- package/dist/babel_helpers/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +9 -6
- package/dist/babel_helpers/classApplyDescriptorGet/classApplyDescriptorGet.js +2 -2
- package/dist/babel_helpers/classApplyDescriptorSet/classApplyDescriptorSet.js +3 -3
- package/dist/babel_helpers/classCallCheck/classCallCheck.js +1 -1
- package/dist/babel_helpers/classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js +5 -2
- package/dist/babel_helpers/classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js +7 -2
- package/dist/babel_helpers/classExtractFieldDescriptor/classExtractFieldDescriptor.js +9 -3
- package/dist/babel_helpers/classNameTDZError/classNameTDZError.js +3 -1
- package/dist/babel_helpers/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js +4 -4
- package/dist/babel_helpers/classPrivateFieldGet/classPrivateFieldGet.js +4 -4
- package/dist/babel_helpers/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +2 -2
- package/dist/babel_helpers/classPrivateFieldLooseKey/classPrivateFieldLooseKey.js +2 -2
- package/dist/babel_helpers/classPrivateFieldSet/classPrivateFieldSet.js +5 -5
- package/dist/babel_helpers/classPrivateMethodGet/classPrivateMethodGet.js +2 -2
- package/dist/babel_helpers/classPrivateMethodSet/classPrivateMethodSet.js +1 -1
- package/dist/babel_helpers/classStaticPrivateFieldSpecGet/classStaticPrivateFieldSpecGet.js +11 -7
- package/dist/babel_helpers/classStaticPrivateFieldSpecSet/classStaticPrivateFieldSpecSet.js +7 -7
- package/dist/babel_helpers/classStaticPrivateMethodGet/classStaticPrivateMethodGet.js +8 -4
- package/dist/babel_helpers/classStaticPrivateMethodSet/classStaticPrivateMethodSet.js +1 -1
- package/dist/babel_helpers/construct/construct.js +18 -14
- package/dist/babel_helpers/createClass/createClass.js +1 -1
- package/dist/babel_helpers/createForOfIteratorHelper/createForOfIteratorHelper.js +21 -20
- package/dist/babel_helpers/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +10 -9
- package/dist/babel_helpers/createRawReactElement/createRawReactElement.js +11 -11
- package/dist/babel_helpers/createSuper/createSuper.js +11 -11
- package/dist/babel_helpers/decorate/decorate.js +255 -170
- package/dist/babel_helpers/defaults/defaults.js +5 -5
- package/dist/babel_helpers/defineAccessor/defineAccessor.js +1 -1
- package/dist/babel_helpers/defineEnumerableProperties/defineEnumerableProperties.js +11 -11
- package/dist/babel_helpers/defineProperty/defineProperty.js +4 -4
- package/dist/babel_helpers/dispose/dispose.js +39 -39
- package/dist/babel_helpers/extends/extends.js +4 -4
- package/dist/babel_helpers/get/get.js +2 -2
- package/dist/babel_helpers/getPrototypeOf/getPrototypeOf.js +1 -1
- package/dist/babel_helpers/identity/identity.js +1 -1
- package/dist/babel_helpers/importDeferProxy/importDeferProxy.js +27 -27
- package/dist/babel_helpers/inherits/inherits.js +4 -4
- package/dist/babel_helpers/inheritsLoose/inheritsLoose.js +4 -4
- package/dist/babel_helpers/initializerDefineProperty/initializerDefineProperty.js +5 -3
- package/dist/babel_helpers/initializerWarningHelper/initializerWarningHelper.js +1 -1
- package/dist/babel_helpers/instanceof/instanceof.js +7 -3
- package/dist/babel_helpers/interopRequireDefault/interopRequireDefault.js +1 -1
- package/dist/babel_helpers/interopRequireWildcard/interopRequireWildcard.js +3 -1
- package/dist/babel_helpers/isNativeFunction/isNativeFunction.js +1 -1
- package/dist/babel_helpers/isNativeReflectConstruct/isNativeReflectConstruct.js +12 -14
- package/dist/babel_helpers/iterableToArray/iterableToArray.js +1 -1
- package/dist/babel_helpers/iterableToArrayLimit/iterableToArrayLimit.js +1 -1
- package/dist/babel_helpers/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +1 -1
- package/dist/babel_helpers/jsx/jsx.js +1 -1
- package/dist/babel_helpers/maybeArrayLike/maybeArrayLike.js +4 -4
- package/dist/babel_helpers/newArrowCheck/newArrowCheck.js +1 -1
- package/dist/babel_helpers/nonIterableRest/nonIterableRest.js +2 -2
- package/dist/babel_helpers/nonIterableSpread/nonIterableSpread.js +2 -2
- package/dist/babel_helpers/nullishReceiverError/nullishReceiverError.js +1 -1
- package/dist/babel_helpers/objectDestructuringEmpty/objectDestructuringEmpty.js +1 -1
- package/dist/babel_helpers/objectSpread/objectSpread.js +8 -8
- package/dist/babel_helpers/objectSpread2/objectSpread2.js +5 -3
- package/dist/babel_helpers/objectWithoutProperties/objectWithoutProperties.js +12 -12
- package/dist/babel_helpers/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +10 -10
- package/dist/babel_helpers/possibleConstructorReturn/possibleConstructorReturn.js +7 -5
- package/dist/babel_helpers/readOnlyError/readOnlyError.js +1 -1
- package/dist/babel_helpers/regeneratorRuntime/regeneratorRuntime.js +1 -1
- package/dist/babel_helpers/set/set.js +22 -19
- package/dist/babel_helpers/setFunctionName/setFunctionName.js +18 -0
- package/dist/babel_helpers/setPrototypeOf/setPrototypeOf.js +7 -6
- package/dist/babel_helpers/skipFirstGeneratorNext/skipFirstGeneratorNext.js +4 -4
- package/dist/babel_helpers/slicedToArray/slicedToArray.js +5 -5
- package/dist/babel_helpers/slicedToArrayLoose/slicedToArrayLoose.js +5 -5
- package/dist/babel_helpers/superPropBase/superPropBase.js +4 -4
- package/dist/babel_helpers/taggedTemplateLiteral/taggedTemplateLiteral.js +2 -2
- package/dist/babel_helpers/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +3 -3
- package/dist/babel_helpers/tdz/tdz.js +1 -1
- package/dist/babel_helpers/temporalRef/temporalRef.js +3 -3
- package/dist/babel_helpers/toArray/toArray.js +5 -5
- package/dist/babel_helpers/toConsumableArray/toConsumableArray.js +5 -5
- package/dist/babel_helpers/toPrimitive/toPrimitive.js +11 -7
- package/dist/babel_helpers/toPropertyKey/toPropertyKey.js +8 -4
- package/dist/babel_helpers/typeof/typeof.js +6 -5
- package/dist/babel_helpers/unsupportedIterableToArray/unsupportedIterableToArray.js +7 -7
- package/dist/babel_helpers/using/using.js +20 -20
- package/dist/babel_helpers/wrapAsyncGenerator/wrapAsyncGenerator.js +3 -3
- package/dist/babel_helpers/wrapNativeSuper/wrapNativeSuper.js +12 -12
- package/dist/babel_helpers/wrapRegExp/wrapRegExp.js +5 -3
- package/dist/babel_helpers/writeOnlyError/writeOnlyError.js +1 -1
- package/dist/js/ribbon.js +1 -1
- package/dist/js/ws.js +234 -146
- package/dist/jsenv_core.js +1365 -1211
- package/package.json +26 -22
- package/src/build/build.js +22 -14
- package/src/dev/start_dev_server.js +8 -21
- package/src/kitchen/errors.js +29 -24
- package/src/kitchen/kitchen.js +1 -1
- package/src/kitchen/url_graph/references.js +8 -0
- package/src/kitchen/url_graph/url_graph_report.js +5 -3
- package/src/plugins/plugins.js +2 -2
- package/src/plugins/protocol_file/jsenv_plugin_protocol_file.js +17 -7
- package/src/plugins/reference_analysis/js/jsenv_plugin_js_reference_analysis.js +10 -12
- package/src/plugins/ribbon/client/ribbon.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-eq-null, eqeqeq */
|
|
2
2
|
export default function arrayLikeToArray(arr, len) {
|
|
3
|
-
if (len == null || len > arr.length) len = arr.length
|
|
4
|
-
var arr2 = new Array(len)
|
|
5
|
-
for (var i = 0; i < len; i++) arr2[i] = arr[i]
|
|
6
|
-
return arr2
|
|
3
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
+
var arr2 = new Array(len);
|
|
5
|
+
for (var i = 0; i < len; i++) arr2[i] = arr[i];
|
|
6
|
+
return arr2;
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import arrayLikeToArray from "../arrayLikeToArray/arrayLikeToArray.js"
|
|
1
|
+
import arrayLikeToArray from "../arrayLikeToArray/arrayLikeToArray.js";
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line consistent-return
|
|
4
4
|
export default (arr) => {
|
|
5
|
-
if (Array.isArray(arr)) return arrayLikeToArray(arr)
|
|
6
|
-
}
|
|
5
|
+
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
|
6
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export default (self) => {
|
|
2
2
|
// eslint-disable-next-line no-void
|
|
3
3
|
if (self === void 0) {
|
|
4
|
-
throw new ReferenceError(
|
|
4
|
+
throw new ReferenceError(
|
|
5
|
+
"this hasn't been initialised - super() hasn't been called",
|
|
6
|
+
);
|
|
5
7
|
}
|
|
6
|
-
return self
|
|
7
|
-
}
|
|
8
|
+
return self;
|
|
9
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @minVersion 7.0.0-beta.0 */
|
|
2
2
|
|
|
3
|
-
import OverloadYield from "../
|
|
3
|
+
import OverloadYield from "../OverloadYield/OverloadYield.js";
|
|
4
4
|
|
|
5
5
|
export default function _asyncGeneratorDelegate(inner) {
|
|
6
6
|
var iter = {},
|
|
@@ -52,4 +52,4 @@ export default function _asyncGeneratorDelegate(inner) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
return iter;
|
|
55
|
-
}
|
|
55
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
export default function (fn) {
|
|
2
2
|
return function () {
|
|
3
|
-
var self = this
|
|
3
|
+
var self = this;
|
|
4
4
|
// eslint-disable-next-line prefer-rest-params
|
|
5
|
-
var args = arguments
|
|
5
|
+
var args = arguments;
|
|
6
6
|
return new Promise(function (resolve, reject) {
|
|
7
|
-
var gen = fn.apply(self, args)
|
|
7
|
+
var gen = fn.apply(self, args);
|
|
8
8
|
function _next(value) {
|
|
9
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value)
|
|
9
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
10
10
|
}
|
|
11
11
|
function _throw(err) {
|
|
12
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err)
|
|
12
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
13
13
|
}
|
|
14
|
-
_next(undefined)
|
|
15
|
-
})
|
|
16
|
-
}
|
|
14
|
+
_next(undefined);
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const asyncGeneratorStep = (gen, resolve, reject, _next, _throw, key, arg) => {
|
|
20
|
-
var info
|
|
21
|
-
var value
|
|
20
|
+
var info;
|
|
21
|
+
var value;
|
|
22
22
|
try {
|
|
23
|
-
info = gen[key](arg)
|
|
24
|
-
value = info.value
|
|
23
|
+
info = gen[key](arg);
|
|
24
|
+
value = info.value;
|
|
25
25
|
} catch (error) {
|
|
26
|
-
reject(error)
|
|
27
|
-
return
|
|
26
|
+
reject(error);
|
|
27
|
+
return;
|
|
28
28
|
}
|
|
29
29
|
if (info.done) {
|
|
30
|
-
resolve(value)
|
|
30
|
+
resolve(value);
|
|
31
31
|
} else {
|
|
32
|
-
Promise.resolve(value).then(_next, _throw)
|
|
32
|
+
Promise.resolve(value).then(_next, _throw);
|
|
33
33
|
}
|
|
34
|
-
}
|
|
34
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* @minVersion 7.23.8 */
|
|
2
|
+
|
|
3
|
+
// This is duplicated to packages/babel-plugin-transform-classes/src/inline-callSuper-helpers.ts
|
|
4
|
+
|
|
5
|
+
// @ts-expect-error helper
|
|
6
|
+
import getPrototypeOf from "../getPrototypeOf/getPrototypeOf.js";
|
|
7
|
+
import isNativeReflectConstruct from "../isNativeReflectConstruct/isNativeReflectConstruct.js";
|
|
8
|
+
// @ts-expect-error helper
|
|
9
|
+
import possibleConstructorReturn from "../possibleConstructorReturn/possibleConstructorReturn.js";
|
|
10
|
+
|
|
11
|
+
export default function _callSuper(_this, derived, args) {
|
|
12
|
+
// Super
|
|
13
|
+
derived = getPrototypeOf(derived);
|
|
14
|
+
return possibleConstructorReturn(
|
|
15
|
+
_this,
|
|
16
|
+
isNativeReflectConstruct()
|
|
17
|
+
? // NOTE: This doesn't work if this.__proto__.constructor has been modified.
|
|
18
|
+
Reflect.construct(
|
|
19
|
+
derived,
|
|
20
|
+
args || [],
|
|
21
|
+
getPrototypeOf(_this).constructor,
|
|
22
|
+
)
|
|
23
|
+
: derived.apply(_this, args),
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/* @minVersion 7.20.5 */
|
|
2
|
+
|
|
1
3
|
export default function _checkInRHS(value) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
if (Object(value) !== value) {
|
|
5
|
+
throw TypeError(
|
|
6
|
+
"right-hand side of 'in' should be an object, got " +
|
|
7
|
+
(value !== null ? typeof value : "null"),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
}
|
package/dist/babel_helpers/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
export default function _classApplyDescriptorDestructureSet(
|
|
1
|
+
export default function _classApplyDescriptorDestructureSet(
|
|
2
|
+
receiver,
|
|
3
|
+
descriptor,
|
|
4
|
+
) {
|
|
2
5
|
if (descriptor.set) {
|
|
3
6
|
if (!("__destrObj" in descriptor)) {
|
|
4
7
|
descriptor.__destrObj = {
|
|
5
8
|
// eslint-disable-next-line accessor-pairs
|
|
6
9
|
set value(v) {
|
|
7
|
-
descriptor.set.call(receiver, v)
|
|
10
|
+
descriptor.set.call(receiver, v);
|
|
8
11
|
},
|
|
9
|
-
}
|
|
12
|
+
};
|
|
10
13
|
}
|
|
11
|
-
return descriptor.__destrObj
|
|
14
|
+
return descriptor.__destrObj;
|
|
12
15
|
}
|
|
13
16
|
if (!descriptor.writable) {
|
|
14
17
|
// This should only throw in strict mode, but class bodies are
|
|
15
18
|
// always strict and private fields can only be used inside
|
|
16
19
|
// class bodies.
|
|
17
|
-
throw new TypeError("attempted to set read only private field")
|
|
20
|
+
throw new TypeError("attempted to set read only private field");
|
|
18
21
|
}
|
|
19
|
-
return descriptor
|
|
22
|
+
return descriptor;
|
|
20
23
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export default function _classApplyDescriptorSet(receiver, descriptor, value) {
|
|
2
2
|
if (descriptor.set) {
|
|
3
|
-
descriptor.set.call(receiver, value)
|
|
3
|
+
descriptor.set.call(receiver, value);
|
|
4
4
|
} else {
|
|
5
5
|
if (!descriptor.writable) {
|
|
6
6
|
// This should only throw in strict mode, but class bodies are
|
|
7
7
|
// always strict and private fields can only be used inside
|
|
8
8
|
// class bodies.
|
|
9
|
-
throw new TypeError("attempted to set read only private field")
|
|
9
|
+
throw new TypeError("attempted to set read only private field");
|
|
10
10
|
}
|
|
11
|
-
descriptor.value = value
|
|
11
|
+
descriptor.value = value;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export default function _classCheckPrivateStaticAccess(
|
|
1
|
+
export default function _classCheckPrivateStaticAccess(
|
|
2
|
+
receiver,
|
|
3
|
+
classConstructor,
|
|
4
|
+
) {
|
|
2
5
|
if (receiver !== classConstructor) {
|
|
3
|
-
throw new TypeError("Private static access of wrong provenance")
|
|
6
|
+
throw new TypeError("Private static access of wrong provenance");
|
|
4
7
|
}
|
|
5
8
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
export default function _classCheckPrivateStaticFieldDescriptor(
|
|
1
|
+
export default function _classCheckPrivateStaticFieldDescriptor(
|
|
2
|
+
descriptor,
|
|
3
|
+
action,
|
|
4
|
+
) {
|
|
2
5
|
if (descriptor === undefined) {
|
|
3
6
|
// eslint-disable-next-line prefer-template
|
|
4
|
-
throw new TypeError(
|
|
7
|
+
throw new TypeError(
|
|
8
|
+
"attempted to " + action + " private static field before its declaration",
|
|
9
|
+
);
|
|
5
10
|
}
|
|
6
11
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
export default function _classExtractFieldDescriptor(
|
|
1
|
+
export default function _classExtractFieldDescriptor(
|
|
2
|
+
receiver,
|
|
3
|
+
privateMap,
|
|
4
|
+
action,
|
|
5
|
+
) {
|
|
2
6
|
if (!privateMap.has(receiver)) {
|
|
3
7
|
// eslint-disable-next-line prefer-template
|
|
4
|
-
throw new TypeError(
|
|
8
|
+
throw new TypeError(
|
|
9
|
+
"attempted to " + action + " private field on non-instance",
|
|
10
|
+
);
|
|
5
11
|
}
|
|
6
|
-
return privateMap.get(receiver)
|
|
12
|
+
return privateMap.get(receiver);
|
|
7
13
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export default function _classNameTDZError(name) {
|
|
2
2
|
// eslint-disable-next-line prefer-template
|
|
3
|
-
throw new ReferenceError(
|
|
3
|
+
throw new ReferenceError(
|
|
4
|
+
"Class " + name + "cannot be referenced in computed property keys.",
|
|
5
|
+
);
|
|
4
6
|
}
|
package/dist/babel_helpers/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import classApplyDescriptorDestructureSet from "../classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js"
|
|
2
|
-
import classExtractFieldDescriptor from "../classExtractFieldDescriptor/classExtractFieldDescriptor.js"
|
|
1
|
+
import classApplyDescriptorDestructureSet from "../classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js";
|
|
2
|
+
import classExtractFieldDescriptor from "../classExtractFieldDescriptor/classExtractFieldDescriptor.js";
|
|
3
3
|
|
|
4
4
|
export default function (receiver, privateMap) {
|
|
5
|
-
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set")
|
|
6
|
-
return classApplyDescriptorDestructureSet(receiver, descriptor)
|
|
5
|
+
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
|
|
6
|
+
return classApplyDescriptorDestructureSet(receiver, descriptor);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import classApplyDescriptorGet from "../classApplyDescriptorGet/classApplyDescriptorGet.js"
|
|
2
|
-
import classExtractFieldDescriptor from "../classExtractFieldDescriptor/classExtractFieldDescriptor.js"
|
|
1
|
+
import classApplyDescriptorGet from "../classApplyDescriptorGet/classApplyDescriptorGet.js";
|
|
2
|
+
import classExtractFieldDescriptor from "../classExtractFieldDescriptor/classExtractFieldDescriptor.js";
|
|
3
3
|
|
|
4
4
|
export default function (receiver, privateMap) {
|
|
5
|
-
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get")
|
|
6
|
-
return classApplyDescriptorGet(receiver, descriptor)
|
|
5
|
+
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get");
|
|
6
|
+
return classApplyDescriptorGet(receiver, descriptor);
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default function (receiver, privateKey) {
|
|
2
2
|
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
|
|
3
|
-
throw new TypeError("attempted to use private field on non-instance")
|
|
3
|
+
throw new TypeError("attempted to use private field on non-instance");
|
|
4
4
|
}
|
|
5
|
-
return receiver
|
|
5
|
+
return receiver;
|
|
6
6
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import classApplyDescriptorSet from "../classApplyDescriptorSet/classApplyDescriptorSet.js"
|
|
2
|
-
import classExtractFieldDescriptor from "../classExtractFieldDescriptor/classExtractFieldDescriptor.js"
|
|
1
|
+
import classApplyDescriptorSet from "../classApplyDescriptorSet/classApplyDescriptorSet.js";
|
|
2
|
+
import classExtractFieldDescriptor from "../classExtractFieldDescriptor/classExtractFieldDescriptor.js";
|
|
3
3
|
|
|
4
4
|
export default function (receiver, privateMap, value) {
|
|
5
|
-
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set")
|
|
6
|
-
classApplyDescriptorSet(receiver, descriptor, value)
|
|
7
|
-
return value
|
|
5
|
+
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
|
|
6
|
+
classApplyDescriptorSet(receiver, descriptor, value);
|
|
7
|
+
return value;
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default function _classPrivateMethodGet(receiver, privateSet, fn) {
|
|
2
2
|
if (!privateSet.has(receiver)) {
|
|
3
|
-
throw new TypeError("attempted to get private field on non-instance")
|
|
3
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
4
4
|
}
|
|
5
|
-
return fn
|
|
5
|
+
return fn;
|
|
6
6
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import classApplyDescriptorGet from "../classApplyDescriptorGet/classApplyDescriptorGet.js"
|
|
2
|
-
import classCheckPrivateStaticAccess from "../classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js"
|
|
3
|
-
import classCheckPrivateStaticFieldDescriptor from "../classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js"
|
|
1
|
+
import classApplyDescriptorGet from "../classApplyDescriptorGet/classApplyDescriptorGet.js";
|
|
2
|
+
import classCheckPrivateStaticAccess from "../classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js";
|
|
3
|
+
import classCheckPrivateStaticFieldDescriptor from "../classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js";
|
|
4
4
|
|
|
5
|
-
export default function _classStaticPrivateFieldSpecGet(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export default function _classStaticPrivateFieldSpecGet(
|
|
6
|
+
receiver,
|
|
7
|
+
classConstructor,
|
|
8
|
+
descriptor,
|
|
9
|
+
) {
|
|
10
|
+
classCheckPrivateStaticAccess(receiver, classConstructor);
|
|
11
|
+
classCheckPrivateStaticFieldDescriptor(descriptor, "get");
|
|
12
|
+
return classApplyDescriptorGet(receiver, descriptor);
|
|
9
13
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import classApplyDescriptorSet from "../classApplyDescriptorSet/classApplyDescriptorSet.js"
|
|
2
|
-
import classCheckPrivateStaticAccess from "../classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js"
|
|
3
|
-
import classCheckPrivateStaticFieldDescriptor from "../classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js"
|
|
1
|
+
import classApplyDescriptorSet from "../classApplyDescriptorSet/classApplyDescriptorSet.js";
|
|
2
|
+
import classCheckPrivateStaticAccess from "../classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js";
|
|
3
|
+
import classCheckPrivateStaticFieldDescriptor from "../classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js";
|
|
4
4
|
|
|
5
5
|
export default function _classStaticPrivateFieldSpecSet(
|
|
6
6
|
receiver,
|
|
@@ -8,8 +8,8 @@ export default function _classStaticPrivateFieldSpecSet(
|
|
|
8
8
|
descriptor,
|
|
9
9
|
value,
|
|
10
10
|
) {
|
|
11
|
-
classCheckPrivateStaticAccess(receiver, classConstructor)
|
|
12
|
-
classCheckPrivateStaticFieldDescriptor(descriptor, "set")
|
|
13
|
-
classApplyDescriptorSet(receiver, descriptor, value)
|
|
14
|
-
return value
|
|
11
|
+
classCheckPrivateStaticAccess(receiver, classConstructor);
|
|
12
|
+
classCheckPrivateStaticFieldDescriptor(descriptor, "set");
|
|
13
|
+
classApplyDescriptorSet(receiver, descriptor, value);
|
|
14
|
+
return value;
|
|
15
15
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import classCheckPrivateStaticAccess from "../classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js"
|
|
1
|
+
import classCheckPrivateStaticAccess from "../classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js";
|
|
2
2
|
|
|
3
|
-
export default function _classStaticPrivateMethodGet(
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export default function _classStaticPrivateMethodGet(
|
|
4
|
+
receiver,
|
|
5
|
+
classConstructor,
|
|
6
|
+
method,
|
|
7
|
+
) {
|
|
8
|
+
classCheckPrivateStaticAccess(receiver, classConstructor);
|
|
9
|
+
return method;
|
|
6
10
|
}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import isNativeReflectConstruct from "../isNativeReflectConstruct/isNativeReflectConstruct.js"
|
|
1
|
+
/* @minVersion 7.0.0-beta.0 */
|
|
3
2
|
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var a = [null]
|
|
8
|
-
// eslint-disable-next-line prefer-spread
|
|
9
|
-
a.push.apply(a, args)
|
|
10
|
-
var Constructor = Function.bind.apply(Parent, a)
|
|
11
|
-
var instance = new Constructor()
|
|
12
|
-
if (Class) setPrototypeOf(instance, Class.prototype)
|
|
13
|
-
return instance
|
|
14
|
-
}
|
|
3
|
+
// @ts-expect-error helper
|
|
4
|
+
import setPrototypeOf from "../setPrototypeOf/setPrototypeOf.js";
|
|
5
|
+
import isNativeReflectConstruct from "../isNativeReflectConstruct/isNativeReflectConstruct.js";
|
|
15
6
|
|
|
16
|
-
export default
|
|
7
|
+
export default function _construct(Parent, args, Class) {
|
|
8
|
+
if (isNativeReflectConstruct()) {
|
|
9
|
+
// Avoid issues with Class being present but undefined when it wasn't
|
|
10
|
+
// present in the original call.
|
|
11
|
+
return Reflect.construct.apply(null, arguments);
|
|
12
|
+
}
|
|
13
|
+
// NOTE: If Parent !== Class, the correct __proto__ is set *after*
|
|
14
|
+
// calling the constructor.
|
|
15
|
+
var a = [null];
|
|
16
|
+
a.push.apply(a, args);
|
|
17
|
+
var instance = new (Parent.bind.apply(Parent, a))();
|
|
18
|
+
if (Class) setPrototypeOf(instance, Class.prototype);
|
|
19
|
+
return instance;
|
|
20
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/* eslint-disable eqeqeq, no-eq-null */
|
|
2
|
-
import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
|
|
2
|
+
import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js";
|
|
3
3
|
|
|
4
4
|
// s: start (create the iterator)
|
|
5
5
|
// n: next
|
|
6
6
|
// e: error (called whenever something throws)
|
|
7
7
|
// f: finish (always called at the end)
|
|
8
8
|
export default function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
9
|
-
var it =
|
|
9
|
+
var it =
|
|
10
|
+
(typeof Symbol !== "undefined" && o[Symbol.iterator]) || o["@@iterator"];
|
|
10
11
|
if (!it) {
|
|
11
12
|
// Fallback for engines without symbol support
|
|
12
13
|
if (
|
|
@@ -14,47 +15,47 @@ export default function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
14
15
|
(it = unsupportedIterableToArray(o)) ||
|
|
15
16
|
(allowArrayLike && o && typeof o.length === "number")
|
|
16
17
|
) {
|
|
17
|
-
if (it) o = it
|
|
18
|
-
var i = 0
|
|
19
|
-
var F = function () {}
|
|
18
|
+
if (it) o = it;
|
|
19
|
+
var i = 0;
|
|
20
|
+
var F = function () {};
|
|
20
21
|
return {
|
|
21
22
|
s: F,
|
|
22
23
|
n: function () {
|
|
23
|
-
if (i >= o.length) return { done: true }
|
|
24
|
-
return { done: false, value: o[i++] }
|
|
24
|
+
if (i >= o.length) return { done: true };
|
|
25
|
+
return { done: false, value: o[i++] };
|
|
25
26
|
},
|
|
26
27
|
e: function (e) {
|
|
27
|
-
throw e
|
|
28
|
+
throw e;
|
|
28
29
|
},
|
|
29
30
|
f: F,
|
|
30
|
-
}
|
|
31
|
+
};
|
|
31
32
|
}
|
|
32
33
|
throw new TypeError(
|
|
33
34
|
"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
|
|
34
|
-
)
|
|
35
|
+
);
|
|
35
36
|
}
|
|
36
37
|
var normalCompletion = true,
|
|
37
38
|
didErr = false,
|
|
38
|
-
err
|
|
39
|
+
err;
|
|
39
40
|
return {
|
|
40
41
|
s: function () {
|
|
41
|
-
it = it.call(o)
|
|
42
|
+
it = it.call(o);
|
|
42
43
|
},
|
|
43
44
|
n: function () {
|
|
44
|
-
var step = it.next()
|
|
45
|
-
normalCompletion = step.done
|
|
46
|
-
return step
|
|
45
|
+
var step = it.next();
|
|
46
|
+
normalCompletion = step.done;
|
|
47
|
+
return step;
|
|
47
48
|
},
|
|
48
49
|
e: function (e) {
|
|
49
|
-
didErr = true
|
|
50
|
-
err = e
|
|
50
|
+
didErr = true;
|
|
51
|
+
err = e;
|
|
51
52
|
},
|
|
52
53
|
f: function () {
|
|
53
54
|
try {
|
|
54
|
-
if (!normalCompletion && it.return != null) it.return()
|
|
55
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
55
56
|
} finally {
|
|
56
|
-
if (didErr) throw err
|
|
57
|
+
if (didErr) throw err;
|
|
57
58
|
}
|
|
58
59
|
},
|
|
59
|
-
}
|
|
60
|
+
};
|
|
60
61
|
}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
/* eslint-disable eqeqeq, no-eq-null */
|
|
2
|
-
import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
|
|
2
|
+
import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js";
|
|
3
3
|
|
|
4
4
|
export default function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
5
|
-
var it =
|
|
6
|
-
|
|
5
|
+
var it =
|
|
6
|
+
(typeof Symbol !== "undefined" && o[Symbol.iterator]) || o["@@iterator"];
|
|
7
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
7
8
|
// Fallback for engines without symbol support
|
|
8
9
|
if (
|
|
9
10
|
Array.isArray(o) ||
|
|
10
11
|
(it = unsupportedIterableToArray(o)) ||
|
|
11
12
|
(allowArrayLike && o && typeof o.length === "number")
|
|
12
13
|
) {
|
|
13
|
-
if (it) o = it
|
|
14
|
-
var i = 0
|
|
14
|
+
if (it) o = it;
|
|
15
|
+
var i = 0;
|
|
15
16
|
return function () {
|
|
16
|
-
if (i >= o.length) return { done: true }
|
|
17
|
-
return { done: false, value: o[i++] }
|
|
18
|
-
}
|
|
17
|
+
if (i >= o.length) return { done: true };
|
|
18
|
+
return { done: false, value: o[i++] };
|
|
19
|
+
};
|
|
19
20
|
}
|
|
20
21
|
throw new TypeError(
|
|
21
22
|
"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
|
|
22
|
-
)
|
|
23
|
+
);
|
|
23
24
|
}
|