@jsenv/core 29.1.19 → 29.2.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 (73) hide show
  1. package/dist/babel_helpers/AsyncGenerator/AsyncGenerator.js +3 -16
  2. package/dist/babel_helpers/applyDecoratorDescriptor/applyDecoratorDescriptor.js +0 -5
  3. package/dist/babel_helpers/applyDecs/applyDecs.js +54 -241
  4. package/dist/babel_helpers/applyDecs2023/applyDecs2023.js +47 -195
  5. package/dist/babel_helpers/arrayLikeToArray/arrayLikeToArray.js +0 -2
  6. package/dist/babel_helpers/arrayWithoutHoles/arrayWithoutHoles.js +2 -1
  7. package/dist/babel_helpers/assertThisInitialized/assertThisInitialized.js +0 -1
  8. package/dist/babel_helpers/asyncGeneratorDelegate/asyncGeneratorDelegate.js +4 -14
  9. package/dist/babel_helpers/asyncIterator/asyncIterator.js +5 -20
  10. package/dist/babel_helpers/asyncToGenerator/asyncToGenerator.js +2 -8
  11. package/dist/babel_helpers/awaitAsyncGenerator/awaitAsyncGenerator.js +1 -3
  12. package/dist/babel_helpers/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +0 -4
  13. package/dist/babel_helpers/classApplyDescriptorGet/classApplyDescriptorGet.js +0 -1
  14. package/dist/babel_helpers/classApplyDescriptorSet/classApplyDescriptorSet.js +0 -1
  15. package/dist/babel_helpers/classExtractFieldDescriptor/classExtractFieldDescriptor.js +0 -1
  16. package/dist/babel_helpers/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +0 -1
  17. package/dist/babel_helpers/classPrivateMethodGet/classPrivateMethodGet.js +0 -1
  18. package/dist/babel_helpers/construct/construct.js +5 -5
  19. package/dist/babel_helpers/createClass/createClass.js +0 -1
  20. package/dist/babel_helpers/createForOfIteratorHelper/createForOfIteratorHelper.js +5 -9
  21. package/dist/babel_helpers/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +2 -3
  22. package/dist/babel_helpers/createRawReactElement/createRawReactElement.js +2 -8
  23. package/dist/babel_helpers/createSuper/createSuper.js +2 -4
  24. package/dist/babel_helpers/decorate/decorate.js +60 -311
  25. package/dist/babel_helpers/defaults/defaults.js +0 -3
  26. package/dist/babel_helpers/defineEnumerableProperties/defineEnumerableProperties.js +2 -5
  27. package/dist/babel_helpers/defineProperty/defineProperty.js +0 -1
  28. package/dist/babel_helpers/extends/extends.js +0 -3
  29. package/dist/babel_helpers/get/get.js +0 -3
  30. package/dist/babel_helpers/getPrototypeOf/getPrototypeOf.js +2 -1
  31. package/dist/babel_helpers/inherits/inherits.js +2 -3
  32. package/dist/babel_helpers/instanceof/instanceof.js +0 -1
  33. package/dist/babel_helpers/interopRequireWildcard/interopRequireWildcard.js +0 -10
  34. package/dist/babel_helpers/isNativeReflectConstruct/isNativeReflectConstruct.js +6 -6
  35. package/dist/babel_helpers/iterableToArrayLimit/iterableToArrayLimit.js +0 -5
  36. package/dist/babel_helpers/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +2 -5
  37. package/dist/babel_helpers/jsx/jsx.js +2 -8
  38. package/dist/babel_helpers/maybeArrayLike/maybeArrayLike.js +2 -3
  39. package/dist/babel_helpers/objectSpread/objectSpread.js +4 -6
  40. package/dist/babel_helpers/objectSpread2/objectSpread2.js +3 -8
  41. package/dist/babel_helpers/objectWithoutProperties/objectWithoutProperties.js +0 -3
  42. package/dist/babel_helpers/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +0 -2
  43. package/dist/babel_helpers/possibleConstructorReturn/possibleConstructorReturn.js +0 -1
  44. package/dist/babel_helpers/set/set.js +2 -12
  45. package/dist/babel_helpers/superPropBase/superPropBase.js +0 -1
  46. package/dist/babel_helpers/taggedTemplateLiteral/taggedTemplateLiteral.js +0 -1
  47. package/dist/babel_helpers/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +0 -1
  48. package/dist/babel_helpers/toPrimitive/toPrimitive.js +1 -5
  49. package/dist/babel_helpers/typeof/typeof.js +0 -2
  50. package/dist/babel_helpers/wrapNativeSuper/wrapNativeSuper.js +0 -7
  51. package/dist/babel_helpers/wrapRegExp/wrapRegExp.js +5 -19
  52. package/dist/controllable_child_process.mjs +17 -27
  53. package/dist/controllable_worker_thread.mjs +4 -16
  54. package/dist/js/autoreload.js +13 -56
  55. package/dist/js/execute_using_dynamic_import.js +40 -164
  56. package/dist/js/global_this.js +2 -10
  57. package/dist/js/import_meta_hot.js +3 -9
  58. package/dist/js/new_stylesheet.js +0 -59
  59. package/dist/js/regenerator_runtime.js +80 -156
  60. package/dist/js/s.js +25 -113
  61. package/dist/js/s.js.map +10 -10
  62. package/dist/js/script_type_module_supervisor.js +4 -13
  63. package/dist/js/server_events_client.js +10 -38
  64. package/dist/js/supervisor.js +25 -167
  65. package/dist/js/v8_coverage.js +29 -92
  66. package/dist/js/ws.js +226 -704
  67. package/dist/main.js +761 -4155
  68. package/package.json +2 -2
  69. package/src/plugins/import_meta_url/client/import_meta_url_browser.js +1 -2
  70. package/src/plugins/import_meta_url/client/import_meta_url_commonjs.mjs +1 -1
  71. package/src/plugins/plugins.js +1 -1
  72. package/src/plugins/transpilation/as_js_classic/helpers-string.js +1 -0
  73. package/src/plugins/transpilation/babel/global_this/client/global_this.js +0 -2
