@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.
Files changed (119) hide show
  1. package/{license → LICENSE} +21 -21
  2. package/dist/jsenv_browser_system.js +35 -35
  3. package/dist/jsenv_browser_system.js.map +14 -14
  4. package/dist/jsenv_compile_proxy.js +47 -128
  5. package/dist/jsenv_compile_proxy.js.map +25 -62
  6. package/dist/jsenv_exploring_index.js.map +5 -5
  7. package/dist/jsenv_exploring_redirector.js +47 -54
  8. package/dist/jsenv_exploring_redirector.js.map +17 -19
  9. package/dist/jsenv_toolbar.js +47 -128
  10. package/dist/jsenv_toolbar.js.map +12 -47
  11. package/dist/jsenv_toolbar_injector.js.map +5 -5
  12. package/helpers/babel/.eslintrc.cjs +24 -24
  13. package/helpers/babel/AsyncGenerator/AsyncGenerator.js +81 -81
  14. package/helpers/babel/AwaitValue/AwaitValue.js +3 -3
  15. package/helpers/babel/applyDecoratorDescriptor/applyDecoratorDescriptor.js +33 -33
  16. package/helpers/babel/arrayLikeToArray/arrayLikeToArray.js +7 -7
  17. package/helpers/babel/arrayWithHoles/arrayWithHoles.js +4 -4
  18. package/helpers/babel/arrayWithoutHoles/arrayWithoutHoles.js +6 -6
  19. package/helpers/babel/assertThisInitialized/assertThisInitialized.js +7 -7
  20. package/helpers/babel/asyncGeneratorDelegate/asyncGeneratorDelegate.js +40 -40
  21. package/helpers/babel/asyncIterator/asyncIterator.js +12 -12
  22. package/helpers/babel/asyncToGenerator/asyncToGenerator.js +34 -34
  23. package/helpers/babel/awaitAsyncGenerator/awaitAsyncGenerator.js +5 -5
  24. package/helpers/babel/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +20 -20
  25. package/helpers/babel/classApplyDescriptorGet/classApplyDescriptorGet.js +6 -6
  26. package/helpers/babel/classApplyDescriptorSet/classApplyDescriptorSet.js +13 -13
  27. package/helpers/babel/classCallCheck/classCallCheck.js +5 -5
  28. package/helpers/babel/classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js +5 -5
  29. package/helpers/babel/classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js +6 -6
  30. package/helpers/babel/classExtractFieldDescriptor/classExtractFieldDescriptor.js +7 -7
  31. package/helpers/babel/classNameTDZError/classNameTDZError.js +4 -4
  32. package/helpers/babel/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js +7 -7
  33. package/helpers/babel/classPrivateFieldGet/classPrivateFieldGet.js +7 -7
  34. package/helpers/babel/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +6 -6
  35. package/helpers/babel/classPrivateFieldLooseKey/classPrivateFieldLooseKey.js +5 -5
  36. package/helpers/babel/classPrivateFieldSet/classPrivateFieldSet.js +8 -8
  37. package/helpers/babel/classPrivateMethodGet/classPrivateMethodGet.js +6 -6
  38. package/helpers/babel/classPrivateMethodSet/classPrivateMethodSet.js +3 -3
  39. package/helpers/babel/classStaticPrivateFieldSpecGet/classStaticPrivateFieldSpecGet.js +9 -9
  40. package/helpers/babel/classStaticPrivateFieldSpecSet/classStaticPrivateFieldSpecSet.js +15 -15
  41. package/helpers/babel/classStaticPrivateMethodGet/classStaticPrivateMethodGet.js +6 -6
  42. package/helpers/babel/classStaticPrivateMethodSet/classStaticPrivateMethodSet.js +3 -3
  43. package/helpers/babel/construct/construct.js +16 -16
  44. package/helpers/babel/createClass/createClass.js +15 -15
  45. package/helpers/babel/createForOfIteratorHelper/createForOfIteratorHelper.js +60 -60
  46. package/helpers/babel/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +23 -23
  47. package/helpers/babel/createRawReactElement/createRawReactElement.js +50 -50
  48. package/helpers/babel/createSuper/createSuper.js +22 -22
  49. package/helpers/babel/decorate/decorate.js +403 -403
  50. package/helpers/babel/defaults/defaults.js +11 -11
  51. package/helpers/babel/defineEnumerableProperties/defineEnumerableProperties.js +23 -23
  52. package/helpers/babel/defineProperty/defineProperty.js +18 -18
  53. package/helpers/babel/extends/extends.js +14 -14
  54. package/helpers/babel/get/get.js +13 -13
  55. package/helpers/babel/getPrototypeOf/getPrototypeOf.js +4 -4
  56. package/helpers/babel/inherits/inherits.js +15 -15
  57. package/helpers/babel/inheritsLoose/inheritsLoose.js +7 -7
  58. package/helpers/babel/initializerDefineProperty/initializerDefineProperty.js +10 -10
  59. package/helpers/babel/initializerWarningHelper/initializerWarningHelper.js +6 -6
  60. package/helpers/babel/instanceof/instanceof.js +6 -6
  61. package/helpers/babel/interopRequireDefault/interopRequireDefault.js +3 -3
  62. package/helpers/babel/interopRequireWildcard/interopRequireWildcard.js +37 -37
  63. package/helpers/babel/isNativeFunction/isNativeFunction.js +4 -4
  64. package/helpers/babel/isNativeReflectConstruct/isNativeReflectConstruct.js +21 -21
  65. package/helpers/babel/iterableToArray/iterableToArray.js +7 -7
  66. package/helpers/babel/iterableToArrayLimit/iterableToArrayLimit.js +36 -36
  67. package/helpers/babel/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +10 -10
  68. package/helpers/babel/jsx/jsx.js +45 -45
  69. package/helpers/babel/maybeArrayLike/maybeArrayLike.js +10 -10
  70. package/helpers/babel/newArrowCheck/newArrowCheck.js +5 -5
  71. package/helpers/babel/nonIterableRest/nonIterableRest.js +5 -5
  72. package/helpers/babel/nonIterableSpread/nonIterableSpread.js +5 -5
  73. package/helpers/babel/objectDestructuringEmpty/objectDestructuringEmpty.js +3 -3
  74. package/helpers/babel/objectSpread/objectSpread.js +23 -23
  75. package/helpers/babel/objectSpread2/objectSpread2.js +33 -33
  76. package/helpers/babel/objectWithoutProperties/objectWithoutProperties.js +19 -19
  77. package/helpers/babel/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +13 -13
  78. package/helpers/babel/possibleConstructorReturn/possibleConstructorReturn.js +10 -10
  79. package/helpers/babel/readOnlyError/readOnlyError.js +4 -4
  80. package/helpers/babel/readme.md +9 -9
  81. package/helpers/babel/set/set.js +44 -44
  82. package/helpers/babel/setPrototypeOf/setPrototypeOf.js +6 -6
  83. package/helpers/babel/skipFirstGeneratorNext/skipFirstGeneratorNext.js +8 -8
  84. package/helpers/babel/slicedToArray/slicedToArray.js +10 -10
  85. package/helpers/babel/slicedToArrayLoose/slicedToArrayLoose.js +13 -13
  86. package/helpers/babel/superPropBase/superPropBase.js +10 -10
  87. package/helpers/babel/taggedTemplateLiteral/taggedTemplateLiteral.js +10 -10
  88. package/helpers/babel/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +7 -7
  89. package/helpers/babel/tdz/tdz.js +4 -4
  90. package/helpers/babel/temporalRef/temporalRef.js +6 -6
  91. package/helpers/babel/temporalUndefined/temporalUndefined.js +3 -3
  92. package/helpers/babel/toArray/toArray.js +10 -10
  93. package/helpers/babel/toConsumableArray/toConsumableArray.js +10 -10
  94. package/helpers/babel/toPrimitive/toPrimitive.js +10 -10
  95. package/helpers/babel/toPropertyKey/toPropertyKey.js +6 -6
  96. package/helpers/babel/typeof/typeof.js +14 -14
  97. package/helpers/babel/unsupportedIterableToArray/unsupportedIterableToArray.js +12 -12
  98. package/helpers/babel/wrapAsyncGenerator/wrapAsyncGenerator.js +8 -8
  99. package/helpers/babel/wrapNativeSuper/wrapNativeSuper.js +30 -30
  100. package/helpers/babel/wrapRegExp/wrapRegExp.js +63 -63
  101. package/helpers/babel/writeOnlyError/writeOnlyError.js +4 -4
  102. package/helpers/regenerator-runtime/regenerator-runtime.js +748 -748
  103. package/package.json +4 -2
  104. package/src/buildProject.js +300 -300
  105. package/src/execute.js +184 -184
  106. package/src/internal/browser-launcher/jsenv-browser-system.js +199 -199
  107. package/src/internal/compiling/createCompiledFileService.js +290 -290
  108. package/src/internal/compiling/startCompileServer.js +1052 -1131
  109. package/src/internal/executing/coverage/babel_plugin_instrument.js +90 -90
  110. package/src/internal/executing/coverage/reportToCoverage.js +187 -187
  111. package/src/internal/executing/executePlan.js +183 -183
  112. package/src/internal/executing/launchAndExecute.js +458 -450
  113. package/src/internal/runtime/createBrowserRuntime/scanBrowserRuntimeFeatures.js +246 -250
  114. package/src/internal/runtime/createNodeRuntime/scanNodeRuntimeFeatures.js +112 -115
  115. package/src/internal/runtime/s.js +727 -727
  116. package/src/internal/toolbar/jsenv-logo.svg +144 -144
  117. package/src/internal/url_conversion.js +317 -317
  118. package/src/launchNode.js +210 -210
  119. package/src/startExploring.js +309 -309
