@nubjs/nub-darwin-x64 0.2.3 → 0.2.4

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 (348) hide show
  1. package/bin/nub +0 -0
  2. package/bin/nubx +0 -0
  3. package/package.json +2 -3
  4. package/runtime/addons/nub-native.node +0 -0
  5. package/runtime/cache-evict.mjs +0 -69
  6. package/runtime/compile-cache-restore.mjs +0 -21
  7. package/runtime/floor-builtin.mjs +0 -57
  8. package/runtime/navigator-locks.mjs +0 -242
  9. package/runtime/navigator-shim.mjs +0 -144
  10. package/runtime/node_modules/@js-temporal/polyfill/CHANGELOG.md +0 -453
  11. package/runtime/node_modules/@js-temporal/polyfill/LICENSE +0 -13
  12. package/runtime/node_modules/@js-temporal/polyfill/README.md +0 -90
  13. package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs +0 -2
  14. package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs.map +0 -1
  15. package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js +0 -2
  16. package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +0 -1
  17. package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js +0 -2
  18. package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +0 -1
  19. package/runtime/node_modules/@js-temporal/polyfill/index.d.cts +0 -1215
  20. package/runtime/node_modules/@js-temporal/polyfill/index.d.ts +0 -1215
  21. package/runtime/node_modules/@js-temporal/polyfill/lib/assert.ts +0 -8
  22. package/runtime/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +0 -39
  23. package/runtime/node_modules/@js-temporal/polyfill/lib/calendar.ts +0 -2424
  24. package/runtime/node_modules/@js-temporal/polyfill/lib/debug.ts +0 -7
  25. package/runtime/node_modules/@js-temporal/polyfill/lib/duration.ts +0 -438
  26. package/runtime/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +0 -93
  27. package/runtime/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +0 -4973
  28. package/runtime/node_modules/@js-temporal/polyfill/lib/index.ts +0 -34
  29. package/runtime/node_modules/@js-temporal/polyfill/lib/init.ts +0 -43
  30. package/runtime/node_modules/@js-temporal/polyfill/lib/instant.ts +0 -138
  31. package/runtime/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +0 -242
  32. package/runtime/node_modules/@js-temporal/polyfill/lib/intl.ts +0 -758
  33. package/runtime/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +0 -162
  34. package/runtime/node_modules/@js-temporal/polyfill/lib/legacydate.ts +0 -17
  35. package/runtime/node_modules/@js-temporal/polyfill/lib/math.ts +0 -96
  36. package/runtime/node_modules/@js-temporal/polyfill/lib/now.ts +0 -48
  37. package/runtime/node_modules/@js-temporal/polyfill/lib/plaindate.ts +0 -212
  38. package/runtime/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +0 -274
  39. package/runtime/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +0 -110
  40. package/runtime/node_modules/@js-temporal/polyfill/lib/plaintime.ts +0 -154
  41. package/runtime/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +0 -157
  42. package/runtime/node_modules/@js-temporal/polyfill/lib/regex.ts +0 -59
  43. package/runtime/node_modules/@js-temporal/polyfill/lib/slots.ts +0 -341
  44. package/runtime/node_modules/@js-temporal/polyfill/lib/temporal.ts +0 -10
  45. package/runtime/node_modules/@js-temporal/polyfill/lib/timeduration.ts +0 -149
  46. package/runtime/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +0 -492
  47. package/runtime/node_modules/@js-temporal/polyfill/package.json +0 -143
  48. package/runtime/node_modules/@oxc-project/runtime/CHANGELOG.md +0 -88
  49. package/runtime/node_modules/@oxc-project/runtime/LICENSE +0 -22
  50. package/runtime/node_modules/@oxc-project/runtime/README.md +0 -5
  51. package/runtime/node_modules/@oxc-project/runtime/package.json +0 -1066
  52. package/runtime/node_modules/@oxc-project/runtime/src/helpers/AwaitValue.js +0 -4
  53. package/runtime/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js +0 -4
  54. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecoratedDescriptor.js +0 -9
  55. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs.js +0 -236
  56. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203.js +0 -184
  57. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203R.js +0 -191
  58. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2301.js +0 -222
  59. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2305.js +0 -133
  60. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2311.js +0 -124
  61. package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayLikeToArray.js +0 -6
  62. package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithHoles.js +0 -4
  63. package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithoutHoles.js +0 -5
  64. package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertClassBrand.js +0 -5
  65. package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertThisInitialized.js +0 -5
  66. package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js +0 -24
  67. package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js +0 -45
  68. package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncToGenerator.js +0 -26
  69. package/runtime/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js +0 -5
  70. package/runtime/node_modules/@oxc-project/runtime/src/helpers/callSuper.js +0 -7
  71. package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkInRHS.js +0 -6
  72. package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkPrivateRedeclaration.js +0 -4
  73. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorDestructureSet.js +0 -10
  74. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorGet.js +0 -4
  75. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorSet.js +0 -7
  76. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCallCheck.js +0 -4
  77. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticAccess.js +0 -5
  78. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -4
  79. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classExtractFieldDescriptor.js +0 -5
  80. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classNameTDZError.js +0 -4
  81. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldDestructureSet.js +0 -7
  82. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet.js +0 -7
  83. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet2.js +0 -5
  84. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldInitSpec.js +0 -5
  85. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseBase.js +0 -5
  86. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseKey.js +0 -5
  87. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet.js +0 -7
  88. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet2.js +0 -5
  89. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateGetter.js +0 -5
  90. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodGet.js +0 -5
  91. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js +0 -5
  92. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodSet.js +0 -4
  93. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateSetter.js +0 -5
  94. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldDestructureSet.js +0 -7
  95. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecGet.js +0 -7
  96. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecSet.js +0 -7
  97. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodGet.js +0 -5
  98. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodSet.js +0 -4
  99. package/runtime/node_modules/@oxc-project/runtime/src/helpers/construct.js +0 -10
  100. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createClass.js +0 -13
  101. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelper.js +0 -50
  102. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelperLoose.js +0 -19
  103. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createSuper.js +0 -16
  104. package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorate.js +0 -23
  105. package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateMetadata.js +0 -9
  106. package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateParam.js +0 -11
  107. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defaults.js +0 -9
  108. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineAccessor.js +0 -8
  109. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineEnumerableProperties.js +0 -12
  110. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js +0 -10
  111. package/runtime/node_modules/@oxc-project/runtime/src/helpers/dispose.js +0 -28
  112. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/AwaitValue.js +0 -4
  113. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/OverloadYield.js +0 -4
  114. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecoratedDescriptor.js +0 -9
  115. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs.js +0 -236
  116. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203.js +0 -184
  117. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203R.js +0 -191
  118. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2301.js +0 -222
  119. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2305.js +0 -133
  120. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2311.js +0 -124
  121. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayLikeToArray.js +0 -6
  122. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithHoles.js +0 -4
  123. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithoutHoles.js +0 -5
  124. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertClassBrand.js +0 -5
  125. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertThisInitialized.js +0 -5
  126. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncGeneratorDelegate.js +0 -24
  127. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncIterator.js +0 -45
  128. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncToGenerator.js +0 -26
  129. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/awaitAsyncGenerator.js +0 -5
  130. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/callSuper.js +0 -7
  131. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkInRHS.js +0 -6
  132. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkPrivateRedeclaration.js +0 -4
  133. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorDestructureSet.js +0 -10
  134. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorGet.js +0 -4
  135. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorSet.js +0 -7
  136. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCallCheck.js +0 -4
  137. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
  138. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -4
  139. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classExtractFieldDescriptor.js +0 -5
  140. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classNameTDZError.js +0 -4
  141. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldDestructureSet.js +0 -7
  142. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet.js +0 -7
  143. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet2.js +0 -5
  144. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldInitSpec.js +0 -5
  145. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseBase.js +0 -5
  146. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseKey.js +0 -5
  147. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet.js +0 -7
  148. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet2.js +0 -5
  149. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateGetter.js +0 -5
  150. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodGet.js +0 -5
  151. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodInitSpec.js +0 -5
  152. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodSet.js +0 -4
  153. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateSetter.js +0 -5
  154. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -7
  155. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -7
  156. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -7
  157. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodGet.js +0 -5
  158. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodSet.js +0 -4
  159. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/construct.js +0 -10
  160. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createClass.js +0 -13
  161. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelper.js +0 -50
  162. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelperLoose.js +0 -19
  163. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createSuper.js +0 -16
  164. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js +0 -21
  165. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateMetadata.js +0 -7
  166. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateParam.js +0 -9
  167. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defaults.js +0 -9
  168. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineAccessor.js +0 -8
  169. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineEnumerableProperties.js +0 -12
  170. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js +0 -10
  171. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/dispose.js +0 -28
  172. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/extends.js +0 -10
  173. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/get.js +0 -11
  174. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/getPrototypeOf.js +0 -6
  175. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/identity.js +0 -4
  176. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/importDeferProxy.js +0 -27
  177. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inherits.js +0 -14
  178. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inheritsLoose.js +0 -5
  179. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerDefineProperty.js +0 -9
  180. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerWarningHelper.js +0 -4
  181. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/instanceof.js +0 -4
  182. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireDefault.js +0 -6
  183. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireWildcard.js +0 -27
  184. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeFunction.js +0 -8
  185. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeReflectConstruct.js +0 -9
  186. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArray.js +0 -4
  187. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArrayLimit.js +0 -28
  188. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/jsx.js +0 -22
  189. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/maybeArrayLike.js +0 -9
  190. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/newArrowCheck.js +0 -4
  191. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableRest.js +0 -4
  192. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableSpread.js +0 -4
  193. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nullishReceiverError.js +0 -4
  194. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectDestructuringEmpty.js +0 -4
  195. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread.js +0 -14
  196. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread2.js +0 -23
  197. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutProperties.js +0 -13
  198. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutPropertiesLoose.js +0 -10
  199. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/package.json +0 -3
  200. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/possibleConstructorReturn.js +0 -8
  201. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/readOnlyError.js +0 -4
  202. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/regeneratorRuntime.js +0 -304
  203. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/set.js +0 -22
  204. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setFunctionName.js +0 -12
  205. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setPrototypeOf.js +0 -6
  206. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/skipFirstGeneratorNext.js +0 -7
  207. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/slicedToArray.js +0 -8
  208. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropBase.js +0 -6
  209. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropGet.js +0 -9
  210. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropSet.js +0 -6
  211. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteral.js +0 -8
  212. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteralLoose.js +0 -4
  213. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/tdz.js +0 -4
  214. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalRef.js +0 -6
  215. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalUndefined.js +0 -2
  216. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toArray.js +0 -8
  217. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toConsumableArray.js +0 -8
  218. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js +0 -12
  219. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js +0 -7
  220. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toSetter.js +0 -10
  221. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js +0 -10
  222. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/unsupportedIterableToArray.js +0 -9
  223. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/using.js +0 -12
  224. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/usingCtx.js +0 -59
  225. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapAsyncGenerator.js +0 -69
  226. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapNativeSuper.js +0 -27
  227. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapRegExp.js +0 -51
  228. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/writeOnlyError.js +0 -4
  229. package/runtime/node_modules/@oxc-project/runtime/src/helpers/extends.js +0 -10
  230. package/runtime/node_modules/@oxc-project/runtime/src/helpers/get.js +0 -11
  231. package/runtime/node_modules/@oxc-project/runtime/src/helpers/getPrototypeOf.js +0 -6
  232. package/runtime/node_modules/@oxc-project/runtime/src/helpers/identity.js +0 -4
  233. package/runtime/node_modules/@oxc-project/runtime/src/helpers/importDeferProxy.js +0 -27
  234. package/runtime/node_modules/@oxc-project/runtime/src/helpers/inherits.js +0 -14
  235. package/runtime/node_modules/@oxc-project/runtime/src/helpers/inheritsLoose.js +0 -5
  236. package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerDefineProperty.js +0 -9
  237. package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerWarningHelper.js +0 -4
  238. package/runtime/node_modules/@oxc-project/runtime/src/helpers/instanceof.js +0 -4
  239. package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireDefault.js +0 -6
  240. package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireWildcard.js +0 -27
  241. package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeFunction.js +0 -8
  242. package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeReflectConstruct.js +0 -9
  243. package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArray.js +0 -4
  244. package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArrayLimit.js +0 -28
  245. package/runtime/node_modules/@oxc-project/runtime/src/helpers/jsx.js +0 -22
  246. package/runtime/node_modules/@oxc-project/runtime/src/helpers/maybeArrayLike.js +0 -9
  247. package/runtime/node_modules/@oxc-project/runtime/src/helpers/newArrowCheck.js +0 -4
  248. package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableRest.js +0 -4
  249. package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableSpread.js +0 -4
  250. package/runtime/node_modules/@oxc-project/runtime/src/helpers/nullishReceiverError.js +0 -4
  251. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectDestructuringEmpty.js +0 -4
  252. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread.js +0 -14
  253. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js +0 -23
  254. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js +0 -13
  255. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js +0 -10
  256. package/runtime/node_modules/@oxc-project/runtime/src/helpers/possibleConstructorReturn.js +0 -8
  257. package/runtime/node_modules/@oxc-project/runtime/src/helpers/readOnlyError.js +0 -4
  258. package/runtime/node_modules/@oxc-project/runtime/src/helpers/regeneratorRuntime.js +0 -304
  259. package/runtime/node_modules/@oxc-project/runtime/src/helpers/set.js +0 -22
  260. package/runtime/node_modules/@oxc-project/runtime/src/helpers/setFunctionName.js +0 -12
  261. package/runtime/node_modules/@oxc-project/runtime/src/helpers/setPrototypeOf.js +0 -6
  262. package/runtime/node_modules/@oxc-project/runtime/src/helpers/skipFirstGeneratorNext.js +0 -7
  263. package/runtime/node_modules/@oxc-project/runtime/src/helpers/slicedToArray.js +0 -8
  264. package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropBase.js +0 -6
  265. package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropGet.js +0 -9
  266. package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropSet.js +0 -6
  267. package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js +0 -8
  268. package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteralLoose.js +0 -4
  269. package/runtime/node_modules/@oxc-project/runtime/src/helpers/tdz.js +0 -4
  270. package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalRef.js +0 -6
  271. package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalUndefined.js +0 -2
  272. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toArray.js +0 -8
  273. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toConsumableArray.js +0 -8
  274. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js +0 -12
  275. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js +0 -7
  276. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toSetter.js +0 -10
  277. package/runtime/node_modules/@oxc-project/runtime/src/helpers/typeof.js +0 -10
  278. package/runtime/node_modules/@oxc-project/runtime/src/helpers/unsupportedIterableToArray.js +0 -9
  279. package/runtime/node_modules/@oxc-project/runtime/src/helpers/using.js +0 -12
  280. package/runtime/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +0 -59
  281. package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js +0 -69
  282. package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapNativeSuper.js +0 -27
  283. package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapRegExp.js +0 -51
  284. package/runtime/node_modules/@oxc-project/runtime/src/helpers/writeOnlyError.js +0 -4
  285. package/runtime/node_modules/@petamoriken/float16/LICENSE +0 -21
  286. package/runtime/node_modules/@petamoriken/float16/README.md +0 -413
  287. package/runtime/node_modules/@petamoriken/float16/browser/float16.js +0 -1340
  288. package/runtime/node_modules/@petamoriken/float16/browser/float16.mjs +0 -1325
  289. package/runtime/node_modules/@petamoriken/float16/index.d.ts +0 -546
  290. package/runtime/node_modules/@petamoriken/float16/index.v5.6.d.ts +0 -546
  291. package/runtime/node_modules/@petamoriken/float16/index.v5.7.d.ts +0 -555
  292. package/runtime/node_modules/@petamoriken/float16/inspect/node.cjs +0 -25
  293. package/runtime/node_modules/@petamoriken/float16/inspect/node.mjs +0 -23
  294. package/runtime/node_modules/@petamoriken/float16/lib/DataView.cjs +0 -16
  295. package/runtime/node_modules/@petamoriken/float16/lib/Float16Array.cjs +0 -690
  296. package/runtime/node_modules/@petamoriken/float16/lib/_util/arrayIterator.cjs +0 -52
  297. package/runtime/node_modules/@petamoriken/float16/lib/_util/brand.cjs +0 -27
  298. package/runtime/node_modules/@petamoriken/float16/lib/_util/converter.cjs +0 -111
  299. package/runtime/node_modules/@petamoriken/float16/lib/_util/is.cjs +0 -78
  300. package/runtime/node_modules/@petamoriken/float16/lib/_util/messages.cjs +0 -18
  301. package/runtime/node_modules/@petamoriken/float16/lib/_util/primordials.cjs +0 -150
  302. package/runtime/node_modules/@petamoriken/float16/lib/_util/spec.cjs +0 -84
  303. package/runtime/node_modules/@petamoriken/float16/lib/f16round.cjs +0 -10
  304. package/runtime/node_modules/@petamoriken/float16/lib/index.cjs +0 -16
  305. package/runtime/node_modules/@petamoriken/float16/lib/isTypedArray.cjs +0 -11
  306. package/runtime/node_modules/@petamoriken/float16/package.json +0 -115
  307. package/runtime/node_modules/@petamoriken/float16/src/DataView.mjs +0 -35
  308. package/runtime/node_modules/@petamoriken/float16/src/Float16Array.mjs +0 -1194
  309. package/runtime/node_modules/@petamoriken/float16/src/_util/arrayIterator.mjs +0 -86
  310. package/runtime/node_modules/@petamoriken/float16/src/_util/brand.mjs +0 -31
  311. package/runtime/node_modules/@petamoriken/float16/src/_util/converter.mjs +0 -173
  312. package/runtime/node_modules/@petamoriken/float16/src/_util/is.mjs +0 -151
  313. package/runtime/node_modules/@petamoriken/float16/src/_util/messages.mjs +0 -22
  314. package/runtime/node_modules/@petamoriken/float16/src/_util/primordials.mjs +0 -254
  315. package/runtime/node_modules/@petamoriken/float16/src/_util/spec.mjs +0 -137
  316. package/runtime/node_modules/@petamoriken/float16/src/f16round.mjs +0 -10
  317. package/runtime/node_modules/@petamoriken/float16/src/index.mjs +0 -7
  318. package/runtime/node_modules/@petamoriken/float16/src/isTypedArray.mjs +0 -10
  319. package/runtime/node_modules/jsbi/LICENSE +0 -176
  320. package/runtime/node_modules/jsbi/README.md +0 -173
  321. package/runtime/node_modules/jsbi/dist/jsbi-cjs.js +0 -2
  322. package/runtime/node_modules/jsbi/dist/jsbi-cjs.js.map +0 -1
  323. package/runtime/node_modules/jsbi/dist/jsbi-umd.js +0 -2
  324. package/runtime/node_modules/jsbi/dist/jsbi-umd.js.map +0 -1
  325. package/runtime/node_modules/jsbi/dist/jsbi.mjs +0 -2
  326. package/runtime/node_modules/jsbi/dist/jsbi.mjs.map +0 -1
  327. package/runtime/node_modules/jsbi/jsbi.d.ts +0 -43
  328. package/runtime/node_modules/jsbi/package.json +0 -35
  329. package/runtime/node_modules/urlpattern-polyfill/LICENSE +0 -19
  330. package/runtime/node_modules/urlpattern-polyfill/README.md +0 -242
  331. package/runtime/node_modules/urlpattern-polyfill/dist/index.d.ts +0 -9
  332. package/runtime/node_modules/urlpattern-polyfill/dist/types.d.ts +0 -49
  333. package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.cjs +0 -1
  334. package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.js +0 -1
  335. package/runtime/node_modules/urlpattern-polyfill/index.cjs +0 -7
  336. package/runtime/node_modules/urlpattern-polyfill/index.js +0 -7
  337. package/runtime/node_modules/urlpattern-polyfill/package.json +0 -149
  338. package/runtime/pnp-bin-run.cjs +0 -91
  339. package/runtime/pnp-util.cjs +0 -62
  340. package/runtime/polyfills.cjs +0 -816
  341. package/runtime/preload-async-hooks.mjs +0 -110
  342. package/runtime/preload-common.cjs +0 -1096
  343. package/runtime/preload.cjs +0 -313
  344. package/runtime/preload.mjs +0 -149
  345. package/runtime/transform-core.mjs +0 -756
  346. package/runtime/version.mjs +0 -12
  347. package/runtime/worker-blob-url.cjs +0 -116
  348. package/runtime/worker-polyfill.mjs +0 -541