@@ -1,10 +1,8 @@
1
1
  // https://mathiasbynens.be/notes/globalthis
2
2
 
3
3
  /* eslint-disable no-redeclare */
4
-
5
4
  /* global globalThis */
6
5
  let globalObject;
7
-
8
6
  if (typeof globalThis === "object") {
9
7
  globalObject = globalThis;
10
8
  } else {
@@ -16,17 +14,11 @@ if (typeof globalThis === "object") {
16
14
  get() {
17
15
  return this;
18
16
  },
19
-
20
17
  configurable: true
21
- }); // eslint-disable-next-line no-undef
22
-
18
+ });
19
+ // eslint-disable-next-line no-undef
23
20
  globalObject = __global__;
24
21
  delete Object.prototype.__global__;
25
22
  }
26
-
27
23
  globalObject.globalThis = globalObject;
28
24
  }
29
-
30
- var globalObject$1 = globalObject;
31
-
32
- export { globalObject$1 as default };
@@ -2,6 +2,7 @@
2
2
  * https://vitejs.dev/guide/api-hmr.html#hot-accept-deps-cb
3
3
  * https://modern-web.dev/docs/dev-server/plugins/hmr/
4
4
  */
5
+
5
6
  const urlHotMetas = {};
6
7
  const createImportMetaHot = importMetaUrl => {
7
8
  const data = {};
@@ -16,7 +17,6 @@ const createImportMetaHot = importMetaUrl => {
16
17
  });
17
18
  return;
18
19
  }
