@nubjs/nub-linux-x64 0.0.5 → 0.0.8
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/package.json +1 -1
- package/runtime/addons/nub-native.node +0 -0
- package/runtime/cache-evict.mjs +69 -0
- package/runtime/node_modules/@js-temporal/polyfill/CHANGELOG.md +453 -0
- package/runtime/node_modules/@js-temporal/polyfill/LICENSE +13 -0
- package/runtime/node_modules/@js-temporal/polyfill/README.md +90 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs +2 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs.map +1 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js +2 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +1 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js +2 -0
- package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +1 -0
- package/runtime/node_modules/@js-temporal/polyfill/index.d.cts +1215 -0
- package/runtime/node_modules/@js-temporal/polyfill/index.d.ts +1215 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/assert.ts +8 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +39 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/calendar.ts +2424 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/debug.ts +7 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/duration.ts +438 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +93 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +4973 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/index.ts +34 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/init.ts +43 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/instant.ts +138 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +242 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/intl.ts +758 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +162 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/legacydate.ts +17 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/math.ts +96 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/now.ts +48 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindate.ts +212 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +274 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +110 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plaintime.ts +154 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +157 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/regex.ts +59 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/slots.ts +341 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/temporal.ts +10 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/timeduration.ts +149 -0
- package/runtime/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +492 -0
- package/runtime/node_modules/@js-temporal/polyfill/package.json +143 -0
- package/runtime/node_modules/@oxc-parser/binding-linux-x64-gnu/README.md +3 -0
- package/runtime/node_modules/@oxc-parser/binding-linux-x64-gnu/package.json +42 -0
- package/runtime/node_modules/@oxc-parser/binding-linux-x64-gnu/parser.linux-x64-gnu.node +0 -0
- package/runtime/node_modules/@oxc-project/runtime/CHANGELOG.md +88 -0
- package/runtime/node_modules/@oxc-project/runtime/LICENSE +22 -0
- package/runtime/node_modules/@oxc-project/runtime/README.md +5 -0
- package/runtime/node_modules/@oxc-project/runtime/package.json +1066 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/AwaitValue.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecoratedDescriptor.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs.js +236 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203.js +184 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203R.js +191 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2301.js +222 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2305.js +133 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2311.js +124 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayLikeToArray.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithHoles.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithoutHoles.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertClassBrand.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertThisInitialized.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js +24 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js +45 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncToGenerator.js +26 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/callSuper.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkInRHS.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkPrivateRedeclaration.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorDestructureSet.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorGet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCallCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticAccess.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticFieldDescriptor.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classExtractFieldDescriptor.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classNameTDZError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseBase.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseKey.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateGetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateSetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/construct.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createClass.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelper.js +50 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelperLoose.js +19 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/createSuper.js +16 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorate.js +23 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateMetadata.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateParam.js +11 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defaults.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineAccessor.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineEnumerableProperties.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/dispose.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/AwaitValue.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/OverloadYield.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecoratedDescriptor.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs.js +236 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203.js +184 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203R.js +191 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2301.js +222 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2305.js +133 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2311.js +124 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayLikeToArray.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithHoles.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithoutHoles.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertClassBrand.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertThisInitialized.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncGeneratorDelegate.js +24 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncIterator.js +45 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncToGenerator.js +26 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/awaitAsyncGenerator.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/callSuper.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkInRHS.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkPrivateRedeclaration.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorDestructureSet.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorGet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCallCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticAccess.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classExtractFieldDescriptor.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classNameTDZError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseBase.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseKey.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet2.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateGetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodInitSpec.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateSetter.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldDestructureSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecGet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecSet.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodGet.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodSet.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/construct.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createClass.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelper.js +50 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createSuper.js +16 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js +21 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateMetadata.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateParam.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defaults.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineAccessor.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineEnumerableProperties.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/dispose.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/extends.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/get.js +11 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/getPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/identity.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/importDeferProxy.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inherits.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inheritsLoose.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerDefineProperty.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerWarningHelper.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/instanceof.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireDefault.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireWildcard.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeFunction.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeReflectConstruct.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArray.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArrayLimit.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/jsx.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/maybeArrayLike.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/newArrowCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableRest.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableSpread.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nullishReceiverError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectDestructuringEmpty.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread2.js +23 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutProperties.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutPropertiesLoose.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/package.json +3 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/possibleConstructorReturn.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/readOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/regeneratorRuntime.js +304 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/set.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setFunctionName.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/skipFirstGeneratorNext.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/slicedToArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropBase.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropGet.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropSet.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteral.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteralLoose.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/tdz.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalRef.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalUndefined.js +2 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toConsumableArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toSetter.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/unsupportedIterableToArray.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/using.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/usingCtx.js +59 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapAsyncGenerator.js +69 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapNativeSuper.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapRegExp.js +51 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/writeOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/extends.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/get.js +11 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/getPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/identity.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/importDeferProxy.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inherits.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/inheritsLoose.js +5 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerDefineProperty.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerWarningHelper.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/instanceof.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireDefault.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireWildcard.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeFunction.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeReflectConstruct.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArray.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArrayLimit.js +28 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/jsx.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/maybeArrayLike.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/newArrowCheck.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableRest.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableSpread.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/nullishReceiverError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectDestructuringEmpty.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread.js +14 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js +23 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js +13 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/possibleConstructorReturn.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/readOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/regeneratorRuntime.js +304 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/set.js +22 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setFunctionName.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/setPrototypeOf.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/skipFirstGeneratorNext.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/slicedToArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropBase.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropGet.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropSet.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteralLoose.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/tdz.js +4 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalRef.js +6 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalUndefined.js +2 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toConsumableArray.js +8 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js +7 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/toSetter.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/typeof.js +10 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/unsupportedIterableToArray.js +9 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/using.js +12 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +59 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js +69 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapNativeSuper.js +27 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapRegExp.js +51 -0
- package/runtime/node_modules/@oxc-project/runtime/src/helpers/writeOnlyError.js +4 -0
- package/runtime/node_modules/@oxc-project/types/LICENSE +22 -0
- package/runtime/node_modules/@oxc-project/types/README.md +3 -0
- package/runtime/node_modules/@oxc-project/types/package.json +26 -0
- package/runtime/node_modules/@oxc-project/types/types.d.ts +1912 -0
- package/runtime/node_modules/@petamoriken/float16/LICENSE +21 -0
- package/runtime/node_modules/@petamoriken/float16/README.md +413 -0
- package/runtime/node_modules/@petamoriken/float16/browser/float16.js +1340 -0
- package/runtime/node_modules/@petamoriken/float16/browser/float16.mjs +1325 -0
- package/runtime/node_modules/@petamoriken/float16/index.d.ts +546 -0
- package/runtime/node_modules/@petamoriken/float16/index.v5.6.d.ts +546 -0
- package/runtime/node_modules/@petamoriken/float16/index.v5.7.d.ts +555 -0
- package/runtime/node_modules/@petamoriken/float16/inspect/node.cjs +25 -0
- package/runtime/node_modules/@petamoriken/float16/inspect/node.mjs +23 -0
- package/runtime/node_modules/@petamoriken/float16/lib/DataView.cjs +16 -0
- package/runtime/node_modules/@petamoriken/float16/lib/Float16Array.cjs +690 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/arrayIterator.cjs +52 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/brand.cjs +27 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/converter.cjs +111 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/is.cjs +78 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/messages.cjs +18 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/primordials.cjs +150 -0
- package/runtime/node_modules/@petamoriken/float16/lib/_util/spec.cjs +84 -0
- package/runtime/node_modules/@petamoriken/float16/lib/f16round.cjs +10 -0
- package/runtime/node_modules/@petamoriken/float16/lib/index.cjs +16 -0
- package/runtime/node_modules/@petamoriken/float16/lib/isTypedArray.cjs +11 -0
- package/runtime/node_modules/@petamoriken/float16/package.json +115 -0
- package/runtime/node_modules/@petamoriken/float16/src/DataView.mjs +35 -0
- package/runtime/node_modules/@petamoriken/float16/src/Float16Array.mjs +1194 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/arrayIterator.mjs +86 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/brand.mjs +31 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/converter.mjs +173 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/is.mjs +151 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/messages.mjs +22 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/primordials.mjs +254 -0
- package/runtime/node_modules/@petamoriken/float16/src/_util/spec.mjs +137 -0
- package/runtime/node_modules/@petamoriken/float16/src/f16round.mjs +10 -0
- package/runtime/node_modules/@petamoriken/float16/src/index.mjs +7 -0
- package/runtime/node_modules/@petamoriken/float16/src/isTypedArray.mjs +10 -0
- package/runtime/node_modules/jsbi/LICENSE +176 -0
- package/runtime/node_modules/jsbi/README.md +173 -0
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js +2 -0
- package/runtime/node_modules/jsbi/dist/jsbi-cjs.js.map +1 -0
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js +2 -0
- package/runtime/node_modules/jsbi/dist/jsbi-umd.js.map +1 -0
- package/runtime/node_modules/jsbi/dist/jsbi.mjs +2 -0
- package/runtime/node_modules/jsbi/dist/jsbi.mjs.map +1 -0
- package/runtime/node_modules/jsbi/jsbi.d.ts +43 -0
- package/runtime/node_modules/jsbi/package.json +35 -0
- package/runtime/node_modules/oxc-parser/LICENSE +22 -0
- package/runtime/node_modules/oxc-parser/README.md +167 -0
- package/runtime/node_modules/oxc-parser/package.json +153 -0
- package/runtime/node_modules/oxc-parser/src-js/bindings.js +601 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/constants.js +105 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js.js +5862 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js_range.js +6403 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts.js +6154 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts_range.js +6723 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/constructors.js +13875 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/type_ids.js +191 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/lazy/walk.js +5810 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/keys.js +220 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/type_ids.js +177 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts +387 -0
- package/runtime/node_modules/oxc-parser/src-js/generated/visit/walk.js +2455 -0
- package/runtime/node_modules/oxc-parser/src-js/index.d.ts +312 -0
- package/runtime/node_modules/oxc-parser/src-js/index.js +108 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/common.js +301 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/eager.js +255 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy-common.js +11 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy.js +162 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/node-array.js +365 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/supported.js +52 -0
- package/runtime/node_modules/oxc-parser/src-js/raw-transfer/visitor.js +127 -0
- package/runtime/node_modules/oxc-parser/src-js/visit/index.js +41 -0
- package/runtime/node_modules/oxc-parser/src-js/visit/visitor.js +405 -0
- package/runtime/node_modules/oxc-parser/src-js/wasm.js +13 -0
- package/runtime/node_modules/oxc-parser/src-js/webcontainer-fallback.cjs +21 -0
- package/runtime/node_modules/oxc-parser/src-js/wrap.js +57 -0
- package/runtime/node_modules/urlpattern-polyfill/LICENSE +19 -0
- package/runtime/node_modules/urlpattern-polyfill/README.md +242 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/index.d.ts +9 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/types.d.ts +49 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.cjs +1 -0
- package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.js +1 -0
- package/runtime/node_modules/urlpattern-polyfill/index.cjs +7 -0
- package/runtime/node_modules/urlpattern-polyfill/index.js +7 -0
- package/runtime/node_modules/urlpattern-polyfill/package.json +149 -0
- package/runtime/polyfills.mjs +73 -97
- package/runtime/preload-async-hooks.mjs +50 -0
- package/runtime/preload.mjs +274 -320
- package/runtime/transform-core.mjs +762 -0
- package/runtime/version.mjs +12 -0
- package/runtime/worker-polyfill.mjs +147 -9
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// This entry point treats Temporal as a library, and does not polyfill it onto
|
|
2
|
+
// the global object.
|
|
3
|
+
// This is in order to avoid breaking the web in the future, if the polyfill
|
|
4
|
+
// gains wide adoption before the API is finalized. We do not want checks such
|
|
5
|
+
// as `if (typeof Temporal === 'undefined')` in the wild, until browsers start
|
|
6
|
+
// shipping the finalized API.
|
|
7
|
+
|
|
8
|
+
import * as Temporal from './temporal';
|
|
9
|
+
import * as Intl from './intl';
|
|
10
|
+
import { toTemporalInstant } from './legacydate';
|
|
11
|
+
|
|
12
|
+
// Work around https://github.com/babel/babel/issues/2025.
|
|
13
|
+
const types = [
|
|
14
|
+
Temporal.Instant,
|
|
15
|
+
Temporal.PlainDate,
|
|
16
|
+
Temporal.PlainDateTime,
|
|
17
|
+
Temporal.Duration,
|
|
18
|
+
Temporal.PlainMonthDay,
|
|
19
|
+
// Temporal.Now, // plain object (not a constructor), so no `prototype`
|
|
20
|
+
Temporal.PlainTime,
|
|
21
|
+
Temporal.PlainYearMonth,
|
|
22
|
+
Temporal.ZonedDateTime
|
|
23
|
+
];
|
|
24
|
+
for (const type of types) {
|
|
25
|
+
const descriptor = Object.getOwnPropertyDescriptor(type, 'prototype') as PropertyDescriptor;
|
|
26
|
+
if (descriptor.configurable || descriptor.enumerable || descriptor.writable) {
|
|
27
|
+
descriptor.configurable = false;
|
|
28
|
+
descriptor.enumerable = false;
|
|
29
|
+
descriptor.writable = false;
|
|
30
|
+
Object.defineProperty(type, 'prototype', descriptor);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { Temporal, Intl, toTemporalInstant };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// This is an alternate entry point that polyfills Temporal onto the global
|
|
2
|
+
// object. This is used only for the browser playground and the test262 tests.
|
|
3
|
+
// See the note in index.mjs.
|
|
4
|
+
|
|
5
|
+
import * as Temporal from './temporal';
|
|
6
|
+
import * as Intl from './intl';
|
|
7
|
+
import { toTemporalInstant } from './legacydate';
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(globalThis, 'Temporal', {
|
|
10
|
+
value: {},
|
|
11
|
+
writable: true,
|
|
12
|
+
enumerable: false,
|
|
13
|
+
configurable: true
|
|
14
|
+
});
|
|
15
|
+
const globalTemporal = (globalThis as unknown as { Temporal: typeof Temporal }).Temporal;
|
|
16
|
+
copy(globalTemporal, Temporal);
|
|
17
|
+
Object.defineProperty(globalTemporal, Symbol.toStringTag, {
|
|
18
|
+
value: 'Temporal',
|
|
19
|
+
writable: false,
|
|
20
|
+
enumerable: false,
|
|
21
|
+
configurable: true
|
|
22
|
+
});
|
|
23
|
+
copy(globalTemporal.Now, Temporal.Now);
|
|
24
|
+
copy(globalThis.Intl, Intl);
|
|
25
|
+
Object.defineProperty(globalThis.Date.prototype, 'toTemporalInstant', {
|
|
26
|
+
value: toTemporalInstant,
|
|
27
|
+
writable: true,
|
|
28
|
+
enumerable: false,
|
|
29
|
+
configurable: true
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
function copy(target: Record<string | number | symbol, unknown>, source: Record<string | number | symbol, unknown>) {
|
|
33
|
+
for (const prop of Object.getOwnPropertyNames(source)) {
|
|
34
|
+
Object.defineProperty(target, prop, {
|
|
35
|
+
value: source[prop],
|
|
36
|
+
writable: true,
|
|
37
|
+
enumerable: false,
|
|
38
|
+
configurable: true
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { Temporal, Intl, toTemporalInstant };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import * as ES from './ecmascript';
|
|
2
|
+
import { MakeIntrinsicClass } from './intrinsicclass';
|
|
3
|
+
import { EPOCHNANOSECONDS, GetSlot } from './slots';
|
|
4
|
+
import type { Temporal } from '..';
|
|
5
|
+
import { DateTimeFormat } from './intl';
|
|
6
|
+
import type { InstantParams as Params, InstantReturn as Return } from './internaltypes';
|
|
7
|
+
|
|
8
|
+
import JSBI from 'jsbi';
|
|
9
|
+
|
|
10
|
+
export class Instant implements Temporal.Instant {
|
|
11
|
+
constructor(epochNanoseconds: bigint | JSBI) {
|
|
12
|
+
// Note: if the argument is not passed, ToBigInt(undefined) will throw. This check exists only
|
|
13
|
+
// to improve the error message.
|
|
14
|
+
if (arguments.length < 1) {
|
|
15
|
+
throw new TypeError('missing argument: epochNanoseconds is required');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const ns = ES.ToBigInt(epochNanoseconds);
|
|
19
|
+
ES.CreateTemporalInstantSlots(this, ns);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
get epochMilliseconds(): Return['epochMilliseconds'] {
|
|
23
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
24
|
+
const value = GetSlot(this, EPOCHNANOSECONDS);
|
|
25
|
+
return ES.epochNsToMs(value, 'floor');
|
|
26
|
+
}
|
|
27
|
+
get epochNanoseconds(): Return['epochNanoseconds'] {
|
|
28
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
29
|
+
return ES.ToBigIntExternal(JSBI.BigInt(GetSlot(this, EPOCHNANOSECONDS)));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
add(temporalDurationLike: Params['add'][0]): Return['add'] {
|
|
33
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
34
|
+
return ES.AddDurationToInstant('add', this, temporalDurationLike);
|
|
35
|
+
}
|
|
36
|
+
subtract(temporalDurationLike: Params['subtract'][0]): Return['subtract'] {
|
|
37
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
38
|
+
return ES.AddDurationToInstant('subtract', this, temporalDurationLike);
|
|
39
|
+
}
|
|
40
|
+
until(other: Params['until'][0], options: Params['until'][1] = undefined): Return['until'] {
|
|
41
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
42
|
+
return ES.DifferenceTemporalInstant('until', this, other, options);
|
|
43
|
+
}
|
|
44
|
+
since(other: Params['since'][0], options: Params['since'][1] = undefined): Return['since'] {
|
|
45
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
46
|
+
return ES.DifferenceTemporalInstant('since', this, other, options);
|
|
47
|
+
}
|
|
48
|
+
round(roundToParam: Params['round'][0]): Return['round'] {
|
|
49
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
50
|
+
if (roundToParam === undefined) throw new TypeError('options parameter is required');
|
|
51
|
+
const roundTo =
|
|
52
|
+
typeof roundToParam === 'string'
|
|
53
|
+
? (ES.CreateOnePropObject('smallestUnit', roundToParam) as Exclude<typeof roundToParam, string>)
|
|
54
|
+
: ES.GetOptionsObject(roundToParam);
|
|
55
|
+
const roundingIncrement = ES.GetTemporalRoundingIncrementOption(roundTo);
|
|
56
|
+
const roundingMode = ES.GetRoundingModeOption(roundTo, 'halfExpand');
|
|
57
|
+
const smallestUnit = ES.GetTemporalUnitValuedOption(roundTo, 'smallestUnit', 'time', ES.REQUIRED);
|
|
58
|
+
const maximumIncrements = {
|
|
59
|
+
hour: 24,
|
|
60
|
+
minute: 1440,
|
|
61
|
+
second: 86400,
|
|
62
|
+
millisecond: 86400e3,
|
|
63
|
+
microsecond: 86400e6,
|
|
64
|
+
nanosecond: 86400e9
|
|
65
|
+
};
|
|
66
|
+
ES.ValidateTemporalRoundingIncrement(roundingIncrement, maximumIncrements[smallestUnit], true);
|
|
67
|
+
const ns = GetSlot(this, EPOCHNANOSECONDS);
|
|
68
|
+
const roundedNs = ES.RoundTemporalInstant(ns, roundingIncrement, smallestUnit, roundingMode);
|
|
69
|
+
return ES.CreateTemporalInstant(roundedNs);
|
|
70
|
+
}
|
|
71
|
+
equals(otherParam: Params['equals'][0]): Return['equals'] {
|
|
72
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
73
|
+
const other = ES.ToTemporalInstant(otherParam);
|
|
74
|
+
const one = GetSlot(this, EPOCHNANOSECONDS);
|
|
75
|
+
const two = GetSlot(other, EPOCHNANOSECONDS);
|
|
76
|
+
return JSBI.equal(JSBI.BigInt(one), JSBI.BigInt(two));
|
|
77
|
+
}
|
|
78
|
+
toString(options: Params['toString'][0] = undefined): string {
|
|
79
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
80
|
+
const resolvedOptions = ES.GetOptionsObject(options);
|
|
81
|
+
const digits = ES.GetTemporalFractionalSecondDigitsOption(resolvedOptions);
|
|
82
|
+
const roundingMode = ES.GetRoundingModeOption(resolvedOptions, 'trunc');
|
|
83
|
+
const smallestUnit = ES.GetTemporalUnitValuedOption(resolvedOptions, 'smallestUnit', 'time', undefined);
|
|
84
|
+
if (smallestUnit === 'hour') throw new RangeError('smallestUnit must be a time unit other than "hour"');
|
|
85
|
+
let timeZone = resolvedOptions.timeZone;
|
|
86
|
+
if (timeZone !== undefined) timeZone = ES.ToTemporalTimeZoneIdentifier(timeZone);
|
|
87
|
+
const { precision, unit, increment } = ES.ToSecondsStringPrecisionRecord(smallestUnit, digits);
|
|
88
|
+
const ns = GetSlot(this, EPOCHNANOSECONDS);
|
|
89
|
+
const roundedNs = ES.RoundTemporalInstant(ns, increment, unit, roundingMode);
|
|
90
|
+
const roundedInstant = ES.CreateTemporalInstant(roundedNs);
|
|
91
|
+
return ES.TemporalInstantToString(roundedInstant, timeZone, precision);
|
|
92
|
+
}
|
|
93
|
+
toJSON(): string {
|
|
94
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
95
|
+
return ES.TemporalInstantToString(this, undefined, 'auto');
|
|
96
|
+
}
|
|
97
|
+
toLocaleString(
|
|
98
|
+
locales: Params['toLocaleString'][0] = undefined,
|
|
99
|
+
options: Params['toLocaleString'][1] = undefined
|
|
100
|
+
): string {
|
|
101
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
102
|
+
return new DateTimeFormat(locales, options).format(this);
|
|
103
|
+
}
|
|
104
|
+
valueOf(): never {
|
|
105
|
+
ES.ValueOfThrows('Instant');
|
|
106
|
+
}
|
|
107
|
+
toZonedDateTimeISO(timeZoneParam: Params['toZonedDateTimeISO'][0]): Return['toZonedDateTimeISO'] {
|
|
108
|
+
ES.CheckReceiver(this, ES.IsTemporalInstant);
|
|
109
|
+
const timeZone = ES.ToTemporalTimeZoneIdentifier(timeZoneParam);
|
|
110
|
+
return ES.CreateTemporalZonedDateTime(GetSlot(this, EPOCHNANOSECONDS), timeZone, 'iso8601');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static fromEpochMilliseconds(epochMilliseconds: Params['fromEpochMilliseconds'][0]): Return['fromEpochMilliseconds'] {
|
|
114
|
+
const epochNanoseconds = ES.epochMsToNs(ES.ToNumber(epochMilliseconds));
|
|
115
|
+
return ES.CreateTemporalInstant(epochNanoseconds);
|
|
116
|
+
}
|
|
117
|
+
static fromEpochNanoseconds(
|
|
118
|
+
epochNanosecondsParam: Params['fromEpochNanoseconds'][0]
|
|
119
|
+
): Return['fromEpochNanoseconds'] {
|
|
120
|
+
const epochNanoseconds = ES.ToBigInt(epochNanosecondsParam);
|
|
121
|
+
return ES.CreateTemporalInstant(epochNanoseconds);
|
|
122
|
+
}
|
|
123
|
+
static from(item: Params['from'][0]): Return['from'] {
|
|
124
|
+
return ES.ToTemporalInstant(item);
|
|
125
|
+
}
|
|
126
|
+
static compare(oneParam: Params['compare'][0], twoParam: Params['compare'][1]): Return['compare'] {
|
|
127
|
+
const one = ES.ToTemporalInstant(oneParam);
|
|
128
|
+
const two = ES.ToTemporalInstant(twoParam);
|
|
129
|
+
const oneNs = GetSlot(one, EPOCHNANOSECONDS);
|
|
130
|
+
const twoNs = GetSlot(two, EPOCHNANOSECONDS);
|
|
131
|
+
if (JSBI.lessThan(oneNs, twoNs)) return -1;
|
|
132
|
+
if (JSBI.greaterThan(oneNs, twoNs)) return 1;
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
[Symbol.toStringTag]!: 'Temporal.Instant';
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
MakeIntrinsicClass(Instant, 'Temporal.Instant');
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import type { Intl, Temporal } from '..';
|
|
2
|
+
import type { DateTimeFormatImpl } from './intl';
|
|
3
|
+
import type { TimeDuration } from './timeduration';
|
|
4
|
+
|
|
5
|
+
export type BuiltinCalendarId =
|
|
6
|
+
| 'iso8601'
|
|
7
|
+
| 'hebrew'
|
|
8
|
+
| 'islamic'
|
|
9
|
+
| 'islamic-umalqura'
|
|
10
|
+
| 'islamic-tbla'
|
|
11
|
+
| 'islamic-civil'
|
|
12
|
+
| 'islamic-rgsa'
|
|
13
|
+
| 'islamicc'
|
|
14
|
+
| 'persian'
|
|
15
|
+
| 'ethiopic'
|
|
16
|
+
| 'ethioaa'
|
|
17
|
+
| 'ethiopic-amete-alem' // see https://github.com/tc39/ecma402/issues/285
|
|
18
|
+
| 'coptic'
|
|
19
|
+
| 'chinese'
|
|
20
|
+
| 'dangi'
|
|
21
|
+
| 'roc'
|
|
22
|
+
| 'indian'
|
|
23
|
+
| 'buddhist'
|
|
24
|
+
| 'japanese'
|
|
25
|
+
| 'gregory';
|
|
26
|
+
|
|
27
|
+
export type AnySlottedType =
|
|
28
|
+
| DateTimeFormatImpl
|
|
29
|
+
| Temporal.Duration
|
|
30
|
+
| Temporal.Instant
|
|
31
|
+
| Temporal.PlainDate
|
|
32
|
+
| Temporal.PlainDateTime
|
|
33
|
+
| Temporal.PlainMonthDay
|
|
34
|
+
| Temporal.PlainTime
|
|
35
|
+
| Temporal.PlainYearMonth
|
|
36
|
+
| Temporal.ZonedDateTime;
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
// unused, but uncomment if this is needed later
|
|
40
|
+
export type AnyTemporalConstructor =
|
|
41
|
+
| typeof Temporal.Calendar
|
|
42
|
+
| typeof Temporal.Duration
|
|
43
|
+
| typeof Temporal.Instant
|
|
44
|
+
| typeof Temporal.PlainDate
|
|
45
|
+
| typeof Temporal.PlainDateTime
|
|
46
|
+
| typeof Temporal.PlainMonthDay
|
|
47
|
+
| typeof Temporal.PlainTime
|
|
48
|
+
| typeof Temporal.PlainYearMonth
|
|
49
|
+
| typeof Temporal.TimeZone
|
|
50
|
+
| typeof Temporal.ZonedDateTime;
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
// Used in AnyTemporalLikeType
|
|
54
|
+
type AllTemporalLikeTypes = [
|
|
55
|
+
Temporal.DurationLike,
|
|
56
|
+
Temporal.PlainDateLike,
|
|
57
|
+
Temporal.PlainDateTimeLike,
|
|
58
|
+
Temporal.PlainMonthDayLike,
|
|
59
|
+
Temporal.PlainTimeLike,
|
|
60
|
+
Temporal.PlainYearMonthLike,
|
|
61
|
+
Temporal.ZonedDateTimeLike
|
|
62
|
+
];
|
|
63
|
+
export type AnyTemporalLikeType = AllTemporalLikeTypes[number];
|
|
64
|
+
|
|
65
|
+
// Keys is a conditionally-mapped version of keyof
|
|
66
|
+
export type Keys<T> = T extends Record<string, unknown> ? keyof T : never;
|
|
67
|
+
|
|
68
|
+
// Resolve copies the keys and values of a given object type so that TS will
|
|
69
|
+
// stop using type names in error messages / autocomplete. Generally, those
|
|
70
|
+
// names can be more useful, but sometimes having the primitive object shape is
|
|
71
|
+
// significantly easier to reason about (e.g. deeply-nested types).
|
|
72
|
+
// Resolve is an identity function for function types.
|
|
73
|
+
export type Resolve<T> =
|
|
74
|
+
// Re-mapping doesn't work very well for functions, so exclude them
|
|
75
|
+
T extends (...args: never[]) => unknown
|
|
76
|
+
? T
|
|
77
|
+
: // Re-map all the keys in T to the same value. This forces TS into no longer
|
|
78
|
+
// using type aliases, etc.
|
|
79
|
+
{ [K in keyof T]: T[K] };
|
|
80
|
+
|
|
81
|
+
export type AnyTemporalKey = Exclude<Keys<AnyTemporalLikeType>, symbol>;
|
|
82
|
+
|
|
83
|
+
export type FieldKey = Exclude<AnyTemporalKey, Keys<Temporal.DurationLike>>;
|
|
84
|
+
|
|
85
|
+
// The properties below are all the names of Temporal properties that can be set with `with`.
|
|
86
|
+
// `timeZone` and `calendar` are not on the list because they have special methods to set them.
|
|
87
|
+
|
|
88
|
+
export type UnitSmallerThanOrEqualTo<T extends Temporal.DateTimeUnit> = T extends 'year'
|
|
89
|
+
? Temporal.DateTimeUnit
|
|
90
|
+
: T extends 'month'
|
|
91
|
+
? Exclude<Temporal.DateTimeUnit, 'year'>
|
|
92
|
+
: T extends 'week'
|
|
93
|
+
? Exclude<Temporal.DateTimeUnit, 'year' | 'month'>
|
|
94
|
+
: T extends 'day'
|
|
95
|
+
? Exclude<Temporal.DateTimeUnit, 'year' | 'month' | 'week'>
|
|
96
|
+
: T extends 'hour'
|
|
97
|
+
? Temporal.TimeUnit
|
|
98
|
+
: T extends 'minute'
|
|
99
|
+
? Exclude<Temporal.TimeUnit, 'hour'>
|
|
100
|
+
: T extends 'second'
|
|
101
|
+
? Exclude<Temporal.TimeUnit, 'hour' | 'minute'>
|
|
102
|
+
: T extends 'millisecond'
|
|
103
|
+
? Exclude<Temporal.TimeUnit, 'hour' | 'minute' | 'second'>
|
|
104
|
+
: T extends 'microsecond'
|
|
105
|
+
? 'nanosecond'
|
|
106
|
+
: never;
|
|
107
|
+
|
|
108
|
+
type Method = (...args: any) => any;
|
|
109
|
+
type NonObjectKeys<T> = Exclude<keyof T, 'toString' | 'toLocaleString' | 'prototype'>;
|
|
110
|
+
|
|
111
|
+
type MethodParams<Type extends new (...args: any) => any> = {
|
|
112
|
+
// constructor parameters
|
|
113
|
+
constructor: ConstructorParameters<Type>;
|
|
114
|
+
} & {
|
|
115
|
+
// static method parameters
|
|
116
|
+
[Key in NonObjectKeys<Type>]: Type[Key] extends Method ? Parameters<Type[Key]> : never;
|
|
117
|
+
} & {
|
|
118
|
+
// prototype method parameters
|
|
119
|
+
[Key in keyof InstanceType<Type>]: InstanceType<Type>[Key] extends Method
|
|
120
|
+
? Parameters<InstanceType<Type>[Key]>
|
|
121
|
+
: never;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
type MethodReturn<Type extends new (...args: any) => any> = {
|
|
125
|
+
constructor: InstanceType<Type>;
|
|
126
|
+
} & {
|
|
127
|
+
[Key in NonObjectKeys<Type>]: Type[Key] extends Method ? ReturnType<Type[Key]> : Type[Key];
|
|
128
|
+
} & {
|
|
129
|
+
[Key in keyof InstanceType<Type>]: InstanceType<Type>[Key] extends Method
|
|
130
|
+
? ReturnType<InstanceType<Type>[Key]>
|
|
131
|
+
: InstanceType<Type>[Key];
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/* Currently unused, but may use later
|
|
135
|
+
type InterfaceReturn<Type> = {
|
|
136
|
+
[Key in keyof Type]: Type[Key] extends Method ? ReturnType<Type[Key]> : Type[Key];
|
|
137
|
+
};
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
type InterfaceParams<Type> = {
|
|
141
|
+
[Key in keyof Type]: Type[Key] extends Method ? Parameters<Type[Key]> : never;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// Parameters of each Temporal type. Examples:
|
|
145
|
+
// * InstantParams['compare'][1] - static methods
|
|
146
|
+
// * PlainDateParams['since'][0] - prototype methods
|
|
147
|
+
// * DurationParams['constructor'][3] - constructors
|
|
148
|
+
export interface ZonedDateTimeParams extends MethodParams<typeof Temporal.ZonedDateTime> {}
|
|
149
|
+
export interface DurationParams extends MethodParams<typeof Temporal.Duration> {}
|
|
150
|
+
export interface InstantParams extends MethodParams<typeof Temporal.Instant> {}
|
|
151
|
+
export interface PlainDateParams extends MethodParams<typeof Temporal.PlainDate> {}
|
|
152
|
+
export interface PlainDateTimeParams extends MethodParams<typeof Temporal.PlainDateTime> {}
|
|
153
|
+
export interface PlainMonthDayParams extends MethodParams<typeof Temporal.PlainMonthDay> {}
|
|
154
|
+
export interface PlainTimeParams extends MethodParams<typeof Temporal.PlainTime> {}
|
|
155
|
+
export interface PlainYearMonthParams extends MethodParams<typeof Temporal.PlainYearMonth> {}
|
|
156
|
+
export interface ZonedDateTimeParams extends MethodParams<typeof Temporal.ZonedDateTime> {}
|
|
157
|
+
|
|
158
|
+
// Return types of static or instance methods
|
|
159
|
+
export interface ZonedDateTimeReturn extends MethodReturn<typeof Temporal.ZonedDateTime> {}
|
|
160
|
+
export interface DurationReturn extends MethodReturn<typeof Temporal.Duration> {}
|
|
161
|
+
export interface InstantReturn extends MethodReturn<typeof Temporal.Instant> {}
|
|
162
|
+
export interface PlainDateReturn extends MethodReturn<typeof Temporal.PlainDate> {}
|
|
163
|
+
export interface PlainDateTimeReturn extends MethodReturn<typeof Temporal.PlainDateTime> {}
|
|
164
|
+
export interface PlainMonthDayReturn extends MethodReturn<typeof Temporal.PlainMonthDay> {}
|
|
165
|
+
export interface PlainTimeReturn extends MethodReturn<typeof Temporal.PlainTime> {}
|
|
166
|
+
export interface PlainYearMonthReturn extends MethodReturn<typeof Temporal.PlainYearMonth> {}
|
|
167
|
+
export interface ZonedDateTimeReturn extends MethodReturn<typeof Temporal.ZonedDateTime> {}
|
|
168
|
+
|
|
169
|
+
export interface DateTimeFormatParams extends MethodParams<typeof Intl.DateTimeFormat> {}
|
|
170
|
+
export interface DateTimeFormatReturn extends MethodReturn<typeof Intl.DateTimeFormat> {}
|
|
171
|
+
|
|
172
|
+
type OptionsAmenderFunction = (options: globalThis.Intl.DateTimeFormatOptions) => globalThis.Intl.DateTimeFormatOptions;
|
|
173
|
+
export type FormatterOrAmender = globalThis.Intl.DateTimeFormat | OptionsAmenderFunction;
|
|
174
|
+
|
|
175
|
+
export type Overflow = NonNullable<Temporal.AssignmentOptions['overflow']>;
|
|
176
|
+
|
|
177
|
+
export type ISODateToFieldsType = 'date' | 'year-month' | 'month-day';
|
|
178
|
+
|
|
179
|
+
export interface CalendarDateRecord {
|
|
180
|
+
era: string | undefined;
|
|
181
|
+
eraYear: number | undefined;
|
|
182
|
+
year: number;
|
|
183
|
+
month: number;
|
|
184
|
+
monthCode: string;
|
|
185
|
+
day: number;
|
|
186
|
+
dayOfWeek: number;
|
|
187
|
+
dayOfYear: number;
|
|
188
|
+
weekOfYear: { week: number; year: number } | undefined;
|
|
189
|
+
daysInWeek: number;
|
|
190
|
+
daysInMonth: number;
|
|
191
|
+
daysInYear: number;
|
|
192
|
+
monthsInYear: number;
|
|
193
|
+
inLeapYear: boolean;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface CalendarFieldsRecord {
|
|
197
|
+
era?: string;
|
|
198
|
+
eraYear?: number;
|
|
199
|
+
year?: number;
|
|
200
|
+
month?: number;
|
|
201
|
+
monthCode?: string;
|
|
202
|
+
day?: number;
|
|
203
|
+
hour?: number;
|
|
204
|
+
minute?: number;
|
|
205
|
+
second?: number;
|
|
206
|
+
millisecond?: number;
|
|
207
|
+
microsecond?: number;
|
|
208
|
+
nanosecond?: number;
|
|
209
|
+
offset?: string;
|
|
210
|
+
timeZone?: string;
|
|
211
|
+
}
|
|
212
|
+
export type CalendarYMD = { year: number; month: number; day: number };
|
|
213
|
+
export type MonthDayFromFieldsObject = CalendarFieldsRecord & ({ monthCode: string; day: number } | CalendarYMD);
|
|
214
|
+
|
|
215
|
+
/** Record representing YMD of an ISO calendar date */
|
|
216
|
+
export interface ISODate {
|
|
217
|
+
year: number;
|
|
218
|
+
month: number;
|
|
219
|
+
day: number;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export type TimeRecord = Required<Temporal.PlainTimeLike>;
|
|
223
|
+
|
|
224
|
+
export interface ISODateTime {
|
|
225
|
+
isoDate: ISODate;
|
|
226
|
+
time: TimeRecord;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface DateDuration {
|
|
230
|
+
years: number;
|
|
231
|
+
months: number;
|
|
232
|
+
weeks: number;
|
|
233
|
+
days: number;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface InternalDuration {
|
|
237
|
+
date: DateDuration;
|
|
238
|
+
time: TimeDuration;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Signal to TypeScript that not everything should be exported by default
|
|
242
|
+
export {};
|