@jsenv/core 38.3.11 → 38.4.1

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 (118) hide show
  1. package/README.md +17 -18
  2. package/dist/babel_helpers/AsyncGenerator/AsyncGenerator.js +3 -3
  3. package/dist/babel_helpers/AwaitValue/AwaitValue.js +2 -2
  4. package/dist/babel_helpers/{overloadYield/overloadYield.js → OverloadYield/OverloadYield.js} +1 -1
  5. package/dist/babel_helpers/applyDecoratedDescriptor/applyDecoratedDescriptor.js +23 -14
  6. package/dist/babel_helpers/applyDecs/applyDecs.js +32 -21
  7. package/dist/babel_helpers/applyDecs2203/applyDecs2203.js +549 -549
  8. package/dist/babel_helpers/applyDecs2203R/applyDecs2203R.js +27 -15
  9. package/dist/babel_helpers/applyDecs2301/applyDecs2301.js +29 -18
  10. package/dist/babel_helpers/applyDecs2305/applyDecs2305.js +362 -541
  11. package/dist/babel_helpers/arrayLikeToArray/arrayLikeToArray.js +4 -4
  12. package/dist/babel_helpers/arrayWithHoles/arrayWithHoles.js +2 -2
  13. package/dist/babel_helpers/arrayWithoutHoles/arrayWithoutHoles.js +3 -3
  14. package/dist/babel_helpers/assertThisInitialized/assertThisInitialized.js +5 -3
  15. package/dist/babel_helpers/asyncGeneratorDelegate/asyncGeneratorDelegate.js +2 -2
  16. package/dist/babel_helpers/asyncIterator/asyncIterator.js +1 -1
  17. package/dist/babel_helpers/asyncToGenerator/asyncToGenerator.js +17 -17
  18. package/dist/babel_helpers/awaitAsyncGenerator/awaitAsyncGenerator.js +2 -2
  19. package/dist/babel_helpers/callSuper/callSuper.js +25 -0
  20. package/dist/babel_helpers/checkInRHS/checkInRHS.js +10 -8
  21. package/dist/babel_helpers/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +9 -6
  22. package/dist/babel_helpers/classApplyDescriptorGet/classApplyDescriptorGet.js +2 -2
  23. package/dist/babel_helpers/classApplyDescriptorSet/classApplyDescriptorSet.js +3 -3
  24. package/dist/babel_helpers/classCallCheck/classCallCheck.js +1 -1
  25. package/dist/babel_helpers/classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js +5 -2
  26. package/dist/babel_helpers/classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js +7 -2
  27. package/dist/babel_helpers/classExtractFieldDescriptor/classExtractFieldDescriptor.js +9 -3
  28. package/dist/babel_helpers/classNameTDZError/classNameTDZError.js +3 -1
  29. package/dist/babel_helpers/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js +4 -4
  30. package/dist/babel_helpers/classPrivateFieldGet/classPrivateFieldGet.js +4 -4
  31. package/dist/babel_helpers/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +2 -2
  32. package/dist/babel_helpers/classPrivateFieldLooseKey/classPrivateFieldLooseKey.js +2 -2
  33. package/dist/babel_helpers/classPrivateFieldSet/classPrivateFieldSet.js +5 -5
  34. package/dist/babel_helpers/classPrivateMethodGet/classPrivateMethodGet.js +2 -2
  35. package/dist/babel_helpers/classPrivateMethodSet/classPrivateMethodSet.js +1 -1
  36. package/dist/babel_helpers/classStaticPrivateFieldSpecGet/classStaticPrivateFieldSpecGet.js +11 -7
  37. package/dist/babel_helpers/classStaticPrivateFieldSpecSet/classStaticPrivateFieldSpecSet.js +7 -7
  38. package/dist/babel_helpers/classStaticPrivateMethodGet/classStaticPrivateMethodGet.js +8 -4
  39. package/dist/babel_helpers/classStaticPrivateMethodSet/classStaticPrivateMethodSet.js +1 -1
  40. package/dist/babel_helpers/construct/construct.js +18 -14
  41. package/dist/babel_helpers/createClass/createClass.js +1 -1
  42. package/dist/babel_helpers/createForOfIteratorHelper/createForOfIteratorHelper.js +21 -20
  43. package/dist/babel_helpers/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +10 -9
  44. package/dist/babel_helpers/createRawReactElement/createRawReactElement.js +11 -11
  45. package/dist/babel_helpers/createSuper/createSuper.js +11 -11
  46. package/dist/babel_helpers/decorate/decorate.js +255 -170
  47. package/dist/babel_helpers/defaults/defaults.js +5 -5
  48. package/dist/babel_helpers/defineAccessor/defineAccessor.js +1 -1
  49. package/dist/babel_helpers/defineEnumerableProperties/defineEnumerableProperties.js +11 -11
  50. package/dist/babel_helpers/defineProperty/defineProperty.js +4 -4
  51. package/dist/babel_helpers/dispose/dispose.js +39 -39
  52. package/dist/babel_helpers/extends/extends.js +4 -4
  53. package/dist/babel_helpers/get/get.js +2 -2
  54. package/dist/babel_helpers/getPrototypeOf/getPrototypeOf.js +1 -1
  55. package/dist/babel_helpers/identity/identity.js +1 -1
  56. package/dist/babel_helpers/importDeferProxy/importDeferProxy.js +27 -27
  57. package/dist/babel_helpers/inherits/inherits.js +4 -4
  58. package/dist/babel_helpers/inheritsLoose/inheritsLoose.js +4 -4
  59. package/dist/babel_helpers/initializerDefineProperty/initializerDefineProperty.js +5 -3
  60. package/dist/babel_helpers/initializerWarningHelper/initializerWarningHelper.js +1 -1
  61. package/dist/babel_helpers/instanceof/instanceof.js +7 -3
  62. package/dist/babel_helpers/interopRequireDefault/interopRequireDefault.js +1 -1
  63. package/dist/babel_helpers/interopRequireWildcard/interopRequireWildcard.js +3 -1
  64. package/dist/babel_helpers/isNativeFunction/isNativeFunction.js +1 -1
  65. package/dist/babel_helpers/isNativeReflectConstruct/isNativeReflectConstruct.js +12 -14
  66. package/dist/babel_helpers/iterableToArray/iterableToArray.js +1 -1
  67. package/dist/babel_helpers/iterableToArrayLimit/iterableToArrayLimit.js +1 -1
  68. package/dist/babel_helpers/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +1 -1
  69. package/dist/babel_helpers/jsx/jsx.js +1 -1
  70. package/dist/babel_helpers/maybeArrayLike/maybeArrayLike.js +4 -4
  71. package/dist/babel_helpers/newArrowCheck/newArrowCheck.js +1 -1
  72. package/dist/babel_helpers/nonIterableRest/nonIterableRest.js +2 -2
  73. package/dist/babel_helpers/nonIterableSpread/nonIterableSpread.js +2 -2
  74. package/dist/babel_helpers/nullishReceiverError/nullishReceiverError.js +1 -1
  75. package/dist/babel_helpers/objectDestructuringEmpty/objectDestructuringEmpty.js +1 -1
  76. package/dist/babel_helpers/objectSpread/objectSpread.js +8 -8
  77. package/dist/babel_helpers/objectSpread2/objectSpread2.js +5 -3
  78. package/dist/babel_helpers/objectWithoutProperties/objectWithoutProperties.js +12 -12
  79. package/dist/babel_helpers/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +10 -10
  80. package/dist/babel_helpers/possibleConstructorReturn/possibleConstructorReturn.js +7 -5
  81. package/dist/babel_helpers/readOnlyError/readOnlyError.js +1 -1
  82. package/dist/babel_helpers/regeneratorRuntime/regeneratorRuntime.js +1 -1
  83. package/dist/babel_helpers/set/set.js +22 -19
  84. package/dist/babel_helpers/setFunctionName/setFunctionName.js +18 -0
  85. package/dist/babel_helpers/setPrototypeOf/setPrototypeOf.js +7 -6
  86. package/dist/babel_helpers/skipFirstGeneratorNext/skipFirstGeneratorNext.js +4 -4
  87. package/dist/babel_helpers/slicedToArray/slicedToArray.js +5 -5
  88. package/dist/babel_helpers/slicedToArrayLoose/slicedToArrayLoose.js +5 -5
  89. package/dist/babel_helpers/superPropBase/superPropBase.js +4 -4
  90. package/dist/babel_helpers/taggedTemplateLiteral/taggedTemplateLiteral.js +2 -2
  91. package/dist/babel_helpers/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +3 -3
  92. package/dist/babel_helpers/tdz/tdz.js +1 -1
  93. package/dist/babel_helpers/temporalRef/temporalRef.js +3 -3
  94. package/dist/babel_helpers/toArray/toArray.js +5 -5
  95. package/dist/babel_helpers/toConsumableArray/toConsumableArray.js +5 -5
  96. package/dist/babel_helpers/toPrimitive/toPrimitive.js +11 -7
  97. package/dist/babel_helpers/toPropertyKey/toPropertyKey.js +8 -4
  98. package/dist/babel_helpers/typeof/typeof.js +6 -5
  99. package/dist/babel_helpers/unsupportedIterableToArray/unsupportedIterableToArray.js +7 -7
  100. package/dist/babel_helpers/using/using.js +20 -20
  101. package/dist/babel_helpers/wrapAsyncGenerator/wrapAsyncGenerator.js +3 -3
  102. package/dist/babel_helpers/wrapNativeSuper/wrapNativeSuper.js +12 -12
  103. package/dist/babel_helpers/wrapRegExp/wrapRegExp.js +5 -3
  104. package/dist/babel_helpers/writeOnlyError/writeOnlyError.js +1 -1
  105. package/dist/js/ribbon.js +1 -1
  106. package/dist/js/ws.js +234 -146
  107. package/dist/jsenv_core.js +1365 -1211
  108. package/package.json +26 -22
  109. package/src/build/build.js +22 -14
  110. package/src/dev/start_dev_server.js +8 -21
  111. package/src/kitchen/errors.js +29 -24
  112. package/src/kitchen/kitchen.js +1 -1
  113. package/src/kitchen/url_graph/references.js +8 -0
  114. package/src/kitchen/url_graph/url_graph_report.js +5 -3
  115. package/src/plugins/plugins.js +2 -2
  116. package/src/plugins/protocol_file/jsenv_plugin_protocol_file.js +17 -7
  117. package/src/plugins/reference_analysis/js/jsenv_plugin_js_reference_analysis.js +10 -12
  118. package/src/plugins/ribbon/client/ribbon.js +1 -1