19
-
20
20
  if (typeof firstArg === "function") {
21
21
  addUrlMeta(url, {
22
22
  dependencies: [url],
@@ -24,7 +24,6 @@ const createImportMetaHot = importMetaUrl => {
24
24
  });
25
25
  return;
26
26
  }
27
-
28
27
  if (typeof firstArg === "string") {
29
28
  addUrlMeta(url, {
30
29
  dependencies: [firstArg],
@@ -32,7 +31,6 @@ const createImportMetaHot = importMetaUrl => {
32
31
  });
33
32
  return;
34
33
  }
35
-
36
34
  if (Array.isArray(firstArg)) {
37
35
  addUrlMeta(url, {
38
36
  dependencies: firstArg,
@@ -40,7 +38,6 @@ const createImportMetaHot = importMetaUrl => {
40
38
  });
41
39
  return;
42
40
  }
43
-
44
41
  throw new Error(`invalid call to import.meta.hot.accept(), received ${firstArg}`);
45
42
  },
46
43
  dispose: callback => {
@@ -62,22 +59,19 @@ const createImportMetaHot = importMetaUrl => {
62
59
  }
63
60
  };
64
61
  };
65
-
66
62
  const addUrlMeta = (url, meta) => {
67
- urlHotMetas[url] = { ...urlHotMetas[url],
63
+ urlHotMetas[url] = {
64
+ ...urlHotMetas[url],
68
65
  ...meta
69
66
  };
70
67
  };
71
-
72
68
  const asUrlWithoutHmrQuery = url => {
73
69
  const urlObject = new URL(url);
74
-
75
70
  if (urlObject.searchParams.has("hmr")) {
76
71
  urlObject.searchParams.delete("hmr");
77
72
  urlObject.searchParams.delete("v");
78
73
  return urlObject.href;
79
74
  }
80
-
81
75
  return url;
82
76
  };
83
77
 
@@ -1,98 +1,76 @@
1
1
  /* eslint-disable */
2
-
3
2
  (function () {
4
3
 
5
4
  if (typeof document === "undefined" || "adoptedStyleSheets" in document) {
6
5
  return;
7
6
  }
8
-
9
7
  var hasShadyCss = "ShadyCSS" in window && !ShadyCSS.nativeShadow;
10
8
  var bootstrapper = document.implementation.createHTMLDocument("");
11
9
  var closedShadowRootRegistry = new WeakMap();
12
-
13
10
  var _DOMException = typeof DOMException === "object" ? Error : DOMException;
14
-
15
11
  var defineProperty = Object.defineProperty;
16
12
  var forEach = Array.prototype.forEach;
17
13
  var importPattern = /@import.+?;?$/gm;
18
-
19
14
  function rejectImports(contents) {
20
15
  var _contents = contents.replace(importPattern, "");
21
-
22
16
  if (_contents !== contents) {
23
17
  console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418");
24
18
  }
25
-
26
19
  return _contents.trim();
27
20
  }
28
-
29
21
  function isElementConnected(element) {
30
22
  return "isConnected" in element ? element.isConnected : document.contains(element);
31
23
  }
32
-
33
24
  function unique(arr) {
34
25
  return arr.filter(function (value, index) {
35
26
  return arr.indexOf(value) === index;
36
27
  });
37
28
  }
38
-
39
29
  function diff(arr1, arr2) {
40
30
  return arr1.filter(function (value) {
41
31
  return arr2.indexOf(value) === -1;
42
32
  });
43
33
  }
44
-
45
34
  function removeNode(node) {
46
35
  node.parentNode.removeChild(node);
47
36
  }
48
-
49
37
  function getShadowRoot(element) {
50
38
  return element.shadowRoot || closedShadowRootRegistry.get(element);
51
39
  }
52
-
53
40
  var cssStyleSheetMethods = ["addRule", "deleteRule", "insertRule", "removeRule"];
54
41
  var NonConstructedStyleSheet = CSSStyleSheet;
55
42
  var nonConstructedProto = NonConstructedStyleSheet.prototype;
56
-
57
43
  nonConstructedProto.replace = function () {
58
44
  return Promise.reject(new _DOMException("Can't call replace on non-constructed CSSStyleSheets."));
59
45
  };
60
-
61
46
  nonConstructedProto.replaceSync = function () {
62
47
  throw new _DOMException("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets.");
63
48
  };
64
-
65
49
  function isCSSStyleSheetInstance(instance) {
66
50
  return typeof instance === "object" ? proto$1.isPrototypeOf(instance) || nonConstructedProto.isPrototypeOf(instance) : false;
67
51
  }
68
-
69
52
  function isNonConstructedStyleSheetInstance(instance) {
70
53
  return typeof instance === "object" ? nonConstructedProto.isPrototypeOf(instance) : false;
71
54
  }
72
-
73
55
  var $basicStyleElement = new WeakMap();
74
56
  var $locations = new WeakMap();
75
57
  var $adoptersByLocation = new WeakMap();
76
58
  var $appliedMethods = new WeakMap();
77
-
78
59
  function addAdopterLocation(sheet, location) {
79
60
  var adopter = document.createElement("style");
80
61
  $adoptersByLocation.get(sheet).set(location, adopter);
81
62
  $locations.get(sheet).push(location);
82
63
  return adopter;
83
64
  }
84
-
85
65
  function getAdopterByLocation(sheet, location) {
86
66
  return $adoptersByLocation.get(sheet).get(location);
87
67
  }
88
-
89
68
  function removeAdopterLocation(sheet, location) {
90
69
  $adoptersByLocation.get(sheet).delete(location);
91
70
  $locations.set(sheet, $locations.get(sheet).filter(function (_location) {
92
71
  return _location !== location;
93
72
  }));
94
73
  }
95
-
96
74
  function restyleAdopter(sheet, adopter) {
97
75
  requestAnimationFrame(function () {
98
76
  adopter.textContent = $basicStyleElement.get(sheet).textContent;
@@ -101,13 +79,11 @@
101
79
  });
102
80
  });
103
81
  }
104
-
105
82
  function checkInvocationCorrectness(self) {
106
83
  if (!$basicStyleElement.has(self)) {
107
84
  throw new TypeError("Illegal invocation");
108
85
  }
109
86
  }
110
-
111
87
  function ConstructedStyleSheet() {
112
88
  var self = this;
113
89
  var style = document.createElement("style");
@@ -117,9 +93,7 @@
117
93
  $adoptersByLocation.set(self, new WeakMap());
118
94
  $appliedMethods.set(self, []);
119
95
  }
120
-
121
96
  var proto$1 = ConstructedStyleSheet.prototype;
122
-
123
97
  proto$1.replace = function replace(contents) {
124
98
  try {
125
99
  this.replaceSync(contents);
@@ -128,10 +102,8 @@
128
102
  return Promise.reject(e);
129
103
  }
130
104
  };
131
-
132
105
  proto$1.replaceSync = function replaceSync(contents) {
133
106
  checkInvocationCorrectness(this);
134
-
135
107
  if (typeof contents === "string") {
136
108
  var self_1 = this;
137
109
  $basicStyleElement.get(self_1).textContent = rejectImports(contents);
@@ -143,7 +115,6 @@
143
115
  });
144
116
  }
145
117
  };