@@ -1,12 +1,12 @@
1
- /* eslint-disable consistent-return */
2
- import arrayLikeToArray from "../arrayLikeToArray/arrayLikeToArray.js"
3
-
4
- export default function unsupportedIterableToArray(o, minLen) {
5
- if (!o) return
6
- if (typeof o === "string") return arrayLikeToArray(o, minLen)
7
- var n = Object.prototype.toString.call(o).slice(8, -1)
8
- if (n === "Object" && o.constructor) n = o.constructor.name
9
- if (n === "Map" || n === "Set") return Array.from(o)
10
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
11
- return arrayLikeToArray(o, minLen)
12
- }
1
+ /* eslint-disable consistent-return */
2
+ import arrayLikeToArray from "../arrayLikeToArray/arrayLikeToArray.js"
3
+
4
+ export default function unsupportedIterableToArray(o, minLen) {
5
+ if (!o) return
6
+ if (typeof o === "string") return arrayLikeToArray(o, minLen)
7
+ var n = Object.prototype.toString.call(o).slice(8, -1)
8
+ if (n === "Object" && o.constructor) n = o.constructor.name
9
+ if (n === "Map" || n === "Set") return Array.from(o)
10
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
11
+ return arrayLikeToArray(o, minLen)
12
+ }
@@ -1,8 +1,8 @@
1
- import AsyncGenerator from "../AsyncGenerator/AsyncGenerator.js"
2
-
3
- export default function (fn) {
4
- return function () {
5
- // eslint-disable-next-line prefer-rest-params
6
- return new AsyncGenerator(fn.apply(this, arguments))
7
- }
8
- }
1
+ import AsyncGenerator from "../AsyncGenerator/AsyncGenerator.js"
2
+
3
+ export default function (fn) {
4
+ return function () {
5
+ // eslint-disable-next-line prefer-rest-params
6
+ return new AsyncGenerator(fn.apply(this, arguments))
7
+ }
8
+ }
@@ -1,30 +1,30 @@
1
- import getPrototypeOf from "../getPrototypeOf/getPrototypeOf.js"
2
- import setPrototypeOf from "../setPrototypeOf/setPrototypeOf.js"
3
- import isNativeFunction from "../isNativeFunction/isNativeFunction.js"
4
- import construct from "../construct/construct.js"
5
-
6
- var _cache = typeof Map === "function" ? new Map() : undefined
7
-
8
- export default function (Class) {
9
- if (Class === null || !isNativeFunction(Class)) return Class
10
- if (typeof Class !== "function") {
11
- throw new TypeError("Super expression must either be null or a function")
12
- }
13
- if (typeof _cache !== "undefined") {
14
- if (_cache.has(Class)) return _cache.get(Class)
15
- _cache.set(Class, Wrapper)
16
- }
17
- function Wrapper() {
18
- // eslint-disable-next-line prefer-rest-params
19
- return construct(Class, arguments, getPrototypeOf(this).constructor)
20
- }
21
- Wrapper.prototype = Object.create(Class.prototype, {
22
- constructor: {
23
- value: Wrapper,
24
- enumerable: false,
25
- writable: true,
26
- configurable: true,
27
- },
28
- })
29
- return setPrototypeOf(Wrapper, Class)
30
- }
1
+ import getPrototypeOf from "../getPrototypeOf/getPrototypeOf.js"
2
+ import setPrototypeOf from "../setPrototypeOf/setPrototypeOf.js"
3
+ import isNativeFunction from "../isNativeFunction/isNativeFunction.js"
4
+ import construct from "../construct/construct.js"
5
+
6
+ var _cache = typeof Map === "function" ? new Map() : undefined
7
+
8
+ export default function (Class) {
9
+ if (Class === null || !isNativeFunction(Class)) return Class
10
+ if (typeof Class !== "function") {
11
+ throw new TypeError("Super expression must either be null or a function")
12
+ }
13
+ if (typeof _cache !== "undefined") {
14
+ if (_cache.has(Class)) return _cache.get(Class)
15
+ _cache.set(Class, Wrapper)
16
+ }
17
+ function Wrapper() {
18
+ // eslint-disable-next-line prefer-rest-params
19
+ return construct(Class, arguments, getPrototypeOf(this).constructor)
20
+ }
21
+ Wrapper.prototype = Object.create(Class.prototype, {
22
+ constructor: {
23
+ value: Wrapper,
24
+ enumerable: false,
25
+ writable: true,
26
+ configurable: true,
27
+ },
28
+ })
29
+ return setPrototypeOf(Wrapper, Class)
30
+ }
@@ -1,63 +1,63 @@
1
- import setPrototypeOf from "../setPrototypeOf/setPrototypeOf.js"
2
- import inherits from "../inherits/inherits.js"
3
-
4
- export default function _wrapRegExp() {
5
- _wrapRegExp = function (re, groups) {
6
- return new BabelRegExp(re, undefined, groups)
7
- }
8
-
9
- var _super = RegExp.prototype
10
- var _groups = new WeakMap()
11
-
12
- function BabelRegExp(re, flags, groups) {
13
- var _this = new RegExp(re, flags)
14
- // if the regex is recreated with 'g' flag
15
- _groups.set(_this, groups || _groups.get(re))
16
- return setPrototypeOf(_this, BabelRegExp.prototype)
17
- }
18
- inherits(BabelRegExp, RegExp)
19
-
20
- BabelRegExp.prototype.exec = function (str) {
21
- var result = _super.exec.call(this, str)
22
- if (result) result.groups = buildGroups(result, this)
23
- return result
24
- }
25
- BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
26
- if (typeof substitution === "string") {
27
- var groups = _groups.get(this)
28
- return _super[Symbol.replace].call(
29
- this,
30
- str,
31
- substitution.replace(/\$<([^>]+)>/g, function (_, name) {
32
- return "$" + groups[name]
33
- }),
34
- )
35
- } else if (typeof substitution === "function") {
36
- var _this = this
37
- return _super[Symbol.replace].call(this, str, function () {
38
- var args = arguments
39
- // Modern engines already pass result.groups returned by exec() as the last arg.
40
- if (typeof args[args.length - 1] !== "object") {
41
- args = [].slice.call(args)
42
- args.push(buildGroups(args, _this))
43
- }
44
- return substitution.apply(this, args)
45
- })
46
- } else {
47
- return _super[Symbol.replace].call(this, str, substitution)
48
- }
49
- }
50
-
51
- function buildGroups(result, re) {
52
- // NOTE: This function should return undefined if there are no groups,
53
- // but in that case Babel doesn't add the wrapper anyway.
54
-
55
- var g = _groups.get(re)
56
- return Object.keys(g).reduce(function (groups, name) {
57
- groups[name] = result[g[name]]
58
- return groups
59
- }, Object.create(null))
60
- }
61
-
62
- return _wrapRegExp.apply(this, arguments)
63
- }
1
+ import setPrototypeOf from "../setPrototypeOf/setPrototypeOf.js"
2
+ import inherits from "../inherits/inherits.js"
3
+
4
+ export default function _wrapRegExp() {
5
+ _wrapRegExp = function (re, groups) {
6
+ return new BabelRegExp(re, undefined, groups)
7
+ }
8
+
9
+ var _super = RegExp.prototype
10
+ var _groups = new WeakMap()
11
+
12
+ function BabelRegExp(re, flags, groups) {
13
+ var _this = new RegExp(re, flags)
14
+ // if the regex is recreated with 'g' flag
15
+ _groups.set(_this, groups || _groups.get(re))
16
+ return setPrototypeOf(_this, BabelRegExp.prototype)
17
+ }
18
+ inherits(BabelRegExp, RegExp)
19
+
20
+ BabelRegExp.prototype.exec = function (str) {
21
+ var result = _super.exec.call(this, str)
22
+ if (result) result.groups = buildGroups(result, this)
23
+ return result
24
+ }
25
+ BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
26
+ if (typeof substitution === "string") {
27
+ var groups = _groups.get(this)
28
+ return _super[Symbol.replace].call(
29
+ this,
30
+ str,
31
+ substitution.replace(/\$<([^>]+)>/g, function (_, name) {
32
+ return "$" + groups[name]
33
+ }),
34
+ )
35
+ } else if (typeof substitution === "function") {
36
+ var _this = this
37
+ return _super[Symbol.replace].call(this, str, function () {
38
+ var args = arguments
39
+ // Modern engines already pass result.groups returned by exec() as the last arg.
40
+ if (typeof args[args.length - 1] !== "object") {
41
+ args = [].slice.call(args)
42
+ args.push(buildGroups(args, _this))
43
+ }
44
+ return substitution.apply(this, args)
45
+ })
46
+ } else {
47
+ return _super[Symbol.replace].call(this, str, substitution)
48
+ }
49
+ }
50
+
51
+ function buildGroups(result, re) {
52
+ // NOTE: This function should return undefined if there are no groups,
53
+ // but in that case Babel doesn't add the wrapper anyway.
54
+
55
+ var g = _groups.get(re)
56
+ return Object.keys(g).reduce(function (groups, name) {
57
+ groups[name] = result[g[name]]
58
+ return groups
59
+ }, Object.create(null))
60
+ }
61
+
62
+ return _wrapRegExp.apply(this, arguments)
63
+ }
@@ -1,4 +1,4 @@
1
- export default function (name) {
2
- // eslint-disable-next-line prefer-template
3
- throw new TypeError(name + " is write-only")
4
- }
1
+ export default function (name) {
2
+ // eslint-disable-next-line prefer-template
3
+ throw new TypeError(name + " is write-only")
4
+ }