@@ -1,5 +1,8 @@
1
1
  /* @minVersion 7.20.0 */
2
2
 
3
+ import setFunctionName from "../setFunctionName/setFunctionName.js";
4
+ import toPropertyKey from "../toPropertyKey/toPropertyKey.js";
5
+
3
6
  /**
4
7
  Enums are used in this file, but not assigned to vars to avoid non-hoistable values
5
8
 
@@ -35,7 +38,7 @@ function applyDecs2203RFactory() {
35
38
  kind,
36
39
  isStatic,
37
40
  isPrivate,
38
- value
41
+ value,
39
42
  ) {
40
43
  var kindStr;
41
44
 
@@ -58,7 +61,7 @@ function applyDecs2203RFactory() {
58
61
 
59
62
  var ctx = {
60
63
  kind: kindStr,
61
- name: isPrivate ? "#" + name : name,
64
+ name: isPrivate ? "#" + name : toPropertyKey(name),
62
65
  static: isStatic,
63
66
  private: isPrivate,
64
67
  };
@@ -68,7 +71,7 @@ function applyDecs2203RFactory() {
68
71
  if (kind !== 0 /* FIELD */) {
69
72
  ctx.addInitializer = createAddInitializerMethod(
70
73
  initializers,
71
- decoratorFinishedRef
74
+ decoratorFinishedRef,
72
75
  );
73
76
  }
