@jsenv/core 23.6.2 → 23.7.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/{license → LICENSE} +21 -21
- package/dist/jsenv_browser_system.js +35 -35
- package/dist/jsenv_browser_system.js.map +14 -14
- package/dist/jsenv_compile_proxy.js +47 -128
- package/dist/jsenv_compile_proxy.js.map +25 -62
- package/dist/jsenv_exploring_index.js.map +5 -5
- package/dist/jsenv_exploring_redirector.js +47 -54
- package/dist/jsenv_exploring_redirector.js.map +17 -19
- package/dist/jsenv_toolbar.js +47 -128
- package/dist/jsenv_toolbar.js.map +12 -47
- package/dist/jsenv_toolbar_injector.js.map +5 -5
- package/helpers/babel/.eslintrc.cjs +24 -24
- package/helpers/babel/AsyncGenerator/AsyncGenerator.js +81 -81
- package/helpers/babel/AwaitValue/AwaitValue.js +3 -3
- package/helpers/babel/applyDecoratorDescriptor/applyDecoratorDescriptor.js +33 -33
- package/helpers/babel/arrayLikeToArray/arrayLikeToArray.js +7 -7
- package/helpers/babel/arrayWithHoles/arrayWithHoles.js +4 -4
- package/helpers/babel/arrayWithoutHoles/arrayWithoutHoles.js +6 -6
- package/helpers/babel/assertThisInitialized/assertThisInitialized.js +7 -7
- package/helpers/babel/asyncGeneratorDelegate/asyncGeneratorDelegate.js +40 -40
- package/helpers/babel/asyncIterator/asyncIterator.js +12 -12
- package/helpers/babel/asyncToGenerator/asyncToGenerator.js +34 -34
- package/helpers/babel/awaitAsyncGenerator/awaitAsyncGenerator.js +5 -5
- package/helpers/babel/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +20 -20
- package/helpers/babel/classApplyDescriptorGet/classApplyDescriptorGet.js +6 -6
- package/helpers/babel/classApplyDescriptorSet/classApplyDescriptorSet.js +13 -13
- package/helpers/babel/classCallCheck/classCallCheck.js +5 -5
- package/helpers/babel/classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js +5 -5
- package/helpers/babel/classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js +6 -6
- package/helpers/babel/classExtractFieldDescriptor/classExtractFieldDescriptor.js +7 -7
- package/helpers/babel/classNameTDZError/classNameTDZError.js +4 -4
- package/helpers/babel/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js +7 -7
- package/helpers/babel/classPrivateFieldGet/classPrivateFieldGet.js +7 -7
- package/helpers/babel/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +6 -6
- package/helpers/babel/classPrivateFieldLooseKey/classPrivateFieldLooseKey.js +5 -5
- package/helpers/babel/classPrivateFieldSet/classPrivateFieldSet.js +8 -8
- package/helpers/babel/classPrivateMethodGet/classPrivateMethodGet.js +6 -6
- package/helpers/babel/classPrivateMethodSet/classPrivateMethodSet.js +3 -3
- package/helpers/babel/classStaticPrivateFieldSpecGet/classStaticPrivateFieldSpecGet.js +9 -9
- package/helpers/babel/classStaticPrivateFieldSpecSet/classStaticPrivateFieldSpecSet.js +15 -15
- package/helpers/babel/classStaticPrivateMethodGet/classStaticPrivateMethodGet.js +6 -6
- package/helpers/babel/classStaticPrivateMethodSet/classStaticPrivateMethodSet.js +3 -3
- package/helpers/babel/construct/construct.js +16 -16
- package/helpers/babel/createClass/createClass.js +15 -15
- package/helpers/babel/createForOfIteratorHelper/createForOfIteratorHelper.js +60 -60
- package/helpers/babel/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +23 -23
- package/helpers/babel/createRawReactElement/createRawReactElement.js +50 -50
- package/helpers/babel/createSuper/createSuper.js +22 -22
- package/helpers/babel/decorate/decorate.js +403 -403
- package/helpers/babel/defaults/defaults.js +11 -11
- package/helpers/babel/defineEnumerableProperties/defineEnumerableProperties.js +23 -23
- package/helpers/babel/defineProperty/defineProperty.js +18 -18
- package/helpers/babel/extends/extends.js +14 -14
- package/helpers/babel/get/get.js +13 -13
- package/helpers/babel/getPrototypeOf/getPrototypeOf.js +4 -4
- package/helpers/babel/inherits/inherits.js +15 -15
- package/helpers/babel/inheritsLoose/inheritsLoose.js +7 -7
- package/helpers/babel/initializerDefineProperty/initializerDefineProperty.js +10 -10
- package/helpers/babel/initializerWarningHelper/initializerWarningHelper.js +6 -6
- package/helpers/babel/instanceof/instanceof.js +6 -6
- package/helpers/babel/interopRequireDefault/interopRequireDefault.js +3 -3
- package/helpers/babel/interopRequireWildcard/interopRequireWildcard.js +37 -37
- package/helpers/babel/isNativeFunction/isNativeFunction.js +4 -4
- package/helpers/babel/isNativeReflectConstruct/isNativeReflectConstruct.js +21 -21
- package/helpers/babel/iterableToArray/iterableToArray.js +7 -7
- package/helpers/babel/iterableToArrayLimit/iterableToArrayLimit.js +36 -36
- package/helpers/babel/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +10 -10
- package/helpers/babel/jsx/jsx.js +45 -45
- package/helpers/babel/maybeArrayLike/maybeArrayLike.js +10 -10
- package/helpers/babel/newArrowCheck/newArrowCheck.js +5 -5
- package/helpers/babel/nonIterableRest/nonIterableRest.js +5 -5
- package/helpers/babel/nonIterableSpread/nonIterableSpread.js +5 -5
- package/helpers/babel/objectDestructuringEmpty/objectDestructuringEmpty.js +3 -3
- package/helpers/babel/objectSpread/objectSpread.js +23 -23
- package/helpers/babel/objectSpread2/objectSpread2.js +33 -33
- package/helpers/babel/objectWithoutProperties/objectWithoutProperties.js +19 -19
- package/helpers/babel/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +13 -13
- package/helpers/babel/possibleConstructorReturn/possibleConstructorReturn.js +10 -10
- package/helpers/babel/readOnlyError/readOnlyError.js +4 -4
- package/helpers/babel/readme.md +9 -9
- package/helpers/babel/set/set.js +44 -44
- package/helpers/babel/setPrototypeOf/setPrototypeOf.js +6 -6
- package/helpers/babel/skipFirstGeneratorNext/skipFirstGeneratorNext.js +8 -8
- package/helpers/babel/slicedToArray/slicedToArray.js +10 -10
- package/helpers/babel/slicedToArrayLoose/slicedToArrayLoose.js +13 -13
- package/helpers/babel/superPropBase/superPropBase.js +10 -10
- package/helpers/babel/taggedTemplateLiteral/taggedTemplateLiteral.js +10 -10
- package/helpers/babel/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +7 -7
- package/helpers/babel/tdz/tdz.js +4 -4
- package/helpers/babel/temporalRef/temporalRef.js +6 -6
- package/helpers/babel/temporalUndefined/temporalUndefined.js +3 -3
- package/helpers/babel/toArray/toArray.js +10 -10
- package/helpers/babel/toConsumableArray/toConsumableArray.js +10 -10
- package/helpers/babel/toPrimitive/toPrimitive.js +10 -10
- package/helpers/babel/toPropertyKey/toPropertyKey.js +6 -6
- package/helpers/babel/typeof/typeof.js +14 -14
- package/helpers/babel/unsupportedIterableToArray/unsupportedIterableToArray.js +12 -12
- package/helpers/babel/wrapAsyncGenerator/wrapAsyncGenerator.js +8 -8
- package/helpers/babel/wrapNativeSuper/wrapNativeSuper.js +30 -30
- package/helpers/babel/wrapRegExp/wrapRegExp.js +63 -63
- package/helpers/babel/writeOnlyError/writeOnlyError.js +4 -4
- package/helpers/regenerator-runtime/regenerator-runtime.js +748 -748
- package/package.json +4 -2
- package/src/buildProject.js +300 -300
- package/src/execute.js +184 -184
- package/src/internal/browser-launcher/jsenv-browser-system.js +199 -199
- package/src/internal/compiling/createCompiledFileService.js +290 -290
- package/src/internal/compiling/startCompileServer.js +1052 -1131
- package/src/internal/executing/coverage/babel_plugin_instrument.js +90 -90
- package/src/internal/executing/coverage/reportToCoverage.js +187 -187
- package/src/internal/executing/executePlan.js +183 -183
- package/src/internal/executing/launchAndExecute.js +458 -450
- package/src/internal/runtime/createBrowserRuntime/scanBrowserRuntimeFeatures.js +246 -250
- package/src/internal/runtime/createNodeRuntime/scanNodeRuntimeFeatures.js +112 -115
- package/src/internal/runtime/s.js +727 -727
- package/src/internal/toolbar/jsenv-logo.svg +144 -144
- package/src/internal/url_conversion.js +317 -317
- package/src/launchNode.js +210 -210
- package/src/startExploring.js +309 -309
|
@@ -21,80 +21,6 @@
|
|
|
21
21
|
return obj;
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
// eslint-disable-next-line consistent-return
|
|
25
|
-
var arrayWithHoles = (function (arr) {
|
|
26
|
-
if (Array.isArray(arr)) return arr;
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
function _iterableToArrayLimit(arr, i) {
|
|
30
|
-
// this is an expanded form of \`for...of\` that properly supports abrupt completions of
|
|
31
|
-
// iterators etc. variable names have been minimised to reduce the size of this massive
|
|
32
|
-
// helper. sometimes spec compliance is annoying :(
|
|
33
|
-
//
|
|
34
|
-
// _n = _iteratorNormalCompletion
|
|
35
|
-
// _d = _didIteratorError
|
|
36
|
-
// _e = _iteratorError
|
|
37
|
-
// _i = _iterator
|
|
38
|
-
// _s = _step
|
|
39
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
40
|
-
|
|
41
|
-
if (_i == null) return;
|
|
42
|
-
var _arr = [];
|
|
43
|
-
var _n = true;
|
|
44
|
-
var _d = false;
|
|
45
|
-
|
|
46
|
-
var _s, _e;
|
|
47
|
-
|
|
48
|
-
try {
|
|
49
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
50
|
-
_arr.push(_s.value);
|
|
51
|
-
|
|
52
|
-
if (i && _arr.length === i) break;
|
|
53
|
-
}
|
|
54
|
-
} catch (err) {
|
|
55
|
-
_d = true;
|
|
56
|
-
_e = err;
|
|
57
|
-
} finally {
|
|
58
|
-
try {
|
|
59
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
60
|
-
} finally {
|
|
61
|
-
if (_d) throw _e;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return _arr;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* eslint-disable no-eq-null, eqeqeq */
|
|
69
|
-
function arrayLikeToArray(arr, len) {
|
|
70
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
71
|
-
var arr2 = new Array(len);
|
|
72
|
-
|
|
73
|
-
for (var i = 0; i < len; i++) {
|
|
74
|
-
arr2[i] = arr[i];
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return arr2;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* eslint-disable consistent-return */
|
|
81
|
-
function unsupportedIterableToArray(o, minLen) {
|
|
82
|
-
if (!o) return;
|
|
83
|
-
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
|
84
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
85
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
86
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
87
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
var nonIterableRest = (function () {
|
|
91
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
var _slicedToArray = (function (arr, i) {
|
|
95
|
-
return arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
|
96
|
-
});
|
|
97
|
-
|
|
98
24
|
function ownKeys(object, enumerableOnly) {
|
|
99
25
|
var keys = Object.keys(object);
|
|
100
26
|
|
|
@@ -1175,61 +1101,54 @@
|
|
|
1175
1101
|
_ref$failFastOnFeatur = _ref.failFastOnFeatureDetection,
|
|
1176
1102
|
failFastOnFeatureDetection = _ref$failFastOnFeatur === void 0 ? false : _ref$failFastOnFeatur;
|
|
1177
1103
|
|
|
1178
|
-
return _await(fetchJson("/.jsenv/
|
|
1179
|
-
var outDirectoryRelativeUrl = _ref2.outDirectoryRelativeUrl
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
return _await(detectSupportedFeatures({
|
|
1104
|
+
return _await(fetchJson("/.jsenv/__compile_server_meta__.json"), function (_ref2) {
|
|
1105
|
+
var outDirectoryRelativeUrl = _ref2.outDirectoryRelativeUrl,
|
|
1106
|
+
inlineImportMapIntoHTML = _ref2.inlineImportMapIntoHTML,
|
|
1107
|
+
customCompilerPatterns = _ref2.customCompilerPatterns,
|
|
1108
|
+
compileServerGroupMap = _ref2.compileServerGroupMap;
|
|
1109
|
+
var browser = detectBrowser();
|
|
1110
|
+
var compileId = computeCompileIdFromGroupId({
|
|
1111
|
+
groupId: resolveGroup(browser, compileServerGroupMap),
|
|
1112
|
+
groupMap: compileServerGroupMap
|
|
1113
|
+
});
|
|
1114
|
+
var groupInfo = compileServerGroupMap[compileId];
|
|
1115
|
+
var featuresReport = {
|
|
1116
|
+
importmap: undefined,
|
|
1117
|
+
dynamicImport: undefined,
|
|
1118
|
+
topLevelAwait: undefined,
|
|
1119
|
+
jsonImportAssertions: undefined,
|
|
1120
|
+
cssImportAssertions: undefined,
|
|
1121
|
+
newStylesheet: undefined
|
|
1122
|
+
};
|
|
1123
|
+
return _await(detectSupportedFeatures({
|
|
1124
|
+
featuresReport: featuresReport,
|
|
1125
|
+
failFastOnFeatureDetection: failFastOnFeatureDetection,
|
|
1126
|
+
inlineImportMapIntoHTML: inlineImportMapIntoHTML
|
|
1127
|
+
}), function () {
|
|
1128
|
+
return _await(pluginRequiredNamesFromGroupInfo(groupInfo, {
|
|
1204
1129
|
featuresReport: featuresReport,
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
return
|
|
1130
|
+
coverageHandledFromOutside: coverageHandledFromOutside
|
|
1131
|
+
}), function (pluginRequiredNameArray) {
|
|
1132
|
+
var canAvoidCompilation = customCompilerPatterns.length === 0 && pluginRequiredNameArray.length === 0 && featuresReport.importmap && featuresReport.dynamicImport && featuresReport.topLevelAwait;
|
|
1133
|
+
return {
|
|
1134
|
+
canAvoidCompilation: canAvoidCompilation,
|
|
1209
1135
|
featuresReport: featuresReport,
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
pluginRequiredNameArray: pluginRequiredNameArray,
|
|
1218
|
-
inlineImportMapIntoHTML: inlineImportMapIntoHTML,
|
|
1219
|
-
outDirectoryRelativeUrl: outDirectoryRelativeUrl,
|
|
1220
|
-
compileId: compileId,
|
|
1221
|
-
browser: browser
|
|
1222
|
-
};
|
|
1223
|
-
});
|
|
1136
|
+
customCompilerPatterns: customCompilerPatterns,
|
|
1137
|
+
pluginRequiredNameArray: pluginRequiredNameArray,
|
|
1138
|
+
inlineImportMapIntoHTML: inlineImportMapIntoHTML,
|
|
1139
|
+
outDirectoryRelativeUrl: outDirectoryRelativeUrl,
|
|
1140
|
+
compileId: compileId,
|
|
1141
|
+
browser: browser
|
|
1142
|
+
};
|
|
1224
1143
|
});
|
|
1225
1144
|
});
|
|
1226
1145
|
});
|
|
1227
1146
|
});
|
|
1228
1147
|
|
|
1229
|
-
var detectSupportedFeatures = _async(function (
|
|
1230
|
-
var featuresReport =
|
|
1231
|
-
failFastOnFeatureDetection =
|
|
1232
|
-
inlineImportMapIntoHTML =
|
|
1148
|
+
var detectSupportedFeatures = _async(function (_ref3) {
|
|
1149
|
+
var featuresReport = _ref3.featuresReport,
|
|
1150
|
+
failFastOnFeatureDetection = _ref3.failFastOnFeatureDetection,
|
|
1151
|
+
inlineImportMapIntoHTML = _ref3.inlineImportMapIntoHTML;
|
|
1233
1152
|
// start testing importmap support first and not in paralell
|
|
1234
1153
|
// so that there is not module script loaded beore importmap is injected
|
|
1235
1154
|
// it would log an error in chrome console and return undefined
|
|
@@ -1264,9 +1183,9 @@
|
|
|
1264
1183
|
});
|
|
1265
1184
|
});
|
|
1266
1185
|
|
|
1267
|
-
var pluginRequiredNamesFromGroupInfo = _async(function (groupInfo,
|
|
1268
|
-
var featuresReport =
|
|
1269
|
-
coverageHandledFromOutside =
|
|
1186
|
+
var pluginRequiredNamesFromGroupInfo = _async(function (groupInfo, _ref4) {
|
|
1187
|
+
var featuresReport = _ref4.featuresReport,
|
|
1188
|
+
coverageHandledFromOutside = _ref4.coverageHandledFromOutside;
|
|
1270
1189
|
var pluginRequiredNameArray = groupInfo.pluginRequiredNameArray;
|
|
1271
1190
|
var requiredPluginNames = pluginRequiredNameArray.slice();
|
|
1272
1191
|
|
|
@@ -1320,9 +1239,9 @@
|
|
|
1320
1239
|
};
|
|
1321
1240
|
|
|
1322
1241
|
var supportsImportmap = _async(function () {
|
|
1323
|
-
var
|
|
1324
|
-
|
|
1325
|
-
remote =
|
|
1242
|
+
var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
1243
|
+
_ref5$remote = _ref5.remote,
|
|
1244
|
+
remote = _ref5$remote === void 0 ? true : _ref5$remote;
|
|
1326
1245
|
|
|
1327
1246
|
var specifier = asBase64Url("export default false");
|
|
1328
1247
|
var importMap = {
|