146
-
147
118
  defineProperty(proto$1, "cssRules", {
148
119
  configurable: true,
149
120
  enumerable: true,
@@ -188,18 +159,14 @@
188
159
  subtree: true
189
160
  };
190
161
  var locations = new WeakMap();
191
-
192
162
  function getAssociatedLocation(element) {
193
163
  var location = locations.get(element);
194
-
195
164
  if (!location) {
196
165
  location = new Location(element);
197
166
  locations.set(element, location);
198
167
  }
199
-
200
168
  return location;
201
169
  }
202
-
203
170
  function attachAdoptedStyleSheetProperty(constructor) {
204
171
  defineProperty(constructor.prototype, "adoptedStyleSheets", {
205
172
  configurable: true,
@@ -212,32 +179,26 @@
212
179
  }
213
180
  });
214
181
  }
215
-
216
182
  function traverseWebComponents(node, callback) {
217
183
  var iter = document.createNodeIterator(node, NodeFilter.SHOW_ELEMENT, function (foundNode) {
218
184
  return getShadowRoot(foundNode) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
219
185
  }, null, false);
220
-
221
186
  for (var next = void 0; next = iter.nextNode();) {
222
187
  callback(getShadowRoot(next));
223
188
  }
224
189
  }
225
-
226
190
  var $element = new WeakMap();
227
191
  var $uniqueSheets = new WeakMap();
228
192
  var $observer = new WeakMap();
229
-
230
193
  function isExistingAdopter(self, element) {
231
194
  return element instanceof HTMLStyleElement && $uniqueSheets.get(self).some(function (sheet) {
232
195
  return getAdopterByLocation(sheet, self);
233
196
  });
234
197
  }
235
-
236
198
  function getAdopterContainer(self) {
237
199
  var element = $element.get(self);
238
200
  return element instanceof Document ? element.body : element;
239
201
  }
240
-
241
202
  function adopt(self) {
242
203
  var styleList = document.createDocumentFragment();
243
204
  var sheets = $uniqueSheets.get(self);
@@ -253,7 +214,6 @@
253
214
  restyleAdopter(sheet, getAdopterByLocation(sheet, self));
254
215
  });