74
77
 
@@ -116,7 +119,7 @@ function applyDecs2203RFactory() {
116
119
  function assertNotFinished(decoratorFinishedRef, fnName) {
117
120
  if (decoratorFinishedRef.v) {
118
121
  throw new Error(
119
- "attempted to call " + fnName + " after decoration was finished"
122
+ "attempted to call " + fnName + " after decoration was finished",
120
123
  );
121
124
  }
122
125
  }
@@ -133,7 +136,7 @@ function applyDecs2203RFactory() {
133
136
  if (kind === 1 /* ACCESSOR */) {
134
137
  if (type !== "object" || value === null) {
135
138
  throw new TypeError(
136
- "accessor decorators must return an object with get, set, or init properties or void 0"
139
+ "accessor decorators must return an object with get, set, or init properties or void 0",
137
140
  );
138
141
  }
139
142
  if (value.get !== undefined) {
@@ -155,7 +158,7 @@ function applyDecs2203RFactory() {
155
158
  hint = "method";
156
159
  }
157
160
  throw new TypeError(
158
- hint + " decorators must return a function or void 0"
161
+ hint + " decorators must return a function or void 0",
159
162
  );
160
163
  }
161
164
  }
@@ -168,11 +171,11 @@ function applyDecs2203RFactory() {
168
171
  kind,
169
172
  isStatic,
170
173
  isPrivate,
171
- initializers
174
+ initializers,
172
175
  ) {
173
176
  var decs = decInfo[0];
174
177
 
175
- var desc, init, value;
178
+ var desc, init, prefix, value;
176
179
 
177
180
  if (isPrivate) {
178
181
  if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) {
@@ -180,19 +183,28 @@ function applyDecs2203RFactory() {
180
183
  get: decInfo[3],
181
184
  set: decInfo[4],
182
185
  };
186
+ prefix = "get";
183
187
  } else if (kind === 3 /* GETTER */) {
184
188
  desc = {
185
189
  get: decInfo[3],
186
190
  };
191
+ prefix = "get";
187
192
  } else if (kind === 4 /* SETTER */) {
188
193
  desc = {
189
194
  set: decInfo[3],
190
195
  };
196
+ prefix = "set";
191
197
  } else {
192
198
  desc = {
193
199
  value: decInfo[3],
194
200
  };
195
201
  }
202
+ if (kind !== 0 /* FIELD */) {
203
+ if (kind === 1 /* ACCESSOR */) {
204
+ setFunctionName(decInfo[4], "#" + name, "set");
205
+ }
206
+ setFunctionName(decInfo[3], "#" + name, prefix);
207
+ }
196
208
  } else if (kind !== 0 /* FIELD */) {
197
209
  desc = Object.getOwnPropertyDescriptor(base, name);
198
210
  }
@@ -221,7 +233,7 @@ function applyDecs2203RFactory() {
221
233
  kind,
222
234
  isStatic,
223
235
  isPrivate,
224
- value
236
+ value,
225
237
  );
226
238
 
227
239
  if (newValue !== void 0) {
@@ -251,7 +263,7 @@ function applyDecs2203RFactory() {
251
263
  kind,
252
264
  isStatic,
253
265
  isPrivate,
254
- value
266
+ value,
255
267
  );
256
268
 
257
269
  if (newValue !== void 0) {
@@ -398,7 +410,7 @@ function applyDecs2203RFactory() {
398
410
  ) {
399
411
  throw new Error(
400
412
  "Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " +
401
- name
413
+ name,
402
414
  );
403
415
  } else if (!existingKind && kind > 2 /* METHOD */) {
404
416
  existingNonFields.set(name, kind);
@@ -415,7 +427,7 @@ function applyDecs2203RFactory() {
415
427
  kind,
416
428
  isStatic,
417
429
  isPrivate,
418
- initializers
430
+ initializers,
419
431
  );
420
432
  }
421
433
 
@@ -450,7 +462,7 @@ function applyDecs2203RFactory() {
450
462
  name: name,
451
463
  addInitializer: createAddInitializerMethod(
452
464
  initializers,
453
- decoratorFinishedRef
465
+ decoratorFinishedRef,
454
466
  ),
455
467
  });
456
468
  } finally {
@@ -637,6 +649,6 @@ export default function applyDecs2203R(targetClass, memberDecs, classDecs) {
637
649
  return (applyDecs2203R = applyDecs2203RFactory())(
638
650
  targetClass,
639
651
  memberDecs,
640
- classDecs
652
+ classDecs,
641
653
  );
642
- }
654
+ }
@@ -1,6 +1,8 @@
1
1
  /* @minVersion 7.21.0 */
2
2
 
3
3
  import checkInRHS from "../checkInRHS/checkInRHS.js";
4
+ import setFunctionName from "../setFunctionName/setFunctionName.js";
5
+ import toPropertyKey from "../toPropertyKey/toPropertyKey.js";
4
6
 
5
7
  /**
6
8
  Enums are used in this file, but not assigned to vars to avoid non-hoistable values
@@ -32,7 +34,7 @@ function applyDecs2301Factory() {
32
34
  function assertInstanceIfPrivate(has, target) {
33
35
  if (!has(target)) {
34
36
  throw new TypeError(
35
- "Attempted to access private element on non-instance"
37
+ "Attempted to access private element on non-instance",
36
38
  );
37
39
  }
38
40
  }
@@ -46,7 +48,7 @@ function applyDecs2301Factory() {
46
48
  isStatic,
47
49
  isPrivate,
48
50
  value,
49
- hasPrivateBrand
51
+ hasPrivateBrand,
50
52
  ) {
51
53
  var kindStr;
52
54
 
@@ -69,7 +71,7 @@ function applyDecs2301Factory() {
69
71
 
70
72
  var ctx = {
71
73
  kind: kindStr,
72
- name: isPrivate ? "#" + name : name,
74
+ name: isPrivate ? "#" + name : toPropertyKey(name),
73
75
  static: isStatic,
74
76
  private: isPrivate,
75
77
  };
@@ -79,7 +81,7 @@ function applyDecs2301Factory() {
79
81
  if (kind !== 0 /* FIELD */) {
80
82
  ctx.addInitializer = createAddInitializerMethod(
81
83
  initializers,
82
- decoratorFinishedRef
84
+ decoratorFinishedRef,
83
85
  );
84
86
  }
85
87
 
@@ -149,7 +151,7 @@ function applyDecs2301Factory() {
149
151
  function assertNotFinished(decoratorFinishedRef, fnName) {
150
152
  if (decoratorFinishedRef.v) {
151
153
  throw new Error(
152
- "attempted to call " + fnName + " after decoration was finished"
154
+ "attempted to call " + fnName + " after decoration was finished",
153
155
  );
154
156
  }
155
157
  }
@@ -166,7 +168,7 @@ function applyDecs2301Factory() {
166
168
  if (kind === 1 /* ACCESSOR */) {
167
169
  if (type !== "object" || value === null) {
168
170
  throw new TypeError(
169
- "accessor decorators must return an object with get, set, or init properties or void 0"
171
+ "accessor decorators must return an object with get, set, or init properties or void 0",
170
172
  );
171
173
  }
172
174
  if (value.get !== undefined) {
@@ -188,7 +190,7 @@ function applyDecs2301Factory() {
188
190
  hint = "method";
189
191
  }
190
192
  throw new TypeError(
191
- hint + " decorators must return a function or void 0"
193
+ hint + " decorators must return a function or void 0",
192
194
  );
193
195
  }
194
196
  }
@@ -213,11 +215,11 @@ function applyDecs2301Factory() {
213
215
  isStatic,
214
216
  isPrivate,
215
217
  initializers,
216
- hasPrivateBrand
218
+ hasPrivateBrand,
217
219
  ) {
218
220
  var decs = decInfo[0];
219
221
 
220
- var desc, init, value;
222
+ var desc, init, prefix, value;
221
223
 
222
224
  if (isPrivate) {
223
225
  if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) {
@@ -225,21 +227,30 @@ function applyDecs2301Factory() {
225
227
  get: curryThis1(decInfo[3]),
226
228
  set: curryThis2(decInfo[4]),
227
229
  };
230
+ prefix = "get";
228
231
  } else {
229
232
  if (kind === 3 /* GETTER */) {
230
233
  desc = {
231
234
  get: decInfo[3],
232
235
  };
236
+ prefix = "get";
233
237
  } else if (kind === 4 /* SETTER */) {
234
238
  desc = {
235
239
  set: decInfo[3],
236
240
  };
241
+ prefix = "set";
237
242
  } else {
238
243
  desc = {
239
244
  value: decInfo[3],
240
245
  };
241
246
  }
242
247
  }
248
+ if (kind !== 0 /* FIELD */) {
249
+ if (kind === 1 /* ACCESSOR */) {
250
+ setFunctionName(desc.set, "#" + name, "set");
251
+ }
252
+ setFunctionName(desc[prefix || "value"], "#" + name, prefix);
253
+ }
243
254
  } else if (kind !== 0 /* FIELD */) {
244
255
  desc = Object.getOwnPropertyDescriptor(base, name);
245
256
  }
@@ -269,7 +280,7 @@ function applyDecs2301Factory() {
269
280
  isStatic,
270
281
  isPrivate,
271
282
  value,
272
- hasPrivateBrand
283
+ hasPrivateBrand,
273
284
  );
274
285
 
275
286
  if (newValue !== void 0) {
@@ -300,7 +311,7 @@ function applyDecs2301Factory() {
300
311
  isStatic,
301
312
  isPrivate,
302
313
  value,
303
- hasPrivateBrand
314
+ hasPrivateBrand,
304
315
  );
305
316
 
306
317
  if (newValue !== void 0) {
@@ -455,7 +466,7 @@ function applyDecs2301Factory() {
455
466
  ) {
456
467
  throw new Error(
457
468
  "Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " +
458
- name
469
+ name,
459
470
  );
460
471
  } else if (!existingKind && kind > 2 /* METHOD */) {
461
472
  existingNonFields.set(name, kind);
@@ -473,7 +484,7 @@ function applyDecs2301Factory() {
473
484
  isStatic,
474
485
  isPrivate,
475
486
  initializers,
476
- hasPrivateBrand
487
+ hasPrivateBrand,
477
488
  );
478
489
  }
479
490
 
@@ -508,7 +519,7 @@ function applyDecs2301Factory() {
508
519
  name: name,
509
520
  addInitializer: createAddInitializerMethod(
510
521
  initializers,
511
- decoratorFinishedRef
522
+ decoratorFinishedRef,
512
523
  ),
513
524
  });
514
525
  } finally {
@@ -683,7 +694,7 @@ function applyDecs2301Factory() {
683
694
  targetClass,
684
695
  memberDecs,
685
696
  classDecs,
686
- instanceBrand
697
+ instanceBrand,
687
698
  ) {
688
699
  return {
689
700
  e: applyMemberDecs(targetClass, memberDecs, instanceBrand),
@@ -699,12 +710,12 @@ export default function applyDecs2301(
699
710
  targetClass,
700
711
  memberDecs,
701
712
  classDecs,
702
- instanceBrand
713
+ instanceBrand,
703
714
  ) {
704
715
  return (applyDecs2301 = applyDecs2301Factory())(
705
716
  targetClass,
706
717
  memberDecs,
707
718
  classDecs,
708
- instanceBrand
719
+ instanceBrand,
709
720
  );
710
- }
721
+ }