@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.
- package/bin/nub +0 -0
- package/bin/nubx +0 -0
- package/package.json +2 -3
- package/runtime/addons/nub-native.node +0 -0
- package/runtime/cache-evict.mjs +0 -69
- package/runtime/compile-cache-restore.mjs +0 -21
- package/runtime/floor-builtin.mjs +0 -57
- package/runtime/navigator-locks.mjs +0 -242
- package/runtime/navigator-shim.mjs +0 -144
- package/runtime/node_modules/@js-temporal/polyfill/CHANGELOG.md +0 -453
- package/runtime/node_modules/@js-temporal/polyfill/LICENSE +0 -13
- package/runtime/node_modules/@js-temporal/polyfill/README.md +0 -90
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs +0 -2
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs.map +0 -1
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js +0 -2
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +0 -1
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js +0 -2
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +0 -1
- package/runtime/node_modules/@js-temporal/polyfill/index.d.cts +0 -1215
- package/runtime/node_modules/@js-temporal/polyfill/index.d.ts +0 -1215
- package/runtime/node_modules/@js-temporal/polyfill/lib/assert.ts +0 -8
- package/runtime/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +0 -39
- package/runtime/node_modules/@js-temporal/polyfill/lib/calendar.ts +0 -2424
- package/runtime/node_modules/@js-temporal/polyfill/lib/debug.ts +0 -7
- package/runtime/node_modules/@js-temporal/polyfill/lib/duration.ts +0 -438
- package/runtime/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +0 -93
- package/runtime/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +0 -4973
- package/runtime/node_modules/@js-temporal/polyfill/lib/index.ts +0 -34
- package/runtime/node_modules/@js-temporal/polyfill/lib/init.ts +0 -43
- package/runtime/node_modules/@js-temporal/polyfill/lib/instant.ts +0 -138
- package/runtime/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +0 -242
- package/runtime/node_modules/@js-temporal/polyfill/lib/intl.ts +0 -758
- package/runtime/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +0 -162
- package/runtime/node_modules/@js-temporal/polyfill/lib/legacydate.ts +0 -17
- package/runtime/node_modules/@js-temporal/polyfill/lib/math.ts +0 -96
- package/runtime/node_modules/@js-temporal/polyfill/lib/now.ts +0 -48
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindate.ts +0 -212
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +0 -274
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +0 -110
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaintime.ts +0 -154
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +0 -157
- package/runtime/node_modules/@js-temporal/polyfill/lib/regex.ts +0 -59
- package/runtime/node_modules/@js-temporal/polyfill/lib/slots.ts +0 -341
- package/runtime/node_modules/@js-temporal/polyfill/lib/temporal.ts +0 -10
- package/runtime/node_modules/@js-temporal/polyfill/lib/timeduration.ts +0 -149
- package/runtime/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +0 -492
- package/runtime/node_modules/@js-temporal/polyfill/package.json +0 -143
- package/runtime/node_modules/@oxc-project/runtime/CHANGELOG.md +0 -88
- package/runtime/node_modules/@oxc-project/runtime/LICENSE +0 -22
- package/runtime/node_modules/@oxc-project/runtime/README.md +0 -5
- package/runtime/node_modules/@oxc-project/runtime/package.json +0 -1066
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/AwaitValue.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecoratedDescriptor.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs.js +0 -236
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203.js +0 -184
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203R.js +0 -191
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2301.js +0 -222
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2305.js +0 -133
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2311.js +0 -124
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayLikeToArray.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithHoles.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithoutHoles.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertClassBrand.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertThisInitialized.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js +0 -24
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js +0 -45
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncToGenerator.js +0 -26
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/callSuper.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkInRHS.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkPrivateRedeclaration.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorDestructureSet.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorGet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCallCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticAccess.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classExtractFieldDescriptor.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classNameTDZError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseBase.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseKey.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateGetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateSetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/construct.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createClass.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelper.js +0 -50
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelperLoose.js +0 -19
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createSuper.js +0 -16
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorate.js +0 -23
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateMetadata.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateParam.js +0 -11
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defaults.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineAccessor.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineEnumerableProperties.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/dispose.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/AwaitValue.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/OverloadYield.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecoratedDescriptor.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs.js +0 -236
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203.js +0 -184
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203R.js +0 -191
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2301.js +0 -222
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2305.js +0 -133
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2311.js +0 -124
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayLikeToArray.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithHoles.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithoutHoles.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertClassBrand.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertThisInitialized.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncGeneratorDelegate.js +0 -24
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncIterator.js +0 -45
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncToGenerator.js +0 -26
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/awaitAsyncGenerator.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/callSuper.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkInRHS.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkPrivateRedeclaration.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorDestructureSet.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorGet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCallCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classExtractFieldDescriptor.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classNameTDZError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseBase.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseKey.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet2.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateGetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodInitSpec.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateSetter.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodGet.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodSet.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/construct.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createClass.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelper.js +0 -50
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelperLoose.js +0 -19
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createSuper.js +0 -16
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js +0 -21
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateMetadata.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateParam.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defaults.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineAccessor.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineEnumerableProperties.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/dispose.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/extends.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/get.js +0 -11
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/getPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/identity.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/importDeferProxy.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inherits.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inheritsLoose.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerDefineProperty.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerWarningHelper.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/instanceof.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireDefault.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireWildcard.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeFunction.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeReflectConstruct.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArray.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArrayLimit.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/jsx.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/maybeArrayLike.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/newArrowCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableRest.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableSpread.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nullishReceiverError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectDestructuringEmpty.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread2.js +0 -23
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutProperties.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutPropertiesLoose.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/package.json +0 -3
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/possibleConstructorReturn.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/readOnlyError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/regeneratorRuntime.js +0 -304
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/set.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setFunctionName.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/skipFirstGeneratorNext.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/slicedToArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropBase.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropGet.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropSet.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteral.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteralLoose.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/tdz.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalRef.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalUndefined.js +0 -2
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toConsumableArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toSetter.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/unsupportedIterableToArray.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/using.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/usingCtx.js +0 -59
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapAsyncGenerator.js +0 -69
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapNativeSuper.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapRegExp.js +0 -51
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/writeOnlyError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/extends.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/get.js +0 -11
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/getPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/identity.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/importDeferProxy.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inherits.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inheritsLoose.js +0 -5
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerDefineProperty.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerWarningHelper.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/instanceof.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireDefault.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireWildcard.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeFunction.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeReflectConstruct.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArray.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArrayLimit.js +0 -28
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/jsx.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/maybeArrayLike.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/newArrowCheck.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableRest.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableSpread.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nullishReceiverError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectDestructuringEmpty.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread.js +0 -14
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js +0 -23
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js +0 -13
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/possibleConstructorReturn.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/readOnlyError.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/regeneratorRuntime.js +0 -304
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/set.js +0 -22
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setFunctionName.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setPrototypeOf.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/skipFirstGeneratorNext.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/slicedToArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropBase.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropGet.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropSet.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteralLoose.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/tdz.js +0 -4
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalRef.js +0 -6
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalUndefined.js +0 -2
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toConsumableArray.js +0 -8
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js +0 -7
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toSetter.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/typeof.js +0 -10
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/unsupportedIterableToArray.js +0 -9
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/using.js +0 -12
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +0 -59
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js +0 -69
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapNativeSuper.js +0 -27
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapRegExp.js +0 -51
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/writeOnlyError.js +0 -4
- package/runtime/node_modules/@petamoriken/float16/LICENSE +0 -21
- package/runtime/node_modules/@petamoriken/float16/README.md +0 -413
- package/runtime/node_modules/@petamoriken/float16/browser/float16.js +0 -1340
- package/runtime/node_modules/@petamoriken/float16/browser/float16.mjs +0 -1325
- package/runtime/node_modules/@petamoriken/float16/index.d.ts +0 -546
- package/runtime/node_modules/@petamoriken/float16/index.v5.6.d.ts +0 -546
- package/runtime/node_modules/@petamoriken/float16/index.v5.7.d.ts +0 -555
- package/runtime/node_modules/@petamoriken/float16/inspect/node.cjs +0 -25
- package/runtime/node_modules/@petamoriken/float16/inspect/node.mjs +0 -23
- package/runtime/node_modules/@petamoriken/float16/lib/DataView.cjs +0 -16
- package/runtime/node_modules/@petamoriken/float16/lib/Float16Array.cjs +0 -690
- package/runtime/node_modules/@petamoriken/float16/lib/_util/arrayIterator.cjs +0 -52
- package/runtime/node_modules/@petamoriken/float16/lib/_util/brand.cjs +0 -27
- package/runtime/node_modules/@petamoriken/float16/lib/_util/converter.cjs +0 -111
- package/runtime/node_modules/@petamoriken/float16/lib/_util/is.cjs +0 -78
- package/runtime/node_modules/@petamoriken/float16/lib/_util/messages.cjs +0 -18
- package/runtime/node_modules/@petamoriken/float16/lib/_util/primordials.cjs +0 -150
- package/runtime/node_modules/@petamoriken/float16/lib/_util/spec.cjs +0 -84
- package/runtime/node_modules/@petamoriken/float16/lib/f16round.cjs +0 -10
- package/runtime/node_modules/@petamoriken/float16/lib/index.cjs +0 -16
- package/runtime/node_modules/@petamoriken/float16/lib/isTypedArray.cjs +0 -11
- package/runtime/node_modules/@petamoriken/float16/package.json +0 -115
- package/runtime/node_modules/@petamoriken/float16/src/DataView.mjs +0 -35
- package/runtime/node_modules/@petamoriken/float16/src/Float16Array.mjs +0 -1194
- package/runtime/node_modules/@petamoriken/float16/src/_util/arrayIterator.mjs +0 -86
- package/runtime/node_modules/@petamoriken/float16/src/_util/brand.mjs +0 -31
- package/runtime/node_modules/@petamoriken/float16/src/_util/converter.mjs +0 -173
- package/runtime/node_modules/@petamoriken/float16/src/_util/is.mjs +0 -151
- package/runtime/node_modules/@petamoriken/float16/src/_util/messages.mjs +0 -22
- package/runtime/node_modules/@petamoriken/float16/src/_util/primordials.mjs +0 -254
- package/runtime/node_modules/@petamoriken/float16/src/_util/spec.mjs +0 -137
- package/runtime/node_modules/@petamoriken/float16/src/f16round.mjs +0 -10
- package/runtime/node_modules/@petamoriken/float16/src/index.mjs +0 -7
- package/runtime/node_modules/@petamoriken/float16/src/isTypedArray.mjs +0 -10
- package/runtime/node_modules/jsbi/LICENSE +0 -176
- package/runtime/node_modules/jsbi/README.md +0 -173
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js +0 -2
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js.map +0 -1
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js +0 -2
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js.map +0 -1
- package/runtime/node_modules/jsbi/dist/jsbi.mjs +0 -2
- package/runtime/node_modules/jsbi/dist/jsbi.mjs.map +0 -1
- package/runtime/node_modules/jsbi/jsbi.d.ts +0 -43
- package/runtime/node_modules/jsbi/package.json +0 -35
- package/runtime/node_modules/urlpattern-polyfill/LICENSE +0 -19
- package/runtime/node_modules/urlpattern-polyfill/README.md +0 -242
- package/runtime/node_modules/urlpattern-polyfill/dist/index.d.ts +0 -9
- package/runtime/node_modules/urlpattern-polyfill/dist/types.d.ts +0 -49
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.cjs +0 -1
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.js +0 -1
- package/runtime/node_modules/urlpattern-polyfill/index.cjs +0 -7
- package/runtime/node_modules/urlpattern-polyfill/index.js +0 -7
- package/runtime/node_modules/urlpattern-polyfill/package.json +0 -149
- package/runtime/pnp-bin-run.cjs +0 -91
- package/runtime/pnp-util.cjs +0 -62
- package/runtime/polyfills.cjs +0 -278
- package/runtime/preload-async-hooks.mjs +0 -110
- package/runtime/preload-common.cjs +0 -1096
- package/runtime/preload.cjs +0 -313
- package/runtime/preload.mjs +0 -149
- package/runtime/transform-core.mjs +0 -756
- package/runtime/version.mjs +0 -12
- package/runtime/worker-blob-url.cjs +0 -116
- package/runtime/worker-polyfill.mjs +0 -541
package/bin/nub
CHANGED
|
Binary file
|
package/bin/nubx
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nubjs/nub-darwin-x64",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Nub binary for darwin-x64",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/nubjs/nub",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"x64"
|
|
12
12
|
],
|
|
13
13
|
"files": [
|
|
14
|
-
"bin"
|
|
15
|
-
"runtime"
|
|
14
|
+
"bin"
|
|
16
15
|
]
|
|
17
16
|
}
|
|
Binary file
|
package/runtime/cache-evict.mjs
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// Bounded-size eviction for the transpile cache (A16). Kept in its own module
|
|
2
|
-
// so it loads lazily — only when a sweep is actually due (see preload.mjs's
|
|
3
|
-
// throttled maybeSweepCache) — and so it can be tested in isolation.
|
|
4
|
-
//
|
|
5
|
-
// LRU by mtime: when the cache exceeds `maxBytes`, delete oldest-written entries
|
|
6
|
-
// until at or below `lowWater`. Entries are content-addressed, so evicting one
|
|
7
|
-
// only costs a re-transpile on next use. mtime reflects write time, not last
|
|
8
|
-
// read — true read-LRU would need an mtime touch on every cache hit, defeating
|
|
9
|
-
// the read-only fast path; oldest-written is the right, cheap proxy for a cache
|
|
10
|
-
// whose entries are written once per source version.
|
|
11
|
-
|
|
12
|
-
import { readdirSync, statSync, unlinkSync } from "node:fs";
|
|
13
|
-
import { join } from "node:path";
|
|
14
|
-
|
|
15
|
-
// A valid cache entry is a 64-char lowercase-hex sha256 (see cacheKey in
|
|
16
|
-
// preload.mjs). Everything else — the `.sweep` sentinel, `*.tmp` in-flight
|
|
17
|
-
// writes from cacheSet — is skipped: never counted toward the cap, never
|
|
18
|
-
// evicted.
|
|
19
|
-
const ENTRY_RE = /^[0-9a-f]{64}$/;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Evict oldest entries from `dir` until total entry bytes ≤ `lowWater`, if they
|
|
23
|
-
* exceed `maxBytes`. Returns `{ scanned, deleted, freed }`. Best-effort: a stat
|
|
24
|
-
* or unlink that fails (concurrent reader/evictor, Windows open handle) is
|
|
25
|
-
* skipped, and the next sweep retries. Never throws.
|
|
26
|
-
*/
|
|
27
|
-
export function sweepCache(dir, maxBytes, lowWater = Math.floor(maxBytes * 0.75)) {
|
|
28
|
-
let names;
|
|
29
|
-
try {
|
|
30
|
-
names = readdirSync(dir);
|
|
31
|
-
} catch {
|
|
32
|
-
return { scanned: 0, deleted: 0, freed: 0 };
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const entries = [];
|
|
36
|
-
let total = 0;
|
|
37
|
-
for (const name of names) {
|
|
38
|
-
if (!ENTRY_RE.test(name)) continue;
|
|
39
|
-
const path = join(dir, name);
|
|
40
|
-
const s = statSync(path, { throwIfNoEntry: false });
|
|
41
|
-
if (!s || !s.isFile()) continue;
|
|
42
|
-
entries.push({ path, size: s.size, mtime: s.mtimeMs });
|
|
43
|
-
total += s.size;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (total <= maxBytes) {
|
|
47
|
-
return { scanned: entries.length, deleted: 0, freed: 0 };
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Oldest first; delete down to the low-water mark so we don't sweep again on
|
|
51
|
-
// the very next write.
|
|
52
|
-
entries.sort((a, b) => a.mtime - b.mtime);
|
|
53
|
-
let deleted = 0;
|
|
54
|
-
let freed = 0;
|
|
55
|
-
for (const e of entries) {
|
|
56
|
-
if (total <= lowWater) break;
|
|
57
|
-
try {
|
|
58
|
-
unlinkSync(e.path);
|
|
59
|
-
total -= e.size;
|
|
60
|
-
freed += e.size;
|
|
61
|
-
deleted++;
|
|
62
|
-
} catch {
|
|
63
|
-
// Already removed by a concurrent sweep, or held open (Windows): skip.
|
|
64
|
-
// `total` is unchanged so we keep trying to reach lowWater via other
|
|
65
|
-
// entries; the loop is bounded by `entries`, so it still terminates.
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return { scanned: entries.length, deleted, freed };
|
|
69
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// R8 early step for the compat tier (--import preload.mjs). Restores
|
|
2
|
-
// NODE_COMPILE_CACHE into process.env as a SIDE EFFECT, and must be the FIRST
|
|
3
|
-
// import in preload.mjs so it runs before transform-core.mjs's module body — which
|
|
4
|
-
// reads `NODE_COMPILE_CACHE === "0"` as nub's transpile-cache disable signal.
|
|
5
|
-
//
|
|
6
|
-
// Why a separate module instead of a statement in preload.mjs: ESM `import`s are
|
|
7
|
-
// hoisted and their module bodies evaluate in source order BEFORE any statement in
|
|
8
|
-
// the importer. transform-core.mjs is imported in preload.mjs, so the only way to
|
|
9
|
-
// mutate process.env ahead of transform-core's evaluation is from a module imported
|
|
10
|
-
// earlier in source order. The fast tier (preload.cjs, CommonJS) has no such
|
|
11
|
-
// hoisting and calls common.restoreCompileCacheEnv() directly instead.
|
|
12
|
-
//
|
|
13
|
-
// spawn.rs strips NODE_COMPILE_CACHE from the child env (so Node's V8 compile cache
|
|
14
|
-
// never caches nub's preload chain) and stashes the original value in a PID-keyed
|
|
15
|
-
// sentinel file; here we read + delete it and put it back. Restoring it in JS does
|
|
16
|
-
// not re-enable Node's bootstrap compile cache. See preload-common.cjs
|
|
17
|
-
// (restoreCompileCacheEnv) for the full mechanism — this file just calls it.
|
|
18
|
-
import { createRequire } from "node:module";
|
|
19
|
-
|
|
20
|
-
const require_ = createRequire(import.meta.url);
|
|
21
|
-
require_("./preload-common.cjs").restoreCompileCacheEnv();
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// Compat-tier floor bootstrap: threads `node:module`'s `createRequire` into the
|
|
2
|
-
// modules that fetch their `node:` builtins via `process.getBuiltinModule`
|
|
3
|
-
// (transform-core.mjs, worker-polyfill.mjs) on the narrow FLOOR where that API is
|
|
4
|
-
// absent — WITHOUT any globalThis surface.
|
|
5
|
-
//
|
|
6
|
-
// WHY those modules can't fetch the builtin themselves: both are loaded on the fast
|
|
7
|
-
// tier via Node's `require(esm)`, which instantiates an ES module by walking its
|
|
8
|
-
// STATIC IMPORT graph through whatever ESM loader chain is registered — including the
|
|
9
|
-
// USER's `--experimental-loader` / `module.register` hooks. A static `import {
|
|
10
|
-
// createRequire } from "node:module"` in either file therefore routed the builtin
|
|
11
|
-
// through the user chain, and a user resolve/load hook that rejects or rewrites
|
|
12
|
-
// `node:module` exploded nub's own load (observed against es-module/test-esm-example-
|
|
13
|
-
// loader and the loader-chaining corpus). So they fetch builtins via
|
|
14
|
-
// `process.getBuiltinModule` (synchronous, OFF the loader chain, no static import).
|
|
15
|
-
//
|
|
16
|
-
// `process.getBuiltinModule` only exists from Node 22.3 / 20.16 / 18.20.4. On the
|
|
17
|
-
// narrow FLOOR below that (18.19.x, 20.11–20.15, 22.0–22.2) it is `undefined`, so the
|
|
18
|
-
// floor needs another way to reach `node:module`'s `createRequire`. This file is that
|
|
19
|
-
// fallback: it holds the LONE static `import { createRequire } from "node:module"`
|
|
20
|
-
// and hands the value to transform-core / worker-polyfill through their module-scoped
|
|
21
|
-
// SETTERS (no globalThis surface — a `globalThis.__nub*` sentinel is the same brand
|
|
22
|
-
// leak as a NUB_* env var, enumerable in user code AND worker realms, so it is
|
|
23
|
-
// forbidden; this threading honors the same enumeration-invisibility contract every
|
|
24
|
-
// other nub polyfill keeps).
|
|
25
|
-
//
|
|
26
|
-
// WHY THIS IS LEAK-SAFE WHERE the static import in transform-core/worker-polyfill WAS
|
|
27
|
-
// NOT: this module is imported ONLY by the compat-tier entries (preload.mjs and
|
|
28
|
-
// preload-async-hooks.mjs), AHEAD of transform-core/worker-polyfill in their source
|
|
29
|
-
// order. The FAST tier (preload.cjs) loads those via `require(esm)` directly and never
|
|
30
|
-
// touches preload.mjs / preload-async-hooks.mjs — so this file's static `node:module`
|
|
31
|
-
// import never enters the fast-tier `require(esm)` graph, and the user loader chain
|
|
32
|
-
// can never observe it. On the compat tier the loader hooks run in nub's OWN worker
|
|
33
|
-
// (preload-async-hooks) or on the main thread before any user `--loader` could
|
|
34
|
-
// intercept a bare `node:` builtin, both off the user chain — so the static import is
|
|
35
|
-
// harmless exactly where it's reachable.
|
|
36
|
-
//
|
|
37
|
-
// IMPORT ORDERING (load-bearing): the compat entries import this file BEFORE
|
|
38
|
-
// transform-core/worker-polyfill, but ES modules evaluate the importEE before the
|
|
39
|
-
// importer's body — so transform-core's body has ALREADY run by the time the setter
|
|
40
|
-
// calls below fire (during THIS module's evaluation). That is fine: transform-core
|
|
41
|
-
// acquires its floor builtins lazily and `setBootstrapCreateRequire` triggers that
|
|
42
|
-
// acquisition immediately, so every binding is ready before the entry body and long
|
|
43
|
-
// before any hook fires. On Node WITH getBuiltinModule this file is a near no-op (the
|
|
44
|
-
// setters are called but those modules never consult `_bootstrapCreateRequire`).
|
|
45
|
-
import { createRequire } from "node:module";
|
|
46
|
-
import { setBootstrapCreateRequire as setTransformCoreCreateRequire } from "./transform-core.mjs";
|
|
47
|
-
|
|
48
|
-
// The floor's `createRequire`, exported so the compat entries (and any future floor
|
|
49
|
-
// consumer) can thread it elsewhere without re-importing `node:module` into their own
|
|
50
|
-
// static graph.
|
|
51
|
-
export { createRequire };
|
|
52
|
-
|
|
53
|
-
// Thread it into transform-core unconditionally (the setter no-ops the floor branch
|
|
54
|
-
// on Node WITH getBuiltinModule). worker-polyfill's setter is wired by the entries
|
|
55
|
-
// themselves, AFTER they import worker-polyfill, since worker-polyfill is loaded later
|
|
56
|
-
// in the entry's flow (via dynamic import) than this static import runs.
|
|
57
|
-
setTransformCoreCreateRequire(createRequire);
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
// Web Locks API polyfill for Node < 24.5 (native on Node 24.5+, #58666).
|
|
2
|
-
// Single-process only — locks don't coordinate across worker threads (a deliberate
|
|
3
|
-
// scope: the common in-process serialization use is covered; cross-thread coordination
|
|
4
|
-
// would need a SharedArrayBuffer waitlist and is out of scope until there's demand).
|
|
5
|
-
//
|
|
6
|
-
// Spec: https://w3c.github.io/web-locks/. Modeled to match Node's own
|
|
7
|
-
// internal/locks.js (the native impl on 24.5+) so behavior is identical across the
|
|
8
|
-
// version boundary — including `steal`, AbortSignal integration, and the option/name
|
|
9
|
-
// validation that the WPT web-locks suite exercises. Requires a `navigator` object to
|
|
10
|
-
// host `navigator.locks`; navigator-shim.mjs backfills that on Node < 21 and MUST run
|
|
11
|
-
// first.
|
|
12
|
-
|
|
13
|
-
if (typeof globalThis.navigator === "object" && typeof globalThis.navigator.locks === "undefined") {
|
|
14
|
-
const AbortSig = globalThis.AbortSignal;
|
|
15
|
-
|
|
16
|
-
const abortError = (msg) => new DOMException(msg || "The operation was aborted", "AbortError");
|
|
17
|
-
const stolenError = () => abortError("The lock was stolen by another request");
|
|
18
|
-
const notSupported = (msg) => new DOMException(msg, "NotSupportedError");
|
|
19
|
-
|
|
20
|
-
class Lock {
|
|
21
|
-
#name;
|
|
22
|
-
#mode;
|
|
23
|
-
constructor(name, mode) {
|
|
24
|
-
this.#name = name;
|
|
25
|
-
this.#mode = mode;
|
|
26
|
-
}
|
|
27
|
-
get name() { return this.#name; }
|
|
28
|
-
get mode() { return this.#mode; }
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// held: name → { mode, holders:Set<Holder> }. A shared grant has N holders sharing
|
|
32
|
-
// one record; an exclusive grant has exactly one. queue: name → Array<Waiter> (FIFO).
|
|
33
|
-
const held = new Map();
|
|
34
|
-
const queue = new Map();
|
|
35
|
-
|
|
36
|
-
function canAcquire(name, mode) {
|
|
37
|
-
const rec = held.get(name);
|
|
38
|
-
if (!rec) return true;
|
|
39
|
-
return mode === "shared" && rec.mode === "shared";
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// A FRESH request may be granted immediately only when no waiters are already
|
|
43
|
-
// queued for the name — otherwise it must queue behind them. This is the
|
|
44
|
-
// reader/writer FAIRNESS rule: a new shared request must NOT barge ahead of a
|
|
45
|
-
// pending exclusive request and join the current shared holders, which would
|
|
46
|
-
// starve the writer (WPT mode-mixed "An exclusive lock between shared locks").
|
|
47
|
-
// drainQueue, which only ever grants from the FRONT of the queue, keeps using
|
|
48
|
-
// canAcquire directly.
|
|
49
|
-
function canGrantNow(name, mode) {
|
|
50
|
-
const q = queue.get(name);
|
|
51
|
-
if (q && q.length > 0) return false;
|
|
52
|
-
return canAcquire(name, mode);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function addHolder(name, mode, holder) {
|
|
56
|
-
const rec = held.get(name);
|
|
57
|
-
if (rec) rec.holders.add(holder);
|
|
58
|
-
else held.set(name, { mode, holders: new Set([holder]) });
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function removeHolder(name, holder) {
|
|
62
|
-
const rec = held.get(name);
|
|
63
|
-
if (!rec) return;
|
|
64
|
-
rec.holders.delete(holder);
|
|
65
|
-
if (rec.holders.size === 0) held.delete(name);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function enqueue(name, waiter) {
|
|
69
|
-
let q = queue.get(name);
|
|
70
|
-
if (!q) queue.set(name, (q = []));
|
|
71
|
-
q.push(waiter);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Grant as many head-of-queue waiters as the current held state allows: a head
|
|
75
|
-
// exclusive takes the lock alone; a run of head shared waiters is all granted.
|
|
76
|
-
function drainQueue(name) {
|
|
77
|
-
const q = queue.get(name);
|
|
78
|
-
if (!q || q.length === 0) return;
|
|
79
|
-
while (q.length > 0) {
|
|
80
|
-
const first = q[0];
|
|
81
|
-
if (!canAcquire(name, first.mode)) break;
|
|
82
|
-
q.shift();
|
|
83
|
-
first.grant(); // synchronously addHolders, so canAcquire reflects it next iter
|
|
84
|
-
if (first.mode === "exclusive") break;
|
|
85
|
-
}
|
|
86
|
-
if (q.length === 0) queue.delete(name);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Run `cb(lock)` as a holder of (name, mode); return the promise that settles when
|
|
90
|
-
// the holder releases (cb's result/throw) — or rejects early if a steal BREAKS it.
|
|
91
|
-
// The callback is invoked one microtask later (matching Node), so a synchronously
|
|
92
|
-
// signaled abort is observed before the callback runs.
|
|
93
|
-
function runHolder(name, mode, cb) {
|
|
94
|
-
const lock = new Lock(name, mode);
|
|
95
|
-
let broken = false;
|
|
96
|
-
let rejectReleased;
|
|
97
|
-
const holder = {
|
|
98
|
-
mode,
|
|
99
|
-
break(reason) {
|
|
100
|
-
if (broken) return;
|
|
101
|
-
broken = true;
|
|
102
|
-
// Remove WITHOUT draining — the stealer takes the lock next; queued waiters
|
|
103
|
-
// stay pending until the steal's own holder releases.
|
|
104
|
-
removeHolder(name, holder);
|
|
105
|
-
rejectReleased(reason);
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
addHolder(name, mode, holder);
|
|
109
|
-
return new Promise((resolve, reject) => {
|
|
110
|
-
rejectReleased = reject;
|
|
111
|
-
Promise.resolve()
|
|
112
|
-
.then(() => cb(lock))
|
|
113
|
-
.then(
|
|
114
|
-
(value) => { if (!broken) { removeHolder(name, holder); resolve(value); drainQueue(name); } },
|
|
115
|
-
(err) => { if (!broken) { removeHolder(name, holder); reject(err); drainQueue(name); } },
|
|
116
|
-
);
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// The lock engine: returns the `released` promise. `cb` receives the granted Lock
|
|
121
|
-
// (or null on an ifAvailable miss). Mirrors the grant/steal/ifAvailable/queue shape
|
|
122
|
-
// of Node's internalBinding('locks').request.
|
|
123
|
-
function engineRequest(name, mode, steal, ifAvailable, cb) {
|
|
124
|
-
if (steal) {
|
|
125
|
-
const rec = held.get(name);
|
|
126
|
-
if (rec) for (const h of [...rec.holders]) h.break(stolenError());
|
|
127
|
-
return runHolder(name, "exclusive", cb);
|
|
128
|
-
}
|
|
129
|
-
if (canGrantNow(name, mode)) {
|
|
130
|
-
return runHolder(name, mode, cb);
|
|
131
|
-
}
|
|
132
|
-
if (ifAvailable) {
|
|
133
|
-
return Promise.resolve().then(() => cb(null));
|
|
134
|
-
}
|
|
135
|
-
return new Promise((resolve, reject) => {
|
|
136
|
-
const waiter = {
|
|
137
|
-
mode,
|
|
138
|
-
settled: false,
|
|
139
|
-
grant() {
|
|
140
|
-
if (waiter.settled) return;
|
|
141
|
-
waiter.settled = true;
|
|
142
|
-
runHolder(name, mode, cb).then(resolve, reject);
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
enqueue(name, waiter);
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
class LockManager {
|
|
150
|
-
async request(name, optionsOrCallback, maybeCallback) {
|
|
151
|
-
let options = optionsOrCallback;
|
|
152
|
-
let callback = maybeCallback;
|
|
153
|
-
if (callback === undefined) {
|
|
154
|
-
callback = options;
|
|
155
|
-
options = undefined;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// WebIDL DOMString coercion (throws TypeError on a Symbol, like the binding).
|
|
159
|
-
name = `${name}`;
|
|
160
|
-
if (typeof callback !== "function") {
|
|
161
|
-
throw new TypeError("Failed to execute 'request' on 'LockManager': parameter 2 is not a function.");
|
|
162
|
-
}
|
|
163
|
-
if (options === undefined || typeof options === "function") options = {};
|
|
164
|
-
|
|
165
|
-
const mode = options.mode === undefined ? "exclusive" : options.mode;
|
|
166
|
-
if (mode !== "exclusive" && mode !== "shared") {
|
|
167
|
-
throw new TypeError(`Failed to execute 'request' on 'LockManager': '${mode}' is not a valid value for enumeration LockMode.`);
|
|
168
|
-
}
|
|
169
|
-
const ifAvailable = !!options.ifAvailable;
|
|
170
|
-
const steal = !!options.steal;
|
|
171
|
-
const signal = options.signal;
|
|
172
|
-
if (signal !== undefined && signal !== null && !(AbortSig && signal instanceof AbortSig)) {
|
|
173
|
-
throw new TypeError("Failed to execute 'request' on 'LockManager': member signal is not of type AbortSignal.");
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// Already-aborted signal rejects with its reason BEFORE the option-combo checks
|
|
177
|
-
// (matching Node's signal.throwIfAborted() ordering).
|
|
178
|
-
if (signal && signal.aborted) {
|
|
179
|
-
throw signal.reason || abortError();
|
|
180
|
-
}
|
|
181
|
-
if (name[0] === "-") {
|
|
182
|
-
throw notSupported("Lock name may not start with hyphen '-'");
|
|
183
|
-
}
|
|
184
|
-
if (ifAvailable && steal) {
|
|
185
|
-
throw notSupported("ifAvailable and steal options cannot be used together");
|
|
186
|
-
}
|
|
187
|
-
if (mode !== "exclusive" && steal) {
|
|
188
|
-
throw notSupported("mode must be 'exclusive' when using the steal option");
|
|
189
|
-
}
|
|
190
|
-
if (signal && (steal || ifAvailable)) {
|
|
191
|
-
throw notSupported("signal cannot be used with the steal or ifAvailable options");
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// Signal path: the callback is deferred and skipped if the signal aborts before
|
|
195
|
-
// it runs; the abort rejects the OUTER promise iff the callback hasn't entered
|
|
196
|
-
// (lockGranted false). Verbatim shape of Node's internal/locks.js so a queued
|
|
197
|
-
// abort releases the slot (callback skipped) and the next waiter is granted.
|
|
198
|
-
if (signal) {
|
|
199
|
-
return new Promise((resolve, reject) => {
|
|
200
|
-
let lockGranted = false;
|
|
201
|
-
const onAbort = () => {
|
|
202
|
-
if (!lockGranted) reject(signal.reason || abortError());
|
|
203
|
-
};
|
|
204
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
205
|
-
const wrapped = (lock) =>
|
|
206
|
-
Promise.resolve().then(() => {
|
|
207
|
-
if (signal.aborted) return undefined;
|
|
208
|
-
lockGranted = true;
|
|
209
|
-
return callback(lock);
|
|
210
|
-
});
|
|
211
|
-
const released = engineRequest(name, mode, false, false, wrapped);
|
|
212
|
-
released.then(resolve, reject).finally(() => signal.removeEventListener("abort", onAbort));
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return engineRequest(name, mode, steal, ifAvailable, (lock) => callback(lock));
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
async query() {
|
|
220
|
-
// clientId is per-realm and opaque: `node-<pid>-0` (single-process; this polyfill
|
|
221
|
-
// does not coordinate across worker threads, so the threadId slot is always 0 —
|
|
222
|
-
// and we avoid importing node:worker_threads to keep this module builtin-free for a
|
|
223
|
-
// cheap bootstrap). The cross-context distinct-id WPT cases are browser-specific.
|
|
224
|
-
const clientId = `node-${process.pid}-0`;
|
|
225
|
-
const heldOut = [];
|
|
226
|
-
for (const [name, rec] of held) {
|
|
227
|
-
for (let i = 0; i < rec.holders.size; i++) heldOut.push({ name, mode: rec.mode, clientId });
|
|
228
|
-
}
|
|
229
|
-
const pending = [];
|
|
230
|
-
for (const [name, q] of queue) {
|
|
231
|
-
for (const w of q) if (!w.settled) pending.push({ name, mode: w.mode, clientId });
|
|
232
|
-
}
|
|
233
|
-
return { held: heldOut, pending };
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
Object.defineProperty(globalThis.navigator, "locks", {
|
|
238
|
-
value: new LockManager(),
|
|
239
|
-
enumerable: true,
|
|
240
|
-
configurable: true,
|
|
241
|
-
});
|
|
242
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
// `navigator` global backfill for Node < 21 (where the global is wholly absent).
|
|
2
|
-
//
|
|
3
|
-
// Node ships `globalThis.navigator` from 21.0.0. Below that it is `undefined`, so
|
|
4
|
-
// any web-platform API hosted ON navigator — chiefly `navigator.locks` (Web Locks,
|
|
5
|
-
// see navigator-locks.mjs) — has no object to attach to and silently does nothing.
|
|
6
|
-
// nub's floor is 18.19, so to make those APIs reach the floor we synthesize the
|
|
7
|
-
// `navigator` object Node 21+ would provide. Companion to navigator-locks.mjs:
|
|
8
|
-
// this MUST run BEFORE it so locks has a host on 18.19–20.x.
|
|
9
|
-
//
|
|
10
|
-
// Shape mirrors Node's internal/navigator.js: a `Navigator` instance with the
|
|
11
|
-
// enumerable prototype getters `hardwareConcurrency`, `language`, `languages`,
|
|
12
|
-
// `userAgent`, `platform` (locks is added separately by navigator-locks.mjs). The
|
|
13
|
-
// userAgent is `Node.js/<major>` — NEVER `Nub/…`: the user is running Node, nub is
|
|
14
|
-
// the augmenter, and a `Nub/` UA would be a brand-boundary leak.
|
|
15
|
-
//
|
|
16
|
-
// VERSION-GATE, not a global read: installNavigatorShim() returns early on Node >= 21
|
|
17
|
-
// from `process.versions.node` WITHOUT ever touching `globalThis.navigator`. That
|
|
18
|
-
// matters because on Node 24.5+ the native `navigator` is a lazy getter whose first
|
|
19
|
-
// access realizes ~30 internal/stream/worker-io builtins — a cold-start regression
|
|
20
|
-
// (test-bootstrap-modules). The shim must never trigger that; the version check makes
|
|
21
|
-
// the fast tier (>= 22.15, navigator always present) a free no-op.
|
|
22
|
-
//
|
|
23
|
-
// node: builtins (node:os) are fetched via `process.getBuiltinModule` when present,
|
|
24
|
-
// else via a createRequire THREADED IN through `setBootstrapCreateRequire` — the same
|
|
25
|
-
// brand-safe, off-the-user-loader-chain pattern worker-polyfill.mjs uses. The narrow
|
|
26
|
-
// floor (18.19.x, 20.11–20.15) lacks `process.getBuiltinModule`, and the shim only
|
|
27
|
-
// touches os lazily (the `hardwareConcurrency` getter), so the threaded require is
|
|
28
|
-
// needed exactly there. `os` is never loaded on Node >= 21 (the early return).
|
|
29
|
-
|
|
30
|
-
let _bootstrapCreateRequire = null;
|
|
31
|
-
export function setBootstrapCreateRequire(fn) {
|
|
32
|
-
_bootstrapCreateRequire = fn;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function __getBuiltin(id) {
|
|
36
|
-
if (typeof process.getBuiltinModule === "function") return process.getBuiltinModule(id);
|
|
37
|
-
if (_bootstrapCreateRequire) return _bootstrapCreateRequire(import.meta.url)(id);
|
|
38
|
-
// Last-resort: a bare specifier require off this module's own createRequire is
|
|
39
|
-
// unavailable in ESM without node:module, which is exactly what the threading
|
|
40
|
-
// avoids importing statically. If neither path is wired, surface a clear error.
|
|
41
|
-
throw new Error("navigator-shim: no builtin accessor for " + id);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function deriveLanguage() {
|
|
45
|
-
// Approximate Node's ICU default locale from the POSIX locale env, falling back
|
|
46
|
-
// to "en-US" (Node's own fallback). `en_US.UTF-8` → `en-US`.
|
|
47
|
-
const raw =
|
|
48
|
-
process.env.LC_ALL || process.env.LC_MESSAGES || process.env.LANG || "";
|
|
49
|
-
const base = raw.split(".")[0].split("@")[0].replace("_", "-");
|
|
50
|
-
return base && base !== "C" && base !== "POSIX" ? base : "en-US";
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function navigatorPlatform(platform, arch) {
|
|
54
|
-
// Mirror node/lib/internal/navigator.js getNavigatorPlatform.
|
|
55
|
-
if (platform === "darwin") return "MacIntel";
|
|
56
|
-
if (platform === "win32") return "Win32";
|
|
57
|
-
if (platform === "linux") {
|
|
58
|
-
if (arch === "ia32") return "Linux i686";
|
|
59
|
-
if (arch === "x64") return "Linux x86_64";
|
|
60
|
-
return `Linux ${arch}`;
|
|
61
|
-
}
|
|
62
|
-
if (platform === "freebsd") return arch === "ia32" ? "FreeBSD i386" : arch === "x64" ? "FreeBSD amd64" : `FreeBSD ${arch}`;
|
|
63
|
-
if (platform === "openbsd") return arch === "ia32" ? "OpenBSD i386" : arch === "x64" ? "OpenBSD amd64" : `OpenBSD ${arch}`;
|
|
64
|
-
if (platform === "sunos") return arch === "ia32" ? "SunOS i86pc" : `SunOS ${arch}`;
|
|
65
|
-
if (platform === "aix") return "AIX";
|
|
66
|
-
return `${platform[0].toUpperCase()}${platform.slice(1)} ${arch}`;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Build the Navigator class lazily (only when actually backfilling) so loading this
|
|
70
|
-
// module on the fast tier costs nothing beyond the early-return check.
|
|
71
|
-
function makeNavigator() {
|
|
72
|
-
let _hw, _lang, _langs, _ua, _plat;
|
|
73
|
-
class Navigator {
|
|
74
|
-
get hardwareConcurrency() {
|
|
75
|
-
// os.availableParallelism honors cgroup CPU limits (Node 18.14+/19.4+; present
|
|
76
|
-
// on the 18.19 floor); fall back to cpus().length on the off chance it's absent.
|
|
77
|
-
if (_hw === undefined) {
|
|
78
|
-
const os = __getBuiltin("node:os");
|
|
79
|
-
_hw = typeof os.availableParallelism === "function" ? os.availableParallelism() : os.cpus().length;
|
|
80
|
-
}
|
|
81
|
-
return _hw;
|
|
82
|
-
}
|
|
83
|
-
get language() {
|
|
84
|
-
return (_lang ??= deriveLanguage());
|
|
85
|
-
}
|
|
86
|
-
get languages() {
|
|
87
|
-
return (_langs ??= Object.freeze([this.language]));
|
|
88
|
-
}
|
|
89
|
-
get userAgent() {
|
|
90
|
-
// `Node.js/<major>` — match Node exactly; never a nub-branded UA.
|
|
91
|
-
return (_ua ??= `Node.js/${process.versions.node.split(".")[0]}`);
|
|
92
|
-
}
|
|
93
|
-
get platform() {
|
|
94
|
-
return (_plat ??= navigatorPlatform(process.platform, process.arch));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
// Match Node's instance shape: the property getters live on the prototype and are
|
|
98
|
-
// ENUMERABLE (Node sets them with kEnumerableProperty), so `for (const k in
|
|
99
|
-
// navigator)` walks them while `Object.keys(navigator)` (own enumerable) is empty.
|
|
100
|
-
// Class-body getters default to enumerable:false, so flip them in place.
|
|
101
|
-
for (const k of ["hardwareConcurrency", "language", "languages", "userAgent", "platform"]) {
|
|
102
|
-
Object.defineProperty(Navigator.prototype, k, { enumerable: true });
|
|
103
|
-
}
|
|
104
|
-
return { Navigator, instance: new Navigator() };
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Install the navigator backfill if and only if the running Node lacks the global
|
|
108
|
-
// (i.e. Node < 21). Idempotent and side-effect-free on Node >= 21.
|
|
109
|
-
export function installNavigatorShim() {
|
|
110
|
-
const major = parseInt(process.versions.node.split(".")[0], 10);
|
|
111
|
-
// Node 21+ ships navigator natively — never read the (possibly lazy) global here.
|
|
112
|
-
if (major >= 21) return;
|
|
113
|
-
// Defensive idempotency for the < 21 path (navigator is genuinely undefined there,
|
|
114
|
-
// so this read can't trigger a lazy realization).
|
|
115
|
-
if (typeof globalThis.navigator !== "undefined") return;
|
|
116
|
-
|
|
117
|
-
const { Navigator, instance } = makeNavigator();
|
|
118
|
-
|
|
119
|
-
// The binding on globalThis is NON-ENUMERABLE (invisible to Object.keys(globalThis)
|
|
120
|
-
// / for-in) — nub's additive-global contract, matching how reportError and Worker
|
|
121
|
-
// are installed. Configurable + writable so user code may still override it.
|
|
122
|
-
Object.defineProperty(globalThis, "navigator", {
|
|
123
|
-
value: instance,
|
|
124
|
-
enumerable: false,
|
|
125
|
-
writable: true,
|
|
126
|
-
configurable: true,
|
|
127
|
-
});
|
|
128
|
-
// Node also exposes the `Navigator` constructor globally; mirror it (non-enumerable).
|
|
129
|
-
if (typeof globalThis.Navigator === "undefined") {
|
|
130
|
-
Object.defineProperty(globalThis, "Navigator", {
|
|
131
|
-
value: Navigator,
|
|
132
|
-
enumerable: false,
|
|
133
|
-
writable: true,
|
|
134
|
-
configurable: true,
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// Fast tier / modern compat (getBuiltinModule present, Node >= 20.16): install eagerly
|
|
140
|
-
// at module eval — a guaranteed no-op above Node 21 thanks to the version gate, and
|
|
141
|
-
// correct on a 20.16–20.x compat run where navigator is still absent. On the narrow
|
|
142
|
-
// floor below getBuiltinModule the compat entry calls setBootstrapCreateRequire(...)
|
|
143
|
-
// + installNavigatorShim() explicitly (mirroring worker-polyfill's wiring).
|
|
144
|
-
if (typeof process.getBuiltinModule === "function") installNavigatorShim();
|