255
216
  }
256
-
257
217
  function Location(element) {
258
218
  var self = this;
259
219
  self.sheets = [];
@@ -264,29 +224,24 @@
264
224
  observer.disconnect();
265
225
  return;
266
226
  }
267
-
268
227
  mutations.forEach(function (mutation) {
269
228
  if (!hasShadyCss) {
270
229
  forEach.call(mutation.addedNodes, function (node) {
271
230
  if (!(node instanceof Element)) {
272
231
  return;
273
232
  }
274
-
275
233
  traverseWebComponents(node, function (root) {
276
234
  getAssociatedLocation(root).connect();
277
235
  });
278
236
  });
279
237
  }
280
-
281
238
  forEach.call(mutation.removedNodes, function (node) {
282
239
  if (!(node instanceof Element)) {
283
240
  return;
284
241
  }
285
-
286
242
  if (isExistingAdopter(self, node)) {
287
243
  adopt(self);
288
244
  }
289
-
290
245
  if (!hasShadyCss) {
291
246
  traverseWebComponents(node, function (root) {
292
247
  getAssociatedLocation(root).disconnect();
@@ -296,7 +251,6 @@
296
251
  });
297
252
  }));
298
253
  }
299
-
300
254
  Location.prototype = {
301
255
  isConnected: function () {
302
256
  var element = $element.get(this);
@@ -305,11 +259,9 @@
305
259
  connect: function () {
306
260
  var container = getAdopterContainer(this);
307
261
  $observer.get(this).observe(container, defaultObserverOptions);
308
-
309
262
  if ($uniqueSheets.get(this).length > 0) {
310
263
  adopt(this);
311
264
  }
312
-
313
265
  traverseWebComponents(container, function (root) {
314
266
  getAssociatedLocation(root).connect();
315
267
  });
@@ -320,19 +272,15 @@
320
272
  update: function (sheets) {
321
273
  var self = this;
322
274
  var locationType = $element.get(self) === document ? "Document" : "ShadowRoot";
323
-
324
275
  if (!Array.isArray(sheets)) {
325
276
  throw new TypeError("Failed to set the 'adoptedStyleSheets' property on " + locationType + ": Iterator getter is not callable.");
326
277
  }
327
-
328
278
  if (!sheets.every(isCSSStyleSheetInstance)) {
329
279
  throw new TypeError("Failed to set the 'adoptedStyleSheets' property on " + locationType + ": Failed to convert value to 'CSSStyleSheet'");
330
280
  }
331
-
332
281
  if (sheets.some(isNonConstructedStyleSheetInstance)) {
333
282
  throw new TypeError("Failed to set the 'adoptedStyleSheets' property on " + locationType + ": Can't adopt non-constructed stylesheets");
334
283
  }
335
-
336
284
  self.sheets = sheets;
337
285
  var oldUniqueSheets = $uniqueSheets.get(self);
338
286
  var uniqueSheets = unique(sheets);
@@ -342,7 +290,6 @@
342
290
  removeAdopterLocation(sheet, self);
343
291
  });
344
292
  $uniqueSheets.set(self, uniqueSheets);
345
-
346
293
  if (self.isConnected() && uniqueSheets.length > 0) {
347
294
  adopt(self);
348
295
  }
@@ -350,25 +297,19 @@
350
297
  };
351
298
  window.CSSStyleSheet = ConstructedStyleSheet;
352
299
  attachAdoptedStyleSheetProperty(Document);
353
-
354
300
  if ("ShadowRoot" in window) {
355
301
  attachAdoptedStyleSheetProperty(ShadowRoot);
356
302
  var proto = Element.prototype;
357
303
  var attach_1 = proto.attachShadow;
358
-
359
304
  proto.attachShadow = function attachShadow(init) {
360
305
  var root = attach_1.call(this, init);
361
-
362
306
  if (init.mode === "closed") {
363
307
  closedShadowRootRegistry.set(this, root);
364
308
  }
365
-
366
309
  return root;
367
310
  };
368
311
  }
369
-
370
312
  var documentLocation = getAssociatedLocation(document);
371
-
372
313
  if (documentLocation.isConnected()) {
373
314
  documentLocation.connect();
374
315
  } else {