@@ -1,816 +0,0 @@
1
- // Polyfill preloads for Nub v0.1 — the shared implementation for BOTH tiers.
2
- //
3
- // This is a CommonJS module with ZERO top-level await so the fast tier
4
- // (Node 22.15+, `--require` CJS preload) can `require()` it synchronously: a
5
- // `require()`-loaded preload keeps Node's synchronous `Module.runMain` CJS entry
6
- // path (top-level `executionAsyncId()===1`, sync exception origin), which the old
7
- // `--import` ESM preload broke (R1). The compat tier (`--import` preload.mjs)
8
- // reuses this same logic via the `installSyncPolyfills` export, then loads the two
9
- // ESM side-effect modules (worker-polyfill, navigator-locks) with dynamic
10
- // `import()` — on the < 22.15 floor `require()` of an ES module is unreliable.
11
- //
12
- // All polyfills feature-detect and bow out if the global is already present.
13
- //
14
- // Node 22.15+ (our floor) already has: navigator, navigator.locks,
15
- // navigator.hardwareConcurrency, WebSocket. No polyfills needed.
16
- //
17
- // Node 24+ adds: URLPattern, RegExp.escape, Error.isError, Promise.try.
18
- // We polyfill those on Node 22.x only.
19
- //
20
- // No Node version ships: Temporal, reportError, browser-shape Worker.
21
- // These need polyfills on all supported versions. (Temporal is a lazy global
22
- // installed by the preload entry, NOT here — see preload.cjs / preload.mjs.)
23
-
24
- const { createRequire } = require("node:module");
25
- const __require = createRequire(__filename);
26
-
27
- // Install every globalThis/prototype polyfill that doesn't depend on loading the
28
- // ESM side-effect modules (worker-polyfill, navigator-locks). Synchronous and
29
- // idempotent — safe to call once per realm. `preloaded` carries the CJS-required
30
- // polyfill packages the preload entry stashed (urlpattern, float16), since the
31
- // resolve hook would otherwise clobber a later import of them.
32
- function installSyncPolyfills(preloaded) {
33
- preloaded = preloaded || {};
34
-
35
- // ── Web Storage: neutralize the throwing localStorage getter ────────
36
- // When nub injects `--experimental-webstorage` on the 22.4–24 band AND the user
37
- // did NOT pass `--localstorage-file`, Node installs a `localStorage` global that
38
- // is a getter THROWING `ERR_INVALID_ARG_VALUE` on ANY access — even
39
- // `typeof localStorage` throws, so feature-detection is impossible and the throw
40
- // can surface before user code expects it. The spawn layer signals this case via
41
- // the internal `__NUB_NEUTRALIZE_LOCALSTORAGE` env var (set iff unflagged ∧
42
- // no user file). DELETE the throwing getter so the global becomes ABSENT —
43
- // matching vanilla Node 24's shape on this band (`'localStorage' in globalThis
44
- // === false`), not present-but-undefined. Absent is the additive choice: a bare
45
- // `localStorage` read throws ReferenceError exactly as on vanilla Node 24, and
46
- // `typeof localStorage === "undefined"` stays true with no throw. The earlier
47
- // present-undefined define matched Node 25+'s native shape, but that broke isomorphic
48
- // libraries that gate on `'localStorage' in window/globalThis` (e.g. vitest's
49
- // happy-dom `getWindowKeys`): a present property made them SKIP installing their
50
- // own store, so user code then read nub's `undefined` and crashed (#166). This
51
- // runs in the preload BEFORE any user code, so the throwing getter is never
52
- // observed. When the user passes `--localstorage-file`, the env var is absent and
53
- // `localStorage` works normally (we do not touch it). We deliberately KEEP the
54
- // env var set so it inherits to the whole process subtree: a `node`- or
55
- // `nub`-spawned grandchild re-inherits the webstorage flag via NODE_OPTIONS and
56
- // would otherwise re-install the throwing getter with no neutralize signal. It's
57
- // an internal `__NUB_*` plumbing var that's explicitly fine to leak to children.
58
- // Neutralization is idempotent — a descendant re-running this preload deletes an
59
- // already-absent or re-installed `localStorage` again, which is harmless. The
60
- // property is a configurable own accessor (the define that replaced it before
61
- // already proved that), so `delete` removes it cleanly. This file is sloppy-mode
62
- // CJS, where `delete` never throws (a non-configurable property would just make
63
- // it return false and leave Node's getter in place); the try/catch is belt-and-
64
- // suspenders for any future strict/ESM move.
65
- if (process.env.__NUB_NEUTRALIZE_LOCALSTORAGE) {
66
- try {
67
- delete globalThis.localStorage;
68
- } catch { /* non-configurable on this runtime: leave Node's behavior */ }
69
- }
70
-
71
- // ── reportError (WinterTC min-common-API, not in any Node) ──────────
72
- // Defined NON-ENUMERABLE so it is invisible to `Object.keys(globalThis)` /
73
- // for-in / structured-clone-of-keys — that invisibility-to-enumeration IS the
74
- // additive contract: code written for vanilla Node must not observe nub's
75
- // injected globals when it enumerates the global object. Node defines its own
76
- // globals non-enumerably for the same reason. Kept writable+configurable so
77
- // user code can still override or delete it, matching Node's global descriptors.
78
- if (typeof globalThis.reportError !== "function") {
79
- Object.defineProperty(globalThis, "reportError", {
80
- value: (err) => {
81
- queueMicrotask(() => {
82
- throw err;
83
- });
84
- },
85
- enumerable: false,
86
- writable: true,
87
- configurable: true,
88
- });
89
- }
90
-
91
- // ── File (global on Node 20+, missing on the 18.x compat floor) ─────
92
- // Node exposes the WHATWG `File` as a global from Node 20; on 18.13–18.x it
93
- // exists only as `node:buffer`'s `File` export. Backfill the global from there
94
- // so worker/messaging code that constructs `new File(...)` works down to the
95
- // floor (polyfill-all-the-way-down). Identity is preserved (same constructor as
96
- // `node:buffer`), so `instanceof` and undici's webidl brand checks hold. Blob is
97
- // already global on 18.x, but the same backfill guards it for completeness.
98
- // Non-enumerable to match Node's own global descriptors (the additive contract:
99
- // invisible to global enumeration).
100
- //
101
- // Node 18 emits a one-time `ExperimentalWarning: buffer.File …` on the FIRST
102
- // `new File(...)` (the constructor, NOT the property read). Without nub the floor
103
- // simply has no `File` global, so backfilling it would newly surface that warning
104
- // when user code first constructs a File. To keep the floor backfill silent we
105
- // force one throwaway construction INSIDE a suppression window: that consumes
106
- // Node's once-per-feature guard (the warning is dropped here) so the user's later
107
- // `new File(...)` is silent.
108
- if (typeof globalThis.File === "undefined" || typeof globalThis.Blob === "undefined") {
109
- const origEmitWarning = process.emitWarning;
110
- process.emitWarning = function (warning, ...rest) {
111
- const opt = rest[0];
112
- const type = opt && typeof opt === "object" ? opt.type : opt;
113
- const msg = typeof warning === "string" ? warning : (warning && warning.message) || "";
114
- if (type === "ExperimentalWarning" && /buffer\.(File|Blob)/.test(msg)) return;
115
- return origEmitWarning.call(this, warning, ...rest);
116
- };
117
- try {
118
- const buffer = require("node:buffer");
119
- const sampleArgs = { File: [[], ""], Blob: [[]] };
120
- for (const name of ["File", "Blob"]) {
121
- const Ctor = buffer[name];
122
- if (typeof globalThis[name] === "undefined" && typeof Ctor === "function") {
123
- Object.defineProperty(globalThis, name, {
124
- value: Ctor,
125
- enumerable: false,
126
- writable: true,
127
- configurable: true,
128
- });
129
- // Trip (and suppress) the experimental-feature warning now, so user code
130
- // never sees it.
131
- try { new Ctor(...sampleArgs[name]); } catch { /* construction shape varies; the warning fires regardless */ }
132
- }
133
- }
134
- } finally {
135
- process.emitWarning = origEmitWarning;
136
- }
137
- }
138
-
139
- // ── MessageEvent.ports → frozen array (WHATWG read-only requirement) ─
140
- // The spec mandates `MessageEvent.ports` be a read-only (frozen) array; Node's
141
- // native MessageEvent returns a mutable array. Wrap the configurable prototype
142
- // getter so every read yields a frozen array, for both a native MessageChannel's
143
- // delivery and nub's worker-side MessageEvents. Idempotent (the wrapper is marked
144
- // so a re-run in the same realm doesn't double-wrap).
145
- if (typeof globalThis.MessageEvent === "function") {
146
- const proto = globalThis.MessageEvent.prototype;
147
- const desc = Object.getOwnPropertyDescriptor(proto, "ports");
148
- if (desc && typeof desc.get === "function" && desc.configurable && !desc.get.__nubFreezesPorts) {
149
- const origGet = desc.get;
150
- const get = function () {
151
- const ports = origGet.call(this);
152
- return Array.isArray(ports) ? Object.freeze(ports) : ports;
153
- };
154
- get.__nubFreezesPorts = true;
155
- Object.defineProperty(proto, "ports", { ...desc, get });
156
- }
157
- }
158
-
159
- // ── URLPattern (native on Node 24+, missing on 22.x) ───────────────
160
- if (typeof globalThis.URLPattern === "undefined") {
161
- const mod = preloaded.urlpattern;
162
- const URLPattern = mod?.URLPattern;
163
- if (URLPattern) globalThis.URLPattern = URLPattern;
164
- }
165
-
166
- // Temporal (in no Node version) is installed as a LAZY global by the preload
167
- // entry after this runs — see preload.cjs / preload.mjs (A37). Touching
168
- // globalThis.Temporal here would defeat that laziness, so we must not.
169
-
170
- // ── Stage 4 polyfills (native on Node 24+, missing on 22.x) ────────
171
-
172
- // RegExp.escape — spec-faithful port of the TC39 proposal (native on Node 24+),
173
- // so the 22.x floor behaves byte-for-byte like native: a leading digit/letter is
174
- // control-escaped, syntax chars are backslashed, control chars use \t\n\v\f\r, and
175
- // the "other punctuators" + whitespace set is hex-escaped. Verified byte-identical
176
- // to Node's native RegExp.escape across every ASCII char + leading/whitespace/
177
- // astral cases (so a concatenated `escape(s)` is safe too, not just
178
- // `new RegExp(escape(s))`). The earlier reduced-fidelity version only escaped the
179
- // syntax chars.
180
- if (typeof RegExp.escape !== "function") {
181
- const SYNTAX = new Set(["^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", "|", "/"]);
182
- const CONTROL = { "\t": "\\t", "\n": "\\n", "\v": "\\v", "\f": "\\f", "\r": "\\r" };
183
- // ASCII "other punctuators" the spec escapes by code, plus SPACE.
184
- const OTHER = new Set([..." ,-=<>#&!%:;@~'\"`"]);
185
- const isWhiteSpace = (cp) =>
186
- cp === 0x09 || cp === 0x0a || cp === 0x0b || cp === 0x0c || cp === 0x0d ||
187
- cp === 0x20 || cp === 0xa0 || cp === 0x1680 || (cp >= 0x2000 && cp <= 0x200a) ||
188
- cp === 0x2028 || cp === 0x2029 || cp === 0x202f || cp === 0x205f || cp === 0x3000 ||
189
- cp === 0xfeff;
190
- const hexEscape = (cp) => {
191
- if (cp <= 0xff) return "\\x" + cp.toString(16).padStart(2, "0");
192
- if (cp <= 0xffff) return "\\u" + cp.toString(16).padStart(4, "0");
193
- const h = cp - 0x10000;
194
- const hi = 0xd800 + (h >> 10);
195
- const lo = 0xdc00 + (h & 0x3ff);
196
- return "\\u" + hi.toString(16).padStart(4, "0") + "\\u" + lo.toString(16).padStart(4, "0");
197
- };
198
- const encode = (ch, cp) =>
199
- SYNTAX.has(ch)
200
- ? "\\" + ch
201
- : CONTROL[ch] ?? ((OTHER.has(ch) || isWhiteSpace(cp)) ? hexEscape(cp) : ch);
202
- RegExp.escape = (s) => {
203
- if (typeof s !== "string") throw new TypeError("RegExp.escape argument must be a string");
204
- const cps = [...s]; // iterate by code point (astral-safe)
205
- let out = "";
206
- for (let i = 0; i < cps.length; i++) {
207
- const ch = cps[i];
208
- const cp = ch.codePointAt(0);
209
- // A leading decimal-digit/ASCII-letter is control-escaped so a preceding `\`
210
- // in a concatenated pattern can't form an escape sequence.
211
- if (i === 0 && ((cp >= 0x30 && cp <= 0x39) || (cp >= 0x41 && cp <= 0x5a) || (cp >= 0x61 && cp <= 0x7a))) {
212
- out += "\\x" + cp.toString(16).padStart(2, "0");
213
- } else {
214
- out += encode(ch, cp);
215
- }
216
- }
217
- return out;
218
- };
219
- }
220
-
221
- // Error.isError (~95% fidelity — cross-realm internal-slot unreachable)
222
- if (typeof Error.isError !== "function") {
223
- Error.isError = (value) => {
224
- if (value == null || typeof value !== "object") return false;
225
- return value instanceof Error;
226
- };
227
- }
228
-
229
- // Promise.try
230
- if (typeof Promise.try !== "function") {
231
- Promise.try = (fn, ...args) => {
232
- return new Promise((resolve) => resolve(fn(...args)));
233
- };
234
- }
235
-
236
- // Float16Array (TC39 Stage 4, native on Node 24+; absent on our 22.x floor).
237
- // Installed from the spec-compliant @petamoriken/float16 polyfill (vendored,
238
- // preloaded by the preload entry). It provides the full TypedArray method
239
- // surface (map/filter/subarray/set/reduce/…) and correct round-to-nearest-even,
240
- // including subnormals — unlike the prior hand-rolled Proxy shim, which had
241
- // ~30 methods missing and truncating/denormal-flushing conversion.
242
- //
243
- // INHERENT userland limitation (not fixable by any JS polyfill): a polyfilled
244
- // Float16Array isn't recognized by `ArrayBuffer.isView()` (it has no V8 internal
245
- // [[TypedArrayName]] slot). Code needing that check should use the polyfill's
246
- // `isFloat16Array`. See wiki/runtime/float16array-polyfill.md.
247
- if (typeof globalThis.Float16Array === "undefined") {
248
- const f16 = preloaded.float16;
249
- if (f16?.Float16Array) {
250
- globalThis.Float16Array = f16.Float16Array;
251
-
252
- if (typeof DataView.prototype.getFloat16 !== "function") {
253
- DataView.prototype.getFloat16 = function (offset, littleEndian) {
254
- return f16.getFloat16(this, offset, littleEndian);
255
- };
256
- DataView.prototype.setFloat16 = function (offset, value, littleEndian) {
257
- f16.setFloat16(this, offset, value, littleEndian);
258
- };
259
- }
260
-
261
- if (typeof Math.f16round !== "function") {
262
- Math.f16round = f16.f16round;
263
- }
264
- }
265
- }
266
-
267
- installUint8ArrayBase64();
268
- installDisposableStacks();
269
- }
270
-
271
- // ── Uint8Array base64/hex (TC39 Stage 3; native Node 25+, absent below) ──
272
- // Spec-faithful port of the TC39 proposal-arraybuffer-base64 reference polyfill,
273
- // so the < 25 floor behaves byte-for-byte like native: toBase64/fromBase64 honor
274
- // the {alphabet, omitPadding} / {alphabet, lastChunkHandling} options,
275
- // setFromBase64/setFromHex report {read, written} and write the valid prefix before
276
- // throwing on a malformed tail, and toHex/fromHex round-trip. The methods are
277
- // defined non-enumerable (the additive contract: invisible to enumeration of the
278
- // prototype) and feature-detect off `Uint8Array.prototype.toBase64`, so they are a
279
- // strict no-op where the runtime ships them natively. Verified differentially
280
- // against Node native across the encode/decode/whitespace/padding/maxLength matrix.
281
- function installUint8ArrayBase64() {
282
- if (typeof Uint8Array.prototype.toBase64 === "function") return;
283
-
284
- const B64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
285
- // char code → 6-bit value for the standard alphabet; url chars are remapped to
286
- // standard before lookup, so a single decode table covers both alphabets.
287
- const DECODE = new Int16Array(128).fill(-1);
288
- for (let i = 0; i < B64.length; i++) DECODE[B64.charCodeAt(i)] = i;
289
-
290
- // %TypedArray%.prototype[@@toStringTag] getter — the brand check native uses: it
291
- // accepts a Uint8Array (and Buffer, a Uint8Array subclass) and rejects any other
292
- // TypedArray or non-typed-array with a TypeError.
293
- const tagGet = Object.getOwnPropertyDescriptor(
294
- Object.getPrototypeOf(Uint8Array.prototype),
295
- Symbol.toStringTag,
296
- ).get;
297
- const checkU8 = (arg) => {
298
- let kind;
299
- try {
300
- kind = tagGet.call(arg);
301
- } catch {
302
- throw new TypeError("not a Uint8Array");
303
- }
304
- if (kind !== "Uint8Array") throw new TypeError("not a Uint8Array");
305
- };
306
- const getOptions = (options) => {
307
- if (typeof options === "undefined") return Object.create(null);
308
- if (options && typeof options === "object") return options;
309
- throw new TypeError("options is not object");
310
- };
311
- const isDetached = (arr) => "detached" in arr.buffer && arr.buffer.detached;
312
- const isWs = (cc) =>
313
- cc === 0x09 || cc === 0x0a || cc === 0x0c || cc === 0x0d || cc === 0x20;
314
- const skipWs = (s, i) => {
315
- while (i < s.length && isWs(s.charCodeAt(i))) i++;
316
- return i;
317
- };
318
-
319
- // chunk is 2–4 standard-alphabet chars; pads to 4 then emits 1–3 bytes. In strict
320
- // mode the unused low bits of a 2/3-char chunk must be zero.
321
- const decodeChunk = (chunk, throwOnExtraBits) => {
322
- const n = chunk.length;
323
- const padded = n < 4 ? chunk + (n === 2 ? "AA" : "A") : chunk;
324
- const triplet =
325
- (DECODE[padded.charCodeAt(0)] << 18) +
326
- (DECODE[padded.charCodeAt(1)] << 12) +
327
- (DECODE[padded.charCodeAt(2)] << 6) +
328
- DECODE[padded.charCodeAt(3)];
329
- const b0 = (triplet >> 16) & 255;
330
- const b1 = (triplet >> 8) & 255;
331
- const b2 = triplet & 255;
332
- if (n === 2) {
333
- if (throwOnExtraBits && b1 !== 0) throw new SyntaxError("extra bits");
334
- return [b0];
335
- }
336
- if (n === 3) {
337
- if (throwOnExtraBits && b2 !== 0) throw new SyntaxError("extra bits");
338
- return [b0, b1];
339
- }
340
- return [b0, b1, b2];
341
- };
342
-
343
- const u8ToBase64 = (arr, options) => {
344
- checkU8(arr);
345
- const opts = getOptions(options);
346
- let alphabet = opts.alphabet;
347
- if (typeof alphabet === "undefined") alphabet = "base64";
348
- if (alphabet !== "base64" && alphabet !== "base64url") {
349
- throw new TypeError('expected alphabet to be either "base64" or "base64url"');
350
- }
351
- const omitPadding = !!opts.omitPadding;
352
- if (isDetached(arr)) {
353
- throw new TypeError("toBase64 called on array backed by detached buffer");
354
- }
355
- const lookup =
356
- alphabet === "base64url"
357
- ? "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
358
- : B64;
359
- let result = "";
360
- let i = 0;
361
- for (; i + 2 < arr.length; i += 3) {
362
- const triplet = (arr[i] << 16) + (arr[i + 1] << 8) + arr[i + 2];
363
- result +=
364
- lookup[(triplet >> 18) & 63] +
365
- lookup[(triplet >> 12) & 63] +
366
- lookup[(triplet >> 6) & 63] +
367
- lookup[triplet & 63];
368
- }
369
- if (i + 2 === arr.length) {
370
- const triplet = (arr[i] << 16) + (arr[i + 1] << 8);
371
- result +=
372
- lookup[(triplet >> 18) & 63] +
373
- lookup[(triplet >> 12) & 63] +
374
- lookup[(triplet >> 6) & 63] +
375
- (omitPadding ? "" : "=");
376
- } else if (i + 1 === arr.length) {
377
- const triplet = arr[i] << 16;
378
- result +=
379
- lookup[(triplet >> 18) & 63] +
380
- lookup[(triplet >> 12) & 63] +
381
- (omitPadding ? "" : "==");
382
- }
383
- return result;
384
- };
385
-
386
- // Core decode shared by fromBase64 and setFromBase64. Returns {bytes, read,
387
- // error}: a non-null `error` is thrown by the callers AFTER the valid prefix is
388
- // written (so setFromBase64 partial-writes then throws, matching native).
389
- const fromBase64 = (string, alphabet, lastChunkHandling, maxLength) => {
390
- if (maxLength === 0) return { read: 0, bytes: [], error: null };
391
- let read = 0;
392
- const bytes = [];
393
- let chunk = "";
394
- let index = 0;
395
- while (true) {
396
- index = skipWs(string, index);
397
- if (index === string.length) {
398
- if (chunk.length > 0) {
399
- if (lastChunkHandling === "stop-before-partial") {
400
- return { bytes, read, error: null };
401
- } else if (lastChunkHandling === "loose") {
402
- if (chunk.length === 1) {
403
- return {
404
- bytes,
405
- read,
406
- error: new SyntaxError("malformed padding: exactly one additional character"),
407
- };
408
- }
409
- bytes.push(...decodeChunk(chunk, false));
410
- } else {
411
- return { bytes, read, error: new SyntaxError("missing padding") };
412
- }
413
- }
414
- return { bytes, read: string.length, error: null };
415
- }
416
- let char = string[index];
417
- ++index;
418
- if (char === "=") {
419
- if (chunk.length < 2) {
420
- return { bytes, read, error: new SyntaxError("padding is too early") };
421
- }
422
- index = skipWs(string, index);
423
- if (chunk.length === 2) {
424
- if (index === string.length) {
425
- if (lastChunkHandling === "stop-before-partial") {
426
- return { bytes, read, error: null };
427
- }
428
- return { bytes, read, error: new SyntaxError("malformed padding - only one =") };
429
- }
430
- if (string[index] === "=") {
431
- ++index;
432
- index = skipWs(string, index);
433
- }
434
- }
435
- if (index < string.length) {
436
- return { bytes, read, error: new SyntaxError("unexpected character after padding") };
437
- }
438
- bytes.push(...decodeChunk(chunk, lastChunkHandling === "strict"));
439
- return { bytes, read: string.length, error: null };
440
- }
441
- if (alphabet === "base64url") {
442
- if (char === "+" || char === "/") {
443
- return { bytes, read, error: new SyntaxError("unexpected character " + JSON.stringify(char)) };
444
- } else if (char === "-") {
445
- char = "+";
446
- } else if (char === "_") {
447
- char = "/";
448
- }
449
- }
450
- if (!B64.includes(char)) {
451
- return { bytes, read, error: new SyntaxError("unexpected character " + JSON.stringify(char)) };
452
- }
453
- const remainingBytes = maxLength - bytes.length;
454
- if (
455
- (remainingBytes === 1 && chunk.length === 2) ||
456
- (remainingBytes === 2 && chunk.length === 3)
457
- ) {
458
- // The chunk-in-progress already represents exactly `remainingBytes` bytes;
459
- // the char we just read would start a group we have no room for. Stop.
460
- return { bytes, read, error: null };
461
- }
462
- chunk += char;
463
- if (chunk.length === 4) {
464
- bytes.push(...decodeChunk(chunk, false));
465
- chunk = "";
466
- read = index;
467
- if (bytes.length === maxLength) {
468
- // maxLength hit (setFromBase64 with a short target): native advances
469
- // `read` past trailing whitespace only when it runs to end-of-input —
470
- // if real content follows, `read` stays at the quad boundary.
471
- const after = skipWs(string, index);
472
- if (after === string.length) read = after;
473
- return { bytes, read, error: null };
474
- }
475
- }
476
- }
477
- };
478
-
479
- const b64ToU8 = (string, options, into) => {
480
- if (typeof string !== "string") throw new TypeError("expected input to be a string");
481
- const opts = getOptions(options);
482
- let alphabet = opts.alphabet;
483
- if (typeof alphabet === "undefined") alphabet = "base64";
484
- if (alphabet !== "base64" && alphabet !== "base64url") {
485
- throw new TypeError('expected alphabet to be either "base64" or "base64url"');
486
- }
487
- let lastChunkHandling = opts.lastChunkHandling;
488
- if (typeof lastChunkHandling === "undefined") lastChunkHandling = "loose";
489
- if (
490
- lastChunkHandling !== "loose" &&
491
- lastChunkHandling !== "strict" &&
492
- lastChunkHandling !== "stop-before-partial"
493
- ) {
494
- throw new TypeError(
495
- 'expected lastChunkHandling to be either "loose", "strict", or "stop-before-partial"',
496
- );
497
- }
498
- if (into && isDetached(into)) {
499
- throw new TypeError("setFromBase64 called on array backed by detached buffer");
500
- }
501
- const maxLength = into ? into.length : 2 ** 53 - 1;
502
- let { bytes, read, error } = fromBase64(string, alphabet, lastChunkHandling, maxLength);
503
- if (error && !into) throw error;
504
- bytes = new Uint8Array(bytes);
505
- if (into && bytes.length > 0) into.set(bytes);
506
- if (error) throw error;
507
- return { read, bytes };
508
- };
509
-
510
- const u8ToHex = (arr) => {
511
- checkU8(arr);
512
- if (isDetached(arr)) {
513
- throw new TypeError("toHex called on array backed by detached buffer");
514
- }
515
- let out = "";
516
- for (let i = 0; i < arr.length; ++i) out += arr[i].toString(16).padStart(2, "0");
517
- return out;
518
- };
519
-
520
- const hexToU8 = (string, into) => {
521
- if (typeof string !== "string") throw new TypeError("expected string to be a string");
522
- if (into && isDetached(into)) {
523
- throw new TypeError("setFromHex called on array backed by detached buffer");
524
- }
525
- // Odd-length input is rejected unconditionally — even with an `into` and even
526
- // when maxLength would cut before the lone trailing hexit (matches native).
527
- if (string.length % 2 !== 0) {
528
- throw new SyntaxError("string should be an even number of characters");
529
- }
530
- const maxLength = into ? into.length : 2 ** 53 - 1;
531
- const bytesArr = [];
532
- let read = 0;
533
- let error = null;
534
- if (maxLength > 0) {
535
- while (read < string.length) {
536
- const hexits = string.slice(read, read + 2);
537
- if (/[^0-9a-fA-F]/.test(hexits)) {
538
- error = new SyntaxError("string should only contain hex characters");
539
- break;
540
- }
541
- bytesArr.push(parseInt(hexits, 16));
542
- read += 2;
543
- if (bytesArr.length === maxLength) break;
544
- }
545
- }
546
- if (error && !into) throw error;
547
- const bytes = new Uint8Array(bytesArr);
548
- if (into && bytes.length > 0) into.set(bytes);
549
- if (error) throw error;
550
- return { read, bytes };
551
- };
552
-
553
- const def = (target, name, fn) => {
554
- Object.defineProperty(target, name, {
555
- value: fn,
556
- writable: true,
557
- enumerable: false,
558
- configurable: true,
559
- });
560
- };
561
- def(Uint8Array.prototype, "toBase64", function toBase64(options) {
562
- return u8ToBase64(this, options);
563
- });
564
- def(Uint8Array, "fromBase64", function fromBase64(string, options) {
565
- return b64ToU8(string, options, undefined).bytes;
566
- });
567
- def(Uint8Array.prototype, "setFromBase64", function setFromBase64(string, options) {
568
- checkU8(this);
569
- const { read, bytes } = b64ToU8(string, options, this);
570
- return { read, written: bytes.length };
571
- });
572
- def(Uint8Array.prototype, "toHex", function toHex() {
573
- return u8ToHex(this);
574
- });
575
- def(Uint8Array, "fromHex", function fromHex(string) {
576
- return hexToU8(string, undefined).bytes;
577
- });
578
- def(Uint8Array.prototype, "setFromHex", function setFromHex(string) {
579
- checkU8(this);
580
- const { read, bytes } = hexToU8(string, this);
581
- return { read, written: bytes.length };
582
- });
583
- }
584
-
585
- // ── DisposableStack / AsyncDisposableStack (TC39 Stage 4 Explicit Resource
586
- // Management; native Node 24+, absent below) ──
587
- // nub already down-levels the `using` / `await using` SYNTAX; this fills the
588
- // runtime-CLASS gap so code that references the classes directly (or output from a
589
- // toolchain that targets the native classes) works across the floor. Disposal is
590
- // LIFO; a throwing disposer is aggregated into a SuppressedError chain per spec.
591
- // Symbol.dispose / Symbol.asyncDispose are present on every Node nub supports, but
592
- // are defined defensively if absent since the classes depend on them. Feature-detect
593
- // off `globalThis.DisposableStack` / `globalThis.AsyncDisposableStack` — a strict
594
- // no-op where native.
595
- function installDisposableStacks() {
596
- if (typeof Symbol.dispose === "undefined") {
597
- Object.defineProperty(Symbol, "dispose", { value: Symbol("Symbol.dispose") });
598
- }
599
- if (typeof Symbol.asyncDispose === "undefined") {
600
- Object.defineProperty(Symbol, "asyncDispose", { value: Symbol("Symbol.asyncDispose") });
601
- }
602
-
603
- const defGlobal = (name, value) => {
604
- Object.defineProperty(globalThis, name, {
605
- value,
606
- writable: true,
607
- enumerable: false,
608
- configurable: true,
609
- });
610
- };
611
-
612
- // ── SuppressedError (TC39 Stage 4, the companion to the Stacks; native Node 24+,
613
- // absent below) — the error a throwing disposer is aggregated into.
614
- if (typeof globalThis.SuppressedError === "undefined") {
615
- class SuppressedError extends Error {
616
- constructor(error, suppressed, message) {
617
- super(message);
618
- // Spec (and native Node 24+) install .error/.suppressed as non-enumerable
619
- // data props — plain assignment would make them enumerable, so Object.keys()
620
- // / JSON.stringify() would leak them on the floor but not on native.
621
- Object.defineProperty(this, "error", {
622
- value: error,
623
- writable: true,
624
- enumerable: false,
625
- configurable: true,
626
- });
627
- Object.defineProperty(this, "suppressed", {
628
- value: suppressed,
629
- writable: true,
630
- enumerable: false,
631
- configurable: true,
632
- });
633
- }
634
- }
635
- Object.defineProperty(SuppressedError.prototype, "name", {
636
- value: "SuppressedError",
637
- writable: true,
638
- enumerable: false,
639
- configurable: true,
640
- });
641
- defGlobal("SuppressedError", SuppressedError);
642
- }
643
-
644
- // new SuppressedError(error, suppressed): .error is the most-recent throw, the
645
- // accumulated prior chain is nested under .suppressed — matching the spec's
646
- // DisposeResources fold. Resolved AFTER the polyfill above so the floor gets a
647
- // real SuppressedError instance, not a bare Error.
648
- const Suppressed = globalThis.SuppressedError;
649
-
650
- if (typeof globalThis.DisposableStack === "undefined") {
651
- class DisposableStack {
652
- #disposed = false;
653
- #stack = [];
654
- get disposed() {
655
- return this.#disposed;
656
- }
657
- dispose() {
658
- if (this.#disposed) return undefined;
659
- this.#disposed = true;
660
- let hasError = false;
661
- let error;
662
- const stack = this.#stack;
663
- this.#stack = [];
664
- for (let i = stack.length - 1; i >= 0; i--) {
665
- try {
666
- stack[i]();
667
- } catch (e) {
668
- if (hasError) error = new Suppressed(e, error);
669
- else {
670
- hasError = true;
671
- error = e;
672
- }
673
- }
674
- }
675
- if (hasError) throw error;
676
- return undefined;
677
- }
678
- use(value) {
679
- if (this.#disposed) throw new ReferenceError("DisposableStack already disposed");
680
- if (value !== null && value !== undefined) {
681
- const method = value[Symbol.dispose];
682
- if (typeof method !== "function") throw new TypeError("value is not disposable");
683
- this.#stack.push(() => method.call(value));
684
- }
685
- return value;
686
- }
687
- adopt(value, onDispose) {
688
- if (this.#disposed) throw new ReferenceError("DisposableStack already disposed");
689
- if (typeof onDispose !== "function") throw new TypeError("onDispose is not callable");
690
- this.#stack.push(() => onDispose(value));
691
- return value;
692
- }
693
- defer(onDispose) {
694
- if (this.#disposed) throw new ReferenceError("DisposableStack already disposed");
695
- if (typeof onDispose !== "function") throw new TypeError("onDispose is not callable");
696
- this.#stack.push(() => onDispose());
697
- return undefined;
698
- }
699
- move() {
700
- if (this.#disposed) throw new ReferenceError("DisposableStack already disposed");
701
- const next = new DisposableStack();
702
- next.#stack = this.#stack;
703
- this.#stack = [];
704
- this.#disposed = true;
705
- return next;
706
- }
707
- get [Symbol.toStringTag]() {
708
- return "DisposableStack";
709
- }
710
- }
711
- // Spec: @@dispose is the same function object as `dispose`.
712
- Object.defineProperty(DisposableStack.prototype, Symbol.dispose, {
713
- value: DisposableStack.prototype.dispose,
714
- writable: true,
715
- enumerable: false,
716
- configurable: true,
717
- });
718
- defGlobal("DisposableStack", DisposableStack);
719
- }
720
-
721
- if (typeof globalThis.AsyncDisposableStack === "undefined") {
722
- class AsyncDisposableStack {
723
- #disposed = false;
724
- #stack = [];
725
- get disposed() {
726
- return this.#disposed;
727
- }
728
- async disposeAsync() {
729
- if (this.#disposed) return undefined;
730
- this.#disposed = true;
731
- let hasError = false;
732
- let error;
733
- const stack = this.#stack;
734
- this.#stack = [];
735
- for (let i = stack.length - 1; i >= 0; i--) {
736
- try {
737
- await stack[i]();
738
- } catch (e) {
739
- if (hasError) error = new Suppressed(e, error);
740
- else {
741
- hasError = true;
742
- error = e;
743
- }
744
- }
745
- }
746
- if (hasError) throw error;
747
- return undefined;
748
- }
749
- use(value) {
750
- if (this.#disposed) throw new ReferenceError("AsyncDisposableStack already disposed");
751
- if (value !== null && value !== undefined) {
752
- let method = value[Symbol.asyncDispose];
753
- if (method === undefined || method === null) {
754
- const sync = value[Symbol.dispose];
755
- if (typeof sync !== "function") {
756
- throw new TypeError("value is not async disposable");
757
- }
758
- this.#stack.push(() => sync.call(value));
759
- } else {
760
- if (typeof method !== "function") {
761
- throw new TypeError("value is not async disposable");
762
- }
763
- this.#stack.push(() => method.call(value));
764
- }
765
- }
766
- return value;
767
- }
768
- adopt(value, onDispose) {
769
- if (this.#disposed) throw new ReferenceError("AsyncDisposableStack already disposed");
770
- if (typeof onDispose !== "function") throw new TypeError("onDispose is not callable");
771
- this.#stack.push(() => onDispose(value));
772
- return value;
773
- }
774
- defer(onDispose) {
775
- if (this.#disposed) throw new ReferenceError("AsyncDisposableStack already disposed");
776
- if (typeof onDispose !== "function") throw new TypeError("onDispose is not callable");
777
- this.#stack.push(() => onDispose());
778
- return undefined;
779
- }
780
- move() {
781
- if (this.#disposed) throw new ReferenceError("AsyncDisposableStack already disposed");
782
- const next = new AsyncDisposableStack();
783
- next.#stack = this.#stack;
784
- this.#stack = [];
785
- this.#disposed = true;
786
- return next;
787
- }
788
- get [Symbol.toStringTag]() {
789
- return "AsyncDisposableStack";
790
- }
791
- }
792
- Object.defineProperty(AsyncDisposableStack.prototype, Symbol.asyncDispose, {
793
- value: AsyncDisposableStack.prototype.disposeAsync,
794
- writable: true,
795
- enumerable: false,
796
- configurable: true,
797
- });
798
- defGlobal("AsyncDisposableStack", AsyncDisposableStack);
799
- }
800
- }
801
-
802
- // Load the two ESM side-effect modules — Web Locks (navigator.locks) and the
803
- // browser-shape Worker global — synchronously via `require()`. Valid on the fast
804
- // tier ONLY (Node 22.15+), where require(esm) of these side-effecting ES modules
805
- // works (verified). The compat tier must NOT call this; it loads them with
806
- // dynamic `import()` from preload.mjs instead.
807
- function installEsmPolyfillsSync() {
808
- // ── navigator.locks (native on Node 24+, missing on 22.x) ──────────
809
- if (typeof globalThis.navigator?.locks === "undefined") {
810
- __require("./navigator-locks.mjs");
811
- }
812
- // ── Worker (browser-shape global, not in any Node) ──────────────────
813
- __require("./worker-polyfill.mjs");
814
- }
815
-
816
- module.exports = { installSyncPolyfills, installEsmPolyfillsSync };