@nubjs/nub-darwin-x64 0.2.2 → 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 -278
  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,313 +0,0 @@
1
- // Nub fast-tier preload — Node 22.15+, injected via `--require` (CommonJS).
2
- //
3
- // WHY CJS / `--require` (not the `.mjs` `--import` the compat tier uses): the mere
4
- // presence of `--import` forces Node to eagerly initialize the ESM loader, which
5
- // then routes EVEN A CJS ENTRY POINT through the async ESM module-job
6
- // (`ModuleJob.run`) instead of the synchronous `Module.runMain` CJS path. That one
7
- // change is the root cause of a whole regression cluster (R1): top-level
8
- // `executionAsyncId()===0` (Node: 1), extra PROMISE async-hook events, a top-level
9
- // sync `throw` surfacing as `unhandledRejection` instead of `uncaughtException`,
10
- // `require.main.id` `'.'`→abspath, `module.parent` `null`→`undefined`, and a
11
- // missing-entry `ERR_MODULE_NOT_FOUND` instead of `MODULE_NOT_FOUND`. Loading this
12
- // preload via `--require` (CJS) keeps Node on the synchronous CJS entry path and
13
- // restores all of them, while STILL supporting `module.registerHooks` + TS
14
- // transpile (both work from a `--require` CJS module on Node 22.15+).
15
- //
16
- // HARD CONSTRAINT: this file and everything it pulls in synchronously must be
17
- // TLA-free. `require(esm)` (which loads transform-core.mjs / the polyfill ESM
18
- // modules) rejects any module with top-level await (ERR_REQUIRE_ASYNC_MODULE), so
19
- // transform-core.mjs, polyfills.cjs, worker-polyfill.mjs and navigator-locks.mjs
20
- // are all TLA-free by construction. The compat tier (< 22.15), where require(esm)
21
- // is unreliable, keeps its async `--import` preload.mjs path UNCHANGED.
22
- //
23
- // ROBUSTNESS TO `--no-experimental-require-module` (the require-module cluster):
24
- // a user may set `--no-experimental-require-module` (e.g. to assert the legacy
25
- // require(esm)→ERR_REQUIRE_ESM contract for THEIR code). That flag globally
26
- // disables require(esm) — including for THIS `--require` CJS preload's own
27
- // `require("./transform-core.mjs")`, which would otherwise crash the process at
28
- // startup (ERR_REQUIRE_ESM) before any user code runs. nub's preload must survive
29
- // that. The fix: detect when sync require(esm) is unavailable and fall back to the
30
- // compat tier's async loader-worker hooks (`module.register("./preload-async-
31
- // hooks.mjs")`), which loads transform-core.mjs as a STATIC ESM import inside the
32
- // worker — a path the flag does not gate. User code still gets Node's own
33
- // ERR_REQUIRE_ESM for ITS require(esm), exactly as the flag promises; only nub's
34
- // preload is made robust. (See the require-module corpus cluster:
35
- // test-cjs-esm-warn, test-disable-require-module-with-detection,
36
- // test-esm-type-field-errors-2, parallel/test-require-mjs.)
37
-
38
- const { createRequire } = require("node:module");
39
- const module_ = require("node:module");
40
-
41
- const __require = createRequire(__filename);
42
-
43
- // Load preload-common FIRST so we can restore NODE_COMPILE_CACHE (R8) BEFORE
44
- // transform-core.mjs is required: spawn.rs stripped that env var to keep nub's
45
- // preload chain out of the user's V8 compile cache, and transform-core reads
46
- // `NODE_COMPILE_CACHE === "0"` as its transpile-cache disable signal — so the
47
- // value must be back in process.env before transform-core's module body runs.
48
- // Restoring it in JS does NOT re-enable Node's bootstrap compile cache (already
49
- // configured from the stripped env), so the chain below stays uncached.
50
- const common = __require("./preload-common.cjs");
51
- common.restoreCompileCacheEnv();
52
-
53
- // `--no-experimental-require-module` disables require(esm) globally, so the
54
- // transform-core require below (and the worker/locks ESM side-effect modules)
55
- // would throw ERR_REQUIRE_ESM and abort the process before user code. Detect that
56
- // and load via the async-register fallback instead. We probe by attempting the
57
- // require and catching ERR_REQUIRE_ESM — robust regardless of how the flag arrived
58
- // (CLI, NODE_OPTIONS, or a config file), and a no-op cost on the common path where
59
- // require(esm) works.
60
- let core = null;
61
- let requireEsmDisabled = false;
62
- try {
63
- // The transform core is the single source of truth for resolution + transpile,
64
- // shared verbatim with the compat tier. It's an ES module with no top-level
65
- // await, so `require(esm)` loads it synchronously here on Node 22.15+.
66
- core = __require("./transform-core.mjs");
67
- } catch (err) {
68
- if (err && err.code === "ERR_REQUIRE_ESM") {
69
- requireEsmDisabled = true;
70
- } else {
71
- throw err;
72
- }
73
- }
74
-
75
- const { installSyncPolyfills } = __require("./polyfills.cjs");
76
-
77
- if (!requireEsmDisabled) {
78
- // ── Fast tier (sync require(esm) available) ───────────────────────
79
-
80
- // ── Watch-mode dependency reporting + hooks ───────────────────────
81
- const watchReporting = common.installWatchReporting(core);
82
-
83
- // Best-effort bounded-cache eviction (main thread only; the core guards on it).
84
- // DEFERRED to setImmediate: maybeSweepCache probes `worker_threads.isMainThread`
85
- // and dynamic-imports cache-evict.mjs, which would otherwise pull worker_threads
86
- // (and its streams/worker-io transitive set) into the BOOTSTRAP module-load list
87
- // on every startup — a cold-start regression (test-bootstrap-modules snapshots
88
- // process.moduleLoadList at user code's first line). Running it one turn later
89
- // keeps those out of the bootstrap snapshot while preserving the once-a-day sweep.
90
- // unref so a purely-synchronous program still exits promptly without waiting on it.
91
- setImmediate(() => {
92
- try { core.maybeSweepCache(); } catch {}
93
- }).unref();
94
-
95
- // ── Pre-load clobbered polyfill packages BEFORE hooks register ────
96
- // Packages in the core's CLOBBER_MAP can't be imported after hooks register (the
97
- // resolve hook returns a synthetic module instead of the real package), so
98
- // require them now via the not-yet-hooked CJS require and stash them for the
99
- // polyfill installer. Temporal is deferred entirely to a lazy global (below).
100
- const __preloadedPolyfills = common.preloadPolyfillPackages(__require);
101
-
102
- // ── Hook registration (fast tier: sync, in-thread) ────────────────
103
- // Same realm as user code; covers `import` and (Node 24+) `require`.
104
- // registerHooks' require RESOLUTION is incomplete on 22.15–24, so also install
105
- // the main-thread CJS resolve shim (its _resolveFilename half, always on). We do
106
- // NOT install the classic require.extensions transpile shim on the fast tier: the
107
- // sync registerHooks LOAD hook already transpiles require()'d `.ts` (CJS content,
108
- // tsconfig paths, .tsx, extensionless — all verified), and native require(esm)
109
- // (>= 22.12, always present at the 22.15+ fast floor) loads ES-module `.ts`. The
110
- // classic require.extensions['.ts'] hook would SHADOW that native require(esm) and
111
- // throw a bogus ERR_REQUIRE_ESM on every ESM `.ts` entry on 22.15–22.17 (where
112
- // process.features.typescript is still false) — so it must stay off here. On
113
- // 22.18+/24+ this was already the behavior (native-TS → false); now it's uniform.
114
- const { resolve, load } = common.makeHooks(core, watchReporting);
115
- module_.registerHooks({ resolve, load });
116
- common.installCjsRequireHooks(core, false);
117
- // NOTE: no Yarn `.pnp.loader.mjs` registration. nub's own `resolve` hook already
118
- // routes PnP specifiers through `pnpapi.resolveRequest` (see makeHooks /
119
- // installCjsRequireHooks), covering both `import` and `require` of PnP deps.
120
- // Registering Yarn's ESM loader ON TOP of the sync `module.registerHooks` hooks
121
- // deadlocks ESM entry loading (silent exit) — both hook systems intercept ESM
122
- // resolution. The compat tier (preload-async-hooks.mjs) resolves PnP the same way.
123
-
124
- // ── Sync polyfills + lazy ESM-side-effect polyfills ───────────────
125
- installSyncPolyfills(__preloadedPolyfills);
126
- installLazyEsmPolyfills();
127
-
128
- // ── Temporal: lazy global (A37) ───────────────────────────────────
129
- common.installTemporalLazyGlobal(__require);
130
-
131
- // ── Compile-cache: re-enable for the USER's modules (R8) ──────────
132
- common.reenableUserCompileCache();
133
- } else {
134
- // ── Fallback tier (`--no-experimental-require-module`): async hooks ─
135
- // The user disabled require(esm), so the in-thread sync `module.registerHooks`
136
- // core can't be loaded here. Register the SAME hooks the compat tier uses, run
137
- // in a dedicated loader worker via `module.register`; that worker imports
138
- // transform-core.mjs as a static ESM import (not gated by the flag). The
139
- // main-thread CJS require() transpile shim, which would need the core
140
- // synchronously in-thread, is unavailable in this mode — an honest, additive
141
- // degradation: the user opted out of require(esm), and nub's `.ts`-via-require()
142
- // transpile rides on exactly that mechanism. `import`-side TS still transpiles
143
- // through the registered loader-worker hooks. User require(esm) of THEIR own ES
144
- // modules still gets Node's native ERR_REQUIRE_ESM, exactly as the flag promises.
145
- const { pathToFileURL } = require("node:url");
146
- // Via the shared helper so Node 26+'s DEP0205 (steering to module.registerHooks) is
147
- // not leaked onto the user's stderr — nub is forced onto module.register here
148
- // because require(esm) is off, so registerHooks' in-thread sync core load is
149
- // impossible; the user has no action to take. See registerLoaderWorker.
150
- common.registerLoaderWorker("./preload-async-hooks.mjs", pathToFileURL(__filename).href);
151
-
152
- // Sync, non-require(esm) polyfills still install (none of them require(esm)).
153
- // Clobbered-polyfill packages are CJS requires, unaffected by the flag.
154
- const __preloadedPolyfills = common.preloadPolyfillPackages(__require);
155
- installSyncPolyfills(__preloadedPolyfills);
156
- installLazyEsmPolyfills();
157
-
158
- // Temporal lazy global needs only `__require` (it loads a CJS package), and the
159
- // user's compile-cache re-enable is independent of require(esm).
160
- common.installTemporalLazyGlobal(__require);
161
- common.reenableUserCompileCache();
162
- }
163
-
164
- // ── Lazy ESM-side-effect polyfills (R7) ─────────────────────────────
165
- // The two ESM side-effect polyfills — the browser-shape Worker global
166
- // (worker-polyfill.mjs) and Web Locks (navigator-locks.mjs) — were previously
167
- // installed EAGERLY at preload (polyfills.cjs:installEsmPolyfillsSync). That drags
168
- // ~50 builtins into bootstrap on EVERY startup: worker-polyfill.mjs imports
169
- // node:worker_threads, which pulls internal/streams/* (readable/writable/duplex/
170
- // transform/pipeline/…), internal/worker, internal/worker/io,
171
- // internal/worker/messaging, vm, net, child_process, os, etc.; navigator-locks.mjs
172
- // pulls internal/locks + internal/navigator. None of that is needed by the common
173
- // "run a plain file, never touch Worker or navigator.locks" case, and the eager
174
- // load is a cold-start regression that contradicts the fast-runner premise
175
- // (test-bootstrap-modules: moduleLoadList must match Node's bootstrap set).
176
- //
177
- // Replace the eager install with lazy globals:
178
- // • `globalThis.Worker` — a non-enumerable getter that, on first access (the
179
- // first `new Worker(...)`), deletes itself, requires worker-polyfill.mjs (which
180
- // then defines the real `globalThis.Worker`), and returns it.
181
- // • `navigator.locks` — a non-enumerable getter that loads navigator-locks.mjs on
182
- // first access (only when not native — Node 24.5+ ships it).
183
- // In a WORKER thread, the worker-side bootstrap inside worker-polyfill.mjs (self/
184
- // postMessage/message wiring) MUST run at startup, so we load it eagerly there.
185
- // That costs nothing for bootstrap accounting: a worker already loaded
186
- // worker_threads to exist, and test-bootstrap-modules measures the main thread.
187
- function installLazyEsmPolyfills() {
188
- // Cheap main-thread detection that does NOT pull node:worker_threads into the
189
- // main-thread bootstrap (requiring it eagerly is exactly the regression we're
190
- // fixing): in a worker, worker_threads is already in the module-load list by the
191
- // time this preload runs; on the main thread it is not.
192
- const inWorkerThread = process.moduleLoadList.some(
193
- (m) => m === "NativeModule worker_threads",
194
- );
195
-
196
- const loadEsmSideEffect = (specifier) => {
197
- try {
198
- __require(specifier);
199
- } catch (err) {
200
- if (err && err.code === "ERR_REQUIRE_ESM") {
201
- // require(esm) disabled — load via dynamic import (not flag-gated). Async,
202
- // but side-effect-only; the Worker/locks polyfills are needed lazily, and
203
- // for a worker thread the worker-side wiring lands a tick later, which is
204
- // still before any user message round-trip can complete.
205
- import(specifier).catch(() => {});
206
- } else {
207
- throw err;
208
- }
209
- }
210
- };
211
-
212
- // navigator backfill, ordered BEFORE the navigator.locks installs below so locks
213
- // always has a host. The fast tier floor is 22.15 (navigator is always native, >= 21),
214
- // so installNavigatorShim() version-checks and returns WITHOUT reading globalThis
215
- // .navigator — never triggering the 24.5+ lazy-navigator realization. It does real
216
- // work only if this preload is ever reached on Node < 21; on the fast floor it is a
217
- // cheap no-op, wired for symmetry with the compat tier. See navigator-shim.mjs.
218
- try {
219
- __require("./navigator-shim.mjs").installNavigatorShim();
220
- } catch (err) {
221
- // require(esm) disabled (--no-experimental-require-module): navigator is native at
222
- // the fast floor, so skipping the no-op shim is harmless. Any OTHER error is a real
223
- // fault in the module — surface it rather than swallow it.
224
- if (!err || err.code !== "ERR_REQUIRE_ESM") throw err;
225
- }
226
-
227
- if (inWorkerThread) {
228
- // Worker-side scope bootstrap must be present synchronously where possible.
229
- loadEsmSideEffect("./worker-polyfill.mjs");
230
- if (typeof globalThis.navigator?.locks === "undefined") {
231
- loadEsmSideEffect("./navigator-locks.mjs");
232
- }
233
- return;
234
- }
235
-
236
- // Main thread: install blob: worker support EAGERLY. It only wraps
237
- // URL.createObjectURL + subclasses Blob (touches no node:worker_threads, so it's
238
- // cold-start-cheap) and MUST be live before user code calls createObjectURL —
239
- // which happens before the first `new Worker`, so it cannot wait for the lazy
240
- // Worker load below. See runtime/worker-blob-url.cjs.
241
- try {
242
- __require("./worker-blob-url.cjs").installBlobUrlSupport();
243
- } catch {
244
- // blob: worker support is best-effort; never block startup on it.
245
- }
246
-
247
- // Main thread: lazy Worker global. Defined NON-ENUMERABLE so it stays invisible
248
- // to `Object.keys(globalThis)` / for-in — the additive contract — matching how
249
- // worker-polyfill.mjs defines the real one.
250
- if (typeof globalThis.Worker === "undefined") {
251
- let installing = false;
252
- Object.defineProperty(globalThis, "Worker", {
253
- configurable: true,
254
- enumerable: false,
255
- get() {
256
- if (installing) return undefined;
257
- installing = true;
258
- // Drop this lazy accessor so worker-polyfill.mjs's own
259
- // `if (typeof globalThis.Worker === "undefined")` guard fires and defines
260
- // the real Worker.
261
- delete globalThis.Worker;
262
- loadEsmSideEffect("./worker-polyfill.mjs");
263
- return globalThis.Worker;
264
- },
265
- set(value) {
266
- // A user assigning their own Worker wins — replace the lazy accessor.
267
- Object.defineProperty(globalThis, "Worker", {
268
- value,
269
- configurable: true,
270
- enumerable: false,
271
- writable: true,
272
- });
273
- },
274
- });
275
- }
276
-
277
- // Main thread: lazy navigator.locks (native on Node 24.5+, absent on the 22.x
278
- // floor). VERSION-GATE so we never even READ `globalThis.navigator` where locks
279
- // is native: on Node 24.5+ the native `navigator` global is a lazy getter that,
280
- // on first access, eagerly realizes internal/navigator + internal/locks AND the
281
- // whole stream/worker-io transitive set (~30 builtins) — touching it at preload
282
- // would be exactly the cold-start regression test-bootstrap-modules guards
283
- // against, for zero benefit (locks is already there). Below 24.5 navigator is
284
- // present but lacks `locks`, and accessing it is cheap (one internal module), so
285
- // installing the lazy polyfill there is fine.
286
- const [navMaj, navMin] = process.versions.node.split(".").map((n) => parseInt(n, 10));
287
- const locksNative = navMaj > 24 || (navMaj === 24 && navMin >= 5);
288
- if (locksNative) return;
289
-
290
- const nav = globalThis.navigator;
291
- if (nav && typeof nav.locks === "undefined") {
292
- let installing = false;
293
- Object.defineProperty(nav, "locks", {
294
- configurable: true,
295
- enumerable: true,
296
- get() {
297
- if (installing) return undefined;
298
- installing = true;
299
- delete nav.locks;
300
- loadEsmSideEffect("./navigator-locks.mjs");
301
- return nav.locks;
302
- },
303
- set(value) {
304
- Object.defineProperty(nav, "locks", {
305
- value,
306
- configurable: true,
307
- enumerable: true,
308
- writable: true,
309
- });
310
- },
311
- });
312
- }
313
- }
@@ -1,149 +0,0 @@
1
- // Nub compat-tier preload — Node 18.19–22.14, injected via `--import` (ESM).
2
- //
3
- // The FAST tier (Node 22.15+) is loaded separately, as a `--require` CommonJS
4
- // preload (runtime/preload.cjs), so Node keeps its synchronous `Module.runMain`
5
- // CJS entry path (top-level `executionAsyncId()===1`, sync exception origin,
6
- // `require.main.id` `'.'`, `module.parent` `null`). The mere presence of an
7
- // `--import` ESM preload forces eager ESM-loader init that routes even a CJS entry
8
- // through the async ESM module-job (R1) — so the fast tier must NOT use `--import`.
9
- //
10
- // THIS file stays the compat path: on 18.19–22.14, `module.registerHooks` does not
11
- // exist and `require(esm)` is unreliable, so hooks run async in a dedicated loader
12
- // worker via `module.register`. That async machinery is why the compat tier keeps
13
- // `--import` — its top-level `await` is accepted here (an `--import` ESM module may
14
- // be async), and the < 22.15 floor has no equivalent sync surface. (Module-format
15
- // + decorator detection no longer needs a preloaded JS parser: it is a synchronous
16
- // native addon call, so there is nothing to `await`-warm-up before hooks run.)
17
- //
18
- // Resolution + transpile primitives come from runtime/transform-core.mjs; the
19
- // non-tier-specific wiring (watch IPC, the CJS require() shim, clobbered-polyfill
20
- // preloading, the Temporal lazy global) is shared verbatim with the fast tier via
21
- // runtime/preload-common.cjs, so the two tiers can never drift.
22
-
23
- // MUST be first: restores NODE_COMPILE_CACHE into process.env (R8) before
24
- // transform-core.mjs's body evaluates, since transform-core reads it as the
25
- // transpile-cache disable signal. ESM imports evaluate in source order, so this
26
- // side-effecting import has to precede the transform-core import. See
27
- // compile-cache-restore.mjs.
28
- import "./compile-cache-restore.mjs";
29
- // Floor bootstrap (Node < 22.3/20.16/18.20.4): threads node:module's createRequire
30
- // into transform-core (and, below, worker-polyfill) via MODULE-SCOPE SETTERS — never
31
- // globalThis (brand boundary) — so those fast-tier `require(esm)` modules can fetch
32
- // node: builtins on the floor, where process.getBuiltinModule is absent. floor-builtin
33
- // holds the lone static node:module import and calls transform-core's setter during
34
- // ITS evaluation; importing it FIRST (ESM evaluates imports in source order) means
35
- // that setter has fired before transform-core's hooks are used. No-op on Node with
36
- // getBuiltinModule. See floor-builtin.mjs for why this is leak-safe. We capture its
37
- // re-exported `createRequire` (the floor's, off any user chain) to thread into
38
- // worker-polyfill below — that module is loaded later (dynamic import) so its setter
39
- // can't be called from floor-builtin's own evaluation.
40
- import { createRequire as floorCreateRequire } from "./floor-builtin.mjs";
41
- import module from "node:module";
42
- import { createRequire } from "node:module";
43
- import * as core from "./transform-core.mjs";
44
-
45
- const __require = createRequire(import.meta.url);
46
- const common = __require("./preload-common.cjs");
47
- const { installSyncPolyfills } = __require("./polyfills.cjs");
48
-
49
- // ── Tier detection ──────────────────────────────────────────────────
50
- // This `.mjs` preload should only ever be `--import`ed for the compat tier (the
51
- // Rust spawn path chooses `--require preload.cjs` for 22.15+). But guard anyway: if
52
- // someone `--import`s it directly on an unsupported Node, emit a clear message and
53
- // skip hook registration rather than throw (throwing breaks user-invoked --import
54
- // flows). The fast-tier branch is intentionally absent here — 22.15+ goes through
55
- // preload.cjs.
56
- const [__major = 0, __minor = 0] = process.versions.node.split(".").map((n) => parseInt(n, 10));
57
- const __isCompatTier = __major > 18 || (__major === 18 && __minor >= 19);
58
- const __isFastTier = __major > 22 || (__major === 22 && __minor >= 15);
59
-
60
- // Native TypeScript support (`process.features.typescript`). Where absent (the
61
- // whole compat tier ≤ 22.17), Node can't load a required `.ts` on its own, so the
62
- // classic require.extensions transpile shim is installed; where present it's
63
- // skipped so Node's native require() of `.ts` isn't shadowed.
64
- const __hasNativeTs = !!process.features?.typescript;
65
-
66
- // Watch reporting + the Temporal lazy global are tier-independent.
67
- common.installWatchReporting(core);
68
-
69
- if (__isFastTier) {
70
- // Defensive only — the Rust path uses preload.cjs for 22.15+. If reached, the
71
- // sync registerHooks API is available; register synchronously to stay correct.
72
- // Match preload.cjs: NO classic require.extensions shim on the fast tier — the
73
- // sync registerHooks load hook + native require(esm) cover require()'d `.ts`
74
- // (incl. ES modules); the classic shim would shadow require(esm) and throw a
75
- // bogus ERR_REQUIRE_ESM on 22.15–22.17.
76
- const { resolve, load } = common.makeHooks(core, process.env.WATCH_REPORT_DEPENDENCIES === "1");
77
- module.registerHooks({ resolve, load });
78
- common.installCjsRequireHooks(core, false);
79
- } else if (__isCompatTier) {
80
- // Compat path: ESM `import` hooks run in a dedicated loader worker thread. That
81
- // worker resolves PnP deps via pnpapi.resolveRequest itself (preload-async-
82
- // hooks.mjs), so no Yarn `.pnp.loader.mjs` registration is needed here either.
83
- // Via the shared helper so any DEP0205 from nub's own register() call (Node 26+,
84
- // if this compat path is ever reached there) is not leaked onto the user's stderr.
85
- // On the compat tier proper (18.19–22.14) registerHooks doesn't exist, so the
86
- // loader-worker is the only hook surface; the user has no action to take.
87
- common.registerLoaderWorker("./preload-async-hooks.mjs", import.meta.url);
88
- // (The main-thread require() shim's module-format + decorator detection is a
89
- // synchronous native addon call now — no parser warm-up; the old
90
- // `await core.ensureParser()` for the ESM-only oxc-parser is gone.)
91
- // module.register() is ESM-loader-only; augment CommonJS require() on the main
92
- // thread too. The compat tier has no sync registerHooks, so require()'d `.ts`
93
- // MUST be transpiled by the classic require.extensions shim — hence it always
94
- // installs (true). KNOWN LIMITATION: on the require(esm)-capable slice of the
95
- // compat tier (22.12–22.14) an explicit `require('./esm-module.ts')` still
96
- // surfaces ERR_REQUIRE_ESM, because the classic shim shadows native require(esm)
97
- // and can't delegate to it from inside `_compile`. ESM `.ts` ENTRIES and `import`
98
- // of ESM `.ts` both work (they ride the ESM loader); only require()-of-ESM-`.ts`
99
- // is affected — an uncommon pattern. Below 22.12 the error is fully correct
100
- // (no require(esm) at all). Fast tier (22.15+) has none of this — see preload.cjs.
101
- common.installCjsRequireHooks(core, !__hasNativeTs);
102
- } else {
103
- process.stderr.write(
104
- `Nub requires Node 18.19 or newer for runtime augmentation; got ${process.versions.node}. Preload is inactive.\n`,
105
- );
106
- }
107
-
108
- // ── Clobbered-polyfill preloading + polyfills ───────────────────────
109
- // Require the clobbered polyfill packages before the resolve hook would intercept
110
- // them, then install the sync globals (shared with the fast tier) and the two ESM
111
- // side-effect modules. On the compat tier `require(esm)` of the worker/navigator
112
- // modules is unreliable, so they load via dynamic `import()` here.
113
- const __preloadedPolyfills = common.preloadPolyfillPackages(__require);
114
- installSyncPolyfills(__preloadedPolyfills);
115
- // navigator backfill (Node < 21: the `navigator` global is wholly absent). MUST run
116
- // BEFORE navigator-locks so Web Locks has a host on the 18.19–20.x floor. On Node >= 21
117
- // it is a no-op (navigator is native). Thread the floor's createRequire so the shim can
118
- // fetch node:os where process.getBuiltinModule is absent (the narrow floor). See
119
- // navigator-shim.mjs.
120
- const __navShim = await import("./navigator-shim.mjs");
121
- __navShim.setBootstrapCreateRequire(floorCreateRequire);
122
- __navShim.installNavigatorShim();
123
- if (typeof globalThis.navigator?.locks === "undefined") {
124
- await import("./navigator-locks.mjs");
125
- }
126
- // worker-polyfill fetches its node: builtins via process.getBuiltinModule; on the
127
- // floor (where that's absent) it needs the threaded createRequire BEFORE its install
128
- // runs. The module no longer auto-installs on the floor, so thread the value in and
129
- // install explicitly. On the fast/modern-compat tier the module already auto-installed
130
- // at eval (getBuiltinModule present) and installWorkerPolyfill() is an idempotent
131
- // no-op (its globalThis.Worker / worker-scope guards already fired). See
132
- // floor-builtin.mjs + worker-polyfill.mjs for the brand-safe (globalThis-free)
133
- // threading contract; this same path re-runs per worker realm (preload re-runs via
134
- // NODE_OPTIONS), so each user worker thread gets the value threaded too.
135
- const __workerPolyfill = await import("./worker-polyfill.mjs");
136
- __workerPolyfill.setBootstrapCreateRequire(floorCreateRequire);
137
- __workerPolyfill.installWorkerPolyfill();
138
-
139
- // ── Temporal: lazy global (A37) ─────────────────────────────────────
140
- common.installTemporalLazyGlobal(__require);
141
-
142
- // ── Compile-cache: re-enable for the USER's modules (R8) ────────────
143
- // spawn.rs strips NODE_COMPILE_CACHE for every augmented spawn (both tiers), so
144
- // nub's preload chain is never cached into the user's dir. Re-point the cache at
145
- // the user's original dir (via the PID-keyed sentinel) so their own modules still
146
- // cache. `module.enableCompileCache` only exists on Node 22.8+, so on most of the
147
- // compat tier (< 22.8) this is a safe no-op; it benefits 22.8–22.14 users who set
148
- // NODE_COMPILE_CACHE. See reenableUserCompileCache for the full rationale.
149
- common.reenableUserCompileCache();