@jsenv/core 23.6.1 → 23.8.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 -130
- package/dist/jsenv_toolbar.js.map +13 -48
- 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 +5 -3
- 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/babel_plugin_import_assertions.js +121 -100
- package/src/internal/compiling/babel_plugin_import_metadata.js +22 -0
- package/src/internal/compiling/babel_plugin_import_visitor.js +84 -0
- package/src/internal/compiling/compile-directory/getOrGenerateCompiledFile.js +268 -265
- package/src/internal/compiling/compile-directory/updateMeta.js +154 -150
- package/src/internal/compiling/compile-directory/validateCache.js +265 -265
- package/src/internal/compiling/compileFile.js +215 -200
- package/src/internal/compiling/compileHtml.js +550 -494
- package/src/internal/compiling/createCompiledFileService.js +291 -290
- package/src/internal/compiling/html_source_file_service.js +403 -379
- package/src/internal/compiling/js-compilation-service/jsenvTransform.js +270 -269
- package/src/internal/compiling/jsenvCompilerForHtml.js +300 -293
- package/src/internal/compiling/startCompileServer.js +1048 -1131
- package/src/internal/compiling/transformResultToCompilationResult.js +220 -217
- 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/toolbar/toolbar.main.css +196 -188
- package/src/internal/toolbar/toolbar.main.js +227 -228
- package/src/internal/url_conversion.js +317 -317
- package/src/startExploring.js +309 -309
- package/src/internal/compiling/babel_plugin_transform_import_specifier.js +0 -86
- package/src/internal/toolbar/animation/animation.css +0 -5
- package/src/internal/toolbar/variant/variant.css +0 -3
package/dist/jsenv_toolbar.js
CHANGED
|
@@ -1653,80 +1653,6 @@
|
|
|
1653
1653
|
}
|
|
1654
1654
|
};
|
|
1655
1655
|
|
|
1656
|
-
// eslint-disable-next-line consistent-return
|
|
1657
|
-
var arrayWithHoles = (function (arr) {
|
|
1658
|
-
if (Array.isArray(arr)) return arr;
|
|
1659
|
-
});
|
|
1660
|
-
|
|
1661
|
-
function _iterableToArrayLimit(arr, i) {
|
|
1662
|
-
// this is an expanded form of \`for...of\` that properly supports abrupt completions of
|
|
1663
|
-
// iterators etc. variable names have been minimised to reduce the size of this massive
|
|
1664
|
-
// helper. sometimes spec compliance is annoying :(
|
|
1665
|
-
//
|
|
1666
|
-
// _n = _iteratorNormalCompletion
|
|
1667
|
-
// _d = _didIteratorError
|
|
1668
|
-
// _e = _iteratorError
|
|
1669
|
-
// _i = _iterator
|
|
1670
|
-
// _s = _step
|
|
1671
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1672
|
-
|
|
1673
|
-
if (_i == null) return;
|
|
1674
|
-
var _arr = [];
|
|
1675
|
-
var _n = true;
|
|
1676
|
-
var _d = false;
|
|
1677
|
-
|
|
1678
|
-
var _s, _e;
|
|
1679
|
-
|
|
1680
|
-
try {
|
|
1681
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
1682
|
-
_arr.push(_s.value);
|
|
1683
|
-
|
|
1684
|
-
if (i && _arr.length === i) break;
|
|
1685
|
-
}
|
|
1686
|
-
} catch (err) {
|
|
1687
|
-
_d = true;
|
|
1688
|
-
_e = err;
|
|
1689
|
-
} finally {
|
|
1690
|
-
try {
|
|
1691
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
1692
|
-
} finally {
|
|
1693
|
-
if (_d) throw _e;
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
return _arr;
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
/* eslint-disable no-eq-null, eqeqeq */
|
|
1701
|
-
function arrayLikeToArray(arr, len) {
|
|
1702
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1703
|
-
var arr2 = new Array(len);
|
|
1704
|
-
|
|
1705
|
-
for (var i = 0; i < len; i++) {
|
|
1706
|
-
arr2[i] = arr[i];
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
return arr2;
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
/* eslint-disable consistent-return */
|
|
1713
|
-
function unsupportedIterableToArray(o, minLen) {
|
|
1714
|
-
if (!o) return;
|
|
1715
|
-
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
|
1716
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1717
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1718
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1719
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
var nonIterableRest = (function () {
|
|
1723
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1724
|
-
});
|
|
1725
|
-
|
|
1726
|
-
var _slicedToArray = (function (arr, i) {
|
|
1727
|
-
return arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
|
1728
|
-
});
|
|
1729
|
-
|
|
1730
1656
|
var COMPILE_ID_OTHERWISE = "otherwise";
|
|
1731
1657
|
|
|
1732
1658
|
var computeCompileIdFromGroupId = function computeCompileIdFromGroupId(_ref) {
|
|
@@ -2174,61 +2100,54 @@
|
|
|
2174
2100
|
_ref$failFastOnFeatur = _ref.failFastOnFeatureDetection,
|
|
2175
2101
|
failFastOnFeatureDetection = _ref$failFastOnFeatur === void 0 ? false : _ref$failFastOnFeatur;
|
|
2176
2102
|
|
|
2177
|
-
return _await(fetchJson("/.jsenv/
|
|
2178
|
-
var outDirectoryRelativeUrl = _ref2.outDirectoryRelativeUrl
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
return _await(detectSupportedFeatures({
|
|
2103
|
+
return _await(fetchJson("/.jsenv/__compile_server_meta__.json"), function (_ref2) {
|
|
2104
|
+
var outDirectoryRelativeUrl = _ref2.outDirectoryRelativeUrl,
|
|
2105
|
+
inlineImportMapIntoHTML = _ref2.inlineImportMapIntoHTML,
|
|
2106
|
+
customCompilerPatterns = _ref2.customCompilerPatterns,
|
|
2107
|
+
compileServerGroupMap = _ref2.compileServerGroupMap;
|
|
2108
|
+
var browser = detectBrowser();
|
|
2109
|
+
var compileId = computeCompileIdFromGroupId({
|
|
2110
|
+
groupId: resolveGroup(browser, compileServerGroupMap),
|
|
2111
|
+
groupMap: compileServerGroupMap
|
|
2112
|
+
});
|
|
2113
|
+
var groupInfo = compileServerGroupMap[compileId];
|
|
2114
|
+
var featuresReport = {
|
|
2115
|
+
importmap: undefined,
|
|
2116
|
+
dynamicImport: undefined,
|
|
2117
|
+
topLevelAwait: undefined,
|
|
2118
|
+
jsonImportAssertions: undefined,
|
|
2119
|
+
cssImportAssertions: undefined,
|
|
2120
|
+
newStylesheet: undefined
|
|
2121
|
+
};
|
|
2122
|
+
return _await(detectSupportedFeatures({
|
|
2123
|
+
featuresReport: featuresReport,
|
|
2124
|
+
failFastOnFeatureDetection: failFastOnFeatureDetection,
|
|
2125
|
+
inlineImportMapIntoHTML: inlineImportMapIntoHTML
|
|
2126
|
+
}), function () {
|
|
2127
|
+
return _await(pluginRequiredNamesFromGroupInfo(groupInfo, {
|
|
2203
2128
|
featuresReport: featuresReport,
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
return
|
|
2129
|
+
coverageHandledFromOutside: coverageHandledFromOutside
|
|
2130
|
+
}), function (pluginRequiredNameArray) {
|
|
2131
|
+
var canAvoidCompilation = customCompilerPatterns.length === 0 && pluginRequiredNameArray.length === 0 && featuresReport.importmap && featuresReport.dynamicImport && featuresReport.topLevelAwait;
|
|
2132
|
+
return {
|
|
2133
|
+
canAvoidCompilation: canAvoidCompilation,
|
|
2208
2134
|
featuresReport: featuresReport,
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
pluginRequiredNameArray: pluginRequiredNameArray,
|
|
2217
|
-
inlineImportMapIntoHTML: inlineImportMapIntoHTML,
|
|
2218
|
-
outDirectoryRelativeUrl: outDirectoryRelativeUrl,
|
|
2219
|
-
compileId: compileId,
|
|
2220
|
-
browser: browser
|
|
2221
|
-
};
|
|
2222
|
-
});
|
|
2135
|
+
customCompilerPatterns: customCompilerPatterns,
|
|
2136
|
+
pluginRequiredNameArray: pluginRequiredNameArray,
|
|
2137
|
+
inlineImportMapIntoHTML: inlineImportMapIntoHTML,
|
|
2138
|
+
outDirectoryRelativeUrl: outDirectoryRelativeUrl,
|
|
2139
|
+
compileId: compileId,
|
|
2140
|
+
browser: browser
|
|
2141
|
+
};
|
|
2223
2142
|
});
|
|
2224
2143
|
});
|
|
2225
2144
|
});
|
|
2226
2145
|
});
|
|
2227
2146
|
|
|
2228
|
-
var detectSupportedFeatures = _async$1(function (
|
|
2229
|
-
var featuresReport =
|
|
2230
|
-
failFastOnFeatureDetection =
|
|
2231
|
-
inlineImportMapIntoHTML =
|
|
2147
|
+
var detectSupportedFeatures = _async$1(function (_ref3) {
|
|
2148
|
+
var featuresReport = _ref3.featuresReport,
|
|
2149
|
+
failFastOnFeatureDetection = _ref3.failFastOnFeatureDetection,
|
|
2150
|
+
inlineImportMapIntoHTML = _ref3.inlineImportMapIntoHTML;
|
|
2232
2151
|
// start testing importmap support first and not in paralell
|
|
2233
2152
|
// so that there is not module script loaded beore importmap is injected
|
|
2234
2153
|
// it would log an error in chrome console and return undefined
|
|
@@ -2263,9 +2182,9 @@
|
|
|
2263
2182
|
});
|
|
2264
2183
|
});
|
|
2265
2184
|
|
|
2266
|
-
var pluginRequiredNamesFromGroupInfo = _async$1(function (groupInfo,
|
|
2267
|
-
var featuresReport =
|
|
2268
|
-
coverageHandledFromOutside =
|
|
2185
|
+
var pluginRequiredNamesFromGroupInfo = _async$1(function (groupInfo, _ref4) {
|
|
2186
|
+
var featuresReport = _ref4.featuresReport,
|
|
2187
|
+
coverageHandledFromOutside = _ref4.coverageHandledFromOutside;
|
|
2269
2188
|
var pluginRequiredNameArray = groupInfo.pluginRequiredNameArray;
|
|
2270
2189
|
var requiredPluginNames = pluginRequiredNameArray.slice();
|
|
2271
2190
|
|
|
@@ -2319,9 +2238,9 @@
|
|
|
2319
2238
|
};
|
|
2320
2239
|
|
|
2321
2240
|
var supportsImportmap = _async$1(function () {
|
|
2322
|
-
var
|
|
2323
|
-
|
|
2324
|
-
remote =
|
|
2241
|
+
var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
2242
|
+
_ref5$remote = _ref5.remote,
|
|
2243
|
+
remote = _ref5$remote === void 0 ? true : _ref5$remote;
|
|
2325
2244
|
|
|
2326
2245
|
var specifier = asBase64Url("export default false");
|
|
2327
2246
|
var importMap = {
|
|
@@ -3189,8 +3108,6 @@
|
|
|
3189
3108
|
document.querySelector("#overflow-menu").removeAttribute("data-animate");
|
|
3190
3109
|
};
|
|
3191
3110
|
|
|
3192
|
-
/* eslint-disable import/max-dependencies */
|
|
3193
|
-
|
|
3194
3111
|
function _call(body, then, direct) {
|
|
3195
3112
|
if (direct) {
|
|
3196
3113
|
return then ? then(body()) : body();
|