From ed9506bbaffd475c960f775939473491dd872fe1 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 18 Jan 2023 20:26:59 +0000 Subject: [PATCH] Bump `eslint-plugin-import` to avoid vulnerability in dependency --- node_modules/.bin/resolve | 1 + node_modules/.package-lock.json | 1150 +- node_modules/@types/semver/package.json | 94 +- node_modules/array-includes/.eslintrc | 13 +- node_modules/array-includes/.nycrc | 4 - node_modules/array-includes/CHANGELOG.md | 39 + node_modules/array-includes/README.md | 27 +- node_modules/array-includes/implementation.js | 13 +- node_modules/array-includes/index.js | 2 +- node_modules/array-includes/package.json | 59 +- node_modules/array-includes/polyfill.js | 8 +- node_modules/array-includes/test/shimmed.js | 3 + node_modules/array.prototype.flat/.eslintrc | 12 +- node_modules/array.prototype.flat/.nycrc | 4 - .../array.prototype.flat/CHANGELOG.md | 49 + node_modules/array.prototype.flat/README.md | 17 +- .../array.prototype.flat/implementation.js | 14 +- .../array.prototype.flat/package.json | 51 +- node_modules/array.prototype.flat/shim.js | 6 + .../array.prototype.flat/test/shimmed.js | 2 +- .../.editorconfig | 14 +- .../array.prototype.flatmap/.eslintrc | 34 + .../.github/FUNDING.yml | 12 + node_modules/array.prototype.flatmap/.nycrc | 9 + .../array.prototype.flatmap/CHANGELOG.md | 102 + node_modules/array.prototype.flatmap/LICENSE | 21 + .../array.prototype.flatmap/README.md | 82 + node_modules/array.prototype.flatmap/auto.js | 3 + .../array.prototype.flatmap/implementation.js | 26 + node_modules/array.prototype.flatmap/index.js | 19 + .../array.prototype.flatmap/package.json | 112 + .../array.prototype.flatmap/polyfill.js | 7 + node_modules/array.prototype.flatmap/shim.js | 20 + .../test/implementation.js | 20 + .../array.prototype.flatmap/test/index.js | 18 + .../array.prototype.flatmap/test/shimmed.js | 36 + .../array.prototype.flatmap/test/tests.js | 43 + .../.eslintignore | 0 node_modules/available-typed-arrays/.eslintrc | 9 + .../.github/FUNDING.yml | 12 + node_modules/available-typed-arrays/.nycrc | 9 + .../available-typed-arrays/CHANGELOG.md | 79 + node_modules/available-typed-arrays/LICENSE | 21 + node_modules/available-typed-arrays/README.md | 52 + node_modules/available-typed-arrays/index.js | 27 + .../available-typed-arrays/package.json | 82 + .../available-typed-arrays/test/index.js | 18 + node_modules/define-properties/.eslintrc | 13 +- .../define-properties/.github/FUNDING.yml | 12 + node_modules/define-properties/.jscs.json | 175 - node_modules/define-properties/.nycrc | 9 + node_modules/define-properties/.travis.yml | 233 - node_modules/define-properties/CHANGELOG.md | 19 + node_modules/define-properties/README.md | 24 +- node_modules/define-properties/index.js | 19 +- node_modules/define-properties/package.json | 39 +- node_modules/define-properties/test/index.js | 125 - node_modules/error-ex/README.md | 144 - node_modules/error-ex/index.js | 141 - node_modules/error-ex/package.json | 46 - node_modules/es-abstract/.editorconfig | 2 + node_modules/es-abstract/.eslintrc | 19 +- node_modules/es-abstract/.gitattributes | 625 - node_modules/es-abstract/.nycrc | 7 +- node_modules/es-abstract/2015/ArrayCreate.js | 23 +- .../es-abstract/2015/CharacterRange.js | 31 + .../es-abstract/2015/CompletionRecord.js | 53 + .../es-abstract/2015/CreateDataProperty.js | 4 +- .../es-abstract/2015/DetachArrayBuffer.js | 34 + .../2015/FromPropertyDescriptor.js | 28 +- node_modules/es-abstract/2015/Get.js | 7 +- .../es-abstract/2015/GetGlobalObject.js | 9 + node_modules/es-abstract/2015/GetIterator.js | 3 +- node_modules/es-abstract/2015/GetMethod.js | 14 +- .../es-abstract/2015/GetOwnPropertyKeys.js | 4 +- .../2015/GetPrototypeFromConstructor.js | 3 +- .../es-abstract/2015/GetSubstitution.js | 2 +- node_modules/es-abstract/2015/GetV.js | 8 +- node_modules/es-abstract/2015/IsArray.js | 12 +- .../2015/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2015/IsDetachedBuffer.js | 30 + node_modules/es-abstract/2015/IsExtensible.js | 6 +- .../es-abstract/2015/IteratorClose.js | 7 +- .../es-abstract/2015/NormalCompletion.js | 9 + node_modules/es-abstract/2015/ObjectCreate.js | 39 +- .../2015/ObjectDefineProperties.js | 40 + .../2015/OrdinaryDefineOwnProperty.js | 2 +- .../2015/OrdinaryGetOwnProperty.js | 2 +- node_modules/es-abstract/2015/Set.js | 14 +- .../es-abstract/2015/SetFunctionName.js | 2 +- .../es-abstract/2015/SetIntegrityLevel.js | 6 +- node_modules/es-abstract/2015/StringCreate.js | 2 +- .../es-abstract/2015/TestIntegrityLevel.js | 6 +- node_modules/es-abstract/2015/ToNumber.js | 12 +- .../es-abstract/2015/ValidateTypedArray.js | 30 + node_modules/es-abstract/2015/max.js | 7 + node_modules/es-abstract/2015/min.js | 7 + .../es-abstract/2015/thisTimeValue.js | 4 +- node_modules/es-abstract/2016/ArrayCreate.js | 23 +- .../es-abstract/2016/CharacterRange.js | 31 + .../es-abstract/2016/CompletionRecord.js | 53 + .../es-abstract/2016/CreateDataProperty.js | 4 +- .../es-abstract/2016/DetachArrayBuffer.js | 34 + .../2016/FromPropertyDescriptor.js | 28 +- node_modules/es-abstract/2016/Get.js | 7 +- .../es-abstract/2016/GetGlobalObject.js | 9 + node_modules/es-abstract/2016/GetIterator.js | 3 +- node_modules/es-abstract/2016/GetMethod.js | 14 +- .../es-abstract/2016/GetOwnPropertyKeys.js | 4 +- .../2016/GetPrototypeFromConstructor.js | 3 +- .../es-abstract/2016/GetSubstitution.js | 2 +- node_modules/es-abstract/2016/GetV.js | 8 +- node_modules/es-abstract/2016/IsArray.js | 12 +- .../2016/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2016/IsDetachedBuffer.js | 30 + node_modules/es-abstract/2016/IsExtensible.js | 6 +- .../es-abstract/2016/IterableToArrayLike.js | 19 +- .../es-abstract/2016/IteratorClose.js | 7 +- .../es-abstract/2016/NormalCompletion.js | 9 + node_modules/es-abstract/2016/ObjectCreate.js | 39 +- .../2016/ObjectDefineProperties.js | 40 + .../2016/OrdinaryDefineOwnProperty.js | 2 +- .../2016/OrdinaryGetOwnProperty.js | 2 +- .../2016/OrdinarySetPrototypeOf.js | 54 +- node_modules/es-abstract/2016/Set.js | 14 +- .../es-abstract/2016/SetFunctionName.js | 2 +- .../es-abstract/2016/SetIntegrityLevel.js | 6 +- node_modules/es-abstract/2016/StringCreate.js | 2 +- .../es-abstract/2016/TestIntegrityLevel.js | 6 +- node_modules/es-abstract/2016/ToNumber.js | 12 +- .../es-abstract/2016/ValidateTypedArray.js | 30 + node_modules/es-abstract/2016/max.js | 7 + node_modules/es-abstract/2016/min.js | 7 + .../es-abstract/2016/thisTimeValue.js | 4 +- node_modules/es-abstract/2017/ArrayCreate.js | 23 +- .../es-abstract/2017/CharacterRange.js | 31 + .../es-abstract/2017/CompletionRecord.js | 53 + .../es-abstract/2017/CreateDataProperty.js | 4 +- .../es-abstract/2017/DetachArrayBuffer.js | 35 + .../2017/FromPropertyDescriptor.js | 28 +- node_modules/es-abstract/2017/Get.js | 7 +- .../es-abstract/2017/GetGlobalObject.js | 9 + node_modules/es-abstract/2017/GetIterator.js | 3 +- node_modules/es-abstract/2017/GetMethod.js | 14 +- .../es-abstract/2017/GetOwnPropertyKeys.js | 4 +- .../2017/GetPrototypeFromConstructor.js | 3 +- .../es-abstract/2017/GetSubstitution.js | 2 +- node_modules/es-abstract/2017/GetV.js | 8 +- node_modules/es-abstract/2017/IsArray.js | 12 +- .../2017/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2017/IsDetachedBuffer.js | 30 + node_modules/es-abstract/2017/IsExtensible.js | 6 +- .../es-abstract/2017/IsSharedArrayBuffer.js | 19 + .../es-abstract/2017/IteratorClose.js | 7 +- .../es-abstract/2017/NormalCompletion.js | 9 + .../es-abstract/2017/NumberToRawBytes.js | 198 + node_modules/es-abstract/2017/ObjectCreate.js | 39 +- .../2017/ObjectDefineProperties.js | 40 + .../2017/OrdinaryDefineOwnProperty.js | 2 +- .../2017/OrdinaryGetOwnProperty.js | 2 +- .../2017/OrdinarySetPrototypeOf.js | 54 +- .../es-abstract/2017/OrdinaryToPrimitive.js | 38 + .../es-abstract/2017/RawBytesToNumber.js | 145 + node_modules/es-abstract/2017/Set.js | 14 +- .../es-abstract/2017/SetFunctionName.js | 2 +- .../es-abstract/2017/SetIntegrityLevel.js | 6 +- node_modules/es-abstract/2017/StringCreate.js | 2 +- .../es-abstract/2017/TestIntegrityLevel.js | 6 +- node_modules/es-abstract/2017/ToNumber.js | 12 +- .../es-abstract/2017/ValidateAtomicAccess.js | 36 + .../es-abstract/2017/ValidateTypedArray.js | 30 + node_modules/es-abstract/2017/max.js | 7 + node_modules/es-abstract/2017/min.js | 7 + .../es-abstract/2017/thisTimeValue.js | 4 +- .../2018/AbstractRelationalComparison.js | 48 +- node_modules/es-abstract/2018/ArrayCreate.js | 23 +- .../es-abstract/2018/AsyncIteratorClose.js | 62 + .../es-abstract/2018/CharacterRange.js | 31 + .../es-abstract/2018/CompletionRecord.js | 53 + .../es-abstract/2018/CopyDataProperties.js | 4 +- .../2018/CreateAsyncFromSyncIterator.js | 155 + .../es-abstract/2018/CreateDataProperty.js | 4 +- .../es-abstract/2018/DetachArrayBuffer.js | 43 + .../2018/EnumerableOwnPropertyNames.js | 2 +- .../2018/FromPropertyDescriptor.js | 28 +- node_modules/es-abstract/2018/Get.js | 7 +- .../es-abstract/2018/GetGlobalObject.js | 9 + node_modules/es-abstract/2018/GetIterator.js | 3 +- node_modules/es-abstract/2018/GetMethod.js | 14 +- .../es-abstract/2018/GetOwnPropertyKeys.js | 4 +- .../2018/GetPrototypeFromConstructor.js | 3 +- .../es-abstract/2018/GetSubstitution.js | 2 +- node_modules/es-abstract/2018/GetV.js | 8 +- node_modules/es-abstract/2018/IsArray.js | 12 +- .../2018/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2018/IsDetachedBuffer.js | 30 + node_modules/es-abstract/2018/IsExtensible.js | 6 +- .../es-abstract/2018/IsSharedArrayBuffer.js | 19 + .../es-abstract/2018/IteratorClose.js | 7 +- .../es-abstract/2018/NormalCompletion.js | 9 + .../es-abstract/2018/NumberToRawBytes.js | 198 + node_modules/es-abstract/2018/ObjectCreate.js | 39 +- .../2018/ObjectDefineProperties.js | 40 + .../2018/OrdinaryDefineOwnProperty.js | 2 +- .../2018/OrdinaryGetOwnProperty.js | 2 +- .../2018/OrdinarySetPrototypeOf.js | 54 +- .../es-abstract/2018/OrdinaryToPrimitive.js | 38 + .../es-abstract/2018/RawBytesToNumber.js | 145 + node_modules/es-abstract/2018/Set.js | 14 +- .../es-abstract/2018/SetFunctionName.js | 2 +- .../es-abstract/2018/SetIntegrityLevel.js | 6 +- node_modules/es-abstract/2018/StringCreate.js | 2 +- .../es-abstract/2018/TestIntegrityLevel.js | 6 +- .../es-abstract/2018/ThrowCompletion.js | 9 + node_modules/es-abstract/2018/ToNumber.js | 12 +- .../es-abstract/2018/ValidateAtomicAccess.js | 36 + .../es-abstract/2018/ValidateTypedArray.js | 30 + node_modules/es-abstract/2018/max.js | 7 + node_modules/es-abstract/2018/min.js | 7 + .../es-abstract/2018/thisTimeValue.js | 4 +- .../2019/AbstractRelationalComparison.js | 48 +- node_modules/es-abstract/2019/ArrayCreate.js | 23 +- .../2019/AsyncFromSyncIteratorContinuation.js | 45 + .../es-abstract/2019/AsyncIteratorClose.js | 62 + .../es-abstract/2019/CharacterRange.js | 31 + .../es-abstract/2019/CompletionRecord.js | 53 + .../es-abstract/2019/CopyDataProperties.js | 4 +- .../2019/CreateAsyncFromSyncIterator.js | 121 + .../es-abstract/2019/CreateDataProperty.js | 4 +- .../es-abstract/2019/DetachArrayBuffer.js | 43 + .../2019/EnumerableOwnPropertyNames.js | 2 +- .../2019/FromPropertyDescriptor.js | 28 +- node_modules/es-abstract/2019/Get.js | 7 +- .../es-abstract/2019/GetGlobalObject.js | 9 + node_modules/es-abstract/2019/GetIterator.js | 3 +- node_modules/es-abstract/2019/GetMethod.js | 14 +- .../es-abstract/2019/GetOwnPropertyKeys.js | 4 +- .../2019/GetPrototypeFromConstructor.js | 3 +- .../es-abstract/2019/GetSubstitution.js | 2 +- node_modules/es-abstract/2019/GetV.js | 8 +- node_modules/es-abstract/2019/IsArray.js | 12 +- .../2019/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2019/IsDetachedBuffer.js | 30 + node_modules/es-abstract/2019/IsExtensible.js | 6 +- .../es-abstract/2019/IsSharedArrayBuffer.js | 19 + .../es-abstract/2019/IteratorClose.js | 7 +- .../es-abstract/2019/NormalCompletion.js | 9 + .../es-abstract/2019/NumberToRawBytes.js | 198 + node_modules/es-abstract/2019/ObjectCreate.js | 39 +- .../2019/ObjectDefineProperties.js | 40 + .../2019/OrdinaryDefineOwnProperty.js | 2 +- .../2019/OrdinaryGetOwnProperty.js | 2 +- .../2019/OrdinarySetPrototypeOf.js | 54 +- .../es-abstract/2019/OrdinaryToPrimitive.js | 38 + .../es-abstract/2019/RawBytesToNumber.js | 145 + node_modules/es-abstract/2019/Set.js | 14 +- .../es-abstract/2019/SetFunctionName.js | 2 +- .../es-abstract/2019/SetIntegrityLevel.js | 6 +- node_modules/es-abstract/2019/StringCreate.js | 2 +- .../es-abstract/2019/TestIntegrityLevel.js | 6 +- .../es-abstract/2019/ThrowCompletion.js | 9 + node_modules/es-abstract/2019/ToNumber.js | 12 +- .../es-abstract/2019/ValidateAtomicAccess.js | 36 + .../es-abstract/2019/ValidateTypedArray.js | 30 + node_modules/es-abstract/2019/max.js | 7 + node_modules/es-abstract/2019/min.js | 7 + .../2020/AbstractEqualityComparison.js | 28 +- .../2020/AbstractRelationalComparison.js | 71 +- node_modules/es-abstract/2020/ArrayCreate.js | 23 +- .../2020/AsyncFromSyncIteratorContinuation.js | 45 + .../es-abstract/2020/AsyncIteratorClose.js | 62 + .../es-abstract/2020/BigIntBitwiseOp.js | 4 +- .../es-abstract/2020/CharacterRange.js | 31 + .../es-abstract/2020/CompletionRecord.js | 53 + .../es-abstract/2020/CopyDataProperties.js | 4 +- .../2020/CreateAsyncFromSyncIterator.js | 121 + .../es-abstract/2020/CreateDataProperty.js | 4 +- .../2020/CreateListFromArrayLike.js | 2 +- .../2020/CreateRegExpStringIterator.js | 100 + .../es-abstract/2020/DetachArrayBuffer.js | 43 + .../2020/EnumerableOwnPropertyNames.js | 2 +- .../2020/FromPropertyDescriptor.js | 28 +- node_modules/es-abstract/2020/Get.js | 7 +- .../es-abstract/2020/GetGlobalObject.js | 9 + node_modules/es-abstract/2020/GetIterator.js | 6 +- node_modules/es-abstract/2020/GetMethod.js | 14 +- .../es-abstract/2020/GetOwnPropertyKeys.js | 4 +- .../2020/GetPrototypeFromConstructor.js | 3 +- .../es-abstract/2020/GetSubstitution.js | 2 +- node_modules/es-abstract/2020/GetV.js | 8 +- node_modules/es-abstract/2020/IsArray.js | 12 +- .../2020/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2020/IsDetachedBuffer.js | 30 + node_modules/es-abstract/2020/IsExtensible.js | 6 +- .../es-abstract/2020/IsSharedArrayBuffer.js | 19 + .../2020/IsUnclampedIntegerElementType.js | 10 +- .../es-abstract/2020/IsUnsignedElementType.js | 8 +- .../es-abstract/2020/IteratorClose.js | 7 +- .../es-abstract/2020/NormalCompletion.js | 9 + .../es-abstract/2020/Number/exponentiate.js | 4 +- .../es-abstract/2020/NumberToBigInt.js | 4 + .../es-abstract/2020/NumericToRawBytes.js | 209 + .../2020/ObjectDefineProperties.js | 40 + .../2020/OrdinaryDefineOwnProperty.js | 2 +- .../2020/OrdinaryGetOwnProperty.js | 2 +- .../es-abstract/2020/OrdinaryObjectCreate.js | 48 +- .../2020/OrdinarySetPrototypeOf.js | 54 +- .../es-abstract/2020/OrdinaryToPrimitive.js | 38 + .../es-abstract/2020/RawBytesToNumeric.js | 156 + .../es-abstract/2020/SameValueNonNumeric.js | 2 +- node_modules/es-abstract/2020/Set.js | 14 +- .../es-abstract/2020/SetFunctionName.js | 2 +- .../es-abstract/2020/SetIntegrityLevel.js | 6 +- node_modules/es-abstract/2020/StringCreate.js | 2 +- .../es-abstract/2020/StringToBigInt.js | 23 + .../es-abstract/2020/TestIntegrityLevel.js | 6 +- .../es-abstract/2020/ThrowCompletion.js | 9 + node_modules/es-abstract/2020/ToBigInt.js | 25 + node_modules/es-abstract/2020/ToBigInt64.js | 25 + node_modules/es-abstract/2020/ToBigUint64.js | 22 + node_modules/es-abstract/2020/ToNumber.js | 12 +- .../es-abstract/2020/ValidateAtomicAccess.js | 36 + .../es-abstract/2020/ValidateTypedArray.js | 30 + node_modules/es-abstract/2020/floor.js | 7 +- node_modules/es-abstract/2020/max.js | 7 + node_modules/es-abstract/2020/min.js | 7 + .../2021/AbstractEqualityComparison.js | 57 + .../2021/AbstractRelationalComparison.js | 82 + .../2021/AddEntriesFromIterable.js | 52 + .../es-abstract/2021/AddToKeptObjects.js | 21 + .../es-abstract/2021/AdvanceStringIndex.js | 34 + .../ApplyStringOrNumericBinaryOperator.js | 80 + node_modules/es-abstract/2021/ArrayCreate.js | 54 + .../es-abstract/2021/ArraySetLength.js | 85 + .../es-abstract/2021/ArraySpeciesCreate.js | 48 + .../2021/AsyncFromSyncIteratorContinuation.js | 45 + .../es-abstract/2021/AsyncIteratorClose.js | 68 + node_modules/es-abstract/2021/BigInt/add.js | 18 + .../es-abstract/2021/BigInt/bitwiseAND.js | 17 + .../es-abstract/2021/BigInt/bitwiseNOT.js | 17 + .../es-abstract/2021/BigInt/bitwiseOR.js | 17 + .../es-abstract/2021/BigInt/bitwiseXOR.js | 17 + .../es-abstract/2021/BigInt/divide.js | 22 + node_modules/es-abstract/2021/BigInt/equal.js | 17 + .../es-abstract/2021/BigInt/exponentiate.js | 31 + node_modules/es-abstract/2021/BigInt/index.js | 43 + .../es-abstract/2021/BigInt/leftShift.js | 18 + .../es-abstract/2021/BigInt/lessThan.js | 18 + .../es-abstract/2021/BigInt/multiply.js | 18 + .../es-abstract/2021/BigInt/remainder.js | 30 + .../es-abstract/2021/BigInt/sameValue.js | 18 + .../es-abstract/2021/BigInt/sameValueZero.js | 18 + .../2021/BigInt/signedRightShift.js | 18 + .../es-abstract/2021/BigInt/subtract.js | 18 + .../es-abstract/2021/BigInt/toString.js | 18 + .../es-abstract/2021/BigInt/unaryMinus.js | 24 + .../2021/BigInt/unsignedRightShift.js | 17 + .../es-abstract/2021/BigIntBitwiseOp.js | 66 + node_modules/es-abstract/2021/BinaryAnd.js | 14 + node_modules/es-abstract/2021/BinaryOr.js | 14 + node_modules/es-abstract/2021/BinaryXor.js | 14 + .../es-abstract/2021/ByteListBitwiseOp.js | 44 + .../es-abstract/2021/ByteListEqual.js | 33 + node_modules/es-abstract/2021/Call.js | 20 + .../2021/CanonicalNumericIndexString.js | 22 + .../es-abstract/2021/CharacterRange.js | 31 + .../es-abstract/2021/ClearKeptObjects.js | 12 + node_modules/es-abstract/2021/CodePointAt.js | 58 + .../es-abstract/2021/CodePointsToString.js | 27 + .../2021/CompletePropertyDescriptor.js | 39 + .../es-abstract/2021/CompletionRecord.js | 53 + .../es-abstract/2021/CopyDataProperties.js | 70 + .../2021/CreateAsyncFromSyncIterator.js | 121 + .../es-abstract/2021/CreateDataProperty.js | 45 + .../2021/CreateDataPropertyOrThrow.js | 25 + node_modules/es-abstract/2021/CreateHTML.js | 30 + .../2021/CreateIterResultObject.js | 19 + .../2021/CreateListFromArrayLike.js | 44 + .../es-abstract/2021/CreateMethodProperty.js | 40 + .../2021/CreateRegExpStringIterator.js | 100 + node_modules/es-abstract/2021/DateFromTime.js | 54 + node_modules/es-abstract/2021/DateString.js | 30 + node_modules/es-abstract/2021/Day.js | 11 + node_modules/es-abstract/2021/DayFromYear.js | 10 + .../es-abstract/2021/DayWithinYear.js | 11 + node_modules/es-abstract/2021/DaysInYear.js | 18 + .../es-abstract/2021/DefinePropertyOrThrow.js | 50 + .../es-abstract/2021/DeletePropertyOrThrow.js | 27 + .../es-abstract/2021/DetachArrayBuffer.js | 43 + .../2021/EnumerableOwnPropertyNames.js | 43 + .../es-abstract/2021/FlattenIntoArray.js | 58 + .../2021/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2021/Get.js | 25 + .../es-abstract/2021/GetGlobalObject.js | 9 + node_modules/es-abstract/2021/GetIterator.js | 65 + node_modules/es-abstract/2021/GetMethod.js | 36 + .../es-abstract/2021/GetOwnPropertyKeys.js | 31 + .../es-abstract/2021/GetPromiseResolve.js | 22 + .../2021/GetPrototypeFromConstructor.js | 29 + .../es-abstract/2021/GetSubstitution.js | 128 + node_modules/es-abstract/2021/GetV.js | 23 + .../es-abstract/2021/HasOwnProperty.js | 22 + node_modules/es-abstract/2021/HasProperty.js | 20 + node_modules/es-abstract/2021/HourFromTime.js | 14 + node_modules/es-abstract/2021/InLeapYear.js | 21 + .../es-abstract/2021/InstanceofOperator.js | 30 + node_modules/es-abstract/2021/Invoke.js | 24 + .../es-abstract/2021/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2021/IsArray.js | 4 + .../es-abstract/2021/IsBigIntElementType.js | 7 + node_modules/es-abstract/2021/IsCallable.js | 5 + .../2021/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2021/IsConcatSpreadable.js | 25 + .../es-abstract/2021/IsConstructor.js | 40 + .../es-abstract/2021/IsDataDescriptor.js | 23 + .../es-abstract/2021/IsDetachedBuffer.js | 30 + node_modules/es-abstract/2021/IsExtensible.js | 18 + .../es-abstract/2021/IsGenericDescriptor.js | 23 + .../es-abstract/2021/IsIntegralNumber.js | 18 + .../es-abstract/2021/IsNoTearConfiguration.js | 16 + node_modules/es-abstract/2021/IsPromise.js | 24 + .../es-abstract/2021/IsPropertyKey.js | 7 + node_modules/es-abstract/2021/IsRegExp.js | 24 + .../es-abstract/2021/IsSharedArrayBuffer.js | 19 + .../es-abstract/2021/IsStringPrefix.js | 47 + .../2021/IsUnclampedIntegerElementType.js | 12 + .../es-abstract/2021/IsUnsignedElementType.js | 11 + .../es-abstract/2021/IterableToList.js | 29 + .../es-abstract/2021/IteratorClose.js | 51 + .../es-abstract/2021/IteratorComplete.js | 18 + node_modules/es-abstract/2021/IteratorNext.js | 18 + node_modules/es-abstract/2021/IteratorStep.js | 13 + .../es-abstract/2021/IteratorValue.js | 18 + .../es-abstract/2021/LengthOfArrayLike.js | 20 + node_modules/es-abstract/2021/MakeDate.js | 13 + node_modules/es-abstract/2021/MakeDay.js | 36 + node_modules/es-abstract/2021/MakeTime.js | 23 + node_modules/es-abstract/2021/MinFromTime.js | 14 + .../es-abstract/2021/MonthFromTime.js | 47 + .../es-abstract/2021/NormalCompletion.js | 9 + node_modules/es-abstract/2021/Number/add.js | 36 + .../es-abstract/2021/Number/bitwiseAND.js | 17 + .../es-abstract/2021/Number/bitwiseNOT.js | 19 + .../es-abstract/2021/Number/bitwiseOR.js | 17 + .../es-abstract/2021/Number/bitwiseXOR.js | 17 + .../es-abstract/2021/Number/divide.js | 22 + node_modules/es-abstract/2021/Number/equal.js | 21 + .../es-abstract/2021/Number/exponentiate.js | 77 + node_modules/es-abstract/2021/Number/index.js | 43 + .../es-abstract/2021/Number/leftShift.js | 25 + .../es-abstract/2021/Number/lessThan.js | 26 + .../es-abstract/2021/Number/multiply.js | 33 + .../es-abstract/2021/Number/remainder.js | 32 + .../es-abstract/2021/Number/sameValue.js | 21 + .../es-abstract/2021/Number/sameValueZero.js | 24 + .../2021/Number/signedRightShift.js | 25 + .../es-abstract/2021/Number/subtract.js | 19 + .../es-abstract/2021/Number/toString.js | 18 + .../es-abstract/2021/Number/unaryMinus.js | 21 + .../2021/Number/unsignedRightShift.js | 25 + .../es-abstract/2021/NumberBitwiseOp.js | 29 + .../es-abstract/2021/NumberToBigInt.js | 26 + .../es-abstract/2021/NumericToRawBytes.js | 209 + .../2021/ObjectDefineProperties.js | 40 + .../2021/OrdinaryCreateFromConstructor.js | 20 + .../2021/OrdinaryDefineOwnProperty.js | 61 + .../2021/OrdinaryGetOwnProperty.js | 44 + .../2021/OrdinaryGetPrototypeOf.js | 21 + .../es-abstract/2021/OrdinaryHasInstance.js | 25 + .../es-abstract/2021/OrdinaryHasProperty.js | 20 + .../es-abstract/2021/OrdinaryObjectCreate.js | 56 + .../2021/OrdinarySetPrototypeOf.js | 53 + .../es-abstract/2021/OrdinaryToPrimitive.js | 38 + .../es-abstract/2021/PromiseResolve.js | 17 + .../es-abstract/2021/QuoteJSONString.js | 54 + .../es-abstract/2021/RawBytesToNumeric.js | 156 + node_modules/es-abstract/2021/RegExpCreate.js | 21 + node_modules/es-abstract/2021/RegExpExec.js | 32 + .../2021/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2021/SameValue.js | 13 + .../es-abstract/2021/SameValueNonNumeric.js | 21 + .../es-abstract/2021/SameValueZero.js | 9 + node_modules/es-abstract/2021/SecFromTime.js | 14 + node_modules/es-abstract/2021/Set.js | 47 + .../es-abstract/2021/SetFunctionLength.js | 31 + .../es-abstract/2021/SetFunctionName.js | 44 + .../es-abstract/2021/SetIntegrityLevel.js | 57 + .../es-abstract/2021/SpeciesConstructor.js | 32 + node_modules/es-abstract/2021/SplitMatch.js | 38 + .../2021/StrictEqualityComparison.js | 17 + node_modules/es-abstract/2021/StringCreate.js | 40 + .../es-abstract/2021/StringGetOwnProperty.js | 48 + .../es-abstract/2021/StringIndexOf.js | 39 + node_modules/es-abstract/2021/StringPad.js | 43 + .../es-abstract/2021/StringToBigInt.js | 23 + .../es-abstract/2021/StringToCodePoints.js | 29 + .../2021/SymbolDescriptiveString.js | 20 + .../es-abstract/2021/TestIntegrityLevel.js | 42 + .../es-abstract/2021/ThrowCompletion.js | 9 + node_modules/es-abstract/2021/TimeClip.js | 21 + node_modules/es-abstract/2021/TimeFromYear.js | 11 + node_modules/es-abstract/2021/TimeString.js | 25 + .../es-abstract/2021/TimeWithinDay.js | 12 + node_modules/es-abstract/2021/ToBigInt.js | 25 + node_modules/es-abstract/2021/ToBigInt64.js | 25 + node_modules/es-abstract/2021/ToBigUint64.js | 22 + node_modules/es-abstract/2021/ToBoolean.js | 5 + node_modules/es-abstract/2021/ToDateString.js | 22 + node_modules/es-abstract/2021/ToIndex.js | 26 + node_modules/es-abstract/2021/ToInt16.js | 10 + node_modules/es-abstract/2021/ToInt32.js | 9 + node_modules/es-abstract/2021/ToInt8.js | 10 + .../es-abstract/2021/ToIntegerOrInfinity.js | 20 + node_modules/es-abstract/2021/ToLength.js | 12 + node_modules/es-abstract/2021/ToNumber.js | 62 + node_modules/es-abstract/2021/ToNumeric.js | 21 + node_modules/es-abstract/2021/ToObject.js | 14 + node_modules/es-abstract/2021/ToPrimitive.js | 12 + .../es-abstract/2021/ToPropertyDescriptor.js | 52 + .../es-abstract/2021/ToPropertyKey.js | 15 + node_modules/es-abstract/2021/ToString.js | 15 + node_modules/es-abstract/2021/ToUint16.js | 19 + node_modules/es-abstract/2021/ToUint32.js | 9 + node_modules/es-abstract/2021/ToUint8.js | 20 + node_modules/es-abstract/2021/ToUint8Clamp.js | 19 + node_modules/es-abstract/2021/TrimString.js | 29 + node_modules/es-abstract/2021/Type.js | 15 + .../es-abstract/2021/UTF16EncodeCodePoint.js | 25 + .../2021/UTF16SurrogatePairToCodePoint.js | 19 + .../es-abstract/2021/UnicodeEscape.js | 27 + .../ValidateAndApplyPropertyDescriptor.js | 170 + .../es-abstract/2021/ValidateAtomicAccess.js | 63 + .../2021/ValidateIntegerTypedArray.js | 53 + .../es-abstract/2021/ValidateTypedArray.js | 30 + node_modules/es-abstract/2021/WeakRefDeref.js | 24 + node_modules/es-abstract/2021/WeekDay.js | 10 + node_modules/es-abstract/2021/YearFromTime.js | 16 + node_modules/es-abstract/2021/abs.js | 11 + node_modules/es-abstract/2021/clamp.js | 18 + node_modules/es-abstract/2021/floor.js | 16 + node_modules/es-abstract/2021/max.js | 7 + node_modules/es-abstract/2021/min.js | 7 + node_modules/es-abstract/2021/modulo.js | 9 + node_modules/es-abstract/2021/msFromTime.js | 11 + node_modules/es-abstract/2021/substring.js | 20 + .../es-abstract/2021/thisBigIntValue.js | 22 + .../es-abstract/2021/thisBooleanValue.js | 15 + .../es-abstract/2021/thisNumberValue.js | 18 + .../es-abstract/2021/thisStringValue.js | 15 + .../es-abstract/2021/thisSymbolValue.js | 19 + .../es-abstract/2021/thisTimeValue.js | 3 + .../2022/AddEntriesFromIterable.js | 52 + .../es-abstract/2022/AddToKeptObjects.js | 21 + .../es-abstract/2022/AdvanceStringIndex.js | 34 + .../ApplyStringOrNumericBinaryOperator.js | 80 + node_modules/es-abstract/2022/ArrayCreate.js | 54 + .../es-abstract/2022/ArraySetLength.js | 85 + .../es-abstract/2022/ArraySpeciesCreate.js | 48 + .../2022/AsyncFromSyncIteratorContinuation.js | 45 + .../es-abstract/2022/AsyncIteratorClose.js | 68 + node_modules/es-abstract/2022/BigInt/add.js | 18 + .../es-abstract/2022/BigInt/bitwiseAND.js | 17 + .../es-abstract/2022/BigInt/bitwiseNOT.js | 17 + .../es-abstract/2022/BigInt/bitwiseOR.js | 17 + .../es-abstract/2022/BigInt/bitwiseXOR.js | 17 + .../es-abstract/2022/BigInt/divide.js | 22 + node_modules/es-abstract/2022/BigInt/equal.js | 17 + .../es-abstract/2022/BigInt/exponentiate.js | 31 + node_modules/es-abstract/2022/BigInt/index.js | 43 + .../es-abstract/2022/BigInt/leftShift.js | 18 + .../es-abstract/2022/BigInt/lessThan.js | 18 + .../es-abstract/2022/BigInt/multiply.js | 18 + .../es-abstract/2022/BigInt/remainder.js | 30 + .../es-abstract/2022/BigInt/sameValue.js | 18 + .../es-abstract/2022/BigInt/sameValueZero.js | 18 + .../2022/BigInt/signedRightShift.js | 18 + .../es-abstract/2022/BigInt/subtract.js | 18 + .../es-abstract/2022/BigInt/toString.js | 18 + .../es-abstract/2022/BigInt/unaryMinus.js | 24 + .../2022/BigInt/unsignedRightShift.js | 17 + .../es-abstract/2022/BigIntBitwiseOp.js | 66 + node_modules/es-abstract/2022/BinaryAnd.js | 14 + node_modules/es-abstract/2022/BinaryOr.js | 14 + node_modules/es-abstract/2022/BinaryXor.js | 14 + .../es-abstract/2022/ByteListBitwiseOp.js | 44 + .../es-abstract/2022/ByteListEqual.js | 33 + node_modules/es-abstract/2022/Call.js | 20 + .../2022/CanonicalNumericIndexString.js | 22 + .../es-abstract/2022/CharacterRange.js | 31 + .../es-abstract/2022/ClearKeptObjects.js | 12 + node_modules/es-abstract/2022/CodePointAt.js | 58 + .../es-abstract/2022/CodePointsToString.js | 27 + .../2022/CompletePropertyDescriptor.js | 39 + .../es-abstract/2022/CompletionRecord.js | 53 + .../es-abstract/2022/CopyDataProperties.js | 70 + .../2022/CreateAsyncFromSyncIterator.js | 121 + .../es-abstract/2022/CreateDataProperty.js | 45 + .../2022/CreateDataPropertyOrThrow.js | 25 + node_modules/es-abstract/2022/CreateHTML.js | 30 + .../2022/CreateIterResultObject.js | 19 + .../2022/CreateListFromArrayLike.js | 44 + .../es-abstract/2022/CreateMethodProperty.js | 40 + .../CreateNonEnumerableDataPropertyOrThrow.js | 29 + .../2022/CreateRegExpStringIterator.js | 100 + node_modules/es-abstract/2022/DateFromTime.js | 54 + node_modules/es-abstract/2022/DateString.js | 30 + node_modules/es-abstract/2022/Day.js | 11 + node_modules/es-abstract/2022/DayFromYear.js | 10 + .../es-abstract/2022/DayWithinYear.js | 11 + node_modules/es-abstract/2022/DaysInYear.js | 18 + .../es-abstract/2022/DefinePropertyOrThrow.js | 50 + .../es-abstract/2022/DeletePropertyOrThrow.js | 27 + .../es-abstract/2022/DetachArrayBuffer.js | 43 + .../2022/EnumerableOwnPropertyNames.js | 43 + .../es-abstract/2022/FlattenIntoArray.js | 58 + .../2022/FromPropertyDescriptor.js | 16 + node_modules/es-abstract/2022/Get.js | 25 + .../es-abstract/2022/GetGlobalObject.js | 9 + node_modules/es-abstract/2022/GetIterator.js | 65 + .../es-abstract/2022/GetMatchIndexPair.js | 26 + .../es-abstract/2022/GetMatchString.js | 27 + node_modules/es-abstract/2022/GetMethod.js | 36 + .../es-abstract/2022/GetOwnPropertyKeys.js | 31 + .../es-abstract/2022/GetPromiseResolve.js | 22 + .../2022/GetPrototypeFromConstructor.js | 29 + .../es-abstract/2022/GetStringIndex.js | 30 + .../es-abstract/2022/GetSubstitution.js | 128 + node_modules/es-abstract/2022/GetV.js | 23 + .../es-abstract/2022/HasOwnProperty.js | 22 + node_modules/es-abstract/2022/HasProperty.js | 20 + node_modules/es-abstract/2022/HourFromTime.js | 14 + node_modules/es-abstract/2022/InLeapYear.js | 21 + .../es-abstract/2022/InstallErrorCause.js | 23 + .../es-abstract/2022/InstanceofOperator.js | 30 + node_modules/es-abstract/2022/Invoke.js | 24 + .../es-abstract/2022/IsAccessorDescriptor.js | 23 + node_modules/es-abstract/2022/IsArray.js | 4 + .../es-abstract/2022/IsBigIntElementType.js | 7 + node_modules/es-abstract/2022/IsCallable.js | 5 + .../2022/IsCompatiblePropertyDescriptor.js | 9 + .../es-abstract/2022/IsConcatSpreadable.js | 25 + .../es-abstract/2022/IsConstructor.js | 40 + .../es-abstract/2022/IsDataDescriptor.js | 23 + .../es-abstract/2022/IsDetachedBuffer.js | 30 + node_modules/es-abstract/2022/IsExtensible.js | 18 + .../es-abstract/2022/IsGenericDescriptor.js | 23 + .../es-abstract/2022/IsIntegralNumber.js | 18 + node_modules/es-abstract/2022/IsLessThan.js | 90 + .../es-abstract/2022/IsLooselyEqual.js | 58 + .../es-abstract/2022/IsNoTearConfiguration.js | 16 + node_modules/es-abstract/2022/IsPromise.js | 24 + .../es-abstract/2022/IsPropertyKey.js | 7 + node_modules/es-abstract/2022/IsRegExp.js | 24 + .../es-abstract/2022/IsSharedArrayBuffer.js | 19 + .../es-abstract/2022/IsStrictlyEqual.js | 20 + .../es-abstract/2022/IsStringPrefix.js | 22 + .../2022/IsStringWellFormedUnicode.js | 26 + .../2022/IsUnclampedIntegerElementType.js | 12 + .../es-abstract/2022/IsUnsignedElementType.js | 11 + .../es-abstract/2022/IterableToList.js | 29 + .../es-abstract/2022/IteratorClose.js | 51 + .../es-abstract/2022/IteratorComplete.js | 18 + node_modules/es-abstract/2022/IteratorNext.js | 18 + node_modules/es-abstract/2022/IteratorStep.js | 13 + .../es-abstract/2022/IteratorValue.js | 18 + .../es-abstract/2022/LengthOfArrayLike.js | 20 + node_modules/es-abstract/2022/MakeDate.js | 13 + node_modules/es-abstract/2022/MakeDay.js | 36 + .../2022/MakeMatchIndicesIndexPairArray.js | 69 + node_modules/es-abstract/2022/MakeTime.js | 23 + node_modules/es-abstract/2022/MinFromTime.js | 14 + .../es-abstract/2022/MonthFromTime.js | 47 + .../es-abstract/2022/NormalCompletion.js | 9 + node_modules/es-abstract/2022/Number/add.js | 36 + .../es-abstract/2022/Number/bitwiseAND.js | 17 + .../es-abstract/2022/Number/bitwiseNOT.js | 19 + .../es-abstract/2022/Number/bitwiseOR.js | 17 + .../es-abstract/2022/Number/bitwiseXOR.js | 17 + .../es-abstract/2022/Number/divide.js | 22 + node_modules/es-abstract/2022/Number/equal.js | 21 + .../es-abstract/2022/Number/exponentiate.js | 77 + node_modules/es-abstract/2022/Number/index.js | 43 + .../es-abstract/2022/Number/leftShift.js | 25 + .../es-abstract/2022/Number/lessThan.js | 26 + .../es-abstract/2022/Number/multiply.js | 33 + .../es-abstract/2022/Number/remainder.js | 32 + .../es-abstract/2022/Number/sameValue.js | 21 + .../es-abstract/2022/Number/sameValueZero.js | 24 + .../2022/Number/signedRightShift.js | 25 + .../es-abstract/2022/Number/subtract.js | 19 + .../es-abstract/2022/Number/toString.js | 18 + .../es-abstract/2022/Number/unaryMinus.js | 21 + .../2022/Number/unsignedRightShift.js | 25 + .../es-abstract/2022/NumberBitwiseOp.js | 29 + .../es-abstract/2022/NumberToBigInt.js | 26 + .../es-abstract/2022/NumericToRawBytes.js | 209 + .../2022/ObjectDefineProperties.js | 40 + .../2022/OrdinaryCreateFromConstructor.js | 20 + .../2022/OrdinaryDefineOwnProperty.js | 61 + .../2022/OrdinaryGetOwnProperty.js | 44 + .../2022/OrdinaryGetPrototypeOf.js | 21 + .../es-abstract/2022/OrdinaryHasInstance.js | 25 + .../es-abstract/2022/OrdinaryHasProperty.js | 20 + .../es-abstract/2022/OrdinaryObjectCreate.js | 56 + .../2022/OrdinarySetPrototypeOf.js | 53 + .../es-abstract/2022/OrdinaryToPrimitive.js | 38 + .../es-abstract/2022/PromiseResolve.js | 17 + .../es-abstract/2022/QuoteJSONString.js | 54 + .../es-abstract/2022/RawBytesToNumeric.js | 156 + node_modules/es-abstract/2022/RegExpCreate.js | 21 + node_modules/es-abstract/2022/RegExpExec.js | 32 + .../es-abstract/2022/RegExpHasFlag.js | 38 + .../2022/RequireObjectCoercible.js | 3 + node_modules/es-abstract/2022/SameValue.js | 13 + .../es-abstract/2022/SameValueNonNumeric.js | 21 + .../es-abstract/2022/SameValueZero.js | 9 + node_modules/es-abstract/2022/SecFromTime.js | 14 + node_modules/es-abstract/2022/Set.js | 47 + .../es-abstract/2022/SetFunctionLength.js | 31 + .../es-abstract/2022/SetFunctionName.js | 44 + .../es-abstract/2022/SetIntegrityLevel.js | 57 + .../es-abstract/2022/SortIndexedProperties.js | 64 + .../es-abstract/2022/SpeciesConstructor.js | 32 + node_modules/es-abstract/2022/StringCreate.js | 40 + .../es-abstract/2022/StringGetOwnProperty.js | 48 + .../es-abstract/2022/StringIndexOf.js | 39 + node_modules/es-abstract/2022/StringPad.js | 43 + .../es-abstract/2022/StringToBigInt.js | 23 + .../es-abstract/2022/StringToCodePoints.js | 29 + .../es-abstract/2022/StringToNumber.js | 56 + .../2022/SymbolDescriptiveString.js | 20 + .../es-abstract/2022/TestIntegrityLevel.js | 42 + .../es-abstract/2022/ThrowCompletion.js | 9 + node_modules/es-abstract/2022/TimeClip.js | 21 + node_modules/es-abstract/2022/TimeFromYear.js | 11 + node_modules/es-abstract/2022/TimeString.js | 25 + .../es-abstract/2022/TimeWithinDay.js | 12 + node_modules/es-abstract/2022/ToBigInt.js | 25 + node_modules/es-abstract/2022/ToBigInt64.js | 25 + node_modules/es-abstract/2022/ToBigUint64.js | 22 + node_modules/es-abstract/2022/ToBoolean.js | 5 + node_modules/es-abstract/2022/ToDateString.js | 22 + node_modules/es-abstract/2022/ToIndex.js | 26 + node_modules/es-abstract/2022/ToInt16.js | 10 + node_modules/es-abstract/2022/ToInt32.js | 9 + node_modules/es-abstract/2022/ToInt8.js | 10 + .../es-abstract/2022/ToIntegerOrInfinity.js | 20 + node_modules/es-abstract/2022/ToLength.js | 12 + node_modules/es-abstract/2022/ToNumber.js | 26 + node_modules/es-abstract/2022/ToNumeric.js | 21 + node_modules/es-abstract/2022/ToObject.js | 14 + node_modules/es-abstract/2022/ToPrimitive.js | 12 + .../es-abstract/2022/ToPropertyDescriptor.js | 52 + .../es-abstract/2022/ToPropertyKey.js | 15 + node_modules/es-abstract/2022/ToString.js | 15 + node_modules/es-abstract/2022/ToUint16.js | 19 + node_modules/es-abstract/2022/ToUint32.js | 9 + node_modules/es-abstract/2022/ToUint8.js | 20 + node_modules/es-abstract/2022/ToUint8Clamp.js | 19 + .../2022/ToZeroPaddedDecimalString.js | 19 + node_modules/es-abstract/2022/TrimString.js | 29 + node_modules/es-abstract/2022/Type.js | 15 + .../es-abstract/2022/TypedArrayElementSize.js | 39 + .../es-abstract/2022/TypedArrayElementType.js | 37 + .../es-abstract/2022/UTF16EncodeCodePoint.js | 25 + .../2022/UTF16SurrogatePairToCodePoint.js | 19 + .../es-abstract/2022/UnicodeEscape.js | 27 + .../ValidateAndApplyPropertyDescriptor.js | 177 + .../es-abstract/2022/ValidateAtomicAccess.js | 46 + .../2022/ValidateIntegerTypedArray.js | 39 + .../es-abstract/2022/ValidateTypedArray.js | 30 + node_modules/es-abstract/2022/WeakRefDeref.js | 24 + node_modules/es-abstract/2022/WeekDay.js | 10 + node_modules/es-abstract/2022/YearFromTime.js | 16 + node_modules/es-abstract/2022/abs.js | 11 + node_modules/es-abstract/2022/clamp.js | 18 + node_modules/es-abstract/2022/floor.js | 16 + node_modules/es-abstract/2022/max.js | 7 + node_modules/es-abstract/2022/min.js | 7 + node_modules/es-abstract/2022/modulo.js | 9 + node_modules/es-abstract/2022/msFromTime.js | 11 + node_modules/es-abstract/2022/substring.js | 20 + .../es-abstract/2022/thisBigIntValue.js | 22 + .../es-abstract/2022/thisBooleanValue.js | 15 + .../es-abstract/2022/thisNumberValue.js | 18 + .../es-abstract/2022/thisStringValue.js | 15 + .../es-abstract/2022/thisSymbolValue.js | 19 + .../es-abstract/2022/thisTimeValue.js | 3 + .../es-abstract/5/FromPropertyDescriptor.js | 4 +- node_modules/es-abstract/CHANGELOG.md | 183 + node_modules/es-abstract/LICENSE | 2 +- node_modules/es-abstract/README.md | 2 +- node_modules/es-abstract/es2015.js | 17 +- node_modules/es-abstract/es2016.js | 11 + node_modules/es-abstract/es2017.js | 16 + node_modules/es-abstract/es2018.js | 19 + node_modules/es-abstract/es2019.js | 20 + node_modules/es-abstract/es2020.js | 27 +- node_modules/es-abstract/es2021.js | 195 + node_modules/es-abstract/es2022.js | 207 + .../es-abstract/helpers/DefineOwnProperty.js | 28 +- node_modules/es-abstract/helpers/IsArray.js | 12 + .../es-abstract/helpers/assertRecord.js | 30 +- node_modules/es-abstract/helpers/assign.js | 2 +- .../helpers/fromPropertyDescriptor.js | 27 + .../es-abstract/helpers/getInferredName.js | 10 +- .../es-abstract/helpers/getIteratorMethod.js | 6 +- .../helpers/getOwnPropertyDescriptor.js | 14 +- node_modules/es-abstract/helpers/getProto.js | 6 +- .../helpers/getSymbolDescription.js | 41 +- .../es-abstract/helpers/isAbstractClosure.js | 9 + node_modules/es-abstract/helpers/isFinite.js | 4 +- .../isFullyPopulatedPropertyDescriptor.js | 7 + .../es-abstract/helpers/isMatchRecord.js | 16 + node_modules/es-abstract/helpers/modBigInt.js | 6 + node_modules/es-abstract/helpers/reduce.js | 9 + .../es-abstract/helpers/regexTester.js | 10 +- node_modules/es-abstract/helpers/setProto.js | 11 +- node_modules/es-abstract/index.js | 6 +- node_modules/es-abstract/operations/2015.js | 983 +- node_modules/es-abstract/operations/2016.js | 1078 +- node_modules/es-abstract/operations/2017.js | 1267 +- node_modules/es-abstract/operations/2018.js | 1375 +- node_modules/es-abstract/operations/2019.js | 1395 +- node_modules/es-abstract/operations/2020.js | 1638 +- node_modules/es-abstract/operations/2021.js | 1279 ++ node_modules/es-abstract/operations/2022.js | 1369 ++ node_modules/es-abstract/package.json | 104 +- node_modules/es-abstract/test/GetIntrinsic.js | 207 - node_modules/es-abstract/test/diffOps.js | 58 - node_modules/es-abstract/test/es2015.js | 144 - node_modules/es-abstract/test/es2016.js | 165 - node_modules/es-abstract/test/es2017.js | 211 - node_modules/es-abstract/test/es2018.js | 229 - node_modules/es-abstract/test/es2019.js | 231 - node_modules/es-abstract/test/es2020.js | 240 - node_modules/es-abstract/test/es5.js | 14 - node_modules/es-abstract/test/es6.js | 18 - node_modules/es-abstract/test/es7.js | 18 - .../test/helpers/OwnPropertyKeys.js | 42 - .../es-abstract/test/helpers/assertRecord.js | 60 - .../test/helpers/createBoundESNamespace.js | 23 - .../test/helpers/defineProperty.js | 27 - .../es-abstract/test/helpers/index.js | 6 - .../es-abstract/test/helpers/isByteValue.js | 28 - .../es-abstract/test/helpers/isCodePoint.js | 20 - .../test/helpers/runManifestTest.js | 27 - node_modules/es-abstract/test/index.js | 35 - node_modules/es-abstract/test/ses-compat.js | 8 - node_modules/es-abstract/test/tests.js | 6962 ------ node_modules/es-set-tostringtag/.eslintrc | 13 + node_modules/es-set-tostringtag/CHANGELOG.md | 33 + node_modules/es-set-tostringtag/LICENSE | 21 + node_modules/es-set-tostringtag/README.md | 43 + node_modules/es-set-tostringtag/index.js | 26 + node_modules/es-set-tostringtag/package.json | 69 + node_modules/es-set-tostringtag/test/index.js | 53 + node_modules/es-shim-unscopables/.eslintrc | 37 + .../es-shim-unscopables/.github/FUNDING.yml | 12 + node_modules/es-shim-unscopables/.nycrc | 9 + node_modules/es-shim-unscopables/CHANGELOG.md | 13 + node_modules/es-shim-unscopables/LICENSE | 21 + node_modules/es-shim-unscopables/README.md | 57 + node_modules/es-shim-unscopables/index.js | 21 + node_modules/es-shim-unscopables/package.json | 49 + .../es-shim-unscopables/test/index.js | 67 + node_modules/es-shim-unscopables/test/with.js | 35 + .../eslint-import-resolver-node/index.js | 36 +- .../eslint-import-resolver-node/package.json | 9 +- node_modules/eslint-module-utils/.eslintrc | 5 - .../eslint-module-utils/.eslintrc.yml | 3 - node_modules/eslint-module-utils/.nycrc | 8 +- node_modules/eslint-module-utils/CHANGELOG.md | 55 +- .../eslint-module-utils/module-require.js | 4 +- .../eslint-module-utils/moduleVisitor.js | 8 +- .../node_modules/find-up/index.js | 48 - .../node_modules/find-up/license | 21 - .../node_modules/find-up/package.json | 53 - .../node_modules/find-up/readme.md | 85 - .../node_modules/locate-path/index.js | 24 - .../node_modules/locate-path/license | 21 - .../node_modules/locate-path/package.json | 47 - .../node_modules/locate-path/readme.md | 99 - .../node_modules/p-limit/index.js | 42 - .../node_modules/p-limit/license | 9 - .../node_modules/p-limit/package.json | 49 - .../node_modules/p-limit/readme.md | 69 - .../node_modules/p-locate/index.js | 31 - .../node_modules/p-locate/package.json | 54 - .../node_modules/p-locate/readme.md | 86 - .../node_modules/p-try/index.js | 4 - .../node_modules/p-try/license | 21 - .../node_modules/p-try/package.json | 43 - .../node_modules/p-try/readme.md | 38 - .../node_modules/path-exists/index.js | 17 - .../node_modules/path-exists/license | 21 - .../node_modules/path-exists/package.json | 40 - .../node_modules/path-exists/readme.md | 50 - .../node_modules/pkg-dir/index.js | 10 - .../node_modules/pkg-dir/license | 21 - .../node_modules/pkg-dir/package.json | 53 - .../node_modules/pkg-dir/readme.md | 64 - node_modules/eslint-module-utils/package.json | 10 +- node_modules/eslint-module-utils/parse.js | 63 +- node_modules/eslint-module-utils/pkgDir.js | 11 + node_modules/eslint-module-utils/pkgUp.js | 56 + node_modules/eslint-module-utils/readPkgUp.js | 52 + node_modules/eslint-module-utils/resolve.js | 15 +- .../eslint-module-utils/unambiguous.js | 5 +- node_modules/eslint-module-utils/visit.js | 24 + .../eslint-plugin-import/CHANGELOG.md | 419 +- .../eslint-plugin-import/CONTRIBUTING.md | 98 +- node_modules/eslint-plugin-import/README.md | 226 +- node_modules/eslint-plugin-import/RELEASE.md | 6 +- .../eslint-plugin-import/config/typescript.js | 7 +- .../rules/consistent-type-specifier-style.md | 91 + .../docs/rules/default.md | 4 + .../docs/rules/dynamic-import-chunkname.md | 4 +- .../eslint-plugin-import/docs/rules/export.md | 4 + .../docs/rules/exports-last.md | 2 + .../docs/rules/extensions.md | 13 +- .../eslint-plugin-import/docs/rules/first.md | 6 +- .../docs/rules/group-exports.md | 2 + .../docs/rules/imports-first.md | 10 +- .../docs/rules/max-dependencies.md | 40 +- .../eslint-plugin-import/docs/rules/named.md | 4 + .../docs/rules/namespace.md | 4 + .../docs/rules/newline-after-import.md | 33 +- .../docs/rules/no-absolute-path.md | 8 +- .../eslint-plugin-import/docs/rules/no-amd.md | 2 + .../docs/rules/no-anonymous-default-export.md | 8 + .../docs/rules/no-commonjs.md | 2 + .../docs/rules/no-cycle.md | 20 + .../docs/rules/no-default-export.md | 4 +- .../docs/rules/no-deprecated.md | 4 +- .../docs/rules/no-duplicates.md | 35 +- .../docs/rules/no-dynamic-require.md | 6 +- .../docs/rules/no-empty-named-blocks.md | 43 + .../docs/rules/no-extraneous-dependencies.md | 20 +- .../docs/rules/no-import-module-exports.md | 6 +- .../docs/rules/no-internal-modules.md | 2 + .../docs/rules/no-mutable-exports.md | 6 +- .../docs/rules/no-named-as-default-member.md | 4 + .../docs/rules/no-named-as-default.md | 4 + .../docs/rules/no-named-default.md | 2 + .../docs/rules/no-named-export.md | 4 +- .../docs/rules/no-namespace.md | 6 +- .../docs/rules/no-nodejs-modules.md | 4 +- .../docs/rules/no-relative-packages.md | 5 + .../docs/rules/no-relative-parent-imports.md | 2 + .../docs/rules/no-restricted-paths.md | 124 +- .../docs/rules/no-self-import.md | 4 +- .../docs/rules/no-unassigned-import.md | 4 +- .../docs/rules/no-unresolved.md | 29 +- .../docs/rules/no-unused-modules.md | 4 +- .../docs/rules/no-useless-path-segments.md | 13 +- .../docs/rules/no-webpack-loader-syntax.md | 2 + .../eslint-plugin-import/docs/rules/order.md | 90 +- .../docs/rules/prefer-default-export.md | 132 +- .../docs/rules/unambiguous.md | 6 +- .../eslint-plugin-import/lib/ExportMap.js | 166 +- .../lib/core/importType.js | 30 +- .../lib/core/packagePath.js | 6 +- .../eslint-plugin-import/lib/index.js | 4 +- .../rules/consistent-type-specifier-style.js | 217 + .../eslint-plugin-import/lib/rules/default.js | 4 +- .../lib/rules/dynamic-import-chunkname.js | 14 +- .../eslint-plugin-import/lib/rules/export.js | 134 +- .../lib/rules/exports-last.js | 4 +- .../lib/rules/extensions.js | 11 +- .../eslint-plugin-import/lib/rules/first.js | 7 +- .../lib/rules/group-exports.js | 4 +- .../lib/rules/imports-first.js | 4 +- .../lib/rules/max-dependencies.js | 4 +- .../eslint-plugin-import/lib/rules/named.js | 17 +- .../lib/rules/namespace.js | 89 +- .../lib/rules/newline-after-import.js | 48 +- .../lib/rules/no-absolute-path.js | 24 +- .../eslint-plugin-import/lib/rules/no-amd.js | 4 +- .../lib/rules/no-anonymous-default-export.js | 11 +- .../lib/rules/no-commonjs.js | 6 +- .../lib/rules/no-cycle.js | 51 +- .../lib/rules/no-default-export.js | 26 +- .../lib/rules/no-deprecated.js | 4 +- .../lib/rules/no-duplicates.js | 73 +- .../lib/rules/no-dynamic-require.js | 19 +- .../lib/rules/no-empty-named-blocks.js | 108 + .../lib/rules/no-extraneous-dependencies.js | 70 +- .../lib/rules/no-import-module-exports.js | 30 +- .../lib/rules/no-internal-modules.js | 6 +- .../lib/rules/no-mutable-exports.js | 4 +- .../lib/rules/no-named-as-default-member.js | 4 +- .../lib/rules/no-named-as-default.js | 4 +- .../lib/rules/no-named-default.js | 6 +- .../lib/rules/no-named-export.js | 10 +- .../lib/rules/no-namespace.js | 23 +- .../lib/rules/no-nodejs-modules.js | 4 +- .../lib/rules/no-relative-packages.js | 18 +- .../lib/rules/no-relative-parent-imports.js | 4 +- .../lib/rules/no-restricted-paths.js | 188 +- .../lib/rules/no-self-import.js | 5 +- .../lib/rules/no-unassigned-import.js | 4 +- .../lib/rules/no-unresolved.js | 39 +- .../lib/rules/no-unused-modules.js | 135 +- .../lib/rules/no-useless-path-segments.js | 4 +- .../lib/rules/no-webpack-loader-syntax.js | 4 +- .../eslint-plugin-import/lib/rules/order.js | 235 +- .../lib/rules/prefer-default-export.js | 36 +- .../lib/rules/unambiguous.js | 4 +- .../node_modules/.bin/semver | 1 + .../node_modules/debug/.coveralls.yml | 1 - .../node_modules/debug/.eslintrc | 11 - .../node_modules/debug/.npmignore | 9 - .../node_modules/debug/.travis.yml | 14 - .../node_modules/debug/CHANGELOG.md | 35 +- .../node_modules/debug/Makefile | 50 - .../node_modules/debug/README.md | 251 +- .../node_modules/debug/component.json | 19 - .../node_modules/debug/karma.conf.js | 70 - .../node_modules/debug/package.json | 34 +- .../node_modules/debug/src/browser.js | 159 +- .../node_modules/debug/src/common.js | 249 + .../node_modules/debug/src/debug.js | 202 - .../node_modules/debug/src/index.js | 8 +- .../node_modules/debug/src/inspector-log.js | 15 - .../node_modules/debug/src/node.js | 221 +- .../node_modules/find-up/index.js | 48 - .../node_modules/find-up/license | 21 - .../node_modules/find-up/package.json | 53 - .../node_modules/find-up/readme.md | 85 - .../node_modules/locate-path/index.js | 24 - .../node_modules/locate-path/license | 21 - .../node_modules/locate-path/package.json | 47 - .../node_modules/locate-path/readme.md | 99 - .../node_modules/ms/index.js | 152 - .../node_modules/ms/package.json | 37 - .../node_modules/ms/readme.md | 51 - .../node_modules/p-limit/index.js | 42 - .../node_modules/p-limit/license | 9 - .../node_modules/p-limit/package.json | 49 - .../node_modules/p-limit/readme.md | 69 - .../node_modules/p-locate/index.js | 31 - .../node_modules/p-locate/license | 21 - .../node_modules/p-locate/package.json | 54 - .../node_modules/p-locate/readme.md | 86 - .../node_modules/p-try/index.js | 4 - .../node_modules/p-try/license | 21 - .../node_modules/p-try/package.json | 43 - .../node_modules/p-try/readme.md | 38 - .../node_modules/path-exists/index.js | 17 - .../node_modules/path-exists/license | 21 - .../node_modules/path-exists/package.json | 40 - .../node_modules/path-exists/readme.md | 50 - .../node_modules/semver/CHANGELOG.md | 31 + .../node_modules/semver/LICENSE | 0 .../node_modules/semver/README.md | 39 +- .../node_modules/semver/bin/semver.js} | 18 +- .../node_modules/semver/package.json | 8 +- .../node_modules/semver/range.bnf | 0 .../node_modules/semver/semver.js | 385 +- .../eslint-plugin-import/package.json | 58 +- node_modules/for-each/.editorconfig | 20 + node_modules/for-each/.eslintrc | 16 + node_modules/for-each/.travis.yml | 45 + .../ms/license.md => for-each/LICENSE} | 3 +- node_modules/for-each/README.md | 43 + node_modules/for-each/index.js | 62 + node_modules/for-each/package.json | 65 + node_modules/for-each/test/.eslintrc | 8 + node_modules/for-each/test/test.js | 182 + .../function.prototype.name/.editorconfig | 20 + .../.eslintignore | 0 .../function.prototype.name/.eslintrc | 9 + .../.github/FUNDING.yml | 12 + node_modules/function.prototype.name/.nycrc | 9 + .../function.prototype.name/CHANGELOG.md | 82 + .../LICENSE | 10 +- .../function.prototype.name/README.md | 42 + node_modules/function.prototype.name/auto.js | 3 + .../helpers/functionsHaveNames.js | 5 + .../function.prototype.name/implementation.js | 43 + node_modules/function.prototype.name/index.js | 18 + .../function.prototype.name/package.json | 80 + .../function.prototype.name/polyfill.js | 7 + node_modules/function.prototype.name/shim.js | 35 + .../test/implementation.js | 20 + .../function.prototype.name/test/index.js | 23 + .../function.prototype.name/test/shimmed.js | 21 + .../function.prototype.name/test/tests.js | 60 + .../function.prototype.name/test/uglified.js | 17 + .../functions-have-names/.editorconfig | 20 + node_modules/functions-have-names/.eslintrc | 19 + .../functions-have-names/.github/FUNDING.yml | 12 + node_modules/functions-have-names/.nycrc | 9 + .../functions-have-names/CHANGELOG.md | 89 + node_modules/functions-have-names/LICENSE | 21 + node_modules/functions-have-names/README.md | 40 + node_modules/functions-have-names/index.js | 31 + .../functions-have-names/package.json | 55 + .../functions-have-names/test/index.js | 65 + node_modules/get-intrinsic/.eslintrc | 10 +- node_modules/get-intrinsic/.nycrc | 4 - node_modules/get-intrinsic/CHANGELOG.md | 34 + node_modules/get-intrinsic/README.md | 8 +- node_modules/get-intrinsic/index.js | 4 + node_modules/get-intrinsic/package.json | 37 +- .../get-intrinsic/test/GetIntrinsic.js | 36 +- .../.eslintignore | 0 node_modules/get-symbol-description/.eslintrc | 14 + .../.github/FUNDING.yml | 12 + node_modules/get-symbol-description/.nycrc | 9 + .../get-symbol-description/CHANGELOG.md | 16 + node_modules/get-symbol-description/LICENSE | 21 + node_modules/get-symbol-description/README.md | 43 + .../get-symbol-description/getInferredName.js | 10 + node_modules/get-symbol-description/index.js | 43 + .../get-symbol-description/package.json | 71 + .../test/index.js} | 6 +- node_modules/globalthis/.eslintrc | 18 + node_modules/globalthis/.nycrc | 10 + node_modules/globalthis/CHANGELOG.md | 96 + .../p-locate/license => globalthis/LICENSE} | 10 +- node_modules/globalthis/README.md | 70 + node_modules/globalthis/auto.js | 3 + .../globalthis/implementation.browser.js | 11 + node_modules/globalthis/implementation.js | 3 + node_modules/globalthis/index.js | 19 + node_modules/globalthis/package.json | 97 + node_modules/globalthis/polyfill.js | 10 + node_modules/globalthis/shim.js | 22 + .../globalthis/test/implementation.js | 11 + node_modules/globalthis/test/index.js | 11 + node_modules/globalthis/test/native.js | 26 + node_modules/globalthis/test/shimmed.js | 29 + node_modules/globalthis/test/tests.js | 36 + node_modules/gopd/.eslintrc | 16 + node_modules/gopd/.github/FUNDING.yml | 12 + node_modules/gopd/CHANGELOG.md | 25 + node_modules/gopd/LICENSE | 21 + node_modules/gopd/README.md | 40 + node_modules/gopd/index.js | 16 + node_modules/gopd/package.json | 71 + node_modules/gopd/test/index.js | 35 + node_modules/has-bigints/.eslintrc | 4 - node_modules/has-bigints/.nycrc | 4 - node_modules/has-bigints/CHANGELOG.md | 17 + node_modules/has-bigints/README.md | 30 +- node_modules/has-bigints/index.js | 2 +- node_modules/has-bigints/package.json | 17 +- .../has-property-descriptors/.eslintrc | 13 + .../.github/FUNDING.yml | 12 + node_modules/has-property-descriptors/.nycrc | 9 + .../has-property-descriptors/CHANGELOG.md | 16 + node_modules/has-property-descriptors/LICENSE | 21 + .../has-property-descriptors/README.md | 43 + .../has-property-descriptors/index.js | 33 + .../has-property-descriptors/package.json | 70 + .../has-property-descriptors/test/index.js | 57 + node_modules/has-proto/.eslintrc | 5 + node_modules/has-proto/.github/FUNDING.yml | 12 + node_modules/has-proto/CHANGELOG.md | 23 + node_modules/has-proto/LICENSE | 21 + node_modules/has-proto/README.md | 38 + node_modules/has-proto/index.js | 11 + node_modules/has-proto/package.json | 74 + node_modules/has-proto/test/index.js | 19 + node_modules/has-symbols/.nycrc | 4 - node_modules/has-symbols/CHANGELOG.md | 17 + node_modules/has-symbols/README.md | 6 + node_modules/has-symbols/package.json | 53 +- node_modules/has-tostringtag/.eslintrc | 11 + .../has-tostringtag/.github/FUNDING.yml | 12 + node_modules/has-tostringtag/CHANGELOG.md | 20 + node_modules/has-tostringtag/LICENSE | 21 + node_modules/has-tostringtag/README.md | 46 + node_modules/has-tostringtag/index.js | 7 + node_modules/has-tostringtag/package.json | 84 + node_modules/has-tostringtag/shams.js | 7 + node_modules/has-tostringtag/test/index.js | 21 + .../has-tostringtag/test/shams/core-js.js | 28 + .../test/shams/get-own-property-symbols.js | 28 + node_modules/has-tostringtag/test/tests.js | 14 + node_modules/hosted-git-info/CHANGELOG.md | 151 - node_modules/hosted-git-info/LICENSE | 13 - node_modules/hosted-git-info/README.md | 133 - node_modules/hosted-git-info/git-host-info.js | 79 - node_modules/hosted-git-info/git-host.js | 156 - node_modules/hosted-git-info/index.js | 148 - node_modules/hosted-git-info/package.json | 40 - node_modules/internal-slot/.editorconfig | 20 + .../.eslintignore | 0 node_modules/internal-slot/.eslintrc | 11 + .../internal-slot/.github/FUNDING.yml | 12 + node_modules/internal-slot/.nycrc | 9 + node_modules/internal-slot/CHANGELOG.md | 79 + node_modules/internal-slot/LICENSE | 21 + node_modules/internal-slot/README.md | 58 + node_modules/internal-slot/index.js | 62 + node_modules/internal-slot/package.json | 71 + node_modules/internal-slot/test/index.js | 121 + node_modules/is-array-buffer/.eslintrc | 13 + .../is-array-buffer/.github/FUNDING.yml | 12 + node_modules/is-array-buffer/.nycrc | 9 + node_modules/is-array-buffer/CHANGELOG.md | 50 + node_modules/is-array-buffer/LICENSE | 21 + node_modules/is-array-buffer/README.md | 56 + node_modules/is-array-buffer/index.js | 43 + node_modules/is-array-buffer/package.json | 78 + node_modules/is-array-buffer/test/index.js | 41 + node_modules/is-arrayish/.istanbul.yml | 4 - node_modules/is-arrayish/.npmignore | 5 - node_modules/is-arrayish/.travis.yml | 17 - node_modules/is-arrayish/README.md | 16 - node_modules/is-arrayish/index.js | 10 - node_modules/is-arrayish/package.json | 34 - node_modules/is-bigint/.eslintrc | 4 - node_modules/is-bigint/CHANGELOG.md | 17 + node_modules/is-bigint/README.md | 6 + node_modules/is-bigint/index.js | 4 +- node_modules/is-bigint/package.json | 13 +- node_modules/is-bigint/test/index.js | 11 +- node_modules/is-boolean-object/CHANGELOG.md | 7 + node_modules/is-boolean-object/index.js | 2 +- node_modules/is-boolean-object/package.json | 13 +- node_modules/is-boolean-object/test/index.js | 4 +- node_modules/is-callable/.editorconfig | 10 + node_modules/is-callable/.eslintrc | 11 - .../is-callable/.github/main.workflow | 14 - node_modules/is-callable/.istanbul.yml | 47 - node_modules/is-callable/.nycrc | 4 - node_modules/is-callable/CHANGELOG.md | 64 + node_modules/is-callable/README.md | 45 +- node_modules/is-callable/index.js | 45 +- node_modules/is-callable/package.json | 66 +- node_modules/is-callable/test/index.js | 170 +- node_modules/is-core-module/.eslintignore | 1 - node_modules/is-core-module/.eslintrc | 2 +- node_modules/is-core-module/CHANGELOG.md | 61 + node_modules/is-core-module/core.json | 129 +- node_modules/is-core-module/index.js | 2 +- node_modules/is-core-module/package.json | 34 +- node_modules/is-core-module/test/index.js | 69 +- node_modules/is-date-object/.jscs.json | 176 - node_modules/is-date-object/CHANGELOG.md | 8 + node_modules/is-date-object/index.js | 2 +- node_modules/is-date-object/package.json | 11 +- node_modules/is-date-object/test/index.js | 4 +- node_modules/is-negative-zero/.eslintrc | 2 - .../is-negative-zero/.github/FUNDING.yml | 12 + .../.github/workflows/node-4+.yml | 54 - .../.github/workflows/node-iojs.yml | 58 - .../.github/workflows/node-pretest.yml | 26 - .../.github/workflows/node-zero.yml | 60 - .../.github/workflows/rebase.yml | 15 - .../.github/workflows/require-allow-edits.yml | 12 - node_modules/is-negative-zero/.nycrc | 4 - node_modules/is-negative-zero/CHANGELOG.md | 19 + node_modules/is-negative-zero/README.md | 37 +- node_modules/is-negative-zero/package.json | 22 +- node_modules/is-number-object/.editorconfig | 3 + node_modules/is-number-object/.eslintignore | 1 - node_modules/is-number-object/.eslintrc | 7 + node_modules/is-number-object/.nycrc | 3 +- node_modules/is-number-object/CHANGELOG.md | 20 + node_modules/is-number-object/index.js | 2 +- node_modules/is-number-object/package.json | 35 +- node_modules/is-number-object/test/corejs.js | 5 - node_modules/is-number-object/test/index.js | 4 +- node_modules/is-regex/CHANGELOG.md | 7 + node_modules/is-regex/index.js | 3 +- node_modules/is-regex/package.json | 12 +- node_modules/is-regex/test/index.js | 3 +- .../.eslintignore | 0 node_modules/is-shared-array-buffer/.eslintrc | 5 + .../.github/FUNDING.yml | 12 + node_modules/is-shared-array-buffer/.nycrc | 9 + .../is-shared-array-buffer/CHANGELOG.md | 44 + node_modules/is-shared-array-buffer/LICENSE | 21 + node_modules/is-shared-array-buffer/README.md | 58 + node_modules/is-shared-array-buffer/index.js | 21 + .../is-shared-array-buffer/package.json | 70 + .../is-shared-array-buffer/test/index.js | 27 + node_modules/is-string/CHANGELOG.md | 7 + node_modules/is-string/index.js | 2 +- node_modules/is-string/package.json | 13 +- node_modules/is-string/test/index.js | 4 +- node_modules/is-typed-array/.editorconfig | 20 + node_modules/is-typed-array/.eslintrc | 13 + .../is-typed-array/.github/FUNDING.yml | 12 + node_modules/is-typed-array/.nycrc | 9 + node_modules/is-typed-array/CHANGELOG.md | 120 + node_modules/is-typed-array/LICENSE | 22 + node_modules/is-typed-array/README.md | 70 + node_modules/is-typed-array/index.js | 60 + node_modules/is-typed-array/package.json | 118 + node_modules/is-typed-array/test/index.js | 103 + .../{has-symbols => is-weakref}/.eslintignore | 0 node_modules/is-weakref/.eslintrc | 5 + node_modules/is-weakref/.github/FUNDING.yml | 12 + node_modules/is-weakref/.nycrc | 9 + node_modules/is-weakref/CHANGELOG.md | 54 + node_modules/is-weakref/LICENSE | 21 + node_modules/is-weakref/README.md | 52 + node_modules/is-weakref/index.js | 21 + node_modules/is-weakref/package.json | 63 + node_modules/is-weakref/test/index.js | 26 + .../json-parse-better-errors/CHANGELOG.md | 46 - .../json-parse-better-errors/LICENSE.md | 7 - .../json-parse-better-errors/README.md | 46 - .../json-parse-better-errors/index.js | 38 - .../json-parse-better-errors/package.json | 45 - node_modules/json5/CHANGELOG.md | 274 - node_modules/json5/dist/index.js | 2 +- node_modules/json5/lib/parse.js | 2 +- node_modules/json5/package.json | 2 +- node_modules/minimist/.eslintrc | 54 + node_modules/minimist/.github/FUNDING.yml | 12 + node_modules/minimist/.nycrc | 14 + node_modules/minimist/.travis.yml | 8 - node_modules/minimist/CHANGELOG.md | 212 + .../minimist/{readme.markdown => README.md} | 21 +- node_modules/minimist/package.json | 48 +- node_modules/normalize-package-data/AUTHORS | 4 - node_modules/normalize-package-data/LICENSE | 30 - node_modules/normalize-package-data/README.md | 106 - .../lib/extract_description.js | 14 - .../normalize-package-data/lib/fixer.js | 418 - .../lib/make_warning.js | 23 - .../normalize-package-data/lib/normalize.js | 39 - .../normalize-package-data/lib/safe_format.js | 9 - .../normalize-package-data/lib/typos.json | 25 - .../lib/warning_messages.json | 30 - .../node_modules/.bin/semver | 1 - .../normalize-package-data/package.json | 31 - node_modules/object-inspect/.eslintignore | 1 - node_modules/object-inspect/.eslintrc | 13 +- node_modules/object-inspect/CHANGELOG.md | 370 + node_modules/object-inspect/index.js | 120 +- .../object-inspect/package-support.json | 20 + node_modules/object-inspect/package.json | 48 +- node_modules/object-inspect/readme.markdown | 1 + node_modules/object-inspect/test/bigint.js | 16 +- node_modules/object-inspect/test/err.js | 23 +- node_modules/object-inspect/test/fakes.js | 4 +- node_modules/object-inspect/test/has.js | 31 +- node_modules/object-inspect/test/inspect.js | 37 + node_modules/object-inspect/test/number.js | 48 +- .../object-inspect/test/toStringTag.js | 4 +- node_modules/object-inspect/test/values.js | 9 +- node_modules/object.assign/.eslintignore | 1 - node_modules/object.assign/.eslintrc | 4 +- .../.github/workflows/rebase.yml | 15 - .../.github/workflows/require-allow-edits.yml | 14 - node_modules/object.assign/.nycrc | 5 - node_modules/object.assign/CHANGELOG.md | 24 + node_modules/object.assign/README.md | 13 +- node_modules/object.assign/dist/browser.js | 231 +- node_modules/object.assign/implementation.js | 46 +- node_modules/object.assign/package.json | 39 +- node_modules/object.assign/test.html | 18458 ++++++++++++++++ .../object.assign/test/implementation.js | 19 + node_modules/object.assign/test/tests.js | 9 +- node_modules/object.values/.eslintignore | 1 - node_modules/object.values/.eslintrc | 5 +- node_modules/object.values/CHANGELOG.md | 21 + node_modules/object.values/implementation.js | 5 +- node_modules/object.values/package.json | 36 +- node_modules/parse-json/index.js | 33 - node_modules/parse-json/license | 9 - node_modules/parse-json/package.json | 43 - node_modules/parse-json/readme.md | 83 - node_modules/pkg-up/index.js | 5 - node_modules/pkg-up/license | 21 - .../pkg-up/node_modules/find-up/index.js | 48 - .../pkg-up/node_modules/find-up/license | 21 - .../pkg-up/node_modules/find-up/package.json | 53 - .../pkg-up/node_modules/find-up/readme.md | 85 - .../pkg-up/node_modules/locate-path/index.js | 24 - .../pkg-up/node_modules/locate-path/license | 21 - .../node_modules/locate-path/package.json | 47 - .../pkg-up/node_modules/locate-path/readme.md | 99 - .../pkg-up/node_modules/p-limit/index.js | 42 - .../pkg-up/node_modules/p-limit/license | 9 - .../pkg-up/node_modules/p-limit/package.json | 49 - .../pkg-up/node_modules/p-limit/readme.md | 69 - .../pkg-up/node_modules/p-locate/index.js | 31 - .../pkg-up/node_modules/p-locate/license | 21 - .../pkg-up/node_modules/p-locate/package.json | 54 - .../pkg-up/node_modules/p-locate/readme.md | 86 - .../pkg-up/node_modules/p-try/index.js | 4 - .../pkg-up/node_modules/p-try/license | 21 - .../pkg-up/node_modules/p-try/package.json | 43 - .../pkg-up/node_modules/p-try/readme.md | 38 - .../pkg-up/node_modules/path-exists/index.js | 17 - .../pkg-up/node_modules/path-exists/license | 21 - .../node_modules/path-exists/package.json | 40 - .../pkg-up/node_modules/path-exists/readme.md | 50 - node_modules/pkg-up/package.json | 50 - node_modules/pkg-up/readme.md | 64 - node_modules/read-pkg-up/index.js | 26 - node_modules/read-pkg-up/license | 9 - .../read-pkg-up/node_modules/find-up/index.js | 48 - .../read-pkg-up/node_modules/find-up/license | 21 - .../node_modules/find-up/package.json | 53 - .../node_modules/find-up/readme.md | 85 - .../node_modules/load-json-file/index.js | 11 - .../node_modules/load-json-file/license | 21 - .../node_modules/load-json-file/package.json | 43 - .../node_modules/load-json-file/readme.md | 45 - .../node_modules/locate-path/index.js | 24 - .../node_modules/locate-path/license | 21 - .../node_modules/locate-path/package.json | 47 - .../node_modules/locate-path/readme.md | 99 - .../read-pkg-up/node_modules/p-limit/index.js | 42 - .../read-pkg-up/node_modules/p-limit/license | 9 - .../node_modules/p-limit/package.json | 49 - .../node_modules/p-limit/readme.md | 69 - .../node_modules/p-locate/index.js | 31 - .../read-pkg-up/node_modules/p-locate/license | 21 - .../node_modules/p-locate/package.json | 54 - .../node_modules/p-locate/readme.md | 86 - .../read-pkg-up/node_modules/p-try/index.js | 4 - .../read-pkg-up/node_modules/p-try/license | 21 - .../node_modules/p-try/package.json | 43 - .../read-pkg-up/node_modules/p-try/readme.md | 38 - .../node_modules/path-exists/index.js | 17 - .../node_modules/path-exists/license | 21 - .../node_modules/path-exists/package.json | 40 - .../node_modules/path-exists/readme.md | 50 - .../node_modules/path-type/index.js | 42 - .../node_modules/path-type/license | 9 - .../node_modules/path-type/package.json | 45 - .../node_modules/path-type/readme.md | 42 - .../read-pkg-up/node_modules/pify/index.js | 84 - .../read-pkg-up/node_modules/pify/license | 9 - .../node_modules/pify/package.json | 51 - .../read-pkg-up/node_modules/pify/readme.md | 131 - .../node_modules/read-pkg/index.js | 47 - .../read-pkg-up/node_modules/read-pkg/license | 9 - .../node_modules/read-pkg/package.json | 42 - .../node_modules/read-pkg/readme.md | 79 - node_modules/read-pkg-up/package.json | 57 - node_modules/read-pkg-up/readme.md | 80 - .../regexp.prototype.flags/.editorconfig | 13 + node_modules/regexp.prototype.flags/.eslintrc | 19 + node_modules/regexp.prototype.flags/.nycrc | 9 + .../regexp.prototype.flags/CHANGELOG.md | 190 + .../LICENSE | 3 +- node_modules/regexp.prototype.flags/README.md | 54 + node_modules/regexp.prototype.flags/auto.js | 3 + .../regexp.prototype.flags/implementation.js | 39 + node_modules/regexp.prototype.flags/index.js | 18 + .../regexp.prototype.flags/package.json | 92 + .../regexp.prototype.flags/polyfill.js | 36 + node_modules/regexp.prototype.flags/shim.js | 26 + .../test/implementation.js | 20 + .../regexp.prototype.flags/test/index.js | 17 + .../regexp.prototype.flags/test/shimmed.js | 48 + .../regexp.prototype.flags/test/tests.js | 141 + node_modules/resolve/.eslintignore | 1 - node_modules/resolve/.eslintrc | 42 +- node_modules/resolve/.github/FUNDING.yml | 12 + node_modules/resolve/appveyor.yml | 74 - node_modules/resolve/async.js | 3 + node_modules/resolve/bin/resolve | 50 + node_modules/resolve/lib/async.js | 13 +- node_modules/resolve/lib/core.js | 3 +- node_modules/resolve/lib/core.json | 102 +- node_modules/resolve/lib/homedir.js | 24 + .../resolve/lib/node-modules-paths.js | 2 +- node_modules/resolve/lib/sync.js | 21 +- node_modules/resolve/package.json | 44 +- node_modules/resolve/readme.markdown | 48 +- node_modules/resolve/sync.js | 3 + node_modules/resolve/test/.eslintrc | 5 - node_modules/resolve/test/core.js | 9 +- node_modules/resolve/test/home_paths.js | 127 + node_modules/resolve/test/home_paths_sync.js | 114 + node_modules/resolve/test/mock_sync.js | 6 +- node_modules/resolve/test/node_path.js | 2 +- node_modules/resolve/test/resolver.js | 151 +- .../resolve/test/resolver/false_main/index.js | 0 .../test/resolver/false_main/package.json | 4 + .../test/resolver/invalid_main/package.json | 2 +- .../resolver/malformed_package_json/index.js | 0 .../malformed_package_json/package.json | 1 + node_modules/resolve/test/resolver_sync.js | 414 +- node_modules/safe-regex-test/.eslintrc | 9 + .../safe-regex-test/.github/FUNDING.yml | 12 + node_modules/safe-regex-test/CHANGELOG.md | 15 + node_modules/safe-regex-test/LICENSE | 21 + node_modules/safe-regex-test/README.md | 42 + node_modules/safe-regex-test/index.js | 17 + node_modules/safe-regex-test/package.json | 75 + node_modules/safe-regex-test/test/index.js | 37 + .../.eslintignore | 0 node_modules/side-channel/.eslintrc | 11 + node_modules/side-channel/.github/FUNDING.yml | 12 + node_modules/side-channel/.nycrc | 13 + node_modules/side-channel/CHANGELOG.md | 65 + node_modules/side-channel/LICENSE | 21 + node_modules/side-channel/README.md | 2 + node_modules/side-channel/index.js | 124 + node_modules/side-channel/package.json | 67 + node_modules/side-channel/test/index.js | 78 + node_modules/spdx-correct/LICENSE | 202 - node_modules/spdx-correct/README.md | 14 - node_modules/spdx-correct/index.js | 343 - node_modules/spdx-correct/package.json | 39 - node_modules/spdx-exceptions/README.md | 36 - node_modules/spdx-exceptions/index.json | 40 - node_modules/spdx-exceptions/package.json | 17 - node_modules/spdx-expression-parse/AUTHORS | 4 - node_modules/spdx-expression-parse/LICENSE | 22 - node_modules/spdx-expression-parse/README.md | 91 - node_modules/spdx-expression-parse/index.js | 8 - .../spdx-expression-parse/package.json | 40 - node_modules/spdx-expression-parse/parse.js | 138 - node_modules/spdx-expression-parse/scan.js | 131 - node_modules/spdx-license-ids/README.md | 52 - node_modules/spdx-license-ids/deprecated.json | 24 - node_modules/spdx-license-ids/index.json | 370 - node_modules/spdx-license-ids/package.json | 39 - .../string.prototype.trimend/.eslintignore | 1 - .../string.prototype.trimend/.eslintrc | 9 + node_modules/string.prototype.trimend/.nycrc | 4 - .../string.prototype.trimend/CHANGELOG.md | 27 + .../string.prototype.trimend/README.md | 8 +- .../implementation.js | 5 +- .../string.prototype.trimend/index.js | 9 +- .../string.prototype.trimend/package.json | 34 +- .../string.prototype.trimend/test/tests.js | 9 +- .../string.prototype.trimstart/.eslintignore | 1 - .../string.prototype.trimstart/.eslintrc | 9 + .../string.prototype.trimstart/.nycrc | 4 - .../string.prototype.trimstart/CHANGELOG.md | 27 + .../string.prototype.trimstart/README.md | 6 + .../implementation.js | 5 +- .../string.prototype.trimstart/index.js | 9 +- .../string.prototype.trimstart/package.json | 34 +- .../string.prototype.trimstart/test/tests.js | 9 +- .../supports-preserve-symlinks-flag/.eslintrc | 14 + .../.github/FUNDING.yml | 12 + .../supports-preserve-symlinks-flag/.nycrc | 9 + .../CHANGELOG.md | 22 + .../supports-preserve-symlinks-flag/LICENSE | 21 + .../supports-preserve-symlinks-flag/README.md | 42 + .../browser.js | 3 + .../supports-preserve-symlinks-flag/index.js | 9 + .../package.json | 70 + .../test/index.js | 29 + node_modules/tsconfig-paths/.nycrc.json | 8 - node_modules/tsconfig-paths/CHANGELOG.md | 62 +- node_modules/tsconfig-paths/README.md | 55 +- .../lib/__tests__/config-loader.test.d.ts | 1 + .../lib/__tests__/config-loader.test.js | 88 + .../lib/__tests__/config-loader.test.js.map | 1 + .../lib/__tests__/data/match-path-data.d.ts | 17 + .../lib/__tests__/data/match-path-data.js | 205 + .../lib/__tests__/data/match-path-data.js.map | 1 + .../lib/__tests__/filesystem.test.d.ts | 1 + .../lib/__tests__/filesystem.test.js | 64 + .../lib/__tests__/filesystem.test.js.map | 1 + .../lib/__tests__/mapping-entry.test.d.ts | 1 + .../lib/__tests__/mapping-entry.test.js | 66 + .../lib/__tests__/mapping-entry.test.js.map | 1 + .../lib/__tests__/match-path-async.test.d.ts | 1 + .../lib/__tests__/match-path-async.test.js | 19 + .../__tests__/match-path-async.test.js.map | 1 + .../lib/__tests__/match-path-sync.test.d.ts | 1 + .../lib/__tests__/match-path-sync.test.js | 15 + .../lib/__tests__/match-path-sync.test.js.map | 1 + .../lib/__tests__/try-path.test.d.ts | 1 + .../lib/__tests__/try-path.test.js | 175 + .../lib/__tests__/try-path.test.js.map | 1 + .../lib/__tests__/tsconfig-loader.test.d.ts | 1 + .../lib/__tests__/tsconfig-loader.test.js | 246 + .../lib/__tests__/tsconfig-loader.test.js.map | 1 + .../tsconfig-paths/lib/config-loader.d.ts | 6 +- .../tsconfig-paths/lib/config-loader.js | 16 +- .../tsconfig-paths/lib/config-loader.js.map | 1 + node_modules/tsconfig-paths/lib/filesystem.js | 2 + .../tsconfig-paths/lib/filesystem.js.map | 1 + node_modules/tsconfig-paths/lib/index.d.ts | 8 +- node_modules/tsconfig-paths/lib/index.js | 14 +- node_modules/tsconfig-paths/lib/index.js.map | 1 + .../tsconfig-paths/lib/mapping-entry.js | 8 +- .../tsconfig-paths/lib/mapping-entry.js.map | 1 + .../tsconfig-paths/lib/match-path-async.d.ts | 2 +- .../tsconfig-paths/lib/match-path-async.js | 6 +- .../lib/match-path-async.js.map | 1 + .../tsconfig-paths/lib/match-path-sync.d.ts | 2 +- .../tsconfig-paths/lib/match-path-sync.js | 8 +- .../tsconfig-paths/lib/match-path-sync.js.map | 1 + node_modules/tsconfig-paths/lib/options.js | 8 +- .../tsconfig-paths/lib/options.js.map | 1 + node_modules/tsconfig-paths/lib/register.js | 23 +- .../tsconfig-paths/lib/register.js.map | 1 + node_modules/tsconfig-paths/lib/try-path.js | 15 +- .../tsconfig-paths/lib/try-path.js.map | 1 + .../tsconfig-paths/lib/tsconfig-loader.d.ts | 4 +- .../tsconfig-paths/lib/tsconfig-loader.js | 44 +- .../tsconfig-paths/lib/tsconfig-loader.js.map | 1 + node_modules/tsconfig-paths/package.json | 60 +- node_modules/tsconfig-paths/register.js | 2 +- .../__tests__/config-loader.test.ts} | 58 +- .../__tests__}/data/match-path-data.ts | 111 +- .../src/__tests__/filesystem.test.ts | 65 + .../src/__tests__/mapping-entry.test.ts | 70 + .../__tests__/match-path-async.test.ts} | 10 +- .../__tests__/match-path-sync.test.ts} | 10 +- .../src/__tests__/try-path.test.ts | 193 + .../__tests__/tsconfig-loader.test.ts} | 185 +- .../__tests__}/tsconfig-named.json | 0 .../tsconfig-paths/src/config-loader.ts | 97 + node_modules/tsconfig-paths/src/filesystem.ts | 87 + node_modules/tsconfig-paths/src/index.ts | 24 + .../tsconfig-paths/src/mapping-entry.ts | 64 + .../tsconfig-paths/src/match-path-async.ts | 218 + .../tsconfig-paths/src/match-path-sync.ts | 141 + node_modules/tsconfig-paths/src/options.ts | 18 + node_modules/tsconfig-paths/src/register.ts | 97 + node_modules/tsconfig-paths/src/try-path.ts | 102 + .../tsconfig-paths/src/tsconfig-loader.ts | 172 + .../tsconfig-paths/test/filesystem-tests.ts | 46 - .../tsconfig-paths/test/mapping-entry-test.ts | 47 - node_modules/tsconfig-paths/test/mocha.opts | 3 - .../tsconfig-paths/test/try-path-tests.ts | 99 - .../tsconfig-paths/test/tsconfig.json | 9 - node_modules/tsconfig-paths/tslint.json | 88 - node_modules/typed-array-length/.eslintrc | 11 + .../typed-array-length/.github/FUNDING.yml | 12 + node_modules/typed-array-length/.nycrc | 13 + node_modules/typed-array-length/CHANGELOG.md | 69 + node_modules/typed-array-length/LICENSE | 21 + node_modules/typed-array-length/README.md | 64 + node_modules/typed-array-length/index.js | 77 + node_modules/typed-array-length/package.json | 89 + node_modules/typed-array-length/test/index.js | 85 + node_modules/unbox-primitive/.eslintignore | 1 - node_modules/unbox-primitive/CHANGELOG.md | 13 + node_modules/unbox-primitive/README.md | 28 +- node_modules/unbox-primitive/index.js | 12 +- node_modules/unbox-primitive/package.json | 29 +- .../validate-npm-package-license/LICENSE | 202 - .../validate-npm-package-license/README.md | 113 - .../validate-npm-package-license/index.js | 86 - .../validate-npm-package-license/package.json | 28 - node_modules/which-typed-array/.editorconfig | 20 + .../test => which-typed-array}/.eslintrc | 8 +- .../which-typed-array/.github/FUNDING.yml | 12 + node_modules/which-typed-array/.nycrc | 13 + node_modules/which-typed-array/CHANGELOG.md | 175 + node_modules/which-typed-array/LICENSE | 22 + node_modules/which-typed-array/README.md | 70 + node_modules/which-typed-array/index.js | 55 + node_modules/which-typed-array/package.json | 116 + node_modules/which-typed-array/test/index.js | 99 + package-lock.json | 1153 +- package.json | 2 +- 1660 files changed, 67734 insertions(+), 27934 deletions(-) create mode 120000 node_modules/.bin/resolve rename node_modules/{is-arrayish => array.prototype.flatmap}/.editorconfig (59%) create mode 100644 node_modules/array.prototype.flatmap/.eslintrc create mode 100644 node_modules/array.prototype.flatmap/.github/FUNDING.yml create mode 100644 node_modules/array.prototype.flatmap/.nycrc create mode 100644 node_modules/array.prototype.flatmap/CHANGELOG.md create mode 100644 node_modules/array.prototype.flatmap/LICENSE create mode 100644 node_modules/array.prototype.flatmap/README.md create mode 100644 node_modules/array.prototype.flatmap/auto.js create mode 100644 node_modules/array.prototype.flatmap/implementation.js create mode 100644 node_modules/array.prototype.flatmap/index.js create mode 100644 node_modules/array.prototype.flatmap/package.json create mode 100644 node_modules/array.prototype.flatmap/polyfill.js create mode 100644 node_modules/array.prototype.flatmap/shim.js create mode 100644 node_modules/array.prototype.flatmap/test/implementation.js create mode 100644 node_modules/array.prototype.flatmap/test/index.js create mode 100644 node_modules/array.prototype.flatmap/test/shimmed.js create mode 100644 node_modules/array.prototype.flatmap/test/tests.js rename node_modules/{array-includes => available-typed-arrays}/.eslintignore (100%) create mode 100644 node_modules/available-typed-arrays/.eslintrc create mode 100644 node_modules/available-typed-arrays/.github/FUNDING.yml create mode 100644 node_modules/available-typed-arrays/.nycrc create mode 100644 node_modules/available-typed-arrays/CHANGELOG.md create mode 100644 node_modules/available-typed-arrays/LICENSE create mode 100644 node_modules/available-typed-arrays/README.md create mode 100644 node_modules/available-typed-arrays/index.js create mode 100644 node_modules/available-typed-arrays/package.json create mode 100644 node_modules/available-typed-arrays/test/index.js create mode 100644 node_modules/define-properties/.github/FUNDING.yml delete mode 100644 node_modules/define-properties/.jscs.json create mode 100644 node_modules/define-properties/.nycrc delete mode 100644 node_modules/define-properties/.travis.yml delete mode 100644 node_modules/define-properties/test/index.js delete mode 100644 node_modules/error-ex/README.md delete mode 100644 node_modules/error-ex/index.js delete mode 100644 node_modules/error-ex/package.json delete mode 100644 node_modules/es-abstract/.gitattributes create mode 100644 node_modules/es-abstract/2015/CharacterRange.js create mode 100644 node_modules/es-abstract/2015/CompletionRecord.js create mode 100644 node_modules/es-abstract/2015/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2015/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2015/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2015/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2015/NormalCompletion.js create mode 100644 node_modules/es-abstract/2015/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2015/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2015/max.js create mode 100644 node_modules/es-abstract/2015/min.js create mode 100644 node_modules/es-abstract/2016/CharacterRange.js create mode 100644 node_modules/es-abstract/2016/CompletionRecord.js create mode 100644 node_modules/es-abstract/2016/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2016/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2016/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2016/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2016/NormalCompletion.js create mode 100644 node_modules/es-abstract/2016/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2016/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2016/max.js create mode 100644 node_modules/es-abstract/2016/min.js create mode 100644 node_modules/es-abstract/2017/CharacterRange.js create mode 100644 node_modules/es-abstract/2017/CompletionRecord.js create mode 100644 node_modules/es-abstract/2017/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2017/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2017/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2017/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2017/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2017/NormalCompletion.js create mode 100644 node_modules/es-abstract/2017/NumberToRawBytes.js create mode 100644 node_modules/es-abstract/2017/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2017/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2017/RawBytesToNumber.js create mode 100644 node_modules/es-abstract/2017/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2017/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2017/max.js create mode 100644 node_modules/es-abstract/2017/min.js create mode 100644 node_modules/es-abstract/2018/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2018/CharacterRange.js create mode 100644 node_modules/es-abstract/2018/CompletionRecord.js create mode 100644 node_modules/es-abstract/2018/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2018/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2018/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2018/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2018/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2018/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2018/NormalCompletion.js create mode 100644 node_modules/es-abstract/2018/NumberToRawBytes.js create mode 100644 node_modules/es-abstract/2018/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2018/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2018/RawBytesToNumber.js create mode 100644 node_modules/es-abstract/2018/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2018/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2018/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2018/max.js create mode 100644 node_modules/es-abstract/2018/min.js create mode 100644 node_modules/es-abstract/2019/AsyncFromSyncIteratorContinuation.js create mode 100644 node_modules/es-abstract/2019/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2019/CharacterRange.js create mode 100644 node_modules/es-abstract/2019/CompletionRecord.js create mode 100644 node_modules/es-abstract/2019/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2019/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2019/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2019/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2019/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2019/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2019/NormalCompletion.js create mode 100644 node_modules/es-abstract/2019/NumberToRawBytes.js create mode 100644 node_modules/es-abstract/2019/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2019/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2019/RawBytesToNumber.js create mode 100644 node_modules/es-abstract/2019/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2019/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2019/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2019/max.js create mode 100644 node_modules/es-abstract/2019/min.js create mode 100644 node_modules/es-abstract/2020/AsyncFromSyncIteratorContinuation.js create mode 100644 node_modules/es-abstract/2020/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2020/CharacterRange.js create mode 100644 node_modules/es-abstract/2020/CompletionRecord.js create mode 100644 node_modules/es-abstract/2020/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2020/CreateRegExpStringIterator.js create mode 100644 node_modules/es-abstract/2020/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2020/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2020/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2020/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2020/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2020/NormalCompletion.js create mode 100644 node_modules/es-abstract/2020/NumericToRawBytes.js create mode 100644 node_modules/es-abstract/2020/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2020/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2020/RawBytesToNumeric.js create mode 100644 node_modules/es-abstract/2020/StringToBigInt.js create mode 100644 node_modules/es-abstract/2020/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2020/ToBigInt.js create mode 100644 node_modules/es-abstract/2020/ToBigInt64.js create mode 100644 node_modules/es-abstract/2020/ToBigUint64.js create mode 100644 node_modules/es-abstract/2020/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2020/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2020/max.js create mode 100644 node_modules/es-abstract/2020/min.js create mode 100644 node_modules/es-abstract/2021/AbstractEqualityComparison.js create mode 100644 node_modules/es-abstract/2021/AbstractRelationalComparison.js create mode 100644 node_modules/es-abstract/2021/AddEntriesFromIterable.js create mode 100644 node_modules/es-abstract/2021/AddToKeptObjects.js create mode 100644 node_modules/es-abstract/2021/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2021/ApplyStringOrNumericBinaryOperator.js create mode 100644 node_modules/es-abstract/2021/ArrayCreate.js create mode 100644 node_modules/es-abstract/2021/ArraySetLength.js create mode 100644 node_modules/es-abstract/2021/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2021/AsyncFromSyncIteratorContinuation.js create mode 100644 node_modules/es-abstract/2021/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2021/BigInt/add.js create mode 100644 node_modules/es-abstract/2021/BigInt/bitwiseAND.js create mode 100644 node_modules/es-abstract/2021/BigInt/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2021/BigInt/bitwiseOR.js create mode 100644 node_modules/es-abstract/2021/BigInt/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2021/BigInt/divide.js create mode 100644 node_modules/es-abstract/2021/BigInt/equal.js create mode 100644 node_modules/es-abstract/2021/BigInt/exponentiate.js create mode 100644 node_modules/es-abstract/2021/BigInt/index.js create mode 100644 node_modules/es-abstract/2021/BigInt/leftShift.js create mode 100644 node_modules/es-abstract/2021/BigInt/lessThan.js create mode 100644 node_modules/es-abstract/2021/BigInt/multiply.js create mode 100644 node_modules/es-abstract/2021/BigInt/remainder.js create mode 100644 node_modules/es-abstract/2021/BigInt/sameValue.js create mode 100644 node_modules/es-abstract/2021/BigInt/sameValueZero.js create mode 100644 node_modules/es-abstract/2021/BigInt/signedRightShift.js create mode 100644 node_modules/es-abstract/2021/BigInt/subtract.js create mode 100644 node_modules/es-abstract/2021/BigInt/toString.js create mode 100644 node_modules/es-abstract/2021/BigInt/unaryMinus.js create mode 100644 node_modules/es-abstract/2021/BigInt/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2021/BigIntBitwiseOp.js create mode 100644 node_modules/es-abstract/2021/BinaryAnd.js create mode 100644 node_modules/es-abstract/2021/BinaryOr.js create mode 100644 node_modules/es-abstract/2021/BinaryXor.js create mode 100644 node_modules/es-abstract/2021/ByteListBitwiseOp.js create mode 100644 node_modules/es-abstract/2021/ByteListEqual.js create mode 100644 node_modules/es-abstract/2021/Call.js create mode 100644 node_modules/es-abstract/2021/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2021/CharacterRange.js create mode 100644 node_modules/es-abstract/2021/ClearKeptObjects.js create mode 100644 node_modules/es-abstract/2021/CodePointAt.js create mode 100644 node_modules/es-abstract/2021/CodePointsToString.js create mode 100644 node_modules/es-abstract/2021/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2021/CompletionRecord.js create mode 100644 node_modules/es-abstract/2021/CopyDataProperties.js create mode 100644 node_modules/es-abstract/2021/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2021/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2021/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2021/CreateHTML.js create mode 100644 node_modules/es-abstract/2021/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2021/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2021/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2021/CreateRegExpStringIterator.js create mode 100644 node_modules/es-abstract/2021/DateFromTime.js create mode 100644 node_modules/es-abstract/2021/DateString.js create mode 100644 node_modules/es-abstract/2021/Day.js create mode 100644 node_modules/es-abstract/2021/DayFromYear.js create mode 100644 node_modules/es-abstract/2021/DayWithinYear.js create mode 100644 node_modules/es-abstract/2021/DaysInYear.js create mode 100644 node_modules/es-abstract/2021/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2021/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2021/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2021/EnumerableOwnPropertyNames.js create mode 100644 node_modules/es-abstract/2021/FlattenIntoArray.js create mode 100644 node_modules/es-abstract/2021/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2021/Get.js create mode 100644 node_modules/es-abstract/2021/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2021/GetIterator.js create mode 100644 node_modules/es-abstract/2021/GetMethod.js create mode 100644 node_modules/es-abstract/2021/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2021/GetPromiseResolve.js create mode 100644 node_modules/es-abstract/2021/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2021/GetSubstitution.js create mode 100644 node_modules/es-abstract/2021/GetV.js create mode 100644 node_modules/es-abstract/2021/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2021/HasProperty.js create mode 100644 node_modules/es-abstract/2021/HourFromTime.js create mode 100644 node_modules/es-abstract/2021/InLeapYear.js create mode 100644 node_modules/es-abstract/2021/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2021/Invoke.js create mode 100644 node_modules/es-abstract/2021/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2021/IsArray.js create mode 100644 node_modules/es-abstract/2021/IsBigIntElementType.js create mode 100644 node_modules/es-abstract/2021/IsCallable.js create mode 100644 node_modules/es-abstract/2021/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2021/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2021/IsConstructor.js create mode 100644 node_modules/es-abstract/2021/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2021/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2021/IsExtensible.js create mode 100644 node_modules/es-abstract/2021/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2021/IsIntegralNumber.js create mode 100644 node_modules/es-abstract/2021/IsNoTearConfiguration.js create mode 100644 node_modules/es-abstract/2021/IsPromise.js create mode 100644 node_modules/es-abstract/2021/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2021/IsRegExp.js create mode 100644 node_modules/es-abstract/2021/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2021/IsStringPrefix.js create mode 100644 node_modules/es-abstract/2021/IsUnclampedIntegerElementType.js create mode 100644 node_modules/es-abstract/2021/IsUnsignedElementType.js create mode 100644 node_modules/es-abstract/2021/IterableToList.js create mode 100644 node_modules/es-abstract/2021/IteratorClose.js create mode 100644 node_modules/es-abstract/2021/IteratorComplete.js create mode 100644 node_modules/es-abstract/2021/IteratorNext.js create mode 100644 node_modules/es-abstract/2021/IteratorStep.js create mode 100644 node_modules/es-abstract/2021/IteratorValue.js create mode 100644 node_modules/es-abstract/2021/LengthOfArrayLike.js create mode 100644 node_modules/es-abstract/2021/MakeDate.js create mode 100644 node_modules/es-abstract/2021/MakeDay.js create mode 100644 node_modules/es-abstract/2021/MakeTime.js create mode 100644 node_modules/es-abstract/2021/MinFromTime.js create mode 100644 node_modules/es-abstract/2021/MonthFromTime.js create mode 100644 node_modules/es-abstract/2021/NormalCompletion.js create mode 100644 node_modules/es-abstract/2021/Number/add.js create mode 100644 node_modules/es-abstract/2021/Number/bitwiseAND.js create mode 100644 node_modules/es-abstract/2021/Number/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2021/Number/bitwiseOR.js create mode 100644 node_modules/es-abstract/2021/Number/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2021/Number/divide.js create mode 100644 node_modules/es-abstract/2021/Number/equal.js create mode 100644 node_modules/es-abstract/2021/Number/exponentiate.js create mode 100644 node_modules/es-abstract/2021/Number/index.js create mode 100644 node_modules/es-abstract/2021/Number/leftShift.js create mode 100644 node_modules/es-abstract/2021/Number/lessThan.js create mode 100644 node_modules/es-abstract/2021/Number/multiply.js create mode 100644 node_modules/es-abstract/2021/Number/remainder.js create mode 100644 node_modules/es-abstract/2021/Number/sameValue.js create mode 100644 node_modules/es-abstract/2021/Number/sameValueZero.js create mode 100644 node_modules/es-abstract/2021/Number/signedRightShift.js create mode 100644 node_modules/es-abstract/2021/Number/subtract.js create mode 100644 node_modules/es-abstract/2021/Number/toString.js create mode 100644 node_modules/es-abstract/2021/Number/unaryMinus.js create mode 100644 node_modules/es-abstract/2021/Number/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2021/NumberBitwiseOp.js create mode 100644 node_modules/es-abstract/2021/NumberToBigInt.js create mode 100644 node_modules/es-abstract/2021/NumericToRawBytes.js create mode 100644 node_modules/es-abstract/2021/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2021/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2021/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2021/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2021/OrdinaryGetPrototypeOf.js create mode 100644 node_modules/es-abstract/2021/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2021/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2021/OrdinaryObjectCreate.js create mode 100644 node_modules/es-abstract/2021/OrdinarySetPrototypeOf.js create mode 100644 node_modules/es-abstract/2021/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2021/PromiseResolve.js create mode 100644 node_modules/es-abstract/2021/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2021/RawBytesToNumeric.js create mode 100644 node_modules/es-abstract/2021/RegExpCreate.js create mode 100644 node_modules/es-abstract/2021/RegExpExec.js create mode 100644 node_modules/es-abstract/2021/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2021/SameValue.js create mode 100644 node_modules/es-abstract/2021/SameValueNonNumeric.js create mode 100644 node_modules/es-abstract/2021/SameValueZero.js create mode 100644 node_modules/es-abstract/2021/SecFromTime.js create mode 100644 node_modules/es-abstract/2021/Set.js create mode 100644 node_modules/es-abstract/2021/SetFunctionLength.js create mode 100644 node_modules/es-abstract/2021/SetFunctionName.js create mode 100644 node_modules/es-abstract/2021/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2021/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2021/SplitMatch.js create mode 100644 node_modules/es-abstract/2021/StrictEqualityComparison.js create mode 100644 node_modules/es-abstract/2021/StringCreate.js create mode 100644 node_modules/es-abstract/2021/StringGetOwnProperty.js create mode 100644 node_modules/es-abstract/2021/StringIndexOf.js create mode 100644 node_modules/es-abstract/2021/StringPad.js create mode 100644 node_modules/es-abstract/2021/StringToBigInt.js create mode 100644 node_modules/es-abstract/2021/StringToCodePoints.js create mode 100644 node_modules/es-abstract/2021/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2021/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2021/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2021/TimeClip.js create mode 100644 node_modules/es-abstract/2021/TimeFromYear.js create mode 100644 node_modules/es-abstract/2021/TimeString.js create mode 100644 node_modules/es-abstract/2021/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2021/ToBigInt.js create mode 100644 node_modules/es-abstract/2021/ToBigInt64.js create mode 100644 node_modules/es-abstract/2021/ToBigUint64.js create mode 100644 node_modules/es-abstract/2021/ToBoolean.js create mode 100644 node_modules/es-abstract/2021/ToDateString.js create mode 100644 node_modules/es-abstract/2021/ToIndex.js create mode 100644 node_modules/es-abstract/2021/ToInt16.js create mode 100644 node_modules/es-abstract/2021/ToInt32.js create mode 100644 node_modules/es-abstract/2021/ToInt8.js create mode 100644 node_modules/es-abstract/2021/ToIntegerOrInfinity.js create mode 100644 node_modules/es-abstract/2021/ToLength.js create mode 100644 node_modules/es-abstract/2021/ToNumber.js create mode 100644 node_modules/es-abstract/2021/ToNumeric.js create mode 100644 node_modules/es-abstract/2021/ToObject.js create mode 100644 node_modules/es-abstract/2021/ToPrimitive.js create mode 100644 node_modules/es-abstract/2021/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2021/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2021/ToString.js create mode 100644 node_modules/es-abstract/2021/ToUint16.js create mode 100644 node_modules/es-abstract/2021/ToUint32.js create mode 100644 node_modules/es-abstract/2021/ToUint8.js create mode 100644 node_modules/es-abstract/2021/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2021/TrimString.js create mode 100644 node_modules/es-abstract/2021/Type.js create mode 100644 node_modules/es-abstract/2021/UTF16EncodeCodePoint.js create mode 100644 node_modules/es-abstract/2021/UTF16SurrogatePairToCodePoint.js create mode 100644 node_modules/es-abstract/2021/UnicodeEscape.js create mode 100644 node_modules/es-abstract/2021/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2021/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2021/ValidateIntegerTypedArray.js create mode 100644 node_modules/es-abstract/2021/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2021/WeakRefDeref.js create mode 100644 node_modules/es-abstract/2021/WeekDay.js create mode 100644 node_modules/es-abstract/2021/YearFromTime.js create mode 100644 node_modules/es-abstract/2021/abs.js create mode 100644 node_modules/es-abstract/2021/clamp.js create mode 100644 node_modules/es-abstract/2021/floor.js create mode 100644 node_modules/es-abstract/2021/max.js create mode 100644 node_modules/es-abstract/2021/min.js create mode 100644 node_modules/es-abstract/2021/modulo.js create mode 100644 node_modules/es-abstract/2021/msFromTime.js create mode 100644 node_modules/es-abstract/2021/substring.js create mode 100644 node_modules/es-abstract/2021/thisBigIntValue.js create mode 100644 node_modules/es-abstract/2021/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2021/thisNumberValue.js create mode 100644 node_modules/es-abstract/2021/thisStringValue.js create mode 100644 node_modules/es-abstract/2021/thisSymbolValue.js create mode 100644 node_modules/es-abstract/2021/thisTimeValue.js create mode 100644 node_modules/es-abstract/2022/AddEntriesFromIterable.js create mode 100644 node_modules/es-abstract/2022/AddToKeptObjects.js create mode 100644 node_modules/es-abstract/2022/AdvanceStringIndex.js create mode 100644 node_modules/es-abstract/2022/ApplyStringOrNumericBinaryOperator.js create mode 100644 node_modules/es-abstract/2022/ArrayCreate.js create mode 100644 node_modules/es-abstract/2022/ArraySetLength.js create mode 100644 node_modules/es-abstract/2022/ArraySpeciesCreate.js create mode 100644 node_modules/es-abstract/2022/AsyncFromSyncIteratorContinuation.js create mode 100644 node_modules/es-abstract/2022/AsyncIteratorClose.js create mode 100644 node_modules/es-abstract/2022/BigInt/add.js create mode 100644 node_modules/es-abstract/2022/BigInt/bitwiseAND.js create mode 100644 node_modules/es-abstract/2022/BigInt/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2022/BigInt/bitwiseOR.js create mode 100644 node_modules/es-abstract/2022/BigInt/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2022/BigInt/divide.js create mode 100644 node_modules/es-abstract/2022/BigInt/equal.js create mode 100644 node_modules/es-abstract/2022/BigInt/exponentiate.js create mode 100644 node_modules/es-abstract/2022/BigInt/index.js create mode 100644 node_modules/es-abstract/2022/BigInt/leftShift.js create mode 100644 node_modules/es-abstract/2022/BigInt/lessThan.js create mode 100644 node_modules/es-abstract/2022/BigInt/multiply.js create mode 100644 node_modules/es-abstract/2022/BigInt/remainder.js create mode 100644 node_modules/es-abstract/2022/BigInt/sameValue.js create mode 100644 node_modules/es-abstract/2022/BigInt/sameValueZero.js create mode 100644 node_modules/es-abstract/2022/BigInt/signedRightShift.js create mode 100644 node_modules/es-abstract/2022/BigInt/subtract.js create mode 100644 node_modules/es-abstract/2022/BigInt/toString.js create mode 100644 node_modules/es-abstract/2022/BigInt/unaryMinus.js create mode 100644 node_modules/es-abstract/2022/BigInt/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2022/BigIntBitwiseOp.js create mode 100644 node_modules/es-abstract/2022/BinaryAnd.js create mode 100644 node_modules/es-abstract/2022/BinaryOr.js create mode 100644 node_modules/es-abstract/2022/BinaryXor.js create mode 100644 node_modules/es-abstract/2022/ByteListBitwiseOp.js create mode 100644 node_modules/es-abstract/2022/ByteListEqual.js create mode 100644 node_modules/es-abstract/2022/Call.js create mode 100644 node_modules/es-abstract/2022/CanonicalNumericIndexString.js create mode 100644 node_modules/es-abstract/2022/CharacterRange.js create mode 100644 node_modules/es-abstract/2022/ClearKeptObjects.js create mode 100644 node_modules/es-abstract/2022/CodePointAt.js create mode 100644 node_modules/es-abstract/2022/CodePointsToString.js create mode 100644 node_modules/es-abstract/2022/CompletePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2022/CompletionRecord.js create mode 100644 node_modules/es-abstract/2022/CopyDataProperties.js create mode 100644 node_modules/es-abstract/2022/CreateAsyncFromSyncIterator.js create mode 100644 node_modules/es-abstract/2022/CreateDataProperty.js create mode 100644 node_modules/es-abstract/2022/CreateDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2022/CreateHTML.js create mode 100644 node_modules/es-abstract/2022/CreateIterResultObject.js create mode 100644 node_modules/es-abstract/2022/CreateListFromArrayLike.js create mode 100644 node_modules/es-abstract/2022/CreateMethodProperty.js create mode 100644 node_modules/es-abstract/2022/CreateNonEnumerableDataPropertyOrThrow.js create mode 100644 node_modules/es-abstract/2022/CreateRegExpStringIterator.js create mode 100644 node_modules/es-abstract/2022/DateFromTime.js create mode 100644 node_modules/es-abstract/2022/DateString.js create mode 100644 node_modules/es-abstract/2022/Day.js create mode 100644 node_modules/es-abstract/2022/DayFromYear.js create mode 100644 node_modules/es-abstract/2022/DayWithinYear.js create mode 100644 node_modules/es-abstract/2022/DaysInYear.js create mode 100644 node_modules/es-abstract/2022/DefinePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2022/DeletePropertyOrThrow.js create mode 100644 node_modules/es-abstract/2022/DetachArrayBuffer.js create mode 100644 node_modules/es-abstract/2022/EnumerableOwnPropertyNames.js create mode 100644 node_modules/es-abstract/2022/FlattenIntoArray.js create mode 100644 node_modules/es-abstract/2022/FromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2022/Get.js create mode 100644 node_modules/es-abstract/2022/GetGlobalObject.js create mode 100644 node_modules/es-abstract/2022/GetIterator.js create mode 100644 node_modules/es-abstract/2022/GetMatchIndexPair.js create mode 100644 node_modules/es-abstract/2022/GetMatchString.js create mode 100644 node_modules/es-abstract/2022/GetMethod.js create mode 100644 node_modules/es-abstract/2022/GetOwnPropertyKeys.js create mode 100644 node_modules/es-abstract/2022/GetPromiseResolve.js create mode 100644 node_modules/es-abstract/2022/GetPrototypeFromConstructor.js create mode 100644 node_modules/es-abstract/2022/GetStringIndex.js create mode 100644 node_modules/es-abstract/2022/GetSubstitution.js create mode 100644 node_modules/es-abstract/2022/GetV.js create mode 100644 node_modules/es-abstract/2022/HasOwnProperty.js create mode 100644 node_modules/es-abstract/2022/HasProperty.js create mode 100644 node_modules/es-abstract/2022/HourFromTime.js create mode 100644 node_modules/es-abstract/2022/InLeapYear.js create mode 100644 node_modules/es-abstract/2022/InstallErrorCause.js create mode 100644 node_modules/es-abstract/2022/InstanceofOperator.js create mode 100644 node_modules/es-abstract/2022/Invoke.js create mode 100644 node_modules/es-abstract/2022/IsAccessorDescriptor.js create mode 100644 node_modules/es-abstract/2022/IsArray.js create mode 100644 node_modules/es-abstract/2022/IsBigIntElementType.js create mode 100644 node_modules/es-abstract/2022/IsCallable.js create mode 100644 node_modules/es-abstract/2022/IsCompatiblePropertyDescriptor.js create mode 100644 node_modules/es-abstract/2022/IsConcatSpreadable.js create mode 100644 node_modules/es-abstract/2022/IsConstructor.js create mode 100644 node_modules/es-abstract/2022/IsDataDescriptor.js create mode 100644 node_modules/es-abstract/2022/IsDetachedBuffer.js create mode 100644 node_modules/es-abstract/2022/IsExtensible.js create mode 100644 node_modules/es-abstract/2022/IsGenericDescriptor.js create mode 100644 node_modules/es-abstract/2022/IsIntegralNumber.js create mode 100644 node_modules/es-abstract/2022/IsLessThan.js create mode 100644 node_modules/es-abstract/2022/IsLooselyEqual.js create mode 100644 node_modules/es-abstract/2022/IsNoTearConfiguration.js create mode 100644 node_modules/es-abstract/2022/IsPromise.js create mode 100644 node_modules/es-abstract/2022/IsPropertyKey.js create mode 100644 node_modules/es-abstract/2022/IsRegExp.js create mode 100644 node_modules/es-abstract/2022/IsSharedArrayBuffer.js create mode 100644 node_modules/es-abstract/2022/IsStrictlyEqual.js create mode 100644 node_modules/es-abstract/2022/IsStringPrefix.js create mode 100644 node_modules/es-abstract/2022/IsStringWellFormedUnicode.js create mode 100644 node_modules/es-abstract/2022/IsUnclampedIntegerElementType.js create mode 100644 node_modules/es-abstract/2022/IsUnsignedElementType.js create mode 100644 node_modules/es-abstract/2022/IterableToList.js create mode 100644 node_modules/es-abstract/2022/IteratorClose.js create mode 100644 node_modules/es-abstract/2022/IteratorComplete.js create mode 100644 node_modules/es-abstract/2022/IteratorNext.js create mode 100644 node_modules/es-abstract/2022/IteratorStep.js create mode 100644 node_modules/es-abstract/2022/IteratorValue.js create mode 100644 node_modules/es-abstract/2022/LengthOfArrayLike.js create mode 100644 node_modules/es-abstract/2022/MakeDate.js create mode 100644 node_modules/es-abstract/2022/MakeDay.js create mode 100644 node_modules/es-abstract/2022/MakeMatchIndicesIndexPairArray.js create mode 100644 node_modules/es-abstract/2022/MakeTime.js create mode 100644 node_modules/es-abstract/2022/MinFromTime.js create mode 100644 node_modules/es-abstract/2022/MonthFromTime.js create mode 100644 node_modules/es-abstract/2022/NormalCompletion.js create mode 100644 node_modules/es-abstract/2022/Number/add.js create mode 100644 node_modules/es-abstract/2022/Number/bitwiseAND.js create mode 100644 node_modules/es-abstract/2022/Number/bitwiseNOT.js create mode 100644 node_modules/es-abstract/2022/Number/bitwiseOR.js create mode 100644 node_modules/es-abstract/2022/Number/bitwiseXOR.js create mode 100644 node_modules/es-abstract/2022/Number/divide.js create mode 100644 node_modules/es-abstract/2022/Number/equal.js create mode 100644 node_modules/es-abstract/2022/Number/exponentiate.js create mode 100644 node_modules/es-abstract/2022/Number/index.js create mode 100644 node_modules/es-abstract/2022/Number/leftShift.js create mode 100644 node_modules/es-abstract/2022/Number/lessThan.js create mode 100644 node_modules/es-abstract/2022/Number/multiply.js create mode 100644 node_modules/es-abstract/2022/Number/remainder.js create mode 100644 node_modules/es-abstract/2022/Number/sameValue.js create mode 100644 node_modules/es-abstract/2022/Number/sameValueZero.js create mode 100644 node_modules/es-abstract/2022/Number/signedRightShift.js create mode 100644 node_modules/es-abstract/2022/Number/subtract.js create mode 100644 node_modules/es-abstract/2022/Number/toString.js create mode 100644 node_modules/es-abstract/2022/Number/unaryMinus.js create mode 100644 node_modules/es-abstract/2022/Number/unsignedRightShift.js create mode 100644 node_modules/es-abstract/2022/NumberBitwiseOp.js create mode 100644 node_modules/es-abstract/2022/NumberToBigInt.js create mode 100644 node_modules/es-abstract/2022/NumericToRawBytes.js create mode 100644 node_modules/es-abstract/2022/ObjectDefineProperties.js create mode 100644 node_modules/es-abstract/2022/OrdinaryCreateFromConstructor.js create mode 100644 node_modules/es-abstract/2022/OrdinaryDefineOwnProperty.js create mode 100644 node_modules/es-abstract/2022/OrdinaryGetOwnProperty.js create mode 100644 node_modules/es-abstract/2022/OrdinaryGetPrototypeOf.js create mode 100644 node_modules/es-abstract/2022/OrdinaryHasInstance.js create mode 100644 node_modules/es-abstract/2022/OrdinaryHasProperty.js create mode 100644 node_modules/es-abstract/2022/OrdinaryObjectCreate.js create mode 100644 node_modules/es-abstract/2022/OrdinarySetPrototypeOf.js create mode 100644 node_modules/es-abstract/2022/OrdinaryToPrimitive.js create mode 100644 node_modules/es-abstract/2022/PromiseResolve.js create mode 100644 node_modules/es-abstract/2022/QuoteJSONString.js create mode 100644 node_modules/es-abstract/2022/RawBytesToNumeric.js create mode 100644 node_modules/es-abstract/2022/RegExpCreate.js create mode 100644 node_modules/es-abstract/2022/RegExpExec.js create mode 100644 node_modules/es-abstract/2022/RegExpHasFlag.js create mode 100644 node_modules/es-abstract/2022/RequireObjectCoercible.js create mode 100644 node_modules/es-abstract/2022/SameValue.js create mode 100644 node_modules/es-abstract/2022/SameValueNonNumeric.js create mode 100644 node_modules/es-abstract/2022/SameValueZero.js create mode 100644 node_modules/es-abstract/2022/SecFromTime.js create mode 100644 node_modules/es-abstract/2022/Set.js create mode 100644 node_modules/es-abstract/2022/SetFunctionLength.js create mode 100644 node_modules/es-abstract/2022/SetFunctionName.js create mode 100644 node_modules/es-abstract/2022/SetIntegrityLevel.js create mode 100644 node_modules/es-abstract/2022/SortIndexedProperties.js create mode 100644 node_modules/es-abstract/2022/SpeciesConstructor.js create mode 100644 node_modules/es-abstract/2022/StringCreate.js create mode 100644 node_modules/es-abstract/2022/StringGetOwnProperty.js create mode 100644 node_modules/es-abstract/2022/StringIndexOf.js create mode 100644 node_modules/es-abstract/2022/StringPad.js create mode 100644 node_modules/es-abstract/2022/StringToBigInt.js create mode 100644 node_modules/es-abstract/2022/StringToCodePoints.js create mode 100644 node_modules/es-abstract/2022/StringToNumber.js create mode 100644 node_modules/es-abstract/2022/SymbolDescriptiveString.js create mode 100644 node_modules/es-abstract/2022/TestIntegrityLevel.js create mode 100644 node_modules/es-abstract/2022/ThrowCompletion.js create mode 100644 node_modules/es-abstract/2022/TimeClip.js create mode 100644 node_modules/es-abstract/2022/TimeFromYear.js create mode 100644 node_modules/es-abstract/2022/TimeString.js create mode 100644 node_modules/es-abstract/2022/TimeWithinDay.js create mode 100644 node_modules/es-abstract/2022/ToBigInt.js create mode 100644 node_modules/es-abstract/2022/ToBigInt64.js create mode 100644 node_modules/es-abstract/2022/ToBigUint64.js create mode 100644 node_modules/es-abstract/2022/ToBoolean.js create mode 100644 node_modules/es-abstract/2022/ToDateString.js create mode 100644 node_modules/es-abstract/2022/ToIndex.js create mode 100644 node_modules/es-abstract/2022/ToInt16.js create mode 100644 node_modules/es-abstract/2022/ToInt32.js create mode 100644 node_modules/es-abstract/2022/ToInt8.js create mode 100644 node_modules/es-abstract/2022/ToIntegerOrInfinity.js create mode 100644 node_modules/es-abstract/2022/ToLength.js create mode 100644 node_modules/es-abstract/2022/ToNumber.js create mode 100644 node_modules/es-abstract/2022/ToNumeric.js create mode 100644 node_modules/es-abstract/2022/ToObject.js create mode 100644 node_modules/es-abstract/2022/ToPrimitive.js create mode 100644 node_modules/es-abstract/2022/ToPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2022/ToPropertyKey.js create mode 100644 node_modules/es-abstract/2022/ToString.js create mode 100644 node_modules/es-abstract/2022/ToUint16.js create mode 100644 node_modules/es-abstract/2022/ToUint32.js create mode 100644 node_modules/es-abstract/2022/ToUint8.js create mode 100644 node_modules/es-abstract/2022/ToUint8Clamp.js create mode 100644 node_modules/es-abstract/2022/ToZeroPaddedDecimalString.js create mode 100644 node_modules/es-abstract/2022/TrimString.js create mode 100644 node_modules/es-abstract/2022/Type.js create mode 100644 node_modules/es-abstract/2022/TypedArrayElementSize.js create mode 100644 node_modules/es-abstract/2022/TypedArrayElementType.js create mode 100644 node_modules/es-abstract/2022/UTF16EncodeCodePoint.js create mode 100644 node_modules/es-abstract/2022/UTF16SurrogatePairToCodePoint.js create mode 100644 node_modules/es-abstract/2022/UnicodeEscape.js create mode 100644 node_modules/es-abstract/2022/ValidateAndApplyPropertyDescriptor.js create mode 100644 node_modules/es-abstract/2022/ValidateAtomicAccess.js create mode 100644 node_modules/es-abstract/2022/ValidateIntegerTypedArray.js create mode 100644 node_modules/es-abstract/2022/ValidateTypedArray.js create mode 100644 node_modules/es-abstract/2022/WeakRefDeref.js create mode 100644 node_modules/es-abstract/2022/WeekDay.js create mode 100644 node_modules/es-abstract/2022/YearFromTime.js create mode 100644 node_modules/es-abstract/2022/abs.js create mode 100644 node_modules/es-abstract/2022/clamp.js create mode 100644 node_modules/es-abstract/2022/floor.js create mode 100644 node_modules/es-abstract/2022/max.js create mode 100644 node_modules/es-abstract/2022/min.js create mode 100644 node_modules/es-abstract/2022/modulo.js create mode 100644 node_modules/es-abstract/2022/msFromTime.js create mode 100644 node_modules/es-abstract/2022/substring.js create mode 100644 node_modules/es-abstract/2022/thisBigIntValue.js create mode 100644 node_modules/es-abstract/2022/thisBooleanValue.js create mode 100644 node_modules/es-abstract/2022/thisNumberValue.js create mode 100644 node_modules/es-abstract/2022/thisStringValue.js create mode 100644 node_modules/es-abstract/2022/thisSymbolValue.js create mode 100644 node_modules/es-abstract/2022/thisTimeValue.js create mode 100644 node_modules/es-abstract/es2021.js create mode 100644 node_modules/es-abstract/es2022.js create mode 100644 node_modules/es-abstract/helpers/IsArray.js create mode 100644 node_modules/es-abstract/helpers/fromPropertyDescriptor.js create mode 100644 node_modules/es-abstract/helpers/isAbstractClosure.js create mode 100644 node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js create mode 100644 node_modules/es-abstract/helpers/isMatchRecord.js create mode 100644 node_modules/es-abstract/helpers/modBigInt.js create mode 100644 node_modules/es-abstract/helpers/reduce.js create mode 100644 node_modules/es-abstract/operations/2021.js create mode 100644 node_modules/es-abstract/operations/2022.js delete mode 100644 node_modules/es-abstract/test/GetIntrinsic.js delete mode 100644 node_modules/es-abstract/test/diffOps.js delete mode 100644 node_modules/es-abstract/test/es2015.js delete mode 100644 node_modules/es-abstract/test/es2016.js delete mode 100644 node_modules/es-abstract/test/es2017.js delete mode 100644 node_modules/es-abstract/test/es2018.js delete mode 100644 node_modules/es-abstract/test/es2019.js delete mode 100644 node_modules/es-abstract/test/es2020.js delete mode 100644 node_modules/es-abstract/test/es5.js delete mode 100644 node_modules/es-abstract/test/es6.js delete mode 100644 node_modules/es-abstract/test/es7.js delete mode 100644 node_modules/es-abstract/test/helpers/OwnPropertyKeys.js delete mode 100644 node_modules/es-abstract/test/helpers/assertRecord.js delete mode 100644 node_modules/es-abstract/test/helpers/createBoundESNamespace.js delete mode 100644 node_modules/es-abstract/test/helpers/defineProperty.js delete mode 100644 node_modules/es-abstract/test/helpers/index.js delete mode 100644 node_modules/es-abstract/test/helpers/isByteValue.js delete mode 100644 node_modules/es-abstract/test/helpers/isCodePoint.js delete mode 100644 node_modules/es-abstract/test/helpers/runManifestTest.js delete mode 100644 node_modules/es-abstract/test/index.js delete mode 100644 node_modules/es-abstract/test/ses-compat.js delete mode 100644 node_modules/es-abstract/test/tests.js create mode 100644 node_modules/es-set-tostringtag/.eslintrc create mode 100644 node_modules/es-set-tostringtag/CHANGELOG.md create mode 100644 node_modules/es-set-tostringtag/LICENSE create mode 100644 node_modules/es-set-tostringtag/README.md create mode 100644 node_modules/es-set-tostringtag/index.js create mode 100644 node_modules/es-set-tostringtag/package.json create mode 100644 node_modules/es-set-tostringtag/test/index.js create mode 100644 node_modules/es-shim-unscopables/.eslintrc create mode 100644 node_modules/es-shim-unscopables/.github/FUNDING.yml create mode 100644 node_modules/es-shim-unscopables/.nycrc create mode 100644 node_modules/es-shim-unscopables/CHANGELOG.md create mode 100644 node_modules/es-shim-unscopables/LICENSE create mode 100644 node_modules/es-shim-unscopables/README.md create mode 100644 node_modules/es-shim-unscopables/index.js create mode 100644 node_modules/es-shim-unscopables/package.json create mode 100644 node_modules/es-shim-unscopables/test/index.js create mode 100644 node_modules/es-shim-unscopables/test/with.js delete mode 100644 node_modules/eslint-module-utils/.eslintrc delete mode 100644 node_modules/eslint-module-utils/.eslintrc.yml delete mode 100644 node_modules/eslint-module-utils/node_modules/find-up/index.js delete mode 100644 node_modules/eslint-module-utils/node_modules/find-up/license delete mode 100644 node_modules/eslint-module-utils/node_modules/find-up/package.json delete mode 100644 node_modules/eslint-module-utils/node_modules/find-up/readme.md delete mode 100644 node_modules/eslint-module-utils/node_modules/locate-path/index.js delete mode 100644 node_modules/eslint-module-utils/node_modules/locate-path/license delete mode 100644 node_modules/eslint-module-utils/node_modules/locate-path/package.json delete mode 100644 node_modules/eslint-module-utils/node_modules/locate-path/readme.md delete mode 100644 node_modules/eslint-module-utils/node_modules/p-limit/index.js delete mode 100644 node_modules/eslint-module-utils/node_modules/p-limit/license delete mode 100644 node_modules/eslint-module-utils/node_modules/p-limit/package.json delete mode 100644 node_modules/eslint-module-utils/node_modules/p-limit/readme.md delete mode 100644 node_modules/eslint-module-utils/node_modules/p-locate/index.js delete mode 100644 node_modules/eslint-module-utils/node_modules/p-locate/package.json delete mode 100644 node_modules/eslint-module-utils/node_modules/p-locate/readme.md delete mode 100644 node_modules/eslint-module-utils/node_modules/p-try/index.js delete mode 100644 node_modules/eslint-module-utils/node_modules/p-try/license delete mode 100644 node_modules/eslint-module-utils/node_modules/p-try/package.json delete mode 100644 node_modules/eslint-module-utils/node_modules/p-try/readme.md delete mode 100644 node_modules/eslint-module-utils/node_modules/path-exists/index.js delete mode 100644 node_modules/eslint-module-utils/node_modules/path-exists/license delete mode 100644 node_modules/eslint-module-utils/node_modules/path-exists/package.json delete mode 100644 node_modules/eslint-module-utils/node_modules/path-exists/readme.md delete mode 100644 node_modules/eslint-module-utils/node_modules/pkg-dir/index.js delete mode 100644 node_modules/eslint-module-utils/node_modules/pkg-dir/license delete mode 100644 node_modules/eslint-module-utils/node_modules/pkg-dir/package.json delete mode 100644 node_modules/eslint-module-utils/node_modules/pkg-dir/readme.md create mode 100644 node_modules/eslint-module-utils/pkgDir.js create mode 100644 node_modules/eslint-module-utils/pkgUp.js create mode 100644 node_modules/eslint-module-utils/readPkgUp.js create mode 100644 node_modules/eslint-module-utils/visit.js create mode 100644 node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md create mode 100644 node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md create mode 100644 node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js create mode 100644 node_modules/eslint-plugin-import/lib/rules/no-empty-named-blocks.js create mode 120000 node_modules/eslint-plugin-import/node_modules/.bin/semver delete mode 100644 node_modules/eslint-plugin-import/node_modules/debug/.coveralls.yml delete mode 100644 node_modules/eslint-plugin-import/node_modules/debug/.eslintrc delete mode 100644 node_modules/eslint-plugin-import/node_modules/debug/.npmignore delete mode 100644 node_modules/eslint-plugin-import/node_modules/debug/.travis.yml delete mode 100644 node_modules/eslint-plugin-import/node_modules/debug/Makefile delete mode 100644 node_modules/eslint-plugin-import/node_modules/debug/component.json delete mode 100644 node_modules/eslint-plugin-import/node_modules/debug/karma.conf.js create mode 100644 node_modules/eslint-plugin-import/node_modules/debug/src/common.js delete mode 100644 node_modules/eslint-plugin-import/node_modules/debug/src/debug.js delete mode 100644 node_modules/eslint-plugin-import/node_modules/debug/src/inspector-log.js delete mode 100644 node_modules/eslint-plugin-import/node_modules/find-up/index.js delete mode 100644 node_modules/eslint-plugin-import/node_modules/find-up/license delete mode 100644 node_modules/eslint-plugin-import/node_modules/find-up/package.json delete mode 100644 node_modules/eslint-plugin-import/node_modules/find-up/readme.md delete mode 100644 node_modules/eslint-plugin-import/node_modules/locate-path/index.js delete mode 100644 node_modules/eslint-plugin-import/node_modules/locate-path/license delete mode 100644 node_modules/eslint-plugin-import/node_modules/locate-path/package.json delete mode 100644 node_modules/eslint-plugin-import/node_modules/locate-path/readme.md delete mode 100644 node_modules/eslint-plugin-import/node_modules/ms/index.js delete mode 100644 node_modules/eslint-plugin-import/node_modules/ms/package.json delete mode 100644 node_modules/eslint-plugin-import/node_modules/ms/readme.md delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-limit/index.js delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-limit/license delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-limit/package.json delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-limit/readme.md delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-locate/index.js delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-locate/license delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-locate/package.json delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-locate/readme.md delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-try/index.js delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-try/license delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-try/package.json delete mode 100644 node_modules/eslint-plugin-import/node_modules/p-try/readme.md delete mode 100644 node_modules/eslint-plugin-import/node_modules/path-exists/index.js delete mode 100644 node_modules/eslint-plugin-import/node_modules/path-exists/license delete mode 100644 node_modules/eslint-plugin-import/node_modules/path-exists/package.json delete mode 100644 node_modules/eslint-plugin-import/node_modules/path-exists/readme.md rename node_modules/{normalize-package-data => eslint-plugin-import}/node_modules/semver/CHANGELOG.md (51%) rename node_modules/{normalize-package-data => eslint-plugin-import}/node_modules/semver/LICENSE (100%) rename node_modules/{normalize-package-data => eslint-plugin-import}/node_modules/semver/README.md (91%) rename node_modules/{normalize-package-data/node_modules/semver/bin/semver => eslint-plugin-import/node_modules/semver/bin/semver.js} (92%) rename node_modules/{normalize-package-data => eslint-plugin-import}/node_modules/semver/package.json (74%) rename node_modules/{normalize-package-data => eslint-plugin-import}/node_modules/semver/range.bnf (100%) rename node_modules/{normalize-package-data => eslint-plugin-import}/node_modules/semver/semver.js (78%) create mode 100644 node_modules/for-each/.editorconfig create mode 100644 node_modules/for-each/.eslintrc create mode 100644 node_modules/for-each/.travis.yml rename node_modules/{eslint-plugin-import/node_modules/ms/license.md => for-each/LICENSE} (97%) create mode 100644 node_modules/for-each/README.md create mode 100644 node_modules/for-each/index.js create mode 100644 node_modules/for-each/package.json create mode 100644 node_modules/for-each/test/.eslintrc create mode 100644 node_modules/for-each/test/test.js create mode 100644 node_modules/function.prototype.name/.editorconfig rename node_modules/{array.prototype.flat => function.prototype.name}/.eslintignore (100%) create mode 100644 node_modules/function.prototype.name/.eslintrc create mode 100644 node_modules/function.prototype.name/.github/FUNDING.yml create mode 100644 node_modules/function.prototype.name/.nycrc create mode 100644 node_modules/function.prototype.name/CHANGELOG.md rename node_modules/{error-ex => function.prototype.name}/LICENSE (88%) create mode 100644 node_modules/function.prototype.name/README.md create mode 100644 node_modules/function.prototype.name/auto.js create mode 100644 node_modules/function.prototype.name/helpers/functionsHaveNames.js create mode 100644 node_modules/function.prototype.name/implementation.js create mode 100644 node_modules/function.prototype.name/index.js create mode 100644 node_modules/function.prototype.name/package.json create mode 100644 node_modules/function.prototype.name/polyfill.js create mode 100644 node_modules/function.prototype.name/shim.js create mode 100644 node_modules/function.prototype.name/test/implementation.js create mode 100644 node_modules/function.prototype.name/test/index.js create mode 100644 node_modules/function.prototype.name/test/shimmed.js create mode 100644 node_modules/function.prototype.name/test/tests.js create mode 100644 node_modules/function.prototype.name/test/uglified.js create mode 100644 node_modules/functions-have-names/.editorconfig create mode 100644 node_modules/functions-have-names/.eslintrc create mode 100644 node_modules/functions-have-names/.github/FUNDING.yml create mode 100644 node_modules/functions-have-names/.nycrc create mode 100644 node_modules/functions-have-names/CHANGELOG.md create mode 100644 node_modules/functions-have-names/LICENSE create mode 100644 node_modules/functions-have-names/README.md create mode 100644 node_modules/functions-have-names/index.js create mode 100644 node_modules/functions-have-names/package.json create mode 100644 node_modules/functions-have-names/test/index.js rename node_modules/{es-abstract => get-symbol-description}/.eslintignore (100%) create mode 100644 node_modules/get-symbol-description/.eslintrc create mode 100644 node_modules/get-symbol-description/.github/FUNDING.yml create mode 100644 node_modules/get-symbol-description/.nycrc create mode 100644 node_modules/get-symbol-description/CHANGELOG.md create mode 100644 node_modules/get-symbol-description/LICENSE create mode 100644 node_modules/get-symbol-description/README.md create mode 100644 node_modules/get-symbol-description/getInferredName.js create mode 100644 node_modules/get-symbol-description/index.js create mode 100644 node_modules/get-symbol-description/package.json rename node_modules/{es-abstract/test/helpers/getSymbolDescription.js => get-symbol-description/test/index.js} (92%) create mode 100644 node_modules/globalthis/.eslintrc create mode 100644 node_modules/globalthis/.nycrc create mode 100644 node_modules/globalthis/CHANGELOG.md rename node_modules/{eslint-module-utils/node_modules/p-locate/license => globalthis/LICENSE} (85%) create mode 100644 node_modules/globalthis/README.md create mode 100644 node_modules/globalthis/auto.js create mode 100644 node_modules/globalthis/implementation.browser.js create mode 100644 node_modules/globalthis/implementation.js create mode 100644 node_modules/globalthis/index.js create mode 100644 node_modules/globalthis/package.json create mode 100644 node_modules/globalthis/polyfill.js create mode 100644 node_modules/globalthis/shim.js create mode 100644 node_modules/globalthis/test/implementation.js create mode 100644 node_modules/globalthis/test/index.js create mode 100644 node_modules/globalthis/test/native.js create mode 100644 node_modules/globalthis/test/shimmed.js create mode 100644 node_modules/globalthis/test/tests.js create mode 100644 node_modules/gopd/.eslintrc create mode 100644 node_modules/gopd/.github/FUNDING.yml create mode 100644 node_modules/gopd/CHANGELOG.md create mode 100644 node_modules/gopd/LICENSE create mode 100644 node_modules/gopd/README.md create mode 100644 node_modules/gopd/index.js create mode 100644 node_modules/gopd/package.json create mode 100644 node_modules/gopd/test/index.js create mode 100644 node_modules/has-property-descriptors/.eslintrc create mode 100644 node_modules/has-property-descriptors/.github/FUNDING.yml create mode 100644 node_modules/has-property-descriptors/.nycrc create mode 100644 node_modules/has-property-descriptors/CHANGELOG.md create mode 100644 node_modules/has-property-descriptors/LICENSE create mode 100644 node_modules/has-property-descriptors/README.md create mode 100644 node_modules/has-property-descriptors/index.js create mode 100644 node_modules/has-property-descriptors/package.json create mode 100644 node_modules/has-property-descriptors/test/index.js create mode 100644 node_modules/has-proto/.eslintrc create mode 100644 node_modules/has-proto/.github/FUNDING.yml create mode 100644 node_modules/has-proto/CHANGELOG.md create mode 100644 node_modules/has-proto/LICENSE create mode 100644 node_modules/has-proto/README.md create mode 100644 node_modules/has-proto/index.js create mode 100644 node_modules/has-proto/package.json create mode 100644 node_modules/has-proto/test/index.js create mode 100644 node_modules/has-tostringtag/.eslintrc create mode 100644 node_modules/has-tostringtag/.github/FUNDING.yml create mode 100644 node_modules/has-tostringtag/CHANGELOG.md create mode 100644 node_modules/has-tostringtag/LICENSE create mode 100644 node_modules/has-tostringtag/README.md create mode 100644 node_modules/has-tostringtag/index.js create mode 100644 node_modules/has-tostringtag/package.json create mode 100644 node_modules/has-tostringtag/shams.js create mode 100644 node_modules/has-tostringtag/test/index.js create mode 100644 node_modules/has-tostringtag/test/shams/core-js.js create mode 100644 node_modules/has-tostringtag/test/shams/get-own-property-symbols.js create mode 100644 node_modules/has-tostringtag/test/tests.js delete mode 100644 node_modules/hosted-git-info/CHANGELOG.md delete mode 100644 node_modules/hosted-git-info/LICENSE delete mode 100644 node_modules/hosted-git-info/README.md delete mode 100644 node_modules/hosted-git-info/git-host-info.js delete mode 100644 node_modules/hosted-git-info/git-host.js delete mode 100644 node_modules/hosted-git-info/index.js delete mode 100644 node_modules/hosted-git-info/package.json create mode 100644 node_modules/internal-slot/.editorconfig rename node_modules/{get-intrinsic => internal-slot}/.eslintignore (100%) create mode 100644 node_modules/internal-slot/.eslintrc create mode 100644 node_modules/internal-slot/.github/FUNDING.yml create mode 100644 node_modules/internal-slot/.nycrc create mode 100644 node_modules/internal-slot/CHANGELOG.md create mode 100644 node_modules/internal-slot/LICENSE create mode 100644 node_modules/internal-slot/README.md create mode 100644 node_modules/internal-slot/index.js create mode 100644 node_modules/internal-slot/package.json create mode 100644 node_modules/internal-slot/test/index.js create mode 100644 node_modules/is-array-buffer/.eslintrc create mode 100644 node_modules/is-array-buffer/.github/FUNDING.yml create mode 100644 node_modules/is-array-buffer/.nycrc create mode 100644 node_modules/is-array-buffer/CHANGELOG.md create mode 100644 node_modules/is-array-buffer/LICENSE create mode 100644 node_modules/is-array-buffer/README.md create mode 100644 node_modules/is-array-buffer/index.js create mode 100644 node_modules/is-array-buffer/package.json create mode 100644 node_modules/is-array-buffer/test/index.js delete mode 100644 node_modules/is-arrayish/.istanbul.yml delete mode 100644 node_modules/is-arrayish/.npmignore delete mode 100644 node_modules/is-arrayish/.travis.yml delete mode 100644 node_modules/is-arrayish/README.md delete mode 100644 node_modules/is-arrayish/index.js delete mode 100644 node_modules/is-arrayish/package.json delete mode 100644 node_modules/is-callable/.github/main.workflow delete mode 100644 node_modules/is-callable/.istanbul.yml delete mode 100644 node_modules/is-core-module/.eslintignore delete mode 100644 node_modules/is-date-object/.jscs.json create mode 100644 node_modules/is-negative-zero/.github/FUNDING.yml delete mode 100644 node_modules/is-negative-zero/.github/workflows/node-4+.yml delete mode 100644 node_modules/is-negative-zero/.github/workflows/node-iojs.yml delete mode 100644 node_modules/is-negative-zero/.github/workflows/node-pretest.yml delete mode 100644 node_modules/is-negative-zero/.github/workflows/node-zero.yml delete mode 100644 node_modules/is-negative-zero/.github/workflows/rebase.yml delete mode 100644 node_modules/is-negative-zero/.github/workflows/require-allow-edits.yml delete mode 100644 node_modules/is-number-object/.eslintignore delete mode 100644 node_modules/is-number-object/test/corejs.js rename node_modules/{has-bigints => is-shared-array-buffer}/.eslintignore (100%) create mode 100644 node_modules/is-shared-array-buffer/.eslintrc create mode 100644 node_modules/is-shared-array-buffer/.github/FUNDING.yml create mode 100644 node_modules/is-shared-array-buffer/.nycrc create mode 100644 node_modules/is-shared-array-buffer/CHANGELOG.md create mode 100644 node_modules/is-shared-array-buffer/LICENSE create mode 100644 node_modules/is-shared-array-buffer/README.md create mode 100644 node_modules/is-shared-array-buffer/index.js create mode 100644 node_modules/is-shared-array-buffer/package.json create mode 100644 node_modules/is-shared-array-buffer/test/index.js create mode 100644 node_modules/is-typed-array/.editorconfig create mode 100644 node_modules/is-typed-array/.eslintrc create mode 100644 node_modules/is-typed-array/.github/FUNDING.yml create mode 100644 node_modules/is-typed-array/.nycrc create mode 100644 node_modules/is-typed-array/CHANGELOG.md create mode 100644 node_modules/is-typed-array/LICENSE create mode 100644 node_modules/is-typed-array/README.md create mode 100644 node_modules/is-typed-array/index.js create mode 100644 node_modules/is-typed-array/package.json create mode 100644 node_modules/is-typed-array/test/index.js rename node_modules/{has-symbols => is-weakref}/.eslintignore (100%) create mode 100644 node_modules/is-weakref/.eslintrc create mode 100644 node_modules/is-weakref/.github/FUNDING.yml create mode 100644 node_modules/is-weakref/.nycrc create mode 100644 node_modules/is-weakref/CHANGELOG.md create mode 100644 node_modules/is-weakref/LICENSE create mode 100644 node_modules/is-weakref/README.md create mode 100644 node_modules/is-weakref/index.js create mode 100644 node_modules/is-weakref/package.json create mode 100644 node_modules/is-weakref/test/index.js delete mode 100644 node_modules/json-parse-better-errors/CHANGELOG.md delete mode 100644 node_modules/json-parse-better-errors/LICENSE.md delete mode 100644 node_modules/json-parse-better-errors/README.md delete mode 100644 node_modules/json-parse-better-errors/index.js delete mode 100644 node_modules/json-parse-better-errors/package.json delete mode 100644 node_modules/json5/CHANGELOG.md create mode 100644 node_modules/minimist/.eslintrc create mode 100644 node_modules/minimist/.github/FUNDING.yml create mode 100644 node_modules/minimist/.nycrc delete mode 100644 node_modules/minimist/.travis.yml create mode 100644 node_modules/minimist/CHANGELOG.md rename node_modules/minimist/{readme.markdown => README.md} (71%) delete mode 100644 node_modules/normalize-package-data/AUTHORS delete mode 100644 node_modules/normalize-package-data/LICENSE delete mode 100644 node_modules/normalize-package-data/README.md delete mode 100644 node_modules/normalize-package-data/lib/extract_description.js delete mode 100644 node_modules/normalize-package-data/lib/fixer.js delete mode 100644 node_modules/normalize-package-data/lib/make_warning.js delete mode 100644 node_modules/normalize-package-data/lib/normalize.js delete mode 100644 node_modules/normalize-package-data/lib/safe_format.js delete mode 100644 node_modules/normalize-package-data/lib/typos.json delete mode 100644 node_modules/normalize-package-data/lib/warning_messages.json delete mode 120000 node_modules/normalize-package-data/node_modules/.bin/semver delete mode 100644 node_modules/normalize-package-data/package.json delete mode 100644 node_modules/object-inspect/.eslintignore create mode 100644 node_modules/object-inspect/CHANGELOG.md create mode 100644 node_modules/object-inspect/package-support.json delete mode 100644 node_modules/object.assign/.eslintignore delete mode 100644 node_modules/object.assign/.github/workflows/rebase.yml delete mode 100644 node_modules/object.assign/.github/workflows/require-allow-edits.yml create mode 100644 node_modules/object.assign/test.html create mode 100644 node_modules/object.assign/test/implementation.js delete mode 100644 node_modules/object.values/.eslintignore delete mode 100644 node_modules/parse-json/index.js delete mode 100644 node_modules/parse-json/license delete mode 100644 node_modules/parse-json/package.json delete mode 100644 node_modules/parse-json/readme.md delete mode 100644 node_modules/pkg-up/index.js delete mode 100644 node_modules/pkg-up/license delete mode 100644 node_modules/pkg-up/node_modules/find-up/index.js delete mode 100644 node_modules/pkg-up/node_modules/find-up/license delete mode 100644 node_modules/pkg-up/node_modules/find-up/package.json delete mode 100644 node_modules/pkg-up/node_modules/find-up/readme.md delete mode 100644 node_modules/pkg-up/node_modules/locate-path/index.js delete mode 100644 node_modules/pkg-up/node_modules/locate-path/license delete mode 100644 node_modules/pkg-up/node_modules/locate-path/package.json delete mode 100644 node_modules/pkg-up/node_modules/locate-path/readme.md delete mode 100644 node_modules/pkg-up/node_modules/p-limit/index.js delete mode 100644 node_modules/pkg-up/node_modules/p-limit/license delete mode 100644 node_modules/pkg-up/node_modules/p-limit/package.json delete mode 100644 node_modules/pkg-up/node_modules/p-limit/readme.md delete mode 100644 node_modules/pkg-up/node_modules/p-locate/index.js delete mode 100644 node_modules/pkg-up/node_modules/p-locate/license delete mode 100644 node_modules/pkg-up/node_modules/p-locate/package.json delete mode 100644 node_modules/pkg-up/node_modules/p-locate/readme.md delete mode 100644 node_modules/pkg-up/node_modules/p-try/index.js delete mode 100644 node_modules/pkg-up/node_modules/p-try/license delete mode 100644 node_modules/pkg-up/node_modules/p-try/package.json delete mode 100644 node_modules/pkg-up/node_modules/p-try/readme.md delete mode 100644 node_modules/pkg-up/node_modules/path-exists/index.js delete mode 100644 node_modules/pkg-up/node_modules/path-exists/license delete mode 100644 node_modules/pkg-up/node_modules/path-exists/package.json delete mode 100644 node_modules/pkg-up/node_modules/path-exists/readme.md delete mode 100644 node_modules/pkg-up/package.json delete mode 100644 node_modules/pkg-up/readme.md delete mode 100644 node_modules/read-pkg-up/index.js delete mode 100644 node_modules/read-pkg-up/license delete mode 100644 node_modules/read-pkg-up/node_modules/find-up/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/find-up/license delete mode 100644 node_modules/read-pkg-up/node_modules/find-up/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/find-up/readme.md delete mode 100644 node_modules/read-pkg-up/node_modules/load-json-file/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/load-json-file/license delete mode 100644 node_modules/read-pkg-up/node_modules/load-json-file/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/load-json-file/readme.md delete mode 100644 node_modules/read-pkg-up/node_modules/locate-path/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/locate-path/license delete mode 100644 node_modules/read-pkg-up/node_modules/locate-path/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/locate-path/readme.md delete mode 100644 node_modules/read-pkg-up/node_modules/p-limit/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/p-limit/license delete mode 100644 node_modules/read-pkg-up/node_modules/p-limit/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/p-limit/readme.md delete mode 100644 node_modules/read-pkg-up/node_modules/p-locate/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/p-locate/license delete mode 100644 node_modules/read-pkg-up/node_modules/p-locate/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/p-locate/readme.md delete mode 100644 node_modules/read-pkg-up/node_modules/p-try/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/p-try/license delete mode 100644 node_modules/read-pkg-up/node_modules/p-try/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/p-try/readme.md delete mode 100644 node_modules/read-pkg-up/node_modules/path-exists/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/path-exists/license delete mode 100644 node_modules/read-pkg-up/node_modules/path-exists/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/path-exists/readme.md delete mode 100644 node_modules/read-pkg-up/node_modules/path-type/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/path-type/license delete mode 100644 node_modules/read-pkg-up/node_modules/path-type/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/path-type/readme.md delete mode 100644 node_modules/read-pkg-up/node_modules/pify/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/pify/license delete mode 100644 node_modules/read-pkg-up/node_modules/pify/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/pify/readme.md delete mode 100644 node_modules/read-pkg-up/node_modules/read-pkg/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/read-pkg/license delete mode 100644 node_modules/read-pkg-up/node_modules/read-pkg/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/read-pkg/readme.md delete mode 100644 node_modules/read-pkg-up/package.json delete mode 100644 node_modules/read-pkg-up/readme.md create mode 100644 node_modules/regexp.prototype.flags/.editorconfig create mode 100644 node_modules/regexp.prototype.flags/.eslintrc create mode 100644 node_modules/regexp.prototype.flags/.nycrc create mode 100644 node_modules/regexp.prototype.flags/CHANGELOG.md rename node_modules/{is-arrayish => regexp.prototype.flags}/LICENSE (96%) create mode 100644 node_modules/regexp.prototype.flags/README.md create mode 100644 node_modules/regexp.prototype.flags/auto.js create mode 100644 node_modules/regexp.prototype.flags/implementation.js create mode 100644 node_modules/regexp.prototype.flags/index.js create mode 100644 node_modules/regexp.prototype.flags/package.json create mode 100644 node_modules/regexp.prototype.flags/polyfill.js create mode 100644 node_modules/regexp.prototype.flags/shim.js create mode 100644 node_modules/regexp.prototype.flags/test/implementation.js create mode 100644 node_modules/regexp.prototype.flags/test/index.js create mode 100644 node_modules/regexp.prototype.flags/test/shimmed.js create mode 100644 node_modules/regexp.prototype.flags/test/tests.js delete mode 100644 node_modules/resolve/.eslintignore create mode 100644 node_modules/resolve/.github/FUNDING.yml delete mode 100644 node_modules/resolve/appveyor.yml create mode 100644 node_modules/resolve/async.js create mode 100755 node_modules/resolve/bin/resolve create mode 100644 node_modules/resolve/lib/homedir.js create mode 100644 node_modules/resolve/sync.js delete mode 100644 node_modules/resolve/test/.eslintrc create mode 100644 node_modules/resolve/test/home_paths.js create mode 100644 node_modules/resolve/test/home_paths_sync.js create mode 100644 node_modules/resolve/test/resolver/false_main/index.js create mode 100644 node_modules/resolve/test/resolver/false_main/package.json create mode 100644 node_modules/resolve/test/resolver/malformed_package_json/index.js create mode 100644 node_modules/resolve/test/resolver/malformed_package_json/package.json create mode 100644 node_modules/safe-regex-test/.eslintrc create mode 100644 node_modules/safe-regex-test/.github/FUNDING.yml create mode 100644 node_modules/safe-regex-test/CHANGELOG.md create mode 100644 node_modules/safe-regex-test/LICENSE create mode 100644 node_modules/safe-regex-test/README.md create mode 100644 node_modules/safe-regex-test/index.js create mode 100644 node_modules/safe-regex-test/package.json create mode 100644 node_modules/safe-regex-test/test/index.js rename node_modules/{is-callable => side-channel}/.eslintignore (100%) create mode 100644 node_modules/side-channel/.eslintrc create mode 100644 node_modules/side-channel/.github/FUNDING.yml create mode 100644 node_modules/side-channel/.nycrc create mode 100644 node_modules/side-channel/CHANGELOG.md create mode 100644 node_modules/side-channel/LICENSE create mode 100644 node_modules/side-channel/README.md create mode 100644 node_modules/side-channel/index.js create mode 100644 node_modules/side-channel/package.json create mode 100644 node_modules/side-channel/test/index.js delete mode 100644 node_modules/spdx-correct/LICENSE delete mode 100644 node_modules/spdx-correct/README.md delete mode 100644 node_modules/spdx-correct/index.js delete mode 100644 node_modules/spdx-correct/package.json delete mode 100644 node_modules/spdx-exceptions/README.md delete mode 100644 node_modules/spdx-exceptions/index.json delete mode 100644 node_modules/spdx-exceptions/package.json delete mode 100644 node_modules/spdx-expression-parse/AUTHORS delete mode 100644 node_modules/spdx-expression-parse/LICENSE delete mode 100644 node_modules/spdx-expression-parse/README.md delete mode 100644 node_modules/spdx-expression-parse/index.js delete mode 100644 node_modules/spdx-expression-parse/package.json delete mode 100644 node_modules/spdx-expression-parse/parse.js delete mode 100644 node_modules/spdx-expression-parse/scan.js delete mode 100644 node_modules/spdx-license-ids/README.md delete mode 100644 node_modules/spdx-license-ids/deprecated.json delete mode 100644 node_modules/spdx-license-ids/index.json delete mode 100644 node_modules/spdx-license-ids/package.json delete mode 100644 node_modules/string.prototype.trimend/.eslintignore delete mode 100644 node_modules/string.prototype.trimstart/.eslintignore create mode 100644 node_modules/supports-preserve-symlinks-flag/.eslintrc create mode 100644 node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml create mode 100644 node_modules/supports-preserve-symlinks-flag/.nycrc create mode 100644 node_modules/supports-preserve-symlinks-flag/CHANGELOG.md create mode 100644 node_modules/supports-preserve-symlinks-flag/LICENSE create mode 100644 node_modules/supports-preserve-symlinks-flag/README.md create mode 100644 node_modules/supports-preserve-symlinks-flag/browser.js create mode 100644 node_modules/supports-preserve-symlinks-flag/index.js create mode 100644 node_modules/supports-preserve-symlinks-flag/package.json create mode 100644 node_modules/supports-preserve-symlinks-flag/test/index.js delete mode 100644 node_modules/tsconfig-paths/.nycrc.json create mode 100644 node_modules/tsconfig-paths/lib/__tests__/config-loader.test.d.ts create mode 100644 node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js create mode 100644 node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js.map create mode 100644 node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.d.ts create mode 100644 node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js create mode 100644 node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js.map create mode 100644 node_modules/tsconfig-paths/lib/__tests__/filesystem.test.d.ts create mode 100644 node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js create mode 100644 node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js.map create mode 100644 node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.d.ts create mode 100644 node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js create mode 100644 node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js.map create mode 100644 node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.d.ts create mode 100644 node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js create mode 100644 node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js.map create mode 100644 node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.d.ts create mode 100644 node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js create mode 100644 node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js.map create mode 100644 node_modules/tsconfig-paths/lib/__tests__/try-path.test.d.ts create mode 100644 node_modules/tsconfig-paths/lib/__tests__/try-path.test.js create mode 100644 node_modules/tsconfig-paths/lib/__tests__/try-path.test.js.map create mode 100644 node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.d.ts create mode 100644 node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js create mode 100644 node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js.map create mode 100644 node_modules/tsconfig-paths/lib/config-loader.js.map create mode 100644 node_modules/tsconfig-paths/lib/filesystem.js.map create mode 100644 node_modules/tsconfig-paths/lib/index.js.map create mode 100644 node_modules/tsconfig-paths/lib/mapping-entry.js.map create mode 100644 node_modules/tsconfig-paths/lib/match-path-async.js.map create mode 100644 node_modules/tsconfig-paths/lib/match-path-sync.js.map create mode 100644 node_modules/tsconfig-paths/lib/options.js.map create mode 100644 node_modules/tsconfig-paths/lib/register.js.map create mode 100644 node_modules/tsconfig-paths/lib/try-path.js.map create mode 100644 node_modules/tsconfig-paths/lib/tsconfig-loader.js.map rename node_modules/tsconfig-paths/{test/config-loader-tests.ts => src/__tests__/config-loader.test.ts} (55%) rename node_modules/tsconfig-paths/{test => src/__tests__}/data/match-path-data.ts (72%) create mode 100644 node_modules/tsconfig-paths/src/__tests__/filesystem.test.ts create mode 100644 node_modules/tsconfig-paths/src/__tests__/mapping-entry.test.ts rename node_modules/tsconfig-paths/{test/match-path-async-tests.ts => src/__tests__/match-path-async.test.ts} (71%) rename node_modules/tsconfig-paths/{test/match-path-sync-tests.ts => src/__tests__/match-path-sync.test.ts} (62%) create mode 100644 node_modules/tsconfig-paths/src/__tests__/try-path.test.ts rename node_modules/tsconfig-paths/{test/tsconfig-loader-tests.ts => src/__tests__/tsconfig-loader.test.ts} (51%) rename node_modules/tsconfig-paths/{test => src/__tests__}/tsconfig-named.json (100%) create mode 100644 node_modules/tsconfig-paths/src/config-loader.ts create mode 100644 node_modules/tsconfig-paths/src/filesystem.ts create mode 100644 node_modules/tsconfig-paths/src/index.ts create mode 100644 node_modules/tsconfig-paths/src/mapping-entry.ts create mode 100644 node_modules/tsconfig-paths/src/match-path-async.ts create mode 100644 node_modules/tsconfig-paths/src/match-path-sync.ts create mode 100644 node_modules/tsconfig-paths/src/options.ts create mode 100644 node_modules/tsconfig-paths/src/register.ts create mode 100644 node_modules/tsconfig-paths/src/try-path.ts create mode 100644 node_modules/tsconfig-paths/src/tsconfig-loader.ts delete mode 100644 node_modules/tsconfig-paths/test/filesystem-tests.ts delete mode 100644 node_modules/tsconfig-paths/test/mapping-entry-test.ts delete mode 100644 node_modules/tsconfig-paths/test/mocha.opts delete mode 100644 node_modules/tsconfig-paths/test/try-path-tests.ts delete mode 100644 node_modules/tsconfig-paths/test/tsconfig.json delete mode 100644 node_modules/tsconfig-paths/tslint.json create mode 100644 node_modules/typed-array-length/.eslintrc create mode 100644 node_modules/typed-array-length/.github/FUNDING.yml create mode 100644 node_modules/typed-array-length/.nycrc create mode 100644 node_modules/typed-array-length/CHANGELOG.md create mode 100644 node_modules/typed-array-length/LICENSE create mode 100644 node_modules/typed-array-length/README.md create mode 100644 node_modules/typed-array-length/index.js create mode 100644 node_modules/typed-array-length/package.json create mode 100644 node_modules/typed-array-length/test/index.js delete mode 100644 node_modules/unbox-primitive/.eslintignore delete mode 100644 node_modules/validate-npm-package-license/LICENSE delete mode 100644 node_modules/validate-npm-package-license/README.md delete mode 100644 node_modules/validate-npm-package-license/index.js delete mode 100644 node_modules/validate-npm-package-license/package.json create mode 100644 node_modules/which-typed-array/.editorconfig rename node_modules/{is-bigint/test => which-typed-array}/.eslintrc (50%) create mode 100644 node_modules/which-typed-array/.github/FUNDING.yml create mode 100644 node_modules/which-typed-array/.nycrc create mode 100644 node_modules/which-typed-array/CHANGELOG.md create mode 100644 node_modules/which-typed-array/LICENSE create mode 100644 node_modules/which-typed-array/README.md create mode 100644 node_modules/which-typed-array/index.js create mode 100644 node_modules/which-typed-array/package.json create mode 100644 node_modules/which-typed-array/test/index.js diff --git a/node_modules/.bin/resolve b/node_modules/.bin/resolve new file mode 120000 index 000000000..b6afda6c7 --- /dev/null +++ b/node_modules/.bin/resolve @@ -0,0 +1 @@ +../resolve/bin/resolve \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 2b56d07fa..0703cd3e0 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -779,7 +779,8 @@ }, "node_modules/@types/json5": { "version": "0.0.29", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, "node_modules/@types/node": { @@ -986,6 +987,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.48.2.tgz", "integrity": "sha512-38zMsKsG2sIuM5Oi/olurGwYJXzmtdsHhn5mI/pQogP+BjYVkK5iRazCQ8RGS0V+YLk282uWElN70zAAUmaYHw==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "5.48.2", "@typescript-eslint/types": "5.48.2", @@ -1293,16 +1295,16 @@ } }, "node_modules/array-includes": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", - "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", - "get-intrinsic": "^1.1.1", - "is-string": "^1.0.5" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" }, "engines": { "node": ">= 0.4" @@ -1319,14 +1321,33 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", - "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -1618,6 +1639,18 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.0", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" @@ -2003,15 +2036,19 @@ "dev": true }, "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dev": true, "dependencies": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/del": { @@ -2112,36 +2149,45 @@ "node": ">=8.6" } }, - "node_modules/error-ex": { - "version": "1.3.2", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, "node_modules/es-abstract": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", - "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz", + "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", "dev": true, "dependencies": { + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", - "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", - "object-inspect": "^1.10.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.4", + "is-array-buffer": "^3.0.1", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" }, "engines": { "node": ">= 0.4" @@ -2150,6 +2196,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -2254,13 +2323,14 @@ } }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.5.tgz", - "integrity": "sha512-XMoPKjSpXbkeJ7ZZ9icLnJMTY5Mc1kZbCakHquaFsXPpyWOwK0TK6CODO+0ca54UoM9LKOxyUNnoVZRl8TeaAg==", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", "dev": true, "dependencies": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { @@ -2273,16 +2343,20 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", - "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", "dev": true, "dependencies": { - "debug": "^3.2.7", - "pkg-dir": "^2.0.0" + "debug": "^3.2.7" }, "engines": { "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, "node_modules/eslint-module-utils/node_modules/debug": { @@ -2294,85 +2368,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-module-utils/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "dependencies": { - "find-up": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/eslint-plugin-eslint-comments": { "version": "3.2.0", "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", @@ -2574,112 +2569,50 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.0.tgz", - "integrity": "sha512-Kc6xqT9hiYi2cgybOc0I2vC9OgAYga5o/rAFinam/yF/t5uBqxQbauNPMC6fgb640T/89P0gFoO27FOilJ/Cqg==", + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", "dev": true, "dependencies": { - "array-includes": "^3.1.3", - "array.prototype.flat": "^1.2.4", - "debug": "^2.6.9", + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.5", - "eslint-module-utils": "^2.6.2", - "find-up": "^2.0.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", "has": "^1.0.3", - "is-core-module": "^2.4.0", - "minimatch": "^3.0.4", - "object.values": "^1.1.3", - "pkg-up": "^2.0.0", - "read-pkg-up": "^3.0.0", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.9.0" + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "2.6.9", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/ms": { - "version": "2.0.0", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/eslint-plugin-import/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" + "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-import/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "engines": { - "node": ">=4" + "bin": { + "semver": "bin/semver.js" } }, "node_modules/eslint-plugin-no-async-foreach": { @@ -3179,6 +3112,15 @@ "integrity": "sha512-OMQjaErSFHmHqZe+PSidH5n8j3O0F2DdnVh8JB4j4eUQ2k6KvB0qGfrKIhapvez5JerBbmWkaLYUYWISaESoXg==", "dev": true }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/form-data": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", @@ -3220,11 +3162,38 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gar": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/gar/-/gar-1.0.4.tgz", @@ -3252,14 +3221,30 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3329,6 +3314,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -3348,6 +3348,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -3366,9 +3378,9 @@ } }, "node_modules/has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3382,38 +3394,72 @@ "node": ">=4" } }, - "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", "dev": true, - "engines": { - "node": ">= 0.4" + "dependencies": { + "get-intrinsic": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true, "engines": { - "node": ">=10.17.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, "engines": { - "node": ">= 4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "engines": { + "node": ">= 4" } }, "node_modules/ignore-by-default": { @@ -3477,6 +3523,20 @@ "version": "2.0.3", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "node_modules/internal-slot": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", + "integrity": "sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ip-regex": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", @@ -3494,16 +3554,28 @@ "node": ">=8" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "node_modules/is-array-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", + "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3521,12 +3593,13 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", - "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -3540,9 +3613,9 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "node_modules/is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "engines": { "node": ">= 0.4" @@ -3552,9 +3625,9 @@ } }, "node_modules/is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -3564,10 +3637,13 @@ } }, "node_modules/is-date-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", - "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -3607,9 +3683,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, "engines": { "node": ">= 0.4" @@ -3626,10 +3702,13 @@ } }, "node_modules/is-number-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", - "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -3668,13 +3747,13 @@ "dev": true }, "node_modules/is-regex": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", - "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -3683,6 +3762,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -3696,10 +3787,13 @@ } }, "node_modules/is-string": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", - "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -3722,6 +3816,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.2.0.tgz", @@ -3734,6 +3847,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -3772,11 +3897,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -3794,8 +3914,9 @@ "dev": true }, "node_modules/json5": { - "version": "1.0.1", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -4078,10 +4199,13 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/ms": { "version": "2.1.2", @@ -4155,25 +4279,6 @@ "node": ">=12.19" } }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4196,9 +4301,9 @@ } }, "node_modules/object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4214,14 +4319,14 @@ } }, "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { @@ -4232,14 +4337,14 @@ } }, "node_modules/object.values": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", - "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.2" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "engines": { "node": ">= 0.4" @@ -4377,18 +4482,6 @@ "node": ">=6" } }, - "node_modules/parse-json": { - "version": "4.0.0", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/parse-ms": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", @@ -4480,85 +4573,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "dependencies": { - "find-up": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/plur": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz", @@ -4657,146 +4671,33 @@ "node": ">=6" } }, - "node_modules/read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { - "pify": "^3.0.0" + "picomatch": "^2.2.1" }, "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" + "node": ">=8.10.0" } }, - "node_modules/read-pkg-up/node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "node_modules/regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "dev": true, "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" }, "engines": { - "node": ">=4" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" + "node": ">= 0.4" }, - "engines": { - "node": ">=8.10.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/regexpp": { @@ -4850,13 +4751,17 @@ } }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4927,6 +4832,20 @@ "version": "1.1.9", "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==" }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -4994,6 +4913,20 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -5095,34 +5028,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/spdx-correct": { - "version": "3.1.0", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.0", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.5", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -5165,26 +5070,28 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5204,7 +5111,8 @@ }, "node_modules/strip-bom": { "version": "3.0.0", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, "engines": { "node": ">=4" @@ -5306,6 +5214,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/svg-element-attributes": { "version": "1.3.1", "integrity": "sha512-Bh05dSOnJBf3miNMqpsormfNtfidA/GxQVakhtn0T4DECWKeXQRQUceYjJ+OxYiiLdGe4Jo9iFV8wICFapFeIA==", @@ -5479,13 +5399,14 @@ "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, "node_modules/tsconfig-paths": { - "version": "3.9.0", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", "dev": true, "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.1", - "minimist": "^1.2.0", + "minimist": "^1.2.6", "strip-bom": "^3.0.0" } }, @@ -5548,6 +5469,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { "version": "4.9.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", @@ -5562,14 +5497,14 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" }, "funding": { @@ -5616,15 +5551,6 @@ "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", "dev": true }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -5679,6 +5605,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", diff --git a/node_modules/@types/semver/package.json b/node_modules/@types/semver/package.json index f848eab7e..641362ae2 100755 --- a/node_modules/@types/semver/package.json +++ b/node_modules/@types/semver/package.json @@ -1,50 +1,50 @@ { - "name": "@types/semver", - "version": "7.3.13", - "description": "TypeScript definitions for semver", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver", - "license": "MIT", - "contributors": [ - { - "name": "Bart van der Schoor", - "url": "https://github.com/Bartvds", - "githubUsername": "Bartvds" - }, - { - "name": "BendingBender", - "url": "https://github.com/BendingBender", - "githubUsername": "BendingBender" - }, - { - "name": "Lucian Buzzo", - "url": "https://github.com/LucianBuzzo", - "githubUsername": "LucianBuzzo" - }, - { - "name": "Klaus Meinhardt", - "url": "https://github.com/ajafff", - "githubUsername": "ajafff" - }, - { - "name": "ExE Boss", - "url": "https://github.com/ExE-Boss", - "githubUsername": "ExE-Boss" - }, - { - "name": "Piotr Błażejewicz", - "url": "https://github.com/peterblazejewicz", - "githubUsername": "peterblazejewicz" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/semver" + "name": "@types/semver", + "version": "7.3.13", + "description": "TypeScript definitions for semver", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver", + "license": "MIT", + "contributors": [ + { + "name": "Bart van der Schoor", + "url": "https://github.com/Bartvds", + "githubUsername": "Bartvds" }, - "scripts": {}, - "dependencies": {}, - "typesPublisherContentHash": "5443a0792891f230352efbc23f545699de0ce8eef9fe3e28cefd36a3fe993eb6", - "typeScriptVersion": "4.1" + { + "name": "BendingBender", + "url": "https://github.com/BendingBender", + "githubUsername": "BendingBender" + }, + { + "name": "Lucian Buzzo", + "url": "https://github.com/LucianBuzzo", + "githubUsername": "LucianBuzzo" + }, + { + "name": "Klaus Meinhardt", + "url": "https://github.com/ajafff", + "githubUsername": "ajafff" + }, + { + "name": "ExE Boss", + "url": "https://github.com/ExE-Boss", + "githubUsername": "ExE-Boss" + }, + { + "name": "Piotr Błażejewicz", + "url": "https://github.com/peterblazejewicz", + "githubUsername": "peterblazejewicz" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/semver" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "5443a0792891f230352efbc23f545699de0ce8eef9fe3e28cefd36a3fe993eb6", + "typeScriptVersion": "4.1" } \ No newline at end of file diff --git a/node_modules/array-includes/.eslintrc b/node_modules/array-includes/.eslintrc index 0df206d50..540ac8ebf 100644 --- a/node_modules/array-includes/.eslintrc +++ b/node_modules/array-includes/.eslintrc @@ -4,10 +4,17 @@ "extends": "@ljharb", "rules": { - "complexity": 0, "id-length": [2, { "min": 1, "max": 26 }], - "max-statements": [2, 14], - "new-cap": [2, { capIsNewExceptions: ["GetIntrinsic", "ToObject", "ToInteger", "ToLength", "SameValueZero", "RequireObjectCoercible"] }], + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + "ToObject", + "ToIntegerOrInfinity", + "ToLength", + "SameValueZero", + "RequireObjectCoercible", + ], + }], }, "overrides": [ diff --git a/node_modules/array-includes/.nycrc b/node_modules/array-includes/.nycrc index 1826526e0..bdd626ce9 100644 --- a/node_modules/array-includes/.nycrc +++ b/node_modules/array-includes/.nycrc @@ -2,10 +2,6 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, "exclude": [ "coverage", "test" diff --git a/node_modules/array-includes/CHANGELOG.md b/node_modules/array-includes/CHANGELOG.md index 7e8a56ebf..eaefc2c9a 100644 --- a/node_modules/array-includes/CHANGELOG.md +++ b/node_modules/array-includes/CHANGELOG.md @@ -1,3 +1,42 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.1.6](https://github.com/es-shims/array-includes/compare/v3.1.5...v3.1.6) - 2022-11-07 + +### Commits + +- [meta] add `auto-changelog` [`c5fbe72`](https://github.com/es-shims/array-includes/commit/c5fbe728395deff641d756cc9d398a949076c180) +- [meta] use `npmignore` to autogenerate an npmignore file [`dbd6dc8`](https://github.com/es-shims/array-includes/commit/dbd6dc8f8906cca6b0b493e308686c4fd05bea15) +- [Deps] update `es-abstract`, `get-intrinsic` [`b819e3b`](https://github.com/es-shims/array-includes/commit/b819e3b3dd1adce0b3359529b0276a416efce351) +- [actions] update rebase action to use reusable workflow [`6e241d5`](https://github.com/es-shims/array-includes/commit/6e241d5177513cfb0261d0fbe0c8c98daf5c5eab) +- [Dev Deps] update `aud`, `tape` [`9b2a931`](https://github.com/es-shims/array-includes/commit/9b2a931aee6fc8195a349c6fe7894445a911223f) +- [readme] note that FF 102+ no longer needs this package [`0a0c758`](https://github.com/es-shims/array-includes/commit/0a0c758ed52808428314ffe53ea8278297170c84) + + + +3.1.5 / 2022-05-03 +================= + * [Fix] install polyfill on FF 99+ + * [Deps] update `define-properties`, `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `functions-have-names`, `safe-publish-latest`, `tape` + * [actions] reuse common workflows + * [actions] update codecov uploader + +3.1.4 / 2021-10-04 +================= + * [Robustness] avoid a runtime `Math.max` call + * [readme] add github actions/codecov badges + * [readme] fix repo URLs; remove travis badge + * [Deps] update `es-abstract`, `is-string` + * [meta] use `prepublishOnly` script for npm 7+ + * [actions] update workflows + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `tape` + 3.1.3 / 2021-02-20 ================= * [Deps] update `call-bind`, `es-abstract`, `get-intrinsic` diff --git a/node_modules/array-includes/README.md b/node_modules/array-includes/README.md index fb8758798..525c2a2dd 100644 --- a/node_modules/array-includes/README.md +++ b/node_modules/array-includes/README.md @@ -1,6 +1,7 @@ # array-includes [![Version Badge][npm-version-svg]][package-url] -[![Build Status][travis-svg]][travis-url] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] @@ -10,10 +11,18 @@ An ES7/ES2016 spec-compliant `Array.prototype.includes` shim/polyfill/replacement that works as far down as ES3. -This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the proposed [spec](http://www.ecma-international.org/ecma-262/6.0/). +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the proposed [spec](https://262.ecma-international.org/6.0/). Because `Array.prototype.includes` depends on a receiver (the `this` value), the main export takes the array to operate on as the first argument. +Engines that need this package include: + - IE (all versions) + - Safari < 9 + - Firefox < 43, and 99-101 + - Chrome < 47 + - Edge < 14 + - node < 6 + ## Getting started ```sh @@ -80,15 +89,17 @@ assert.equal(arr.includes(1, 'foo'), includes(arr, 1, 'foo')); Simply clone the repo, `npm install`, and run `npm test` [package-url]: https://npmjs.org/package/array-includes -[npm-version-svg]: http://versionbadg.es/es-shims/array-includes.svg -[travis-svg]: https://travis-ci.org/es-shims/array-includes.svg -[travis-url]: https://travis-ci.org/es-shims/array-includes +[npm-version-svg]: https://versionbadg.es/es-shims/array-includes.svg [deps-svg]: https://david-dm.org/es-shims/array-includes.svg [deps-url]: https://david-dm.org/es-shims/array-includes [dev-deps-svg]: https://david-dm.org/es-shims/array-includes/dev-status.svg [dev-deps-url]: https://david-dm.org/es-shims/array-includes#info=devDependencies [npm-badge-png]: https://nodei.co/npm/array-includes.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/array-includes.svg +[license-image]: https://img.shields.io/npm/l/array-includes.svg [license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/array-includes.svg -[downloads-url]: http://npm-stat.com/charts.html?package=array-includes +[downloads-image]: https://img.shields.io/npm/dm/array-includes.svg +[downloads-url]: https://npm-stat.com/charts.html?package=array-includes +[codecov-image]: https://codecov.io/gh/es-shims/array-includes/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/array-includes/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/array-includes +[actions-url]: https://github.com/es-shims/array-includes/actions diff --git a/node_modules/array-includes/implementation.js b/node_modules/array-includes/implementation.js index 7823d5a59..224ecbb0d 100644 --- a/node_modules/array-includes/implementation.js +++ b/node_modules/array-includes/implementation.js @@ -1,9 +1,9 @@ 'use strict'; -var ToInteger = require('es-abstract/2020/ToInteger'); -var ToLength = require('es-abstract/2020/ToLength'); -var ToObject = require('es-abstract/2020/ToObject'); -var SameValueZero = require('es-abstract/2020/SameValueZero'); +var ToIntegerOrInfinity = require('es-abstract/2022/ToIntegerOrInfinity'); +var ToLength = require('es-abstract/2022/ToLength'); +var ToObject = require('es-abstract/2022/ToObject'); +var SameValueZero = require('es-abstract/2022/SameValueZero'); var $isNaN = require('es-abstract/helpers/isNaN'); var $isFinite = require('es-abstract/helpers/isFinite'); var GetIntrinsic = require('get-intrinsic'); @@ -12,9 +12,10 @@ var isString = require('is-string'); var $charAt = callBound('String.prototype.charAt'); var $indexOf = GetIntrinsic('%Array.prototype.indexOf%'); // TODO: use callBind.apply without breaking IE 8 +var $max = GetIntrinsic('%Math.max%'); module.exports = function includes(searchElement) { - var fromIndex = arguments.length > 1 ? ToInteger(arguments[1]) : 0; + var fromIndex = arguments.length > 1 ? ToIntegerOrInfinity(arguments[1]) : 0; if ($indexOf && !$isNaN(searchElement) && $isFinite(fromIndex) && typeof searchElement !== 'undefined') { return $indexOf.apply(this, arguments) > -1; } @@ -24,7 +25,7 @@ module.exports = function includes(searchElement) { if (length === 0) { return false; } - var k = fromIndex >= 0 ? fromIndex : Math.max(0, length + fromIndex); + var k = fromIndex >= 0 ? fromIndex : $max(0, length + fromIndex); while (k < length) { if (SameValueZero(searchElement, isString(O) ? $charAt(O, k) : O[k])) { return true; diff --git a/node_modules/array-includes/index.js b/node_modules/array-includes/index.js index bed832e4b..1ecb33102 100644 --- a/node_modules/array-includes/index.js +++ b/node_modules/array-includes/index.js @@ -1,7 +1,7 @@ 'use strict'; var define = require('define-properties'); -var RequireObjectCoercible = require('es-abstract/2020/RequireObjectCoercible'); +var RequireObjectCoercible = require('es-abstract/2022/RequireObjectCoercible'); var callBind = require('call-bind'); var callBound = require('call-bind/callBound'); diff --git a/node_modules/array-includes/package.json b/node_modules/array-includes/package.json index aa5c91b45..fe6ad1749 100644 --- a/node_modules/array-includes/package.json +++ b/node_modules/array-includes/package.json @@ -1,6 +1,6 @@ { "name": "array-includes", - "version": "3.1.3", + "version": "3.1.6", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", @@ -20,13 +20,18 @@ "license": "MIT", "main": "index.js", "scripts": { - "prepublish": "safe-publish-latest", - "pretest": "npm run --silent lint && evalmd README.md", + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run --silent lint", "test": "npm run --silent tests-only", - "posttest": "npx aud --production", + "posttest": "aud --production", "tests-only": "nyc tape 'test/**/*.js'", - "lint": "eslint .", - "postlint": "es-shim-api --bound" + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, "repository": { "type": "git", @@ -45,25 +50,27 @@ ], "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", - "get-intrinsic": "^1.1.1", - "is-string": "^1.0.5" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" }, "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^17.5.1", - "aud": "^1.1.4", - "eslint": "^7.20.0", - "evalmd": "0.0.19", - "foreach": "^2.0.5", + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", "function-bind": "^1.1.1", - "functions-have-names": "^1.2.2", + "functions-have-names": "^1.2.3", "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", "indexof": "^0.0.1", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.2.0" + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" }, "testling": { "files": [ @@ -89,5 +96,19 @@ }, "engines": { "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "3.1.6" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] } } diff --git a/node_modules/array-includes/polyfill.js b/node_modules/array-includes/polyfill.js index dfbaa4289..6abe64b83 100644 --- a/node_modules/array-includes/polyfill.js +++ b/node_modules/array-includes/polyfill.js @@ -3,5 +3,11 @@ var implementation = require('./implementation'); module.exports = function getPolyfill() { - return Array.prototype.includes || implementation; + if ( + Array.prototype.includes + && Array(1).includes(undefined) // https://bugzilla.mozilla.org/show_bug.cgi?id=1767541 + ) { + return Array.prototype.includes; + } + return implementation; }; diff --git a/node_modules/array-includes/test/shimmed.js b/node_modules/array-includes/test/shimmed.js index 7081eb175..95c378aed 100644 --- a/node_modules/array-includes/test/shimmed.js +++ b/node_modules/array-includes/test/shimmed.js @@ -1,5 +1,7 @@ 'use strict'; +var orig = Array.prototype.includes; + require('../auto'); var test = require('tape'); @@ -11,6 +13,7 @@ var functionsHaveNames = require('functions-have-names')(); var runTests = require('./tests'); test('shimmed', function (t) { + t.comment('shimmed: ' + (orig === Array.prototype.includes ? 'no' : 'yes')); t.equal(Array.prototype.includes.length, 1, 'Array#includes has a length of 1'); t.test('Function name', { skip: !functionsHaveNames }, function (st) { st.equal(Array.prototype.includes.name, 'includes', 'Array#includes has name "includes"'); diff --git a/node_modules/array.prototype.flat/.eslintrc b/node_modules/array.prototype.flat/.eslintrc index 5a5c9c003..0f117d3f4 100644 --- a/node_modules/array.prototype.flat/.eslintrc +++ b/node_modules/array.prototype.flat/.eslintrc @@ -4,11 +4,6 @@ "extends": "@ljharb", "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "func-name-matching": 0, - "max-statements-per-line": [2, { "max": 2 }], - "multiline-comment-style": 0, "new-cap": [2, { "capIsNewExceptions": [ "ArraySpeciesCreate", @@ -19,11 +14,11 @@ "HasProperty", "IsArray", "Set", - "ToInteger", + "ToIntegerOrInfinity", "ToLength", "ToObject", - "ToString" - ] + "ToString", + ], }], "no-magic-numbers": 0, }, @@ -32,6 +27,7 @@ { "files": "test/**", "rules": { + "func-name-matching": 0, "max-params": 0, "no-invalid-this": [1], }, diff --git a/node_modules/array.prototype.flat/.nycrc b/node_modules/array.prototype.flat/.nycrc index d0fe23bec..bdd626ce9 100644 --- a/node_modules/array.prototype.flat/.nycrc +++ b/node_modules/array.prototype.flat/.nycrc @@ -2,10 +2,6 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 96, - "statements": 96, - "functions": 80, - "branches": 87, "exclude": [ "coverage", "test" diff --git a/node_modules/array.prototype.flat/CHANGELOG.md b/node_modules/array.prototype.flat/CHANGELOG.md index d5e3b7485..730cf41d7 100644 --- a/node_modules/array.prototype.flat/CHANGELOG.md +++ b/node_modules/array.prototype.flat/CHANGELOG.md @@ -1,3 +1,52 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.3.1](https://github.com/es-shims/Array.prototype.flat/compare/v1.3.0...v1.3.1) - 2022-11-02 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`e339ed7`](https://github.com/es-shims/Array.prototype.flat/commit/e339ed71634921d770e8831458767e4564bfc018) +- [meta] add `auto-changelog` [`bb5cbd6`](https://github.com/es-shims/Array.prototype.flat/commit/bb5cbd64544bcdb11d0dff24ea4a18dcb5ab7fd1) +- [Deps] update `define-properties`, `es-abstract` [`8067910`](https://github.com/es-shims/Array.prototype.flat/commit/80679104268c99a3d01552024aeff5bfc39eb97e) +- [actions] update rebase action to use reusable workflow [`d4d9b28`](https://github.com/es-shims/Array.prototype.flat/commit/d4d9b28870ba950d6a19f0ad85f09a35767fbc55) +- [Dev Deps] update `aud`, `object-inspect`, `tape` [`d9d7300`](https://github.com/es-shims/Array.prototype.flat/commit/d9d730009cfe8d02ed1e0f7db0f5b4ebe7c11fae) + + + +1.3.0 / 2022-04-11 +================= + * [New] `shim`/`auto`: add `flat` to `Symbol.unscopables` + * [Deps] update `es-abstract` + * [actions] reuse common workflows + * [actions] update codecov uploader + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` + +1.2.5 / 2021-10-01 +================= + * [readme] add github actions/codecov badges; remove travis badge + * [Deps] update `call-bind`, `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `has-strict-mode`, `object-inspect`, `tape` + * [meta] use `prepublishOnly`, for npm 7+ + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [actions] update workflows + * [Tests] increase coverage + * [meta] fix changelog for v1.2.4 + +1.2.4 / 2020-11-18 +================= + * [meta] do not publish Github Action workflows + * [Deps] update `es-abstract`; add `call-bind` where applicable + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` + * [Tests] run `nyc` on all tests + * [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner + * [Tests] migrate tests to Github Actions + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + 1.2.3 / 2019-12-12 ================= * [Refactor] use split-up `es-abstract` (65% bundle size decrease) diff --git a/node_modules/array.prototype.flat/README.md b/node_modules/array.prototype.flat/README.md index 1ada9f340..712ffce39 100644 --- a/node_modules/array.prototype.flat/README.md +++ b/node_modules/array.prototype.flat/README.md @@ -1,6 +1,7 @@ # array.prototype.flat [![Version Badge][npm-version-svg]][package-url] -[![Build Status][travis-svg]][travis-url] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] @@ -58,15 +59,17 @@ assert.deepEqual(arr.flat(mapper), flat(arr, mapper)); Simply clone the repo, `npm install`, and run `npm test` [package-url]: https://npmjs.org/package/array.prototype.flat -[npm-version-svg]: http://versionbadg.es/es-shims/Array.prototype.flat.svg -[travis-svg]: https://travis-ci.org/es-shims/Array.prototype.flat.svg -[travis-url]: https://travis-ci.org/es-shims/Array.prototype.flat +[npm-version-svg]: https://versionbadg.es/es-shims/Array.prototype.flat.svg [deps-svg]: https://david-dm.org/es-shims/Array.prototype.flat.svg [deps-url]: https://david-dm.org/es-shims/Array.prototype.flat [dev-deps-svg]: https://david-dm.org/es-shims/Array.prototype.flat/dev-status.svg [dev-deps-url]: https://david-dm.org/es-shims/Array.prototype.flat#info=devDependencies [npm-badge-png]: https://nodei.co/npm/array.prototype.flat.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/array.prototype.flat.svg +[license-image]: https://img.shields.io/npm/l/array.prototype.flat.svg [license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/array.prototype.flat.svg -[downloads-url]: http://npm-stat.com/charts.html?package=array.prototype.flat +[downloads-image]: https://img.shields.io/npm/dm/array.prototype.flat.svg +[downloads-url]: https://npm-stat.com/charts.html?package=array.prototype.flat +[codecov-image]: https://codecov.io/gh/es-shims/Array.prototype.flat/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/Array.prototype.flat/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Array.prototype.flat +[actions-url]: https://github.com/es-shims/Array.prototype.flat/actions diff --git a/node_modules/array.prototype.flat/implementation.js b/node_modules/array.prototype.flat/implementation.js index 68a0d28cf..84fcc9522 100644 --- a/node_modules/array.prototype.flat/implementation.js +++ b/node_modules/array.prototype.flat/implementation.js @@ -1,11 +1,11 @@ 'use strict'; -var ArraySpeciesCreate = require('es-abstract/2020/ArraySpeciesCreate'); -var FlattenIntoArray = require('es-abstract/2020/FlattenIntoArray'); -var Get = require('es-abstract/2020/Get'); -var ToInteger = require('es-abstract/2020/ToInteger'); -var ToLength = require('es-abstract/2020/ToLength'); -var ToObject = require('es-abstract/2020/ToObject'); +var ArraySpeciesCreate = require('es-abstract/2022/ArraySpeciesCreate'); +var FlattenIntoArray = require('es-abstract/2022/FlattenIntoArray'); +var Get = require('es-abstract/2022/Get'); +var ToIntegerOrInfinity = require('es-abstract/2022/ToIntegerOrInfinity'); +var ToLength = require('es-abstract/2022/ToLength'); +var ToObject = require('es-abstract/2022/ToObject'); module.exports = function flat() { var O = ToObject(this); @@ -13,7 +13,7 @@ module.exports = function flat() { var depthNum = 1; if (arguments.length > 0 && typeof arguments[0] !== 'undefined') { - depthNum = ToInteger(arguments[0]); + depthNum = ToIntegerOrInfinity(arguments[0]); } var A = ArraySpeciesCreate(O, 0); diff --git a/node_modules/array.prototype.flat/package.json b/node_modules/array.prototype.flat/package.json index 97159a123..77a4122ec 100644 --- a/node_modules/array.prototype.flat/package.json +++ b/node_modules/array.prototype.flat/package.json @@ -1,6 +1,6 @@ { "name": "array.prototype.flat", - "version": "1.2.4", + "version": "1.3.1", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", @@ -20,13 +20,17 @@ "license": "MIT", "main": "index.js", "scripts": { - "prepublish": "safe-publish-latest", + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", "pretest": "npm run --silent lint && evalmd README.md", "test": "npm run tests-only", "posttest": "aud --production", "tests-only": "nyc tape 'test/**/*.js'", - "lint": "eslint .", - "postlint": "es-shim-api --bound" + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, "repository": { "type": "git", @@ -46,23 +50,27 @@ "es-shim API" ], "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" }, "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^17.2.0", - "aud": "^1.1.3", + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", "covert": "^1.1.1", - "eslint": "^7.13.0", + "eslint": "=8.8.0", "evalmd": "^0.0.19", "function-bind": "^1.1.1", - "has-strict-mode": "^1.0.0", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "object-inspect": "^1.8.0", - "safe-publish-latest": "^1.1.4", - "tape": "^5.0.1" + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" }, "testling": { "files": [ @@ -88,9 +96,18 @@ "engines": { "node": ">= 0.4" }, - "greenkeeper": { + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "1.3.1" + }, + "publishConfig": { "ignore": [ - "nyc" + ".github/workflows" ] } } diff --git a/node_modules/array.prototype.flat/shim.js b/node_modules/array.prototype.flat/shim.js index 53ea7012e..ecc8dbeea 100644 --- a/node_modules/array.prototype.flat/shim.js +++ b/node_modules/array.prototype.flat/shim.js @@ -1,14 +1,20 @@ 'use strict'; var define = require('define-properties'); +var shimUnscopables = require('es-shim-unscopables'); + var getPolyfill = require('./polyfill'); module.exports = function shimFlat() { var polyfill = getPolyfill(); + define( Array.prototype, { flat: polyfill }, { flat: function () { return Array.prototype.flat !== polyfill; } } ); + + shimUnscopables('flat'); + return polyfill; }; diff --git a/node_modules/array.prototype.flat/test/shimmed.js b/node_modules/array.prototype.flat/test/shimmed.js index bbd786184..a9f396ea0 100644 --- a/node_modules/array.prototype.flat/test/shimmed.js +++ b/node_modules/array.prototype.flat/test/shimmed.js @@ -1,6 +1,6 @@ 'use strict'; -require('../shim')(); +require('../auto'); var test = require('tape'); var defineProperties = require('define-properties'); diff --git a/node_modules/is-arrayish/.editorconfig b/node_modules/array.prototype.flatmap/.editorconfig similarity index 59% rename from node_modules/is-arrayish/.editorconfig rename to node_modules/array.prototype.flatmap/.editorconfig index 4c017f8ad..bc228f826 100644 --- a/node_modules/is-arrayish/.editorconfig +++ b/node_modules/array.prototype.flatmap/.editorconfig @@ -2,17 +2,19 @@ root = true [*] indent_style = tab +indent_size = 4 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true +max_line_length = 150 -[*.coffee] -indent_style = space - -[{package.json,*.yml}] +[CHANGELOG.md] indent_style = space indent_size = 2 -[*.md] -trim_trailing_whitespace = false +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/array.prototype.flatmap/.eslintrc b/node_modules/array.prototype.flatmap/.eslintrc new file mode 100644 index 000000000..07c091852 --- /dev/null +++ b/node_modules/array.prototype.flatmap/.eslintrc @@ -0,0 +1,34 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { + "capIsNewExceptions": [ + "ArraySpeciesCreate", + "Call", + "CreateDataPropertyOrThrow", + "FlattenIntoArray", + "Get", + "HasProperty", + "IsArray", + "IsCallable", + "Set", + "ToLength", + "ToObject", + "ToString", + ] + }], + "no-magic-numbers": 0, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "no-invalid-this": [1], + }, + }, + ], +} diff --git a/node_modules/array.prototype.flatmap/.github/FUNDING.yml b/node_modules/array.prototype.flatmap/.github/FUNDING.yml new file mode 100644 index 000000000..f80b0c40b --- /dev/null +++ b/node_modules/array.prototype.flatmap/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/array.prototype.flatmap +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/array.prototype.flatmap/.nycrc b/node_modules/array.prototype.flatmap/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/array.prototype.flatmap/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/array.prototype.flatmap/CHANGELOG.md b/node_modules/array.prototype.flatmap/CHANGELOG.md new file mode 100644 index 000000000..76d6d5904 --- /dev/null +++ b/node_modules/array.prototype.flatmap/CHANGELOG.md @@ -0,0 +1,102 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.3.1](https://github.com/es-shims/Array.prototype.flatMap/compare/v1.3.0...v1.3.1) - 2022-11-02 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`3587a34`](https://github.com/es-shims/Array.prototype.flatMap/commit/3587a34ca111ec36ffc46b4131f5b32d4d8a357c) +- [meta] add `auto-changelog` [`d66bdea`](https://github.com/es-shims/Array.prototype.flatMap/commit/d66bdeac56f2c1803a72695230c80d8270ab2ecf) +- [Deps] update `define-properties`, `es-abstract` [`d64c486`](https://github.com/es-shims/Array.prototype.flatMap/commit/d64c48639ec4958ed9a2627a4d7315ac1404687a) +- [actions] update rebase action to use reusable workflow [`8d657d0`](https://github.com/es-shims/Array.prototype.flatMap/commit/8d657d094a2aafa7948eee73eaa0e56047c5d60d) +- [Dev Deps] update `aud`, `object-inspect`, `tape` [`aa22741`](https://github.com/es-shims/Array.prototype.flatMap/commit/aa22741a4bbe8db6d448cc4ca5417ddec90ac01d) +- [Tests] use `for-each` instead of `foreach` [`748a78d`](https://github.com/es-shims/Array.prototype.flatMap/commit/748a78dbddb08462c75916fde07746d34cfd5c5c) + + + +1.3.0 / 2022-04-11 +================= + * [New] `shim`/`auto`: add `flatMap` to `Symbol.unscopables` + * [Deps] update `call-bind`, `es-abstract` + * [actions] reuse common workflows + * [actions] update codecov uploader + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` + +1.2.5 / 2021-10-01 +================= + * [readme] add github actions/codecov badges; update description; remove travis badge + * [Deps] update `call-bind`, `es-abstract`; remove unused `function-bind` + * [meta] use `prepublishOnly`, for npm 7+ + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `has-strict-mode`, `object-inspect`, `tape` + * [actions] update workflows + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [Tests] increase coverage + +1.2.4 / 2020-11-18 +================= + * [Deps] update `es-abstract`; use `call-bind` where applicable + * [meta] do not publish github action workflows + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `tape`; add `aud` + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests + * [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + +1.2.3 / 2019-12-12 +================= + * [Refactor] use split-up `es-abstract` (65% bundle size decrease) + * [Deps] update `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `object-inspect` + * [meta] add `funding` field + * [Tests] use shared travis-ci configs + * [actions] add automatic rebasing / merge commit blocking + +1.2.2 / 2019-10-10 +================= + * [Refactor] rename callback argument to `mapperFunction`, to match spec + * [Deps] update `es-abstract`, `define-properties` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `evalmd`, `object-inspect`, `safe-publish-latest`, `tape` + * [meta] create FUNDING.yml + * [Tests] up to `node` `v12.11`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `v6.17`, `v4.9`; use `nvm install-latest-npm` + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + +1.2.1 / 2018-02-23 +================= + * [Fix] Temporarily hack main entry, so it's compatible with other resolvers + * [Dev Deps] update `eslint`, `nsp`, `tape` + * [Tests] up to `node` `v9.6`, `v6.13` + +1.2.0 / 2018-01-18 +================= + * [New] add "auto" entry point + * [Fix] Move the receiver length check higher + * [Fix] spec adjustments + * [Refactor] adjust shouldFlatten logic + * [Dev Deps] update `eslint`, `object-inspect` + * [Tests] up to `node` `v9.4` + +1.1.1 / 2017-11-29 +================= + * [Fix] avoid an extra hole in the array (#1) + * [Deps] update `es-abstract` + * [Dev Deps] update `eslint`, `nsp`, `object-inspect` + * [Tests] up to `node` `v9.2`, `v8.9`, `v6.12`; pin included builds to LTS + +1.1.0 / 2017-10-03 +================= + * [New] add explicit setting of “length” on target array + * [Fix] `FlattenIntoArray`: add assertion that `thisArg` and `mapperFunction` are both passed together + * [Tests] make coverage required + +1.0.1 / 2017-10-02 +================= + * Add readme + +1.0.0 / 2017-10-01 +================= + * Initial release diff --git a/node_modules/array.prototype.flatmap/LICENSE b/node_modules/array.prototype.flatmap/LICENSE new file mode 100644 index 000000000..999c081c6 --- /dev/null +++ b/node_modules/array.prototype.flatmap/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 ECMAScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/array.prototype.flatmap/README.md b/node_modules/array.prototype.flatmap/README.md new file mode 100644 index 000000000..a4ee7c239 --- /dev/null +++ b/node_modules/array.prototype.flatmap/README.md @@ -0,0 +1,82 @@ +# array.prototype.flatmap [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +An ES2019 spec-compliant `Array.prototype.flatMap` shim/polyfill/replacement that works as far down as ES3. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://tc39.es/ecma262/#sec-array.prototype.flatmap). + +Because `Array.prototype.flatMap` depends on a receiver (the `this` value), the main export takes the array to operate on as the first argument. + +## Getting started + +```sh +npm install --save array.prototype.flatmap +``` + +## Usage/Examples + +```js +var flatMap = require('array.prototype.flatmap'); +var assert = require('assert'); + +var arr = [1, [2], [], 3]; + +var results = flatMap(arr, function (x, i) { + assert.equal(x, arr[i]); + return x; +}); + +assert.deepEqual(results, [1, 2, 3]); +``` + +```js +var flatMap = require('array.prototype.flatmap'); +var assert = require('assert'); +/* when Array#flatMap is not present */ +delete Array.prototype.flatMap; +var shimmedFlatMap = flatMap.shim(); + +var mapper = function (x) { return [x, 1]; }; + +assert.equal(shimmedFlatMap, flatMap.getPolyfill()); +assert.deepEqual(arr.flatMap(mapper), flatMap(arr, mapper)); +``` + +```js +var flatMap = require('array.prototype.flatmap'); +var assert = require('assert'); +/* when Array#flatMap is present */ +var shimmedIncludes = flatMap.shim(); + +var mapper = function (x) { return [x, 1]; }; + +assert.equal(shimmedIncludes, Array.prototype.flatMap); +assert.deepEqual(arr.flatMap(mapper), flatMap(arr, mapper)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/array.prototype.flatmap +[npm-version-svg]: https://versionbadg.es/es-shims/Array.prototype.flatMap.svg +[deps-svg]: https://david-dm.org/es-shims/Array.prototype.flatMap.svg +[deps-url]: https://david-dm.org/es-shims/Array.prototype.flatMap +[dev-deps-svg]: https://david-dm.org/es-shims/Array.prototype.flatMap/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/Array.prototype.flatMap#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/array.prototype.flatmap.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/array.prototype.flatmap.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/array.prototype.flatmap.svg +[downloads-url]: https://npm-stat.com/charts.html?package=array.prototype.flatmap +[codecov-image]: https://codecov.io/gh/es-shims/Array.prototype.flatMap/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/Array.prototype.flatMap/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Array.prototype.flatMap +[actions-url]: https://github.com/es-shims/Array.prototype.flatMap/actions diff --git a/node_modules/array.prototype.flatmap/auto.js b/node_modules/array.prototype.flatmap/auto.js new file mode 100644 index 000000000..8ebf606cb --- /dev/null +++ b/node_modules/array.prototype.flatmap/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/array.prototype.flatmap/implementation.js b/node_modules/array.prototype.flatmap/implementation.js new file mode 100644 index 000000000..d677442e9 --- /dev/null +++ b/node_modules/array.prototype.flatmap/implementation.js @@ -0,0 +1,26 @@ +'use strict'; + +var ArraySpeciesCreate = require('es-abstract/2022/ArraySpeciesCreate'); +var FlattenIntoArray = require('es-abstract/2022/FlattenIntoArray'); +var Get = require('es-abstract/2022/Get'); +var IsCallable = require('es-abstract/2022/IsCallable'); +var ToLength = require('es-abstract/2022/ToLength'); +var ToObject = require('es-abstract/2022/ToObject'); + +module.exports = function flatMap(mapperFunction) { + var O = ToObject(this); + var sourceLen = ToLength(Get(O, 'length')); + + if (!IsCallable(mapperFunction)) { + throw new TypeError('mapperFunction must be a function'); + } + + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + var A = ArraySpeciesCreate(O, 0); + FlattenIntoArray(A, O, sourceLen, 0, 1, mapperFunction, T); + return A; +}; diff --git a/node_modules/array.prototype.flatmap/index.js b/node_modules/array.prototype.flatmap/index.js new file mode 100644 index 000000000..078ac0a5a --- /dev/null +++ b/node_modules/array.prototype.flatmap/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var define = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var polyfill = getPolyfill(); +var shim = require('./shim'); + +var boundFlatMap = callBind(polyfill); + +define(boundFlatMap, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundFlatMap; diff --git a/node_modules/array.prototype.flatmap/package.json b/node_modules/array.prototype.flatmap/package.json new file mode 100644 index 000000000..6c4ff4960 --- /dev/null +++ b/node_modules/array.prototype.flatmap/package.json @@ -0,0 +1,112 @@ +{ + "name": "array.prototype.flatmap", + "version": "1.3.1", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "An ES2019 spec-compliant `Array.prototype.flatMap` shim/polyfill/replacement that works as far down as ES3.", + "license": "MIT", + "main": "index", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/Array.prototype.flatMap.git" + }, + "keywords": [ + "Array.prototype.flatMap", + "flatMap", + "array", + "ESnext", + "shim", + "polyfill", + "flatten", + "Array.prototype.flatten", + "es-shim API" + ], + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "devDependencies": { + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "covert": "^1.1.1", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "testling": { + "files": [ + "test/index.js", + "test/shimmed.js" + ], + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "1.3.1" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/array.prototype.flatmap/polyfill.js b/node_modules/array.prototype.flatmap/polyfill.js new file mode 100644 index 000000000..716ae58b9 --- /dev/null +++ b/node_modules/array.prototype.flatmap/polyfill.js @@ -0,0 +1,7 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + return Array.prototype.flatMap || implementation; +}; diff --git a/node_modules/array.prototype.flatmap/shim.js b/node_modules/array.prototype.flatmap/shim.js new file mode 100644 index 000000000..41b4f05ab --- /dev/null +++ b/node_modules/array.prototype.flatmap/shim.js @@ -0,0 +1,20 @@ +'use strict'; + +var define = require('define-properties'); +var shimUnscopables = require('es-shim-unscopables'); + +var getPolyfill = require('./polyfill'); + +module.exports = function shimFlatMap() { + var polyfill = getPolyfill(); + + define( + Array.prototype, + { flatMap: polyfill }, + { flatMap: function () { return Array.prototype.flatMap !== polyfill; } } + ); + + shimUnscopables('flatMap'); + + return polyfill; +}; diff --git a/node_modules/array.prototype.flatmap/test/implementation.js b/node_modules/array.prototype.flatmap/test/implementation.js new file mode 100644 index 000000000..3571c707f --- /dev/null +++ b/node_modules/array.prototype.flatmap/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var flatMap = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { flatMap.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { flatMap.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(flatMap), t); + + t.end(); +}); diff --git a/node_modules/array.prototype.flatmap/test/index.js b/node_modules/array.prototype.flatmap/test/index.js new file mode 100644 index 000000000..58a59fd35 --- /dev/null +++ b/node_modules/array.prototype.flatmap/test/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var flatMap = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { flatMap.call(undefined, function () {}); }, TypeError, 'undefined is not an object'); + st['throws'](function () { flatMap.call(null, function () {}); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(flatMap, t); + + t.end(); +}); diff --git a/node_modules/array.prototype.flatmap/test/shimmed.js b/node_modules/array.prototype.flatmap/test/shimmed.js new file mode 100644 index 000000000..1af257984 --- /dev/null +++ b/node_modules/array.prototype.flatmap/test/shimmed.js @@ -0,0 +1,36 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = function f() {}.name === 'f'; + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.equal(Array.prototype.flatMap.length, 1, 'Array#flatMap has a length of 1'); + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(Array.prototype.flatMap.name, 'flatMap', 'Array#flatMap has name "flatMap"'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(Array.prototype, 'flatMap'), 'Array#flatMap is not enumerable'); + et.end(); + }); + + var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); + + t.test('bad array/this value', { skip: !supportsStrictMode }, function (st) { + st['throws'](function () { return Array.prototype.flatMap.call(undefined, 'a'); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return Array.prototype.flatMap.call(null, 'a'); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(Array.prototype.flatMap), t); + + t.end(); +}); diff --git a/node_modules/array.prototype.flatmap/test/tests.js b/node_modules/array.prototype.flatmap/test/tests.js new file mode 100644 index 000000000..5f0bf7fb3 --- /dev/null +++ b/node_modules/array.prototype.flatmap/test/tests.js @@ -0,0 +1,43 @@ +'use strict'; + +var inspect = require('object-inspect'); +var forEach = require('for-each'); + +module.exports = function (flatMap, t) { + t.test('callback function', function (st) { + forEach([[], {}, true, false, 42, 'foo', /a/g, null], function (nonFunction) { + st['throws']( + function () { flatMap([], nonFunction); }, + TypeError, + inspect(nonFunction) + ' is not a function' + ); + }); + + st.end(); + }); + + t.test('flatMaps', function (st) { + var mapped = flatMap([1, [2], [3, 4]], function (x, i) { + return [x, i]; + }); + + var expected = [1, 0, [2], 1, [3, 4], 2]; + st.deepEqual(mapped, expected, 'array is flattened and mapped to tuples of item/index'); + st.equal(mapped.length, expected.length, 'array has expected length'); + + var context = {}; + var actual; + flatMap([1], function () { actual = this; }, context); + st.equal(actual, context, 'thisArg works as expected'); + + st.end(); + }); + + t.test('sparse arrays', function (st) { + var identity = function (x) { return x; }; + // eslint-disable-next-line no-sparse-arrays + st.deepEqual(flatMap([, [1]], identity), flatMap([[], [1]], identity), 'an array hole is treated the same as an empty array'); + + st.end(); + }); +}; diff --git a/node_modules/array-includes/.eslintignore b/node_modules/available-typed-arrays/.eslintignore similarity index 100% rename from node_modules/array-includes/.eslintignore rename to node_modules/available-typed-arrays/.eslintignore diff --git a/node_modules/available-typed-arrays/.eslintrc b/node_modules/available-typed-arrays/.eslintrc new file mode 100644 index 000000000..62f1d7f50 --- /dev/null +++ b/node_modules/available-typed-arrays/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "globals": { + "globalThis": false + } +} diff --git a/node_modules/available-typed-arrays/.github/FUNDING.yml b/node_modules/available-typed-arrays/.github/FUNDING.yml new file mode 100644 index 000000000..14abc7253 --- /dev/null +++ b/node_modules/available-typed-arrays/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/available-typed-arrays +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/available-typed-arrays/.nycrc b/node_modules/available-typed-arrays/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/available-typed-arrays/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/available-typed-arrays/CHANGELOG.md b/node_modules/available-typed-arrays/CHANGELOG.md new file mode 100644 index 000000000..112aff968 --- /dev/null +++ b/node_modules/available-typed-arrays/CHANGELOG.md @@ -0,0 +1,79 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.5](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.4...v1.0.5) - 2021-08-30 + +### Fixed + +- [Refactor] use `globalThis` if available [`#12`](https://github.com/inspect-js/available-typed-arrays/issues/12) + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1199790`](https://github.com/inspect-js/available-typed-arrays/commit/1199790ab5841517ad04827fab3f135d2dc5cfb7) + +## [v1.0.4](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.3...v1.0.4) - 2021-05-25 + +### Commits + +- [Refactor] Remove `array.prototype.filter` dependency [`f39c90e`](https://github.com/inspect-js/available-typed-arrays/commit/f39c90ecb1907de28ee2d3577b7da37ae12aac56) +- [Dev Deps] update `eslint`, `auto-changelog` [`b2e3a03`](https://github.com/inspect-js/available-typed-arrays/commit/b2e3a035e8cd3ddfd7b565249e1651c6419a34d0) +- [meta] create `FUNDING.yml` [`8c0e758`](https://github.com/inspect-js/available-typed-arrays/commit/8c0e758c6ec80adbb3770554653cdc3aa16beb55) +- [Tests] fix harmony test matrix [`ef96549`](https://github.com/inspect-js/available-typed-arrays/commit/ef96549df171776267529413240a2219cb59d5ce) +- [meta] add `sideEffects` flag [`288cca0`](https://github.com/inspect-js/available-typed-arrays/commit/288cca0fbd214bec706447851bb8bccc4b899a48) + +## [v1.0.3](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.2...v1.0.3) - 2021-05-19 + +### Commits + +- [Tests] migrate tests to Github Actions [`3ef082c`](https://github.com/inspect-js/available-typed-arrays/commit/3ef082caaa153b49f4c37c85bbd5c4b13fe4f638) +- [meta] do not publish github action workflow files [`fd95ffd`](https://github.com/inspect-js/available-typed-arrays/commit/fd95ffdaca759eca81cb4c5d5772ee863dfea501) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`eb6bd65`](https://github.com/inspect-js/available-typed-arrays/commit/eb6bd659a31c92a6a178c71a89fe0d5261413e6c) +- [Tests] run `nyc` on all tests [`636c946`](https://github.com/inspect-js/available-typed-arrays/commit/636c94657b532599ef90a214aaa12639d11b0161) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`70a3b61`](https://github.com/inspect-js/available-typed-arrays/commit/70a3b61367b318fb883c2f35b8f2d539849a23b6) +- [actions] add "Allow Edits" workflow [`bd09c45`](https://github.com/inspect-js/available-typed-arrays/commit/bd09c45299e396fa5bbd5be4c58b1aedcb372a82) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.every`, `aud`, `tape` [`8f97523`](https://github.com/inspect-js/available-typed-arrays/commit/8f9752308390a79068cd431436bbfd77bca15647) +- [readme] fix URLs [`75418e2`](https://github.com/inspect-js/available-typed-arrays/commit/75418e20b57f4ad5e65d8c2e1864efd14eaa2e65) +- [readme] add actions and codecov badges [`4a8bc30`](https://github.com/inspect-js/available-typed-arrays/commit/4a8bc30af2ce1f48e2b28ab3db5be9589bd6f2d0) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`65198ac`](https://github.com/inspect-js/available-typed-arrays/commit/65198ace335a013ef49b6bd722bc80bbbc6be784) +- [actions] update workflows [`7f816eb`](https://github.com/inspect-js/available-typed-arrays/commit/7f816eb231131e53ced2572ba6c6c6a00f975789) +- [Refactor] use `array.prototype.filter` instead of `array-filter` [`2dd1038`](https://github.com/inspect-js/available-typed-arrays/commit/2dd1038d71ce48b5650687691cf8fe09795a6d30) +- [actions] switch Automatic Rease workflow to `pull_request_target` event [`9b45e91`](https://github.com/inspect-js/available-typed-arrays/commit/9b45e914fcb08bdaaaa0166b41716e51f400d1c6) +- [Dev Deps] update `auto-changelog`, `tape` [`0003a5b`](https://github.com/inspect-js/available-typed-arrays/commit/0003a5b122a0724db5499c114104eeeb396b2f67) +- [meta] use `prepublishOnly` script for npm 7+ [`d884dd1`](https://github.com/inspect-js/available-typed-arrays/commit/d884dd1c1117411f35d9fbc07f513a1a85ccdead) +- [readme] remove travis badge [`9da2b3c`](https://github.com/inspect-js/available-typed-arrays/commit/9da2b3c29706340fada995137aba12cfae4d6f37) +- [Dev Deps] update `auto-changelog`; add `aud` [`41b1336`](https://github.com/inspect-js/available-typed-arrays/commit/41b13369c71b0e3e57b9de0f4fb1e4d67950d74a) +- [Tests] only audit prod deps [`2571826`](https://github.com/inspect-js/available-typed-arrays/commit/2571826a5d121eeeeccf4c711e3f9e4616685d50) + +## [v1.0.2](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.1...v1.0.2) - 2020-01-26 + +### Commits + +- [actions] add automatic rebasing / merge commit blocking [`3229a74`](https://github.com/inspect-js/available-typed-arrays/commit/3229a74bda60f24e2257efc40ddff9a3ce98de76) +- [Dev Deps] update `@ljharb/eslint-config` [`9579abe`](https://github.com/inspect-js/available-typed-arrays/commit/9579abecc196088561d3aedf27cad45b56f8e18b) +- [Fix] remove `require` condition to avoid experimental warning [`2cade6b`](https://github.com/inspect-js/available-typed-arrays/commit/2cade6b56d6a508a950c7da27d038bee496e716b) + +## [v1.0.1](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.0...v1.0.1) - 2020-01-24 + +### Commits + +- [meta] add "exports" [`5942917`](https://github.com/inspect-js/available-typed-arrays/commit/5942917aafb56c6bce80f01b7ae6a9b46bc72c69) + +## v1.0.0 - 2020-01-24 + +### Commits + +- Initial commit [`2bc5144`](https://github.com/inspect-js/available-typed-arrays/commit/2bc514459c9f65756adfbd9964abf433183d78f6) +- readme [`31e4796`](https://github.com/inspect-js/available-typed-arrays/commit/31e4796379eba4a16d3c6a8e9baf6eb3f39e33d1) +- npm init [`9194266`](https://github.com/inspect-js/available-typed-arrays/commit/9194266b471a2a2dd5e6969bc40358ceb346e21e) +- Tests [`b539830`](https://github.com/inspect-js/available-typed-arrays/commit/b539830c3213f90de42b4d6e62803f52daf61a6d) +- Implementation [`6577df2`](https://github.com/inspect-js/available-typed-arrays/commit/6577df244ea146ef5ec16858044c8955e0fc445c) +- [meta] add `auto-changelog` [`7b43310`](https://github.com/inspect-js/available-typed-arrays/commit/7b43310be76f00fe60b74a2fd6d0e46ac1d01f3e) +- [Tests] add `npm run lint` [`dedfbc1`](https://github.com/inspect-js/available-typed-arrays/commit/dedfbc1592f86ac1636267d3965f2345df43815b) +- [Tests] use shared travis-ci configs [`c459d78`](https://github.com/inspect-js/available-typed-arrays/commit/c459d78bf2efa9d777f88599ae71a796dbfcb70f) +- Only apps should have lockfiles [`d294668`](https://github.com/inspect-js/available-typed-arrays/commit/d294668422cf35f5e7716a85bfd204e62b01c056) +- [meta] add `funding` field [`6e70bc1`](https://github.com/inspect-js/available-typed-arrays/commit/6e70bc1fb199c7898165aaf05c25bb49f4062e53) +- [meta] add `safe-publish-latest` [`dd89ca2`](https://github.com/inspect-js/available-typed-arrays/commit/dd89ca2c6842f0f3e82958df2b2bd0fc0c929c51) diff --git a/node_modules/available-typed-arrays/LICENSE b/node_modules/available-typed-arrays/LICENSE new file mode 100644 index 000000000..707437b57 --- /dev/null +++ b/node_modules/available-typed-arrays/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/available-typed-arrays/README.md b/node_modules/available-typed-arrays/README.md new file mode 100644 index 000000000..16838f4b2 --- /dev/null +++ b/node_modules/available-typed-arrays/README.md @@ -0,0 +1,52 @@ +# available-typed-arrays [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Returns an array of Typed Array names that are available in the current environment. + +## Example + +```js +var availableTypedArrays = require('available-typed-arrays'); +var assert = require('assert'); + +assert.deepStrictEqual(availableTypedArrays(), [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +].sort()); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/available-typed-arrays +[2]: https://versionbadg.es/inspect-js/available-typed-arrays.svg +[5]: https://david-dm.org/inspect-js/available-typed-arrays.svg +[6]: https://david-dm.org/inspect-js/available-typed-arrays +[7]: https://david-dm.org/inspect-js/available-typed-arrays/dev-status.svg +[8]: https://david-dm.org/inspect-js/available-typed-arrays#info=devDependencies +[11]: https://nodei.co/npm/available-typed-arrays.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/available-typed-arrays.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/available-typed-arrays.svg +[downloads-url]: https://npm-stat.com/charts.html?package=available-typed-arrays +[codecov-image]: https://codecov.io/gh/inspect-js/available-typed-arrays/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/available-typed-arrays/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/available-typed-arrays +[actions-url]: https://github.com/inspect-js/available-typed-arrays/actions diff --git a/node_modules/available-typed-arrays/index.js b/node_modules/available-typed-arrays/index.js new file mode 100644 index 000000000..88dbac3fe --- /dev/null +++ b/node_modules/available-typed-arrays/index.js @@ -0,0 +1,27 @@ +'use strict'; + +var possibleNames = [ + 'BigInt64Array', + 'BigUint64Array', + 'Float32Array', + 'Float64Array', + 'Int16Array', + 'Int32Array', + 'Int8Array', + 'Uint16Array', + 'Uint32Array', + 'Uint8Array', + 'Uint8ClampedArray' +]; + +var g = typeof globalThis === 'undefined' ? global : globalThis; + +module.exports = function availableTypedArrays() { + var out = []; + for (var i = 0; i < possibleNames.length; i++) { + if (typeof g[possibleNames[i]] === 'function') { + out[out.length] = possibleNames[i]; + } + } + return out; +}; diff --git a/node_modules/available-typed-arrays/package.json b/node_modules/available-typed-arrays/package.json new file mode 100644 index 000000000..08f307c71 --- /dev/null +++ b/node_modules/available-typed-arrays/package.json @@ -0,0 +1,82 @@ +{ + "name": "available-typed-arrays", + "version": "1.0.5", + "description": "Returns an array of Typed Array names that are available in the current environment", + "main": "index.js", + "type": "commonjs", + "exports": { + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ], + "./package": "./package.json", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test:harmony": "nyc node --harmony --es-staging test", + "test": "npm run tests-only && npm run test:harmony", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/available-typed-arrays.git" + }, + "keywords": [ + "typed", + "arrays", + "Float32Array", + "Float64Array", + "Int8Array", + "Int16Array", + "Int32Array", + "Uint8Array", + "Uint8ClampedArray", + "Uint16Array", + "Uint32Array", + "BigInt64Array", + "BigUint64Array" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/available-typed-arrays/issues" + }, + "homepage": "https://github.com/inspect-js/available-typed-arrays#readme", + "engines": { + "node": ">= 0.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^18.0.0", + "array.prototype.every": "^1.1.2", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^7.32.0", + "evalmd": "^0.0.19", + "isarray": "^2.0.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/available-typed-arrays/test/index.js b/node_modules/available-typed-arrays/test/index.js new file mode 100644 index 000000000..21c986dc8 --- /dev/null +++ b/node_modules/available-typed-arrays/test/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var test = require('tape'); +var isArray = require('isarray'); +var every = require('array.prototype.every'); + +var availableTypedArrays = require('../'); + +test('available typed arrays', function (t) { + t.equal(typeof availableTypedArrays, 'function', 'is a function'); + + var arrays = availableTypedArrays(); + t.equal(isArray(arrays), true, 'returns an array'); + + t.equal(every(arrays, function (array) { return typeof array === 'string'; }), true, 'contains only strings'); + + t.end(); +}); diff --git a/node_modules/define-properties/.eslintrc b/node_modules/define-properties/.eslintrc index db992d7a9..4297a97f6 100644 --- a/node_modules/define-properties/.eslintrc +++ b/node_modules/define-properties/.eslintrc @@ -5,8 +5,15 @@ "rules": { "id-length": [2, { "min": 1, "max": 35 }], - "max-lines-per-function": [2, 100], "max-params": [2, 4], - "max-statements": [2, 13] - } + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + }, + }, + ], } diff --git a/node_modules/define-properties/.github/FUNDING.yml b/node_modules/define-properties/.github/FUNDING.yml new file mode 100644 index 000000000..c70f264ad --- /dev/null +++ b/node_modules/define-properties/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/define-properties +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/define-properties/.jscs.json b/node_modules/define-properties/.jscs.json deleted file mode 100644 index 6f2d7f9ff..000000000 --- a/node_modules/define-properties/.jscs.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 3 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/define-properties/.nycrc b/node_modules/define-properties/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/define-properties/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/define-properties/.travis.yml b/node_modules/define-properties/.travis.yml deleted file mode 100644 index ec72d5f3d..000000000 --- a/node_modules/define-properties/.travis.yml +++ /dev/null @@ -1,233 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "10.8" - - "9.11" - - "8.11" - - "7.10" - - "6.14" - - "5.12" - - "4.9" - - "iojs-v3.3" - - "iojs-v2.5" - - "iojs-v1.8" - - "0.12" - - "0.10" - - "0.8" -before_install: - - 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac' - - 'nvm install-latest-npm' -install: - - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' - - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' -sudo: false -env: - - TEST=true -matrix: - fast_finish: true - include: - - node_js: "lts/*" - env: PRETEST=true - - node_js: "lts/*" - env: POSTTEST=true - - node_js: "4" - env: COVERAGE=true - - node_js: "10.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "10.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "9.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "8.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "7.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.13" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.12" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "6.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.10" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "5.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.8" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "4.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v3.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v2.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.7" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.5" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.4" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.3" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.2" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.1" - env: TEST=true ALLOW_FAILURE=true - - node_js: "iojs-v1.0" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.11" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.9" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.6" - env: TEST=true ALLOW_FAILURE=true - - node_js: "0.4" - env: TEST=true ALLOW_FAILURE=true - allow_failures: - - os: osx - - env: TEST=true ALLOW_FAILURE=true - - env: COVERAGE=true diff --git a/node_modules/define-properties/CHANGELOG.md b/node_modules/define-properties/CHANGELOG.md index 5cad1e26a..9c86b5b9e 100644 --- a/node_modules/define-properties/CHANGELOG.md +++ b/node_modules/define-properties/CHANGELOG.md @@ -1,3 +1,22 @@ +1.1.4 / 2022-04-14 +================= + * [Refactor] use `has-property-descriptors` + * [readme] add github actions/codecov badges + * [Docs] fix header parsing; remove testling + * [Deps] update `object-keys` + * [meta] use `prepublishOnly` script for npm 7+ + * [meta] add `funding` field; create FUNDING.yml + * [actions] add "Allow Edits" workflow; automatic rebasing / merge commit blocking + * [actions] reuse common workflows + * [actions] update codecov uploader + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests; use `tape` runner + * [Tests] use shared travis-ci config + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + * [Tests] remove `jscs` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape`; add `aud`, `safe-publish-latest` + 1.1.3 / 2018-08-14 ================= * [Refactor] use a for loop instead of `foreach` to make for smaller bundle sizes diff --git a/node_modules/define-properties/README.md b/node_modules/define-properties/README.md index 33b6111f1..650adfa3a 100644 --- a/node_modules/define-properties/README.md +++ b/node_modules/define-properties/README.md @@ -1,6 +1,7 @@ -#define-properties [![Version Badge][npm-version-svg]][package-url] +# define-properties [![Version Badge][npm-version-svg]][package-url] -[![Build Status][travis-svg]][travis-url] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] @@ -8,8 +9,6 @@ [![npm badge][npm-badge-png]][package-url] -[![browser support][testling-svg]][testling-url] - Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines. Existing properties are not overridden. Accepts a map of property names to a predicate that, when true, force-overrides. @@ -69,18 +68,17 @@ if (define.supportsDescriptors) { Simply clone the repo, `npm install`, and run `npm test` [package-url]: https://npmjs.org/package/define-properties -[npm-version-svg]: http://versionbadg.es/ljharb/define-properties.svg -[travis-svg]: https://travis-ci.org/ljharb/define-properties.svg -[travis-url]: https://travis-ci.org/ljharb/define-properties +[npm-version-svg]: https://versionbadg.es/ljharb/define-properties.svg [deps-svg]: https://david-dm.org/ljharb/define-properties.svg [deps-url]: https://david-dm.org/ljharb/define-properties [dev-deps-svg]: https://david-dm.org/ljharb/define-properties/dev-status.svg [dev-deps-url]: https://david-dm.org/ljharb/define-properties#info=devDependencies -[testling-svg]: https://ci.testling.com/ljharb/define-properties.png -[testling-url]: https://ci.testling.com/ljharb/define-properties [npm-badge-png]: https://nodei.co/npm/define-properties.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/define-properties.svg +[license-image]: https://img.shields.io/npm/l/define-properties.svg [license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/define-properties.svg -[downloads-url]: http://npm-stat.com/charts.html?package=define-properties - +[downloads-image]: https://img.shields.io/npm/dm/define-properties.svg +[downloads-url]: https://npm-stat.com/charts.html?package=define-properties +[codecov-image]: https://codecov.io/gh/ljharb/define-properties/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/define-properties/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/define-properties +[actions-url]: https://github.com/ljharb/define-properties/actions diff --git a/node_modules/define-properties/index.js b/node_modules/define-properties/index.js index cb3ae1c7c..453afb9ed 100644 --- a/node_modules/define-properties/index.js +++ b/node_modules/define-properties/index.js @@ -11,20 +11,9 @@ var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; -var arePropertyDescriptorsSupported = function () { - var obj = {}; - try { - origDefineProperty(obj, 'x', { enumerable: false, value: obj }); - // eslint-disable-next-line no-unused-vars, no-restricted-syntax - for (var _ in obj) { // jscs:ignore disallowUnusedVariables - return false; - } - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); +var hasPropertyDescriptors = require('has-property-descriptors')(); + +var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; var defineProperty = function (object, name, value, predicate) { if (name in object && (!isFunction(predicate) || !predicate())) { @@ -38,7 +27,7 @@ var defineProperty = function (object, name, value, predicate) { writable: true }); } else { - object[name] = value; + object[name] = value; // eslint-disable-line no-param-reassign } }; diff --git a/node_modules/define-properties/package.json b/node_modules/define-properties/package.json index 8bdb3571e..215a7e93b 100644 --- a/node_modules/define-properties/package.json +++ b/node_modules/define-properties/package.json @@ -1,21 +1,21 @@ { "name": "define-properties", - "version": "1.1.3", - "author": "Jordan Harband", + "version": "1.1.4", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, "description": "Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in older engines.", "license": "MIT", "main": "index.js", "scripts": { - "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "posttest": "npm run --silent security", - "tests-only": "node test/index.js", - "coverage": "covert test/*.js", - "coverage-quiet": "covert test/*.js --quiet", - "lint": "npm run --silent jscs && npm run --silent eslint", - "jscs": "jscs test/*.js *.js", - "eslint": "eslint test/*.js *.js", - "security": "nsp check" + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs ." }, "repository": { "type": "git", @@ -31,15 +31,16 @@ "ES5" ], "dependencies": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "devDependencies": { - "@ljharb/eslint-config": "^13.0.0", - "covert": "^1.1.0", - "eslint": "^5.3.0", - "jscs": "^3.0.7", - "nsp": "^3.2.1", - "tape": "^4.9.0" + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "eslint": "=8.8.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" }, "testling": { "files": "test/index.js", diff --git a/node_modules/define-properties/test/index.js b/node_modules/define-properties/test/index.js deleted file mode 100644 index 3387f6bc7..000000000 --- a/node_modules/define-properties/test/index.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -var define = require('../'); -var test = require('tape'); -var keys = require('object-keys'); - -var arePropertyDescriptorsSupported = function () { - var obj = { a: 1 }; - try { - Object.defineProperty(obj, 'x', { value: obj }); - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var descriptorsSupported = !!Object.defineProperty && arePropertyDescriptorsSupported(); - -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; - -test('defineProperties', function (dt) { - dt.test('with descriptor support', { skip: !descriptorsSupported }, function (t) { - var getDescriptor = function (value) { - return { - configurable: true, - enumerable: false, - value: value, - writable: true - }; - }; - - var obj = { - a: 1, - b: 2, - c: 3 - }; - t.deepEqual(keys(obj), ['a', 'b', 'c'], 'all literal-set keys start enumerable'); - define(obj, { - b: 3, - c: 4, - d: 5 - }); - t.deepEqual(obj, { - a: 1, - b: 2, - c: 3 - }, 'existing properties were not overridden'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'd'), getDescriptor(5), 'new property "d" was added and is not enumerable'); - t.deepEqual(['a', 'b', 'c'], keys(obj), 'new keys are not enumerable'); - - define(obj, { - a: 2, - b: 3, - c: 4 - }, { - a: function () { return true; }, - b: function () { return false; } - }); - t.deepEqual(obj, { - b: 2, - c: 3 - }, 'properties only overriden when predicate exists and returns true'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'd'), getDescriptor(5), 'existing property "d" remained and is not enumerable'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, 'a'), getDescriptor(2), 'existing property "a" was overridden and is not enumerable'); - t.deepEqual(['b', 'c'], keys(obj), 'overridden keys are not enumerable'); - - t.end(); - }); - - dt.test('without descriptor support', { skip: descriptorsSupported }, function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - define(obj, { - b: 3, - c: 4, - d: 5 - }); - t.deepEqual(obj, { - a: 1, - b: 2, - c: 3, - d: 5 - }, 'existing properties were not overridden, new properties were added'); - - define(obj, { - a: 2, - b: 3, - c: 4 - }, { - a: function () { return true; }, - b: function () { return false; } - }); - t.deepEqual(obj, { - a: 2, - b: 2, - c: 3, - d: 5 - }, 'properties only overriden when predicate exists and returns true'); - - t.end(); - }); - - dt.end(); -}); - -test('symbols', { skip: !hasSymbols }, function (t) { - var sym = Symbol('foo'); - var obj = {}; - var aValue = {}; - var bValue = {}; - var properties = { a: aValue }; - properties[sym] = bValue; - - define(obj, properties); - - t.deepEqual(Object.keys(obj), [], 'object has no enumerable keys'); - t.deepEqual(Object.getOwnPropertyNames(obj), ['a'], 'object has non-enumerable "a" key'); - t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'object has non-enumerable symbol key'); - t.equal(obj.a, aValue, 'string keyed value is defined'); - t.equal(obj[sym], bValue, 'symbol keyed value is defined'); - - t.end(); -}); diff --git a/node_modules/error-ex/README.md b/node_modules/error-ex/README.md deleted file mode 100644 index 97f744af8..000000000 --- a/node_modules/error-ex/README.md +++ /dev/null @@ -1,144 +0,0 @@ -# node-error-ex [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-error-ex.svg?style=flat-square)](https://travis-ci.org/Qix-/node-error-ex) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-error-ex.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-error-ex) -> Easily subclass and customize new Error types - -## Examples -To include in your project: -```javascript -var errorEx = require('error-ex'); -``` - -To create an error message type with a specific name (note, that `ErrorFn.name` -will not reflect this): -```javascript -var JSONError = errorEx('JSONError'); - -var err = new JSONError('error'); -err.name; //-> JSONError -throw err; //-> JSONError: error -``` - -To add a stack line: -```javascript -var JSONError = errorEx('JSONError', {fileName: errorEx.line('in %s')}); - -var err = new JSONError('error') -err.fileName = '/a/b/c/foo.json'; -throw err; //-> (line 2)-> in /a/b/c/foo.json -``` - -To append to the error message: -```javascript -var JSONError = errorEx('JSONError', {fileName: errorEx.append('in %s')}); - -var err = new JSONError('error'); -err.fileName = '/a/b/c/foo.json'; -throw err; //-> JSONError: error in /a/b/c/foo.json -``` - -## API - -#### `errorEx([name], [properties])` -Creates a new ErrorEx error type - -- `name`: the name of the new type (appears in the error message upon throw; - defaults to `Error.name`) -- `properties`: if supplied, used as a key/value dictionary of properties to - use when building up the stack message. Keys are property names that are - looked up on the error message, and then passed to function values. - - `line`: if specified and is a function, return value is added as a stack - entry (error-ex will indent for you). Passed the property value given - the key. - - `stack`: if specified and is a function, passed the value of the property - using the key, and the raw stack lines as a second argument. Takes no - return value (but the stack can be modified directly). - - `message`: if specified and is a function, return value is used as new - `.message` value upon get. Passed the property value of the property named - by key, and the existing message is passed as the second argument as an - array of lines (suitable for multi-line messages). - -Returns a constructor (Function) that can be used just like the regular Error -constructor. - -```javascript -var errorEx = require('error-ex'); - -var BasicError = errorEx(); - -var NamedError = errorEx('NamedError'); - -// -- - -var AdvancedError = errorEx('AdvancedError', { - foo: { - line: function (value, stack) { - if (value) { - return 'bar ' + value; - } - return null; - } - } -} - -var err = new AdvancedError('hello, world'); -err.foo = 'baz'; -throw err; - -/* - AdvancedError: hello, world - bar baz - at tryReadme() (readme.js:20:1) -*/ -``` - -#### `errorEx.line(str)` -Creates a stack line using a delimiter - -> This is a helper function. It is to be used in lieu of writing a value object -> for `properties` values. - -- `str`: The string to create - - Use the delimiter `%s` to specify where in the string the value should go - -```javascript -var errorEx = require('error-ex'); - -var FileError = errorEx('FileError', {fileName: errorEx.line('in %s')}); - -var err = new FileError('problem reading file'); -err.fileName = '/a/b/c/d/foo.js'; -throw err; - -/* - FileError: problem reading file - in /a/b/c/d/foo.js - at tryReadme() (readme.js:7:1) -*/ -``` - -#### `errorEx.append(str)` -Appends to the `error.message` string - -> This is a helper function. It is to be used in lieu of writing a value object -> for `properties` values. - -- `str`: The string to append - - Use the delimiter `%s` to specify where in the string the value should go - -```javascript -var errorEx = require('error-ex'); - -var SyntaxError = errorEx('SyntaxError', {fileName: errorEx.append('in %s')}); - -var err = new SyntaxError('improper indentation'); -err.fileName = '/a/b/c/d/foo.js'; -throw err; - -/* - SyntaxError: improper indentation in /a/b/c/d/foo.js - at tryReadme() (readme.js:7:1) -*/ -``` - -## License -Licensed under the [MIT License](http://opensource.org/licenses/MIT). -You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/error-ex/index.js b/node_modules/error-ex/index.js deleted file mode 100644 index 4fb20b487..000000000 --- a/node_modules/error-ex/index.js +++ /dev/null @@ -1,141 +0,0 @@ -'use strict'; - -var util = require('util'); -var isArrayish = require('is-arrayish'); - -var errorEx = function errorEx(name, properties) { - if (!name || name.constructor !== String) { - properties = name || {}; - name = Error.name; - } - - var errorExError = function ErrorEXError(message) { - if (!this) { - return new ErrorEXError(message); - } - - message = message instanceof Error - ? message.message - : (message || this.message); - - Error.call(this, message); - Error.captureStackTrace(this, errorExError); - - this.name = name; - - Object.defineProperty(this, 'message', { - configurable: true, - enumerable: false, - get: function () { - var newMessage = message.split(/\r?\n/g); - - for (var key in properties) { - if (!properties.hasOwnProperty(key)) { - continue; - } - - var modifier = properties[key]; - - if ('message' in modifier) { - newMessage = modifier.message(this[key], newMessage) || newMessage; - if (!isArrayish(newMessage)) { - newMessage = [newMessage]; - } - } - } - - return newMessage.join('\n'); - }, - set: function (v) { - message = v; - } - }); - - var overwrittenStack = null; - - var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); - var stackGetter = stackDescriptor.get; - var stackValue = stackDescriptor.value; - delete stackDescriptor.value; - delete stackDescriptor.writable; - - stackDescriptor.set = function (newstack) { - overwrittenStack = newstack; - }; - - stackDescriptor.get = function () { - var stack = (overwrittenStack || ((stackGetter) - ? stackGetter.call(this) - : stackValue)).split(/\r?\n+/g); - - // starting in Node 7, the stack builder caches the message. - // just replace it. - if (!overwrittenStack) { - stack[0] = this.name + ': ' + this.message; - } - - var lineCount = 1; - for (var key in properties) { - if (!properties.hasOwnProperty(key)) { - continue; - } - - var modifier = properties[key]; - - if ('line' in modifier) { - var line = modifier.line(this[key]); - if (line) { - stack.splice(lineCount++, 0, ' ' + line); - } - } - - if ('stack' in modifier) { - modifier.stack(this[key], stack); - } - } - - return stack.join('\n'); - }; - - Object.defineProperty(this, 'stack', stackDescriptor); - }; - - if (Object.setPrototypeOf) { - Object.setPrototypeOf(errorExError.prototype, Error.prototype); - Object.setPrototypeOf(errorExError, Error); - } else { - util.inherits(errorExError, Error); - } - - return errorExError; -}; - -errorEx.append = function (str, def) { - return { - message: function (v, message) { - v = v || def; - - if (v) { - message[0] += ' ' + str.replace('%s', v.toString()); - } - - return message; - } - }; -}; - -errorEx.line = function (str, def) { - return { - line: function (v) { - v = v || def; - - if (v) { - return str.replace('%s', v.toString()); - } - - return null; - } - }; -}; - -module.exports = errorEx; diff --git a/node_modules/error-ex/package.json b/node_modules/error-ex/package.json deleted file mode 100644 index f3d9ae0e3..000000000 --- a/node_modules/error-ex/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "error-ex", - "description": "Easy error subclassing and stack customization", - "version": "1.3.2", - "maintainers": [ - "Josh Junon (github.com/qix-)", - "Sindre Sorhus (sindresorhus.com)" - ], - "keywords": [ - "error", - "errors", - "extend", - "extending", - "extension", - "subclass", - "stack", - "custom" - ], - "license": "MIT", - "scripts": { - "pretest": "xo", - "test": "mocha --compilers coffee:coffee-script/register" - }, - "xo": { - "rules": { - "operator-linebreak": [ - 0 - ] - } - }, - "repository": "qix-/node-error-ex", - "files": [ - "index.js" - ], - "devDependencies": { - "coffee-script": "^1.9.3", - "coveralls": "^2.11.2", - "istanbul": "^0.3.17", - "mocha": "^2.2.5", - "should": "^7.0.1", - "xo": "^0.7.1" - }, - "dependencies": { - "is-arrayish": "^0.2.1" - } -} diff --git a/node_modules/es-abstract/.editorconfig b/node_modules/es-abstract/.editorconfig index eaa214161..4598a381a 100644 --- a/node_modules/es-abstract/.editorconfig +++ b/node_modules/es-abstract/.editorconfig @@ -11,3 +11,5 @@ trim_trailing_whitespace = true; spaces_in_brackets = false; end_of_line = lf; +[CHANGELOG.md] +indent_style = space diff --git a/node_modules/es-abstract/.eslintrc b/node_modules/es-abstract/.eslintrc index 1a0d2d2ba..3d3372ac4 100644 --- a/node_modules/es-abstract/.eslintrc +++ b/node_modules/es-abstract/.eslintrc @@ -9,18 +9,18 @@ "rules": { "array-bracket-newline": 0, - "array-element-newline": 0, "complexity": 0, "eqeqeq": [2, "allow-null"], "func-name-matching": 0, "id-length": [2, { "min": 1, "max": 40 }], "max-params": [2, 4], + "max-lines-per-function": 1, + "max-statements": 1, "max-statements-per-line": [2, { "max": 2 }], "multiline-comment-style": 0, "no-magic-numbers": 0, "new-cap": 0, "no-extra-parens": 1, - "operator-linebreak": [2, "before"], "sort-keys": 0, }, @@ -46,9 +46,12 @@ ], "extends": "@ljharb/eslint-config/node/latest", "rules": { + "complexity": 0, "func-style": 0, "max-lines-per-function": 0, "max-nested-callbacks": 0, + "max-statements": 0, + "no-magic-numbers": 0, "no-throw-literal": 0, }, }, @@ -56,9 +59,21 @@ "files": "test/**", "extends": "@ljharb/eslint-config/tests", "rules": { + "max-len": 0, "max-lines-per-function": 0, "no-implicit-coercion": 0, "no-invalid-this": 1, + "prefer-promise-reject-errors": 0, + }, + }, + { + "files": "*/RawBytesToNum*.js", + "rules": { + "operator-linebreak": [2, "before", { + "overrides": { + "=": "none" + } + }], }, }, ], diff --git a/node_modules/es-abstract/.gitattributes b/node_modules/es-abstract/.gitattributes deleted file mode 100644 index cbdb52f92..000000000 --- a/node_modules/es-abstract/.gitattributes +++ /dev/null @@ -1,625 +0,0 @@ -2015/AbstractRelationalComparison.js spackled linguist-generated=true -2015/DateFromTime.js spackled linguist-generated=true -2015/Day.js spackled linguist-generated=true -2015/DayFromYear.js spackled linguist-generated=true -2015/DayWithinYear.js spackled linguist-generated=true -2015/DaysInYear.js spackled linguist-generated=true -2015/HourFromTime.js spackled linguist-generated=true -2015/InLeapYear.js spackled linguist-generated=true -2015/IsCallable.js spackled linguist-generated=true -2015/IsPropertyDescriptor.js spackled linguist-generated=true -2015/MakeDate.js spackled linguist-generated=true -2015/MakeDay.js spackled linguist-generated=true -2015/MakeTime.js spackled linguist-generated=true -2015/MinFromTime.js spackled linguist-generated=true -2015/MonthFromTime.js spackled linguist-generated=true -2015/SameValue.js spackled linguist-generated=true -2015/SecFromTime.js spackled linguist-generated=true -2015/StrictEqualityComparison.js spackled linguist-generated=true -2015/TimeClip.js spackled linguist-generated=true -2015/TimeFromYear.js spackled linguist-generated=true -2015/TimeWithinDay.js spackled linguist-generated=true -2015/ToBoolean.js spackled linguist-generated=true -2015/ToInt32.js spackled linguist-generated=true -2015/ToPropertyDescriptor.js spackled linguist-generated=true -2015/ToUint16.js spackled linguist-generated=true -2015/ToUint32.js spackled linguist-generated=true -2015/WeekDay.js spackled linguist-generated=true -2015/YearFromTime.js spackled linguist-generated=true -2015/abs.js spackled linguist-generated=true -2015/floor.js spackled linguist-generated=true -2015/modulo.js spackled linguist-generated=true -2015/msFromTime.js spackled linguist-generated=true -2016/AbstractEqualityComparison.js spackled linguist-generated=true -2016/AbstractRelationalComparison.js spackled linguist-generated=true -2016/AdvanceStringIndex.js spackled linguist-generated=true -2016/ArrayCreate.js spackled linguist-generated=true -2016/ArraySetLength.js spackled linguist-generated=true -2016/ArraySpeciesCreate.js spackled linguist-generated=true -2016/Call.js spackled linguist-generated=true -2016/CanonicalNumericIndexString.js spackled linguist-generated=true -2016/CompletePropertyDescriptor.js spackled linguist-generated=true -2016/CreateDataProperty.js spackled linguist-generated=true -2016/CreateDataPropertyOrThrow.js spackled linguist-generated=true -2016/CreateHTML.js spackled linguist-generated=true -2016/CreateIterResultObject.js spackled linguist-generated=true -2016/CreateListFromArrayLike.js spackled linguist-generated=true -2016/CreateMethodProperty.js spackled linguist-generated=true -2016/DateFromTime.js spackled linguist-generated=true -2016/Day.js spackled linguist-generated=true -2016/DayFromYear.js spackled linguist-generated=true -2016/DayWithinYear.js spackled linguist-generated=true -2016/DaysInYear.js spackled linguist-generated=true -2016/DefinePropertyOrThrow.js spackled linguist-generated=true -2016/DeletePropertyOrThrow.js spackled linguist-generated=true -2016/EnumerableOwnNames.js spackled linguist-generated=true -2016/FromPropertyDescriptor.js spackled linguist-generated=true -2016/Get.js spackled linguist-generated=true -2016/GetIterator.js spackled linguist-generated=true -2016/GetMethod.js spackled linguist-generated=true -2016/GetOwnPropertyKeys.js spackled linguist-generated=true -2016/GetPrototypeFromConstructor.js spackled linguist-generated=true -2016/GetSubstitution.js spackled linguist-generated=true -2016/GetV.js spackled linguist-generated=true -2016/HasOwnProperty.js spackled linguist-generated=true -2016/HasProperty.js spackled linguist-generated=true -2016/HourFromTime.js spackled linguist-generated=true -2016/InLeapYear.js spackled linguist-generated=true -2016/InstanceofOperator.js spackled linguist-generated=true -2016/Invoke.js spackled linguist-generated=true -2016/IsAccessorDescriptor.js spackled linguist-generated=true -2016/IsArray.js spackled linguist-generated=true -2016/IsCallable.js spackled linguist-generated=true -2016/IsConcatSpreadable.js spackled linguist-generated=true -2016/IsConstructor.js spackled linguist-generated=true -2016/IsDataDescriptor.js spackled linguist-generated=true -2016/IsExtensible.js spackled linguist-generated=true -2016/IsGenericDescriptor.js spackled linguist-generated=true -2016/IsInteger.js spackled linguist-generated=true -2016/IsPromise.js spackled linguist-generated=true -2016/IsPropertyDescriptor.js spackled linguist-generated=true -2016/IsPropertyKey.js spackled linguist-generated=true -2016/IsRegExp.js spackled linguist-generated=true -2016/IteratorClose.js spackled linguist-generated=true -2016/IteratorComplete.js spackled linguist-generated=true -2016/IteratorNext.js spackled linguist-generated=true -2016/IteratorStep.js spackled linguist-generated=true -2016/IteratorValue.js spackled linguist-generated=true -2016/MakeDate.js spackled linguist-generated=true -2016/MakeDay.js spackled linguist-generated=true -2016/MakeTime.js spackled linguist-generated=true -2016/MinFromTime.js spackled linguist-generated=true -2016/MonthFromTime.js spackled linguist-generated=true -2016/ObjectCreate.js spackled linguist-generated=true -2016/OrdinaryCreateFromConstructor.js spackled linguist-generated=true -2016/OrdinaryDefineOwnProperty.js spackled linguist-generated=true -2016/OrdinaryGetOwnProperty.js spackled linguist-generated=true -2016/OrdinaryHasInstance.js spackled linguist-generated=true -2016/OrdinaryHasProperty.js spackled linguist-generated=true -2016/QuoteJSONString.js spackled linguist-generated=true -2016/RegExpCreate.js spackled linguist-generated=true -2016/RegExpExec.js spackled linguist-generated=true -2016/RequireObjectCoercible.js spackled linguist-generated=true -2016/SameValue.js spackled linguist-generated=true -2016/SameValueZero.js spackled linguist-generated=true -2016/SecFromTime.js spackled linguist-generated=true -2016/Set.js spackled linguist-generated=true -2016/SetFunctionName.js spackled linguist-generated=true -2016/SetIntegrityLevel.js spackled linguist-generated=true -2016/SpeciesConstructor.js spackled linguist-generated=true -2016/SplitMatch.js spackled linguist-generated=true -2016/StrictEqualityComparison.js spackled linguist-generated=true -2016/StringCreate.js spackled linguist-generated=true -2016/SymbolDescriptiveString.js spackled linguist-generated=true -2016/TestIntegrityLevel.js spackled linguist-generated=true -2016/TimeClip.js spackled linguist-generated=true -2016/TimeFromYear.js spackled linguist-generated=true -2016/TimeWithinDay.js spackled linguist-generated=true -2016/ToBoolean.js spackled linguist-generated=true -2016/ToDateString.js spackled linguist-generated=true -2016/ToInt16.js spackled linguist-generated=true -2016/ToInt32.js spackled linguist-generated=true -2016/ToInt8.js spackled linguist-generated=true -2016/ToInteger.js spackled linguist-generated=true -2016/ToLength.js spackled linguist-generated=true -2016/ToNumber.js spackled linguist-generated=true -2016/ToObject.js spackled linguist-generated=true -2016/ToPrimitive.js spackled linguist-generated=true -2016/ToPropertyDescriptor.js spackled linguist-generated=true -2016/ToPropertyKey.js spackled linguist-generated=true -2016/ToString.js spackled linguist-generated=true -2016/ToUint16.js spackled linguist-generated=true -2016/ToUint32.js spackled linguist-generated=true -2016/ToUint8.js spackled linguist-generated=true -2016/ToUint8Clamp.js spackled linguist-generated=true -2016/Type.js spackled linguist-generated=true -2016/ValidateAndApplyPropertyDescriptor.js spackled linguist-generated=true -2016/WeekDay.js spackled linguist-generated=true -2016/YearFromTime.js spackled linguist-generated=true -2016/abs.js spackled linguist-generated=true -2016/floor.js spackled linguist-generated=true -2016/modulo.js spackled linguist-generated=true -2016/msFromTime.js spackled linguist-generated=true -2016/thisBooleanValue.js spackled linguist-generated=true -2016/thisNumberValue.js spackled linguist-generated=true -2016/thisStringValue.js spackled linguist-generated=true -2016/thisTimeValue.js spackled linguist-generated=true -2017/AbstractEqualityComparison.js spackled linguist-generated=true -2017/AbstractRelationalComparison.js spackled linguist-generated=true -2017/AdvanceStringIndex.js spackled linguist-generated=true -2017/ArrayCreate.js spackled linguist-generated=true -2017/ArraySetLength.js spackled linguist-generated=true -2017/ArraySpeciesCreate.js spackled linguist-generated=true -2017/Call.js spackled linguist-generated=true -2017/CanonicalNumericIndexString.js spackled linguist-generated=true -2017/CompletePropertyDescriptor.js spackled linguist-generated=true -2017/CreateDataProperty.js spackled linguist-generated=true -2017/CreateDataPropertyOrThrow.js spackled linguist-generated=true -2017/CreateHTML.js spackled linguist-generated=true -2017/CreateIterResultObject.js spackled linguist-generated=true -2017/CreateListFromArrayLike.js spackled linguist-generated=true -2017/CreateMethodProperty.js spackled linguist-generated=true -2017/DateFromTime.js spackled linguist-generated=true -2017/Day.js spackled linguist-generated=true -2017/DayFromYear.js spackled linguist-generated=true -2017/DayWithinYear.js spackled linguist-generated=true -2017/DaysInYear.js spackled linguist-generated=true -2017/DefinePropertyOrThrow.js spackled linguist-generated=true -2017/DeletePropertyOrThrow.js spackled linguist-generated=true -2017/FromPropertyDescriptor.js spackled linguist-generated=true -2017/Get.js spackled linguist-generated=true -2017/GetIterator.js spackled linguist-generated=true -2017/GetMethod.js spackled linguist-generated=true -2017/GetOwnPropertyKeys.js spackled linguist-generated=true -2017/GetPrototypeFromConstructor.js spackled linguist-generated=true -2017/GetSubstitution.js spackled linguist-generated=true -2017/GetV.js spackled linguist-generated=true -2017/HasOwnProperty.js spackled linguist-generated=true -2017/HasProperty.js spackled linguist-generated=true -2017/HourFromTime.js spackled linguist-generated=true -2017/InLeapYear.js spackled linguist-generated=true -2017/InstanceofOperator.js spackled linguist-generated=true -2017/Invoke.js spackled linguist-generated=true -2017/IsAccessorDescriptor.js spackled linguist-generated=true -2017/IsArray.js spackled linguist-generated=true -2017/IsCallable.js spackled linguist-generated=true -2017/IsConcatSpreadable.js spackled linguist-generated=true -2017/IsConstructor.js spackled linguist-generated=true -2017/IsDataDescriptor.js spackled linguist-generated=true -2017/IsExtensible.js spackled linguist-generated=true -2017/IsGenericDescriptor.js spackled linguist-generated=true -2017/IsInteger.js spackled linguist-generated=true -2017/IsPromise.js spackled linguist-generated=true -2017/IsPropertyDescriptor.js spackled linguist-generated=true -2017/IsPropertyKey.js spackled linguist-generated=true -2017/IsRegExp.js spackled linguist-generated=true -2017/IteratorClose.js spackled linguist-generated=true -2017/IteratorComplete.js spackled linguist-generated=true -2017/IteratorNext.js spackled linguist-generated=true -2017/IteratorStep.js spackled linguist-generated=true -2017/IteratorValue.js spackled linguist-generated=true -2017/MakeDate.js spackled linguist-generated=true -2017/MakeDay.js spackled linguist-generated=true -2017/MakeTime.js spackled linguist-generated=true -2017/MinFromTime.js spackled linguist-generated=true -2017/MonthFromTime.js spackled linguist-generated=true -2017/ObjectCreate.js spackled linguist-generated=true -2017/OrdinaryCreateFromConstructor.js spackled linguist-generated=true -2017/OrdinaryDefineOwnProperty.js spackled linguist-generated=true -2017/OrdinaryGetOwnProperty.js spackled linguist-generated=true -2017/OrdinaryGetPrototypeOf.js spackled linguist-generated=true -2017/OrdinaryHasInstance.js spackled linguist-generated=true -2017/OrdinaryHasProperty.js spackled linguist-generated=true -2017/OrdinarySetPrototypeOf.js spackled linguist-generated=true -2017/QuoteJSONString.js spackled linguist-generated=true -2017/RegExpCreate.js spackled linguist-generated=true -2017/RegExpExec.js spackled linguist-generated=true -2017/RequireObjectCoercible.js spackled linguist-generated=true -2017/SameValue.js spackled linguist-generated=true -2017/SameValueNonNumber.js spackled linguist-generated=true -2017/SameValueZero.js spackled linguist-generated=true -2017/SecFromTime.js spackled linguist-generated=true -2017/Set.js spackled linguist-generated=true -2017/SetFunctionName.js spackled linguist-generated=true -2017/SetIntegrityLevel.js spackled linguist-generated=true -2017/SpeciesConstructor.js spackled linguist-generated=true -2017/SplitMatch.js spackled linguist-generated=true -2017/StrictEqualityComparison.js spackled linguist-generated=true -2017/StringCreate.js spackled linguist-generated=true -2017/SymbolDescriptiveString.js spackled linguist-generated=true -2017/TestIntegrityLevel.js spackled linguist-generated=true -2017/TimeClip.js spackled linguist-generated=true -2017/TimeFromYear.js spackled linguist-generated=true -2017/TimeWithinDay.js spackled linguist-generated=true -2017/ToBoolean.js spackled linguist-generated=true -2017/ToDateString.js spackled linguist-generated=true -2017/ToInt16.js spackled linguist-generated=true -2017/ToInt32.js spackled linguist-generated=true -2017/ToInt8.js spackled linguist-generated=true -2017/ToInteger.js spackled linguist-generated=true -2017/ToLength.js spackled linguist-generated=true -2017/ToNumber.js spackled linguist-generated=true -2017/ToObject.js spackled linguist-generated=true -2017/ToPrimitive.js spackled linguist-generated=true -2017/ToPropertyDescriptor.js spackled linguist-generated=true -2017/ToPropertyKey.js spackled linguist-generated=true -2017/ToString.js spackled linguist-generated=true -2017/ToUint16.js spackled linguist-generated=true -2017/ToUint32.js spackled linguist-generated=true -2017/ToUint8.js spackled linguist-generated=true -2017/ToUint8Clamp.js spackled linguist-generated=true -2017/Type.js spackled linguist-generated=true -2017/UTF16Decode.js spackled linguist-generated=true -2017/UTF16Encoding.js spackled linguist-generated=true -2017/ValidateAndApplyPropertyDescriptor.js spackled linguist-generated=true -2017/WeekDay.js spackled linguist-generated=true -2017/YearFromTime.js spackled linguist-generated=true -2017/abs.js spackled linguist-generated=true -2017/floor.js spackled linguist-generated=true -2017/modulo.js spackled linguist-generated=true -2017/msFromTime.js spackled linguist-generated=true -2017/thisBooleanValue.js spackled linguist-generated=true -2017/thisNumberValue.js spackled linguist-generated=true -2017/thisStringValue.js spackled linguist-generated=true -2017/thisTimeValue.js spackled linguist-generated=true -2018/AbstractEqualityComparison.js spackled linguist-generated=true -2018/AbstractRelationalComparison.js spackled linguist-generated=true -2018/AdvanceStringIndex.js spackled linguist-generated=true -2018/ArrayCreate.js spackled linguist-generated=true -2018/ArraySetLength.js spackled linguist-generated=true -2018/ArraySpeciesCreate.js spackled linguist-generated=true -2018/Call.js spackled linguist-generated=true -2018/CanonicalNumericIndexString.js spackled linguist-generated=true -2018/CompletePropertyDescriptor.js spackled linguist-generated=true -2018/CreateDataProperty.js spackled linguist-generated=true -2018/CreateDataPropertyOrThrow.js spackled linguist-generated=true -2018/CreateHTML.js spackled linguist-generated=true -2018/CreateIterResultObject.js spackled linguist-generated=true -2018/CreateListFromArrayLike.js spackled linguist-generated=true -2018/CreateMethodProperty.js spackled linguist-generated=true -2018/DateFromTime.js spackled linguist-generated=true -2018/Day.js spackled linguist-generated=true -2018/DayFromYear.js spackled linguist-generated=true -2018/DayWithinYear.js spackled linguist-generated=true -2018/DaysInYear.js spackled linguist-generated=true -2018/DefinePropertyOrThrow.js spackled linguist-generated=true -2018/DeletePropertyOrThrow.js spackled linguist-generated=true -2018/FromPropertyDescriptor.js spackled linguist-generated=true -2018/Get.js spackled linguist-generated=true -2018/GetIterator.js spackled linguist-generated=true -2018/GetMethod.js spackled linguist-generated=true -2018/GetOwnPropertyKeys.js spackled linguist-generated=true -2018/GetPrototypeFromConstructor.js spackled linguist-generated=true -2018/GetV.js spackled linguist-generated=true -2018/HasOwnProperty.js spackled linguist-generated=true -2018/HasProperty.js spackled linguist-generated=true -2018/HourFromTime.js spackled linguist-generated=true -2018/InLeapYear.js spackled linguist-generated=true -2018/InstanceofOperator.js spackled linguist-generated=true -2018/Invoke.js spackled linguist-generated=true -2018/IsAccessorDescriptor.js spackled linguist-generated=true -2018/IsArray.js spackled linguist-generated=true -2018/IsCallable.js spackled linguist-generated=true -2018/IsConcatSpreadable.js spackled linguist-generated=true -2018/IsConstructor.js spackled linguist-generated=true -2018/IsDataDescriptor.js spackled linguist-generated=true -2018/IsExtensible.js spackled linguist-generated=true -2018/IsGenericDescriptor.js spackled linguist-generated=true -2018/IsInteger.js spackled linguist-generated=true -2018/IsPromise.js spackled linguist-generated=true -2018/IsPropertyKey.js spackled linguist-generated=true -2018/IsRegExp.js spackled linguist-generated=true -2018/IterableToList.js spackled linguist-generated=true -2018/IteratorClose.js spackled linguist-generated=true -2018/IteratorComplete.js spackled linguist-generated=true -2018/IteratorNext.js spackled linguist-generated=true -2018/IteratorStep.js spackled linguist-generated=true -2018/IteratorValue.js spackled linguist-generated=true -2018/MakeDate.js spackled linguist-generated=true -2018/MakeDay.js spackled linguist-generated=true -2018/MakeTime.js spackled linguist-generated=true -2018/MinFromTime.js spackled linguist-generated=true -2018/MonthFromTime.js spackled linguist-generated=true -2018/ObjectCreate.js spackled linguist-generated=true -2018/OrdinaryCreateFromConstructor.js spackled linguist-generated=true -2018/OrdinaryDefineOwnProperty.js spackled linguist-generated=true -2018/OrdinaryGetOwnProperty.js spackled linguist-generated=true -2018/OrdinaryGetPrototypeOf.js spackled linguist-generated=true -2018/OrdinaryHasInstance.js spackled linguist-generated=true -2018/OrdinaryHasProperty.js spackled linguist-generated=true -2018/OrdinarySetPrototypeOf.js spackled linguist-generated=true -2018/RegExpCreate.js spackled linguist-generated=true -2018/RegExpExec.js spackled linguist-generated=true -2018/RequireObjectCoercible.js spackled linguist-generated=true -2018/SameValue.js spackled linguist-generated=true -2018/SameValueNonNumber.js spackled linguist-generated=true -2018/SameValueZero.js spackled linguist-generated=true -2018/SecFromTime.js spackled linguist-generated=true -2018/Set.js spackled linguist-generated=true -2018/SetFunctionName.js spackled linguist-generated=true -2018/SetIntegrityLevel.js spackled linguist-generated=true -2018/SpeciesConstructor.js spackled linguist-generated=true -2018/SplitMatch.js spackled linguist-generated=true -2018/StrictEqualityComparison.js spackled linguist-generated=true -2018/StringCreate.js spackled linguist-generated=true -2018/StringGetOwnProperty.js spackled linguist-generated=true -2018/SymbolDescriptiveString.js spackled linguist-generated=true -2018/TestIntegrityLevel.js spackled linguist-generated=true -2018/TimeClip.js spackled linguist-generated=true -2018/TimeFromYear.js spackled linguist-generated=true -2018/TimeWithinDay.js spackled linguist-generated=true -2018/ToBoolean.js spackled linguist-generated=true -2018/ToDateString.js spackled linguist-generated=true -2018/ToIndex.js spackled linguist-generated=true -2018/ToInt16.js spackled linguist-generated=true -2018/ToInt32.js spackled linguist-generated=true -2018/ToInt8.js spackled linguist-generated=true -2018/ToInteger.js spackled linguist-generated=true -2018/ToLength.js spackled linguist-generated=true -2018/ToNumber.js spackled linguist-generated=true -2018/ToObject.js spackled linguist-generated=true -2018/ToPrimitive.js spackled linguist-generated=true -2018/ToPropertyDescriptor.js spackled linguist-generated=true -2018/ToPropertyKey.js spackled linguist-generated=true -2018/ToString.js spackled linguist-generated=true -2018/ToUint16.js spackled linguist-generated=true -2018/ToUint32.js spackled linguist-generated=true -2018/ToUint8.js spackled linguist-generated=true -2018/ToUint8Clamp.js spackled linguist-generated=true -2018/Type.js spackled linguist-generated=true -2018/UTF16Decode.js spackled linguist-generated=true -2018/UTF16Encoding.js spackled linguist-generated=true -2018/ValidateAndApplyPropertyDescriptor.js spackled linguist-generated=true -2018/WeekDay.js spackled linguist-generated=true -2018/YearFromTime.js spackled linguist-generated=true -2018/abs.js spackled linguist-generated=true -2018/floor.js spackled linguist-generated=true -2018/modulo.js spackled linguist-generated=true -2018/msFromTime.js spackled linguist-generated=true -2018/thisBooleanValue.js spackled linguist-generated=true -2018/thisNumberValue.js spackled linguist-generated=true -2018/thisStringValue.js spackled linguist-generated=true -2018/thisTimeValue.js spackled linguist-generated=true -2019/AbstractEqualityComparison.js spackled linguist-generated=true -2019/AbstractRelationalComparison.js spackled linguist-generated=true -2019/AdvanceStringIndex.js spackled linguist-generated=true -2019/ArrayCreate.js spackled linguist-generated=true -2019/ArraySetLength.js spackled linguist-generated=true -2019/ArraySpeciesCreate.js spackled linguist-generated=true -2019/Call.js spackled linguist-generated=true -2019/CanonicalNumericIndexString.js spackled linguist-generated=true -2019/CompletePropertyDescriptor.js spackled linguist-generated=true -2019/CopyDataProperties.js spackled linguist-generated=true -2019/CreateDataProperty.js spackled linguist-generated=true -2019/CreateDataPropertyOrThrow.js spackled linguist-generated=true -2019/CreateHTML.js spackled linguist-generated=true -2019/CreateIterResultObject.js spackled linguist-generated=true -2019/CreateListFromArrayLike.js spackled linguist-generated=true -2019/CreateMethodProperty.js spackled linguist-generated=true -2019/DateFromTime.js spackled linguist-generated=true -2019/DateString.js spackled linguist-generated=true -2019/Day.js spackled linguist-generated=true -2019/DayFromYear.js spackled linguist-generated=true -2019/DayWithinYear.js spackled linguist-generated=true -2019/DaysInYear.js spackled linguist-generated=true -2019/DefinePropertyOrThrow.js spackled linguist-generated=true -2019/DeletePropertyOrThrow.js spackled linguist-generated=true -2019/EnumerableOwnPropertyNames.js spackled linguist-generated=true -2019/FromPropertyDescriptor.js spackled linguist-generated=true -2019/Get.js spackled linguist-generated=true -2019/GetIterator.js spackled linguist-generated=true -2019/GetMethod.js spackled linguist-generated=true -2019/GetOwnPropertyKeys.js spackled linguist-generated=true -2019/GetPrototypeFromConstructor.js spackled linguist-generated=true -2019/GetSubstitution.js spackled linguist-generated=true -2019/GetV.js spackled linguist-generated=true -2019/HasOwnProperty.js spackled linguist-generated=true -2019/HasProperty.js spackled linguist-generated=true -2019/HourFromTime.js spackled linguist-generated=true -2019/InLeapYear.js spackled linguist-generated=true -2019/InstanceofOperator.js spackled linguist-generated=true -2019/Invoke.js spackled linguist-generated=true -2019/IsAccessorDescriptor.js spackled linguist-generated=true -2019/IsArray.js spackled linguist-generated=true -2019/IsCallable.js spackled linguist-generated=true -2019/IsConcatSpreadable.js spackled linguist-generated=true -2019/IsConstructor.js spackled linguist-generated=true -2019/IsDataDescriptor.js spackled linguist-generated=true -2019/IsExtensible.js spackled linguist-generated=true -2019/IsGenericDescriptor.js spackled linguist-generated=true -2019/IsInteger.js spackled linguist-generated=true -2019/IsPromise.js spackled linguist-generated=true -2019/IsPropertyKey.js spackled linguist-generated=true -2019/IsRegExp.js spackled linguist-generated=true -2019/IsStringPrefix.js spackled linguist-generated=true -2019/IterableToList.js spackled linguist-generated=true -2019/IteratorClose.js spackled linguist-generated=true -2019/IteratorComplete.js spackled linguist-generated=true -2019/IteratorNext.js spackled linguist-generated=true -2019/IteratorStep.js spackled linguist-generated=true -2019/IteratorValue.js spackled linguist-generated=true -2019/MakeDate.js spackled linguist-generated=true -2019/MakeDay.js spackled linguist-generated=true -2019/MakeTime.js spackled linguist-generated=true -2019/MinFromTime.js spackled linguist-generated=true -2019/MonthFromTime.js spackled linguist-generated=true -2019/NumberToString.js spackled linguist-generated=true -2019/ObjectCreate.js spackled linguist-generated=true -2019/OrdinaryCreateFromConstructor.js spackled linguist-generated=true -2019/OrdinaryDefineOwnProperty.js spackled linguist-generated=true -2019/OrdinaryGetOwnProperty.js spackled linguist-generated=true -2019/OrdinaryGetPrototypeOf.js spackled linguist-generated=true -2019/OrdinaryHasInstance.js spackled linguist-generated=true -2019/OrdinaryHasProperty.js spackled linguist-generated=true -2019/OrdinarySetPrototypeOf.js spackled linguist-generated=true -2019/PromiseResolve.js spackled linguist-generated=true -2019/RegExpCreate.js spackled linguist-generated=true -2019/RegExpExec.js spackled linguist-generated=true -2019/RequireObjectCoercible.js spackled linguist-generated=true -2019/SameValue.js spackled linguist-generated=true -2019/SameValueNonNumber.js spackled linguist-generated=true -2019/SameValueZero.js spackled linguist-generated=true -2019/SecFromTime.js spackled linguist-generated=true -2019/Set.js spackled linguist-generated=true -2019/SetFunctionLength.js spackled linguist-generated=true -2019/SetFunctionName.js spackled linguist-generated=true -2019/SetIntegrityLevel.js spackled linguist-generated=true -2019/SpeciesConstructor.js spackled linguist-generated=true -2019/SplitMatch.js spackled linguist-generated=true -2019/StrictEqualityComparison.js spackled linguist-generated=true -2019/StringCreate.js spackled linguist-generated=true -2019/StringGetOwnProperty.js spackled linguist-generated=true -2019/SymbolDescriptiveString.js spackled linguist-generated=true -2019/TestIntegrityLevel.js spackled linguist-generated=true -2019/TimeClip.js spackled linguist-generated=true -2019/TimeFromYear.js spackled linguist-generated=true -2019/TimeString.js spackled linguist-generated=true -2019/TimeWithinDay.js spackled linguist-generated=true -2019/ToBoolean.js spackled linguist-generated=true -2019/ToDateString.js spackled linguist-generated=true -2019/ToIndex.js spackled linguist-generated=true -2019/ToInt16.js spackled linguist-generated=true -2019/ToInt32.js spackled linguist-generated=true -2019/ToInt8.js spackled linguist-generated=true -2019/ToInteger.js spackled linguist-generated=true -2019/ToLength.js spackled linguist-generated=true -2019/ToNumber.js spackled linguist-generated=true -2019/ToObject.js spackled linguist-generated=true -2019/ToPrimitive.js spackled linguist-generated=true -2019/ToPropertyDescriptor.js spackled linguist-generated=true -2019/ToPropertyKey.js spackled linguist-generated=true -2019/ToString.js spackled linguist-generated=true -2019/ToUint16.js spackled linguist-generated=true -2019/ToUint32.js spackled linguist-generated=true -2019/ToUint8.js spackled linguist-generated=true -2019/ToUint8Clamp.js spackled linguist-generated=true -2019/Type.js spackled linguist-generated=true -2019/UTF16Decode.js spackled linguist-generated=true -2019/UTF16Encoding.js spackled linguist-generated=true -2019/UnicodeEscape.js spackled linguist-generated=true -2019/ValidateAndApplyPropertyDescriptor.js spackled linguist-generated=true -2019/WeekDay.js spackled linguist-generated=true -2019/YearFromTime.js spackled linguist-generated=true -2019/abs.js spackled linguist-generated=true -2019/floor.js spackled linguist-generated=true -2019/modulo.js spackled linguist-generated=true -2019/msFromTime.js spackled linguist-generated=true -2019/thisBooleanValue.js spackled linguist-generated=true -2019/thisNumberValue.js spackled linguist-generated=true -2019/thisStringValue.js spackled linguist-generated=true -2019/thisSymbolValue.js spackled linguist-generated=true -2020/AbstractEqualityComparison.js spackled linguist-generated=true -2020/AbstractRelationalComparison.js spackled linguist-generated=true -2020/AddEntriesFromIterable.js spackled linguist-generated=true -2020/ArrayCreate.js spackled linguist-generated=true -2020/ArraySetLength.js spackled linguist-generated=true -2020/ArraySpeciesCreate.js spackled linguist-generated=true -2020/Call.js spackled linguist-generated=true -2020/CanonicalNumericIndexString.js spackled linguist-generated=true -2020/CompletePropertyDescriptor.js spackled linguist-generated=true -2020/CreateDataProperty.js spackled linguist-generated=true -2020/CreateDataPropertyOrThrow.js spackled linguist-generated=true -2020/CreateHTML.js spackled linguist-generated=true -2020/CreateIterResultObject.js spackled linguist-generated=true -2020/CreateMethodProperty.js spackled linguist-generated=true -2020/DateFromTime.js spackled linguist-generated=true -2020/DateString.js spackled linguist-generated=true -2020/Day.js spackled linguist-generated=true -2020/DayFromYear.js spackled linguist-generated=true -2020/DayWithinYear.js spackled linguist-generated=true -2020/DaysInYear.js spackled linguist-generated=true -2020/DefinePropertyOrThrow.js spackled linguist-generated=true -2020/DeletePropertyOrThrow.js spackled linguist-generated=true -2020/EnumerableOwnPropertyNames.js spackled linguist-generated=true -2020/FromPropertyDescriptor.js spackled linguist-generated=true -2020/Get.js spackled linguist-generated=true -2020/GetMethod.js spackled linguist-generated=true -2020/GetOwnPropertyKeys.js spackled linguist-generated=true -2020/GetPrototypeFromConstructor.js spackled linguist-generated=true -2020/GetSubstitution.js spackled linguist-generated=true -2020/GetV.js spackled linguist-generated=true -2020/HasOwnProperty.js spackled linguist-generated=true -2020/HasProperty.js spackled linguist-generated=true -2020/HourFromTime.js spackled linguist-generated=true -2020/InLeapYear.js spackled linguist-generated=true -2020/InstanceofOperator.js spackled linguist-generated=true -2020/Invoke.js spackled linguist-generated=true -2020/IsAccessorDescriptor.js spackled linguist-generated=true -2020/IsArray.js spackled linguist-generated=true -2020/IsCallable.js spackled linguist-generated=true -2020/IsConcatSpreadable.js spackled linguist-generated=true -2020/IsConstructor.js spackled linguist-generated=true -2020/IsDataDescriptor.js spackled linguist-generated=true -2020/IsExtensible.js spackled linguist-generated=true -2020/IsGenericDescriptor.js spackled linguist-generated=true -2020/IsInteger.js spackled linguist-generated=true -2020/IsPromise.js spackled linguist-generated=true -2020/IsPropertyKey.js spackled linguist-generated=true -2020/IsRegExp.js spackled linguist-generated=true -2020/IsStringPrefix.js spackled linguist-generated=true -2020/IteratorClose.js spackled linguist-generated=true -2020/IteratorComplete.js spackled linguist-generated=true -2020/IteratorNext.js spackled linguist-generated=true -2020/IteratorStep.js spackled linguist-generated=true -2020/IteratorValue.js spackled linguist-generated=true -2020/MakeDate.js spackled linguist-generated=true -2020/MakeDay.js spackled linguist-generated=true -2020/MakeTime.js spackled linguist-generated=true -2020/MinFromTime.js spackled linguist-generated=true -2020/MonthFromTime.js spackled linguist-generated=true -2020/OrdinaryDefineOwnProperty.js spackled linguist-generated=true -2020/OrdinaryGetOwnProperty.js spackled linguist-generated=true -2020/OrdinaryGetPrototypeOf.js spackled linguist-generated=true -2020/OrdinaryHasInstance.js spackled linguist-generated=true -2020/OrdinaryHasProperty.js spackled linguist-generated=true -2020/OrdinarySetPrototypeOf.js spackled linguist-generated=true -2020/PromiseResolve.js spackled linguist-generated=true -2020/RegExpCreate.js spackled linguist-generated=true -2020/RegExpExec.js spackled linguist-generated=true -2020/RequireObjectCoercible.js spackled linguist-generated=true -2020/SameValue.js spackled linguist-generated=true -2020/SameValueZero.js spackled linguist-generated=true -2020/SecFromTime.js spackled linguist-generated=true -2020/Set.js spackled linguist-generated=true -2020/SetFunctionName.js spackled linguist-generated=true -2020/SetIntegrityLevel.js spackled linguist-generated=true -2020/SpeciesConstructor.js spackled linguist-generated=true -2020/SplitMatch.js spackled linguist-generated=true -2020/StrictEqualityComparison.js spackled linguist-generated=true -2020/StringCreate.js spackled linguist-generated=true -2020/StringGetOwnProperty.js spackled linguist-generated=true -2020/SymbolDescriptiveString.js spackled linguist-generated=true -2020/TestIntegrityLevel.js spackled linguist-generated=true -2020/TimeClip.js spackled linguist-generated=true -2020/TimeFromYear.js spackled linguist-generated=true -2020/TimeString.js spackled linguist-generated=true -2020/TimeWithinDay.js spackled linguist-generated=true -2020/ToBoolean.js spackled linguist-generated=true -2020/ToDateString.js spackled linguist-generated=true -2020/ToInt16.js spackled linguist-generated=true -2020/ToInt32.js spackled linguist-generated=true -2020/ToInt8.js spackled linguist-generated=true -2020/ToLength.js spackled linguist-generated=true -2020/ToObject.js spackled linguist-generated=true -2020/ToPrimitive.js spackled linguist-generated=true -2020/ToPropertyDescriptor.js spackled linguist-generated=true -2020/ToPropertyKey.js spackled linguist-generated=true -2020/ToString.js spackled linguist-generated=true -2020/ToUint16.js spackled linguist-generated=true -2020/ToUint32.js spackled linguist-generated=true -2020/ToUint8.js spackled linguist-generated=true -2020/ToUint8Clamp.js spackled linguist-generated=true -2020/TrimString.js spackled linguist-generated=true -2020/UTF16Encoding.js spackled linguist-generated=true -2020/ValidateAndApplyPropertyDescriptor.js spackled linguist-generated=true -2020/WeekDay.js spackled linguist-generated=true -2020/YearFromTime.js spackled linguist-generated=true -2020/abs.js spackled linguist-generated=true -2020/floor.js spackled linguist-generated=true -2020/modulo.js spackled linguist-generated=true -2020/msFromTime.js spackled linguist-generated=true -2020/thisBooleanValue.js spackled linguist-generated=true -2020/thisNumberValue.js spackled linguist-generated=true -2020/thisStringValue.js spackled linguist-generated=true -2020/thisSymbolValue.js spackled linguist-generated=true -2020/thisTimeValue.js spackled linguist-generated=true \ No newline at end of file diff --git a/node_modules/es-abstract/.nycrc b/node_modules/es-abstract/.nycrc index 526adaa51..9e5435f9d 100644 --- a/node_modules/es-abstract/.nycrc +++ b/node_modules/es-abstract/.nycrc @@ -5,6 +5,11 @@ "exclude": [ "coverage", "operations", - "test" + "test", + "helpers/callBind.js", + "helpers/callBound.js", + "helpers/getOwnPropertyDescriptor.js", + "helpers/getSymbolDescription.js", + "helpers/regexTester.js" ] } diff --git a/node_modules/es-abstract/2015/ArrayCreate.js b/node_modules/es-abstract/2015/ArrayCreate.js index 4d20e2e5e..cc890cafb 100644 --- a/node_modules/es-abstract/2015/ArrayCreate.js +++ b/node_modules/es-abstract/2015/ArrayCreate.js @@ -9,16 +9,17 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsInteger = require('./IsInteger'); +var hasProto = require('has-proto')(); + var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( - // eslint-disable-next-line no-proto, no-negated-condition - [].__proto__ !== $ArrayPrototype - ? null - : function (O, proto) { + hasProto + ? function (O, proto) { O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign return O; } + : null ); // https://ecma-international.org/ecma-262/6.0/#sec-arraycreate @@ -42,12 +43,12 @@ module.exports = function ArrayCreate(length) { A.length = length; } /* step 10, the above as a shortcut for the below - OrdinaryDefineOwnProperty(A, 'length', { - '[[Configurable]]': false, - '[[Enumerable]]': false, - '[[Value]]': length, - '[[Writable]]': true - }); - */ + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ return A; }; diff --git a/node_modules/es-abstract/2015/CharacterRange.js b/node_modules/es-abstract/2015/CharacterRange.js new file mode 100644 index 000000000..70e4b5235 --- /dev/null +++ b/node_modules/es-abstract/2015/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('%String.prototype.charCodeAt%'); +var $push = callBound('%Array.prototype.push%'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2015/CompletionRecord.js b/node_modules/es-abstract/2015/CompletionRecord.js new file mode 100644 index 000000000..c0ad487c1 --- /dev/null +++ b/node_modules/es-abstract/2015/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/6.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[type]]', type); + SLOT.set(this, '[[value]]', value); + // [[target]] slot? +}; + +CompletionRecord.prototype.type = function type() { + return SLOT.get(this, '[[type]]'); +}; + +CompletionRecord.prototype.value = function value() { + return SLOT.get(this, '[[value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[type]]'); + var value = SLOT.get(this, '[[value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2015/CreateDataProperty.js b/node_modules/es-abstract/2015/CreateDataProperty.js index ff5ca3055..02c6cd1f8 100644 --- a/node_modules/es-abstract/2015/CreateDataProperty.js +++ b/node_modules/es-abstract/2015/CreateDataProperty.js @@ -25,8 +25,8 @@ module.exports = function CreateDataProperty(O, P, V) { } var oldDesc = OrdinaryGetOwnProperty(O, P); var extensible = !oldDesc || IsExtensible(O); - var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']); - if (immutable || !extensible) { + var nonConfigurable = oldDesc && !oldDesc['[[Configurable]]']; + if (nonConfigurable || !extensible) { return false; } return DefineOwnProperty( diff --git a/node_modules/es-abstract/2015/DetachArrayBuffer.js b/node_modules/es-abstract/2015/DetachArrayBuffer.js new file mode 100644 index 000000000..a7b89b36b --- /dev/null +++ b/node_modules/es-abstract/2015/DetachArrayBuffer.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; // node 11.7+ +} catch (e) { /**/ } + +// https://262.ecma-international.org/6.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2015/FromPropertyDescriptor.js b/node_modules/es-abstract/2015/FromPropertyDescriptor.js index 9a69a2605..e142ed582 100644 --- a/node_modules/es-abstract/2015/FromPropertyDescriptor.js +++ b/node_modules/es-abstract/2015/FromPropertyDescriptor.js @@ -1,36 +1,16 @@ 'use strict'; var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); var Type = require('./Type'); // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor module.exports = function FromPropertyDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return Desc; + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); } - assertRecord(Type, 'Property Descriptor', 'Desc', Desc); - - var obj = {}; - if ('[[Value]]' in Desc) { - obj.value = Desc['[[Value]]']; - } - if ('[[Writable]]' in Desc) { - obj.writable = Desc['[[Writable]]']; - } - if ('[[Get]]' in Desc) { - obj.get = Desc['[[Get]]']; - } - if ('[[Set]]' in Desc) { - obj.set = Desc['[[Set]]']; - } - if ('[[Enumerable]]' in Desc) { - obj.enumerable = Desc['[[Enumerable]]']; - } - if ('[[Configurable]]' in Desc) { - obj.configurable = Desc['[[Configurable]]']; - } - return obj; + return fromPropertyDescriptor(Desc); }; diff --git a/node_modules/es-abstract/2015/Get.js b/node_modules/es-abstract/2015/Get.js index 681055a2f..297968643 100644 --- a/node_modules/es-abstract/2015/Get.js +++ b/node_modules/es-abstract/2015/Get.js @@ -9,12 +9,7 @@ var inspect = require('object-inspect'); var IsPropertyKey = require('./IsPropertyKey'); var Type = require('./Type'); -/** - * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p - * 1. Assert: Type(O) is Object. - * 2. Assert: IsPropertyKey(P) is true. - * 3. Return O.[[Get]](P, O). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p module.exports = function Get(O, P) { // 7.3.1.1 diff --git a/node_modules/es-abstract/2015/GetGlobalObject.js b/node_modules/es-abstract/2015/GetGlobalObject.js new file mode 100644 index 000000000..0541ede0c --- /dev/null +++ b/node_modules/es-abstract/2015/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2015/GetIterator.js b/node_modules/es-abstract/2015/GetIterator.js index a2d3b16cb..892197a23 100644 --- a/node_modules/es-abstract/2015/GetIterator.js +++ b/node_modules/es-abstract/2015/GetIterator.js @@ -20,8 +20,7 @@ module.exports = function GetIterator(obj, method) { { AdvanceStringIndex: AdvanceStringIndex, GetMethod: GetMethod, - IsArray: IsArray, - Type: Type + IsArray: IsArray }, obj ); diff --git a/node_modules/es-abstract/2015/GetMethod.js b/node_modules/es-abstract/2015/GetMethod.js index 775d3fb95..d3775178e 100644 --- a/node_modules/es-abstract/2015/GetMethod.js +++ b/node_modules/es-abstract/2015/GetMethod.js @@ -8,15 +8,9 @@ var GetV = require('./GetV'); var IsCallable = require('./IsCallable'); var IsPropertyKey = require('./IsPropertyKey'); -/** - * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let func be GetV(O, P). - * 3. ReturnIfAbrupt(func). - * 4. If func is either undefined or null, return undefined. - * 5. If IsCallable(func) is false, throw a TypeError exception. - * 6. Return func. - */ +var debug = require('object-inspect'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getmethod module.exports = function GetMethod(O, P) { // 7.3.9.1 @@ -34,7 +28,7 @@ module.exports = function GetMethod(O, P) { // 7.3.9.5 if (!IsCallable(func)) { - throw new $TypeError(P + 'is not a function'); + throw new $TypeError(P + ' is not a function: ' + debug(func)); } // 7.3.9.6 diff --git a/node_modules/es-abstract/2015/GetOwnPropertyKeys.js b/node_modules/es-abstract/2015/GetOwnPropertyKeys.js index b8f4167f7..40c0b367f 100644 --- a/node_modules/es-abstract/2015/GetOwnPropertyKeys.js +++ b/node_modules/es-abstract/2015/GetOwnPropertyKeys.js @@ -6,8 +6,8 @@ var hasSymbols = require('has-symbols')(); var $TypeError = GetIntrinsic('%TypeError%'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); -var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); var keys = require('object-keys'); var esType = require('./Type'); diff --git a/node_modules/es-abstract/2015/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2015/GetPrototypeFromConstructor.js index 5f369cad8..25ee12f35 100644 --- a/node_modules/es-abstract/2015/GetPrototypeFromConstructor.js +++ b/node_modules/es-abstract/2015/GetPrototypeFromConstructor.js @@ -4,6 +4,7 @@ var GetIntrinsic = require('get-intrinsic'); var $Function = GetIntrinsic('%Function%'); var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); var Get = require('./Get'); var IsConstructor = require('./IsConstructor'); @@ -20,7 +21,7 @@ module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefa if (Type(proto) !== 'Object') { if (!(constructor instanceof $Function)) { // ignore other realms, for now - throw new $TypeError('cross-realm constructors not currently supported'); + throw new $SyntaxError('cross-realm constructors not currently supported'); } proto = intrinsic; } diff --git a/node_modules/es-abstract/2015/GetSubstitution.js b/node_modules/es-abstract/2015/GetSubstitution.js index 5bdce38b6..a60d42136 100644 --- a/node_modules/es-abstract/2015/GetSubstitution.js +++ b/node_modules/es-abstract/2015/GetSubstitution.js @@ -8,7 +8,7 @@ var $parseInt = GetIntrinsic('%parseInt%'); var inspect = require('object-inspect'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var callBound = require('call-bind/callBound'); var every = require('../helpers/every'); diff --git a/node_modules/es-abstract/2015/GetV.js b/node_modules/es-abstract/2015/GetV.js index 2d8cc8246..2dcddb351 100644 --- a/node_modules/es-abstract/2015/GetV.js +++ b/node_modules/es-abstract/2015/GetV.js @@ -7,13 +7,7 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsPropertyKey = require('./IsPropertyKey'); var ToObject = require('./ToObject'); -/** - * 7.3.2 GetV (V, P) - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let O be ToObject(V). - * 3. ReturnIfAbrupt(O). - * 4. Return O.[[Get]](P, V). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-getv module.exports = function GetV(V, P) { // 7.3.2.1 diff --git a/node_modules/es-abstract/2015/IsArray.js b/node_modules/es-abstract/2015/IsArray.js index f933cec03..600ffa002 100644 --- a/node_modules/es-abstract/2015/IsArray.js +++ b/node_modules/es-abstract/2015/IsArray.js @@ -1,14 +1,4 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $Array = GetIntrinsic('%Array%'); - -// eslint-disable-next-line global-require -var toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString'); - // https://ecma-international.org/ecma-262/6.0/#sec-isarray - -module.exports = $Array.isArray || function IsArray(argument) { - return toStr(argument) === '[object Array]'; -}; +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2015/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2015/IsCompatiblePropertyDescriptor.js new file mode 100644 index 000000000..8bdaf3eb4 --- /dev/null +++ b/node_modules/es-abstract/2015/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2015/IsDetachedBuffer.js b/node_modules/es-abstract/2015/IsDetachedBuffer.js new file mode 100644 index 000000000..4b373e9ab --- /dev/null +++ b/node_modules/es-abstract/2015/IsDetachedBuffer.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('%ArrayBuffer.prototype.byteLength%', true) + || function byteLength(ab) { return ab.byteLength; }; // in node < 0.11, byteLength is an own nonconfigurable property + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2015/IsExtensible.js b/node_modules/es-abstract/2015/IsExtensible.js index 9df5b80b1..d6e363840 100644 --- a/node_modules/es-abstract/2015/IsExtensible.js +++ b/node_modules/es-abstract/2015/IsExtensible.js @@ -2,13 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $Object = GetIntrinsic('%Object%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); var isPrimitive = require('../helpers/isPrimitive'); -var $preventExtensions = $Object.preventExtensions; -var $isExtensible = $Object.isExtensible; - // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o module.exports = $preventExtensions diff --git a/node_modules/es-abstract/2015/IteratorClose.js b/node_modules/es-abstract/2015/IteratorClose.js index dd1118df7..f703ea632 100644 --- a/node_modules/es-abstract/2015/IteratorClose.js +++ b/node_modules/es-abstract/2015/IteratorClose.js @@ -5,6 +5,7 @@ var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); var GetMethod = require('./GetMethod'); var IsCallable = require('./IsCallable'); var Type = require('./Type'); @@ -15,10 +16,10 @@ module.exports = function IteratorClose(iterator, completion) { if (Type(iterator) !== 'Object') { throw new $TypeError('Assertion failed: Type(iterator) is not Object'); } - if (!IsCallable(completion)) { - throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); } - var completionThunk = completion; + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; var iteratorReturn = GetMethod(iterator, 'return'); diff --git a/node_modules/es-abstract/2015/NormalCompletion.js b/node_modules/es-abstract/2015/NormalCompletion.js new file mode 100644 index 000000000..1e429dd65 --- /dev/null +++ b/node_modules/es-abstract/2015/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2015/ObjectCreate.js b/node_modules/es-abstract/2015/ObjectCreate.js index 2851a646d..1f4bb16af 100644 --- a/node_modules/es-abstract/2015/ObjectCreate.js +++ b/node_modules/es-abstract/2015/ObjectCreate.js @@ -6,9 +6,14 @@ var $ObjectCreate = GetIntrinsic('%Object.create%', true); var $TypeError = GetIntrinsic('%TypeError%'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var IsArray = require('./IsArray'); var Type = require('./Type'); -var hasProto = !({ __proto__: null } instanceof Object); +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); // https://ecma-international.org/ecma-262/6.0/#sec-objectcreate @@ -16,22 +21,30 @@ module.exports = function ObjectCreate(proto, internalSlotsList) { if (proto !== null && Type(proto) !== 'Object') { throw new $TypeError('Assertion failed: `proto` must be null or an object'); } - var slots = arguments.length < 2 ? [] : internalSlotsList; - if (slots.length > 0) { - throw new $SyntaxError('es-abstract does not yet support internal slots'); + var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1 + if (arguments.length >= 2 && !IsArray(slots)) { + throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array'); } + var O; if ($ObjectCreate) { - return $ObjectCreate(proto); - } - if (hasProto) { - return { __proto__: proto }; + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); } - if (proto === null) { - throw new $SyntaxError('native Object.create support is required to create null objects'); + if (slots.length > 0) { + forEach(slots, function (slot) { + SLOT.set(O, slot, void undefined); + }); } - var T = function T() {}; - T.prototype = proto; - return new T(); + + return O; // step 6 }; diff --git a/node_modules/es-abstract/2015/ObjectDefineProperties.js b/node_modules/es-abstract/2015/ObjectDefineProperties.js new file mode 100644 index 000000000..f096f1ede --- /dev/null +++ b/node_modules/es-abstract/2015/ObjectDefineProperties.js @@ -0,0 +1,40 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + desc = FromPropertyDescriptor(desc); // TODO: remove this once DefinePropertyOrThrow is fixed + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2015/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2015/OrdinaryDefineOwnProperty.js index 5d33aa6d6..34f029f7e 100644 --- a/node_modules/es-abstract/2015/OrdinaryDefineOwnProperty.js +++ b/node_modules/es-abstract/2015/OrdinaryDefineOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); diff --git a/node_modules/es-abstract/2015/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2015/OrdinaryGetOwnProperty.js index 3d11e9fad..fd8035acb 100644 --- a/node_modules/es-abstract/2015/OrdinaryGetOwnProperty.js +++ b/node_modules/es-abstract/2015/OrdinaryGetOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var callBound = require('call-bind/callBound'); diff --git a/node_modules/es-abstract/2015/Set.js b/node_modules/es-abstract/2015/Set.js index ea49e813f..097149887 100644 --- a/node_modules/es-abstract/2015/Set.js +++ b/node_modules/es-abstract/2015/Set.js @@ -36,12 +36,12 @@ module.exports = function Set(O, P, V, Throw) { throw new $TypeError('Attempted to assign to readonly property.'); } return true; - } else { - try { - O[P] = V; // eslint-disable-line no-param-reassign - return noThrowOnStrictViolation ? SameValue(O[P], V) : true; - } catch (e) { - return false; - } } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + }; diff --git a/node_modules/es-abstract/2015/SetFunctionName.js b/node_modules/es-abstract/2015/SetFunctionName.js index f59cb7b9e..03ec2227c 100644 --- a/node_modules/es-abstract/2015/SetFunctionName.js +++ b/node_modules/es-abstract/2015/SetFunctionName.js @@ -6,7 +6,7 @@ var has = require('has'); var $TypeError = GetIntrinsic('%TypeError%'); -var getSymbolDescription = require('../helpers/getSymbolDescription'); +var getSymbolDescription = require('get-symbol-description'); var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); var IsExtensible = require('./IsExtensible'); diff --git a/node_modules/es-abstract/2015/SetIntegrityLevel.js b/node_modules/es-abstract/2015/SetIntegrityLevel.js index 1ac7d61e2..546f3e74f 100644 --- a/node_modules/es-abstract/2015/SetIntegrityLevel.js +++ b/node_modules/es-abstract/2015/SetIntegrityLevel.js @@ -4,9 +4,9 @@ var GetIntrinsic = require('get-intrinsic'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); -var $preventExtensions = GetIntrinsic('%Object.preventExtensions%'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); var forEach = require('../helpers/forEach'); diff --git a/node_modules/es-abstract/2015/StringCreate.js b/node_modules/es-abstract/2015/StringCreate.js index da0c0ea06..bd02820f7 100644 --- a/node_modules/es-abstract/2015/StringCreate.js +++ b/node_modules/es-abstract/2015/StringCreate.js @@ -20,7 +20,7 @@ module.exports = function StringCreate(value, prototype) { } var S = $Object(value); - if (S !== $StringPrototype) { + if (prototype !== $StringPrototype) { if (setProto) { setProto(S, prototype); } else { diff --git a/node_modules/es-abstract/2015/TestIntegrityLevel.js b/node_modules/es-abstract/2015/TestIntegrityLevel.js index cf1649c1b..7f95a6e1d 100644 --- a/node_modules/es-abstract/2015/TestIntegrityLevel.js +++ b/node_modules/es-abstract/2015/TestIntegrityLevel.js @@ -2,11 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); var IsDataDescriptor = require('./IsDataDescriptor'); var IsExtensible = require('./IsExtensible'); @@ -26,7 +26,7 @@ module.exports = function TestIntegrityLevel(O, level) { if (status) { return false; } - var theKeys = $gOPN(O); + var theKeys = OwnPropertyKeys(O); return theKeys.length === 0 || every(theKeys, function (k) { var currentDesc = $gOPD(O, k); if (typeof currentDesc !== 'undefined') { diff --git a/node_modules/es-abstract/2015/ToNumber.js b/node_modules/es-abstract/2015/ToNumber.js index e776bb2b7..95bdd9ecd 100644 --- a/node_modules/es-abstract/2015/ToNumber.js +++ b/node_modules/es-abstract/2015/ToNumber.js @@ -8,7 +8,7 @@ var $RegExp = GetIntrinsic('%RegExp%'); var $parseInteger = GetIntrinsic('%parseInt%'); var callBound = require('call-bind/callBound'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var isPrimitive = require('../helpers/isPrimitive'); var $strSlice = callBound('String.prototype.slice'); @@ -48,12 +48,12 @@ module.exports = function ToNumber(argument) { return ToNumber($parseInteger($strSlice(value, 2), 8)); } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { return NaN; - } else { - var trimmed = $trim(value); - if (trimmed !== value) { - return ToNumber(trimmed); - } } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + } return $Number(value); }; diff --git a/node_modules/es-abstract/2015/ValidateTypedArray.js b/node_modules/es-abstract/2015/ValidateTypedArray.js new file mode 100644 index 000000000..83df3a81c --- /dev/null +++ b/node_modules/es-abstract/2015/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('%TypedArray.prototype.some%', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2015/max.js b/node_modules/es-abstract/2015/max.js new file mode 100644 index 000000000..b919d4e83 --- /dev/null +++ b/node_modules/es-abstract/2015/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2015/min.js b/node_modules/es-abstract/2015/min.js new file mode 100644 index 000000000..909de4b0e --- /dev/null +++ b/node_modules/es-abstract/2015/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2015/thisTimeValue.js b/node_modules/es-abstract/2015/thisTimeValue.js index 12548fa4f..4687950f1 100644 --- a/node_modules/es-abstract/2015/thisTimeValue.js +++ b/node_modules/es-abstract/2015/thisTimeValue.js @@ -1,9 +1,9 @@ 'use strict'; -var $DateValueOf = require('call-bind/callBound')('Date.prototype.valueOf'); +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object module.exports = function thisTimeValue(value) { - return $DateValueOf(value); + return $DateGetTime(value); }; diff --git a/node_modules/es-abstract/2016/ArrayCreate.js b/node_modules/es-abstract/2016/ArrayCreate.js index 4d20e2e5e..cc890cafb 100644 --- a/node_modules/es-abstract/2016/ArrayCreate.js +++ b/node_modules/es-abstract/2016/ArrayCreate.js @@ -9,16 +9,17 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsInteger = require('./IsInteger'); +var hasProto = require('has-proto')(); + var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( - // eslint-disable-next-line no-proto, no-negated-condition - [].__proto__ !== $ArrayPrototype - ? null - : function (O, proto) { + hasProto + ? function (O, proto) { O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign return O; } + : null ); // https://ecma-international.org/ecma-262/6.0/#sec-arraycreate @@ -42,12 +43,12 @@ module.exports = function ArrayCreate(length) { A.length = length; } /* step 10, the above as a shortcut for the below - OrdinaryDefineOwnProperty(A, 'length', { - '[[Configurable]]': false, - '[[Enumerable]]': false, - '[[Value]]': length, - '[[Writable]]': true - }); - */ + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ return A; }; diff --git a/node_modules/es-abstract/2016/CharacterRange.js b/node_modules/es-abstract/2016/CharacterRange.js new file mode 100644 index 000000000..70e4b5235 --- /dev/null +++ b/node_modules/es-abstract/2016/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('%String.prototype.charCodeAt%'); +var $push = callBound('%Array.prototype.push%'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2016/CompletionRecord.js b/node_modules/es-abstract/2016/CompletionRecord.js new file mode 100644 index 000000000..370a5677f --- /dev/null +++ b/node_modules/es-abstract/2016/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2016/CreateDataProperty.js b/node_modules/es-abstract/2016/CreateDataProperty.js index ff5ca3055..02c6cd1f8 100644 --- a/node_modules/es-abstract/2016/CreateDataProperty.js +++ b/node_modules/es-abstract/2016/CreateDataProperty.js @@ -25,8 +25,8 @@ module.exports = function CreateDataProperty(O, P, V) { } var oldDesc = OrdinaryGetOwnProperty(O, P); var extensible = !oldDesc || IsExtensible(O); - var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']); - if (immutable || !extensible) { + var nonConfigurable = oldDesc && !oldDesc['[[Configurable]]']; + if (nonConfigurable || !extensible) { return false; } return DefineOwnProperty( diff --git a/node_modules/es-abstract/2016/DetachArrayBuffer.js b/node_modules/es-abstract/2016/DetachArrayBuffer.js new file mode 100644 index 000000000..a7b89b36b --- /dev/null +++ b/node_modules/es-abstract/2016/DetachArrayBuffer.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; // node 11.7+ +} catch (e) { /**/ } + +// https://262.ecma-international.org/6.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2016/FromPropertyDescriptor.js b/node_modules/es-abstract/2016/FromPropertyDescriptor.js index 9a69a2605..e142ed582 100644 --- a/node_modules/es-abstract/2016/FromPropertyDescriptor.js +++ b/node_modules/es-abstract/2016/FromPropertyDescriptor.js @@ -1,36 +1,16 @@ 'use strict'; var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); var Type = require('./Type'); // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor module.exports = function FromPropertyDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return Desc; + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); } - assertRecord(Type, 'Property Descriptor', 'Desc', Desc); - - var obj = {}; - if ('[[Value]]' in Desc) { - obj.value = Desc['[[Value]]']; - } - if ('[[Writable]]' in Desc) { - obj.writable = Desc['[[Writable]]']; - } - if ('[[Get]]' in Desc) { - obj.get = Desc['[[Get]]']; - } - if ('[[Set]]' in Desc) { - obj.set = Desc['[[Set]]']; - } - if ('[[Enumerable]]' in Desc) { - obj.enumerable = Desc['[[Enumerable]]']; - } - if ('[[Configurable]]' in Desc) { - obj.configurable = Desc['[[Configurable]]']; - } - return obj; + return fromPropertyDescriptor(Desc); }; diff --git a/node_modules/es-abstract/2016/Get.js b/node_modules/es-abstract/2016/Get.js index 681055a2f..297968643 100644 --- a/node_modules/es-abstract/2016/Get.js +++ b/node_modules/es-abstract/2016/Get.js @@ -9,12 +9,7 @@ var inspect = require('object-inspect'); var IsPropertyKey = require('./IsPropertyKey'); var Type = require('./Type'); -/** - * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p - * 1. Assert: Type(O) is Object. - * 2. Assert: IsPropertyKey(P) is true. - * 3. Return O.[[Get]](P, O). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p module.exports = function Get(O, P) { // 7.3.1.1 diff --git a/node_modules/es-abstract/2016/GetGlobalObject.js b/node_modules/es-abstract/2016/GetGlobalObject.js new file mode 100644 index 000000000..0541ede0c --- /dev/null +++ b/node_modules/es-abstract/2016/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2016/GetIterator.js b/node_modules/es-abstract/2016/GetIterator.js index a2d3b16cb..892197a23 100644 --- a/node_modules/es-abstract/2016/GetIterator.js +++ b/node_modules/es-abstract/2016/GetIterator.js @@ -20,8 +20,7 @@ module.exports = function GetIterator(obj, method) { { AdvanceStringIndex: AdvanceStringIndex, GetMethod: GetMethod, - IsArray: IsArray, - Type: Type + IsArray: IsArray }, obj ); diff --git a/node_modules/es-abstract/2016/GetMethod.js b/node_modules/es-abstract/2016/GetMethod.js index 775d3fb95..d3775178e 100644 --- a/node_modules/es-abstract/2016/GetMethod.js +++ b/node_modules/es-abstract/2016/GetMethod.js @@ -8,15 +8,9 @@ var GetV = require('./GetV'); var IsCallable = require('./IsCallable'); var IsPropertyKey = require('./IsPropertyKey'); -/** - * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let func be GetV(O, P). - * 3. ReturnIfAbrupt(func). - * 4. If func is either undefined or null, return undefined. - * 5. If IsCallable(func) is false, throw a TypeError exception. - * 6. Return func. - */ +var debug = require('object-inspect'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getmethod module.exports = function GetMethod(O, P) { // 7.3.9.1 @@ -34,7 +28,7 @@ module.exports = function GetMethod(O, P) { // 7.3.9.5 if (!IsCallable(func)) { - throw new $TypeError(P + 'is not a function'); + throw new $TypeError(P + ' is not a function: ' + debug(func)); } // 7.3.9.6 diff --git a/node_modules/es-abstract/2016/GetOwnPropertyKeys.js b/node_modules/es-abstract/2016/GetOwnPropertyKeys.js index b8f4167f7..40c0b367f 100644 --- a/node_modules/es-abstract/2016/GetOwnPropertyKeys.js +++ b/node_modules/es-abstract/2016/GetOwnPropertyKeys.js @@ -6,8 +6,8 @@ var hasSymbols = require('has-symbols')(); var $TypeError = GetIntrinsic('%TypeError%'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); -var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); var keys = require('object-keys'); var esType = require('./Type'); diff --git a/node_modules/es-abstract/2016/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2016/GetPrototypeFromConstructor.js index 5f369cad8..25ee12f35 100644 --- a/node_modules/es-abstract/2016/GetPrototypeFromConstructor.js +++ b/node_modules/es-abstract/2016/GetPrototypeFromConstructor.js @@ -4,6 +4,7 @@ var GetIntrinsic = require('get-intrinsic'); var $Function = GetIntrinsic('%Function%'); var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); var Get = require('./Get'); var IsConstructor = require('./IsConstructor'); @@ -20,7 +21,7 @@ module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefa if (Type(proto) !== 'Object') { if (!(constructor instanceof $Function)) { // ignore other realms, for now - throw new $TypeError('cross-realm constructors not currently supported'); + throw new $SyntaxError('cross-realm constructors not currently supported'); } proto = intrinsic; } diff --git a/node_modules/es-abstract/2016/GetSubstitution.js b/node_modules/es-abstract/2016/GetSubstitution.js index 5bdce38b6..a60d42136 100644 --- a/node_modules/es-abstract/2016/GetSubstitution.js +++ b/node_modules/es-abstract/2016/GetSubstitution.js @@ -8,7 +8,7 @@ var $parseInt = GetIntrinsic('%parseInt%'); var inspect = require('object-inspect'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var callBound = require('call-bind/callBound'); var every = require('../helpers/every'); diff --git a/node_modules/es-abstract/2016/GetV.js b/node_modules/es-abstract/2016/GetV.js index 2d8cc8246..2dcddb351 100644 --- a/node_modules/es-abstract/2016/GetV.js +++ b/node_modules/es-abstract/2016/GetV.js @@ -7,13 +7,7 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsPropertyKey = require('./IsPropertyKey'); var ToObject = require('./ToObject'); -/** - * 7.3.2 GetV (V, P) - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let O be ToObject(V). - * 3. ReturnIfAbrupt(O). - * 4. Return O.[[Get]](P, V). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-getv module.exports = function GetV(V, P) { // 7.3.2.1 diff --git a/node_modules/es-abstract/2016/IsArray.js b/node_modules/es-abstract/2016/IsArray.js index f933cec03..600ffa002 100644 --- a/node_modules/es-abstract/2016/IsArray.js +++ b/node_modules/es-abstract/2016/IsArray.js @@ -1,14 +1,4 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $Array = GetIntrinsic('%Array%'); - -// eslint-disable-next-line global-require -var toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString'); - // https://ecma-international.org/ecma-262/6.0/#sec-isarray - -module.exports = $Array.isArray || function IsArray(argument) { - return toStr(argument) === '[object Array]'; -}; +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2016/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2016/IsCompatiblePropertyDescriptor.js new file mode 100644 index 000000000..8bdaf3eb4 --- /dev/null +++ b/node_modules/es-abstract/2016/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2016/IsDetachedBuffer.js b/node_modules/es-abstract/2016/IsDetachedBuffer.js new file mode 100644 index 000000000..4b373e9ab --- /dev/null +++ b/node_modules/es-abstract/2016/IsDetachedBuffer.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('%ArrayBuffer.prototype.byteLength%', true) + || function byteLength(ab) { return ab.byteLength; }; // in node < 0.11, byteLength is an own nonconfigurable property + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2016/IsExtensible.js b/node_modules/es-abstract/2016/IsExtensible.js index 9df5b80b1..d6e363840 100644 --- a/node_modules/es-abstract/2016/IsExtensible.js +++ b/node_modules/es-abstract/2016/IsExtensible.js @@ -2,13 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $Object = GetIntrinsic('%Object%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); var isPrimitive = require('../helpers/isPrimitive'); -var $preventExtensions = $Object.preventExtensions; -var $isExtensible = $Object.isExtensible; - // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o module.exports = $preventExtensions diff --git a/node_modules/es-abstract/2016/IterableToArrayLike.js b/node_modules/es-abstract/2016/IterableToArrayLike.js index a16bbba86..82c6c33d5 100644 --- a/node_modules/es-abstract/2016/IterableToArrayLike.js +++ b/node_modules/es-abstract/2016/IterableToArrayLike.js @@ -11,30 +11,13 @@ var IsArray = require('./IsArray'); var IteratorStep = require('./IteratorStep'); var IteratorValue = require('./IteratorValue'); var ToObject = require('./ToObject'); -var Type = require('./Type'); var ES = { AdvanceStringIndex: AdvanceStringIndex, GetMethod: GetMethod, - IsArray: IsArray, - Type: Type + IsArray: IsArray }; // https://262.ecma-international.org/7.0/#sec-iterabletoarraylike -/** - * 1. Let usingIterator be ? GetMethod(items, @@iterator). - * 2. If usingIterator is not undefined, then - * 1. Let iterator be ? GetIterator(items, usingIterator). - * 2. Let values be a new empty List. - * 3. Let next be true. - * 4. Repeat, while next is not false - * 1. Let next be ? IteratorStep(iterator). - * 2. If next is not false, then - * 1. Let nextValue be ? IteratorValue(next). - * 2. Append nextValue to the end of the List values. - * 5. Return CreateArrayFromList(values). - * 3. NOTE: items is not an Iterable so assume it is already an array-like object. - * 4. Return ! ToObject(items). - */ module.exports = function IterableToArrayLike(items) { var usingIterator = getIteratorMethod(ES, items); diff --git a/node_modules/es-abstract/2016/IteratorClose.js b/node_modules/es-abstract/2016/IteratorClose.js index dd1118df7..f703ea632 100644 --- a/node_modules/es-abstract/2016/IteratorClose.js +++ b/node_modules/es-abstract/2016/IteratorClose.js @@ -5,6 +5,7 @@ var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); var GetMethod = require('./GetMethod'); var IsCallable = require('./IsCallable'); var Type = require('./Type'); @@ -15,10 +16,10 @@ module.exports = function IteratorClose(iterator, completion) { if (Type(iterator) !== 'Object') { throw new $TypeError('Assertion failed: Type(iterator) is not Object'); } - if (!IsCallable(completion)) { - throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); } - var completionThunk = completion; + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; var iteratorReturn = GetMethod(iterator, 'return'); diff --git a/node_modules/es-abstract/2016/NormalCompletion.js b/node_modules/es-abstract/2016/NormalCompletion.js new file mode 100644 index 000000000..1e429dd65 --- /dev/null +++ b/node_modules/es-abstract/2016/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2016/ObjectCreate.js b/node_modules/es-abstract/2016/ObjectCreate.js index 2851a646d..1f4bb16af 100644 --- a/node_modules/es-abstract/2016/ObjectCreate.js +++ b/node_modules/es-abstract/2016/ObjectCreate.js @@ -6,9 +6,14 @@ var $ObjectCreate = GetIntrinsic('%Object.create%', true); var $TypeError = GetIntrinsic('%TypeError%'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var IsArray = require('./IsArray'); var Type = require('./Type'); -var hasProto = !({ __proto__: null } instanceof Object); +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); // https://ecma-international.org/ecma-262/6.0/#sec-objectcreate @@ -16,22 +21,30 @@ module.exports = function ObjectCreate(proto, internalSlotsList) { if (proto !== null && Type(proto) !== 'Object') { throw new $TypeError('Assertion failed: `proto` must be null or an object'); } - var slots = arguments.length < 2 ? [] : internalSlotsList; - if (slots.length > 0) { - throw new $SyntaxError('es-abstract does not yet support internal slots'); + var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1 + if (arguments.length >= 2 && !IsArray(slots)) { + throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array'); } + var O; if ($ObjectCreate) { - return $ObjectCreate(proto); - } - if (hasProto) { - return { __proto__: proto }; + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); } - if (proto === null) { - throw new $SyntaxError('native Object.create support is required to create null objects'); + if (slots.length > 0) { + forEach(slots, function (slot) { + SLOT.set(O, slot, void undefined); + }); } - var T = function T() {}; - T.prototype = proto; - return new T(); + + return O; // step 6 }; diff --git a/node_modules/es-abstract/2016/ObjectDefineProperties.js b/node_modules/es-abstract/2016/ObjectDefineProperties.js new file mode 100644 index 000000000..f096f1ede --- /dev/null +++ b/node_modules/es-abstract/2016/ObjectDefineProperties.js @@ -0,0 +1,40 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + desc = FromPropertyDescriptor(desc); // TODO: remove this once DefinePropertyOrThrow is fixed + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2016/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2016/OrdinaryDefineOwnProperty.js index 5d33aa6d6..34f029f7e 100644 --- a/node_modules/es-abstract/2016/OrdinaryDefineOwnProperty.js +++ b/node_modules/es-abstract/2016/OrdinaryDefineOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); diff --git a/node_modules/es-abstract/2016/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2016/OrdinaryGetOwnProperty.js index 3d11e9fad..fd8035acb 100644 --- a/node_modules/es-abstract/2016/OrdinaryGetOwnProperty.js +++ b/node_modules/es-abstract/2016/OrdinaryGetOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var callBound = require('call-bind/callBound'); diff --git a/node_modules/es-abstract/2016/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2016/OrdinarySetPrototypeOf.js index d0ff7a7c2..d2b72306c 100644 --- a/node_modules/es-abstract/2016/OrdinarySetPrototypeOf.js +++ b/node_modules/es-abstract/2016/OrdinarySetPrototypeOf.js @@ -16,15 +16,15 @@ module.exports = function OrdinarySetPrototypeOf(O, V) { throw new $TypeError('Assertion failed: V must be Object or Null'); } /* - var extensible = IsExtensible(O); - var current = OrdinaryGetPrototypeOf(O); - if (SameValue(V, current)) { - return true; - } - if (!extensible) { - return false; - } - */ + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ try { $setProto(O, V); } catch (e) { @@ -32,22 +32,22 @@ module.exports = function OrdinarySetPrototypeOf(O, V) { } return OrdinaryGetPrototypeOf(O) === V; /* - var p = V; - var done = false; - while (!done) { - if (p === null) { - done = true; - } else if (SameValue(p, O)) { - return false; - } else { - if (wat) { - done = true; - } else { - p = p.[[Prototype]]; - } - } - } - O.[[Prototype]] = V; - return true; - */ + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ }; diff --git a/node_modules/es-abstract/2016/Set.js b/node_modules/es-abstract/2016/Set.js index ea49e813f..097149887 100644 --- a/node_modules/es-abstract/2016/Set.js +++ b/node_modules/es-abstract/2016/Set.js @@ -36,12 +36,12 @@ module.exports = function Set(O, P, V, Throw) { throw new $TypeError('Attempted to assign to readonly property.'); } return true; - } else { - try { - O[P] = V; // eslint-disable-line no-param-reassign - return noThrowOnStrictViolation ? SameValue(O[P], V) : true; - } catch (e) { - return false; - } } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + }; diff --git a/node_modules/es-abstract/2016/SetFunctionName.js b/node_modules/es-abstract/2016/SetFunctionName.js index f59cb7b9e..03ec2227c 100644 --- a/node_modules/es-abstract/2016/SetFunctionName.js +++ b/node_modules/es-abstract/2016/SetFunctionName.js @@ -6,7 +6,7 @@ var has = require('has'); var $TypeError = GetIntrinsic('%TypeError%'); -var getSymbolDescription = require('../helpers/getSymbolDescription'); +var getSymbolDescription = require('get-symbol-description'); var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); var IsExtensible = require('./IsExtensible'); diff --git a/node_modules/es-abstract/2016/SetIntegrityLevel.js b/node_modules/es-abstract/2016/SetIntegrityLevel.js index 1ac7d61e2..546f3e74f 100644 --- a/node_modules/es-abstract/2016/SetIntegrityLevel.js +++ b/node_modules/es-abstract/2016/SetIntegrityLevel.js @@ -4,9 +4,9 @@ var GetIntrinsic = require('get-intrinsic'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); -var $preventExtensions = GetIntrinsic('%Object.preventExtensions%'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); var forEach = require('../helpers/forEach'); diff --git a/node_modules/es-abstract/2016/StringCreate.js b/node_modules/es-abstract/2016/StringCreate.js index da0c0ea06..bd02820f7 100644 --- a/node_modules/es-abstract/2016/StringCreate.js +++ b/node_modules/es-abstract/2016/StringCreate.js @@ -20,7 +20,7 @@ module.exports = function StringCreate(value, prototype) { } var S = $Object(value); - if (S !== $StringPrototype) { + if (prototype !== $StringPrototype) { if (setProto) { setProto(S, prototype); } else { diff --git a/node_modules/es-abstract/2016/TestIntegrityLevel.js b/node_modules/es-abstract/2016/TestIntegrityLevel.js index cf1649c1b..7f95a6e1d 100644 --- a/node_modules/es-abstract/2016/TestIntegrityLevel.js +++ b/node_modules/es-abstract/2016/TestIntegrityLevel.js @@ -2,11 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); var IsDataDescriptor = require('./IsDataDescriptor'); var IsExtensible = require('./IsExtensible'); @@ -26,7 +26,7 @@ module.exports = function TestIntegrityLevel(O, level) { if (status) { return false; } - var theKeys = $gOPN(O); + var theKeys = OwnPropertyKeys(O); return theKeys.length === 0 || every(theKeys, function (k) { var currentDesc = $gOPD(O, k); if (typeof currentDesc !== 'undefined') { diff --git a/node_modules/es-abstract/2016/ToNumber.js b/node_modules/es-abstract/2016/ToNumber.js index e776bb2b7..95bdd9ecd 100644 --- a/node_modules/es-abstract/2016/ToNumber.js +++ b/node_modules/es-abstract/2016/ToNumber.js @@ -8,7 +8,7 @@ var $RegExp = GetIntrinsic('%RegExp%'); var $parseInteger = GetIntrinsic('%parseInt%'); var callBound = require('call-bind/callBound'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var isPrimitive = require('../helpers/isPrimitive'); var $strSlice = callBound('String.prototype.slice'); @@ -48,12 +48,12 @@ module.exports = function ToNumber(argument) { return ToNumber($parseInteger($strSlice(value, 2), 8)); } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { return NaN; - } else { - var trimmed = $trim(value); - if (trimmed !== value) { - return ToNumber(trimmed); - } } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + } return $Number(value); }; diff --git a/node_modules/es-abstract/2016/ValidateTypedArray.js b/node_modules/es-abstract/2016/ValidateTypedArray.js new file mode 100644 index 000000000..83df3a81c --- /dev/null +++ b/node_modules/es-abstract/2016/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('%TypedArray.prototype.some%', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2016/max.js b/node_modules/es-abstract/2016/max.js new file mode 100644 index 000000000..b919d4e83 --- /dev/null +++ b/node_modules/es-abstract/2016/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2016/min.js b/node_modules/es-abstract/2016/min.js new file mode 100644 index 000000000..909de4b0e --- /dev/null +++ b/node_modules/es-abstract/2016/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2016/thisTimeValue.js b/node_modules/es-abstract/2016/thisTimeValue.js index 12548fa4f..4687950f1 100644 --- a/node_modules/es-abstract/2016/thisTimeValue.js +++ b/node_modules/es-abstract/2016/thisTimeValue.js @@ -1,9 +1,9 @@ 'use strict'; -var $DateValueOf = require('call-bind/callBound')('Date.prototype.valueOf'); +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object module.exports = function thisTimeValue(value) { - return $DateValueOf(value); + return $DateGetTime(value); }; diff --git a/node_modules/es-abstract/2017/ArrayCreate.js b/node_modules/es-abstract/2017/ArrayCreate.js index 4d20e2e5e..cc890cafb 100644 --- a/node_modules/es-abstract/2017/ArrayCreate.js +++ b/node_modules/es-abstract/2017/ArrayCreate.js @@ -9,16 +9,17 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsInteger = require('./IsInteger'); +var hasProto = require('has-proto')(); + var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( - // eslint-disable-next-line no-proto, no-negated-condition - [].__proto__ !== $ArrayPrototype - ? null - : function (O, proto) { + hasProto + ? function (O, proto) { O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign return O; } + : null ); // https://ecma-international.org/ecma-262/6.0/#sec-arraycreate @@ -42,12 +43,12 @@ module.exports = function ArrayCreate(length) { A.length = length; } /* step 10, the above as a shortcut for the below - OrdinaryDefineOwnProperty(A, 'length', { - '[[Configurable]]': false, - '[[Enumerable]]': false, - '[[Value]]': length, - '[[Writable]]': true - }); - */ + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ return A; }; diff --git a/node_modules/es-abstract/2017/CharacterRange.js b/node_modules/es-abstract/2017/CharacterRange.js new file mode 100644 index 000000000..70e4b5235 --- /dev/null +++ b/node_modules/es-abstract/2017/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('%String.prototype.charCodeAt%'); +var $push = callBound('%Array.prototype.push%'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2017/CompletionRecord.js b/node_modules/es-abstract/2017/CompletionRecord.js new file mode 100644 index 000000000..370a5677f --- /dev/null +++ b/node_modules/es-abstract/2017/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2017/CreateDataProperty.js b/node_modules/es-abstract/2017/CreateDataProperty.js index ff5ca3055..02c6cd1f8 100644 --- a/node_modules/es-abstract/2017/CreateDataProperty.js +++ b/node_modules/es-abstract/2017/CreateDataProperty.js @@ -25,8 +25,8 @@ module.exports = function CreateDataProperty(O, P, V) { } var oldDesc = OrdinaryGetOwnProperty(O, P); var extensible = !oldDesc || IsExtensible(O); - var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']); - if (immutable || !extensible) { + var nonConfigurable = oldDesc && !oldDesc['[[Configurable]]']; + if (nonConfigurable || !extensible) { return false; } return DefineOwnProperty( diff --git a/node_modules/es-abstract/2017/DetachArrayBuffer.js b/node_modules/es-abstract/2017/DetachArrayBuffer.js new file mode 100644 index 000000000..db77a07ec --- /dev/null +++ b/node_modules/es-abstract/2017/DetachArrayBuffer.js @@ -0,0 +1,35 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; // node 11.7+ +} catch (e) { /**/ } + +// https://262.ecma-international.org/8.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2017/FromPropertyDescriptor.js b/node_modules/es-abstract/2017/FromPropertyDescriptor.js index 9a69a2605..e142ed582 100644 --- a/node_modules/es-abstract/2017/FromPropertyDescriptor.js +++ b/node_modules/es-abstract/2017/FromPropertyDescriptor.js @@ -1,36 +1,16 @@ 'use strict'; var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); var Type = require('./Type'); // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor module.exports = function FromPropertyDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return Desc; + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); } - assertRecord(Type, 'Property Descriptor', 'Desc', Desc); - - var obj = {}; - if ('[[Value]]' in Desc) { - obj.value = Desc['[[Value]]']; - } - if ('[[Writable]]' in Desc) { - obj.writable = Desc['[[Writable]]']; - } - if ('[[Get]]' in Desc) { - obj.get = Desc['[[Get]]']; - } - if ('[[Set]]' in Desc) { - obj.set = Desc['[[Set]]']; - } - if ('[[Enumerable]]' in Desc) { - obj.enumerable = Desc['[[Enumerable]]']; - } - if ('[[Configurable]]' in Desc) { - obj.configurable = Desc['[[Configurable]]']; - } - return obj; + return fromPropertyDescriptor(Desc); }; diff --git a/node_modules/es-abstract/2017/Get.js b/node_modules/es-abstract/2017/Get.js index 681055a2f..297968643 100644 --- a/node_modules/es-abstract/2017/Get.js +++ b/node_modules/es-abstract/2017/Get.js @@ -9,12 +9,7 @@ var inspect = require('object-inspect'); var IsPropertyKey = require('./IsPropertyKey'); var Type = require('./Type'); -/** - * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p - * 1. Assert: Type(O) is Object. - * 2. Assert: IsPropertyKey(P) is true. - * 3. Return O.[[Get]](P, O). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p module.exports = function Get(O, P) { // 7.3.1.1 diff --git a/node_modules/es-abstract/2017/GetGlobalObject.js b/node_modules/es-abstract/2017/GetGlobalObject.js new file mode 100644 index 000000000..0541ede0c --- /dev/null +++ b/node_modules/es-abstract/2017/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2017/GetIterator.js b/node_modules/es-abstract/2017/GetIterator.js index a2d3b16cb..892197a23 100644 --- a/node_modules/es-abstract/2017/GetIterator.js +++ b/node_modules/es-abstract/2017/GetIterator.js @@ -20,8 +20,7 @@ module.exports = function GetIterator(obj, method) { { AdvanceStringIndex: AdvanceStringIndex, GetMethod: GetMethod, - IsArray: IsArray, - Type: Type + IsArray: IsArray }, obj ); diff --git a/node_modules/es-abstract/2017/GetMethod.js b/node_modules/es-abstract/2017/GetMethod.js index 775d3fb95..d3775178e 100644 --- a/node_modules/es-abstract/2017/GetMethod.js +++ b/node_modules/es-abstract/2017/GetMethod.js @@ -8,15 +8,9 @@ var GetV = require('./GetV'); var IsCallable = require('./IsCallable'); var IsPropertyKey = require('./IsPropertyKey'); -/** - * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let func be GetV(O, P). - * 3. ReturnIfAbrupt(func). - * 4. If func is either undefined or null, return undefined. - * 5. If IsCallable(func) is false, throw a TypeError exception. - * 6. Return func. - */ +var debug = require('object-inspect'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getmethod module.exports = function GetMethod(O, P) { // 7.3.9.1 @@ -34,7 +28,7 @@ module.exports = function GetMethod(O, P) { // 7.3.9.5 if (!IsCallable(func)) { - throw new $TypeError(P + 'is not a function'); + throw new $TypeError(P + ' is not a function: ' + debug(func)); } // 7.3.9.6 diff --git a/node_modules/es-abstract/2017/GetOwnPropertyKeys.js b/node_modules/es-abstract/2017/GetOwnPropertyKeys.js index b8f4167f7..40c0b367f 100644 --- a/node_modules/es-abstract/2017/GetOwnPropertyKeys.js +++ b/node_modules/es-abstract/2017/GetOwnPropertyKeys.js @@ -6,8 +6,8 @@ var hasSymbols = require('has-symbols')(); var $TypeError = GetIntrinsic('%TypeError%'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); -var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); var keys = require('object-keys'); var esType = require('./Type'); diff --git a/node_modules/es-abstract/2017/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2017/GetPrototypeFromConstructor.js index 5f369cad8..25ee12f35 100644 --- a/node_modules/es-abstract/2017/GetPrototypeFromConstructor.js +++ b/node_modules/es-abstract/2017/GetPrototypeFromConstructor.js @@ -4,6 +4,7 @@ var GetIntrinsic = require('get-intrinsic'); var $Function = GetIntrinsic('%Function%'); var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); var Get = require('./Get'); var IsConstructor = require('./IsConstructor'); @@ -20,7 +21,7 @@ module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefa if (Type(proto) !== 'Object') { if (!(constructor instanceof $Function)) { // ignore other realms, for now - throw new $TypeError('cross-realm constructors not currently supported'); + throw new $SyntaxError('cross-realm constructors not currently supported'); } proto = intrinsic; } diff --git a/node_modules/es-abstract/2017/GetSubstitution.js b/node_modules/es-abstract/2017/GetSubstitution.js index 5bdce38b6..a60d42136 100644 --- a/node_modules/es-abstract/2017/GetSubstitution.js +++ b/node_modules/es-abstract/2017/GetSubstitution.js @@ -8,7 +8,7 @@ var $parseInt = GetIntrinsic('%parseInt%'); var inspect = require('object-inspect'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var callBound = require('call-bind/callBound'); var every = require('../helpers/every'); diff --git a/node_modules/es-abstract/2017/GetV.js b/node_modules/es-abstract/2017/GetV.js index 2d8cc8246..2dcddb351 100644 --- a/node_modules/es-abstract/2017/GetV.js +++ b/node_modules/es-abstract/2017/GetV.js @@ -7,13 +7,7 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsPropertyKey = require('./IsPropertyKey'); var ToObject = require('./ToObject'); -/** - * 7.3.2 GetV (V, P) - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let O be ToObject(V). - * 3. ReturnIfAbrupt(O). - * 4. Return O.[[Get]](P, V). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-getv module.exports = function GetV(V, P) { // 7.3.2.1 diff --git a/node_modules/es-abstract/2017/IsArray.js b/node_modules/es-abstract/2017/IsArray.js index f933cec03..600ffa002 100644 --- a/node_modules/es-abstract/2017/IsArray.js +++ b/node_modules/es-abstract/2017/IsArray.js @@ -1,14 +1,4 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $Array = GetIntrinsic('%Array%'); - -// eslint-disable-next-line global-require -var toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString'); - // https://ecma-international.org/ecma-262/6.0/#sec-isarray - -module.exports = $Array.isArray || function IsArray(argument) { - return toStr(argument) === '[object Array]'; -}; +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2017/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2017/IsCompatiblePropertyDescriptor.js new file mode 100644 index 000000000..8bdaf3eb4 --- /dev/null +++ b/node_modules/es-abstract/2017/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2017/IsDetachedBuffer.js b/node_modules/es-abstract/2017/IsDetachedBuffer.js new file mode 100644 index 000000000..4b373e9ab --- /dev/null +++ b/node_modules/es-abstract/2017/IsDetachedBuffer.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('%ArrayBuffer.prototype.byteLength%', true) + || function byteLength(ab) { return ab.byteLength; }; // in node < 0.11, byteLength is an own nonconfigurable property + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2017/IsExtensible.js b/node_modules/es-abstract/2017/IsExtensible.js index 9df5b80b1..d6e363840 100644 --- a/node_modules/es-abstract/2017/IsExtensible.js +++ b/node_modules/es-abstract/2017/IsExtensible.js @@ -2,13 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $Object = GetIntrinsic('%Object%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); var isPrimitive = require('../helpers/isPrimitive'); -var $preventExtensions = $Object.preventExtensions; -var $isExtensible = $Object.isExtensible; - // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o module.exports = $preventExtensions diff --git a/node_modules/es-abstract/2017/IsSharedArrayBuffer.js b/node_modules/es-abstract/2017/IsSharedArrayBuffer.js new file mode 100644 index 000000000..8e96e33f3 --- /dev/null +++ b/node_modules/es-abstract/2017/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2017/IteratorClose.js b/node_modules/es-abstract/2017/IteratorClose.js index dd1118df7..f703ea632 100644 --- a/node_modules/es-abstract/2017/IteratorClose.js +++ b/node_modules/es-abstract/2017/IteratorClose.js @@ -5,6 +5,7 @@ var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); var GetMethod = require('./GetMethod'); var IsCallable = require('./IsCallable'); var Type = require('./Type'); @@ -15,10 +16,10 @@ module.exports = function IteratorClose(iterator, completion) { if (Type(iterator) !== 'Object') { throw new $TypeError('Assertion failed: Type(iterator) is not Object'); } - if (!IsCallable(completion)) { - throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); } - var completionThunk = completion; + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; var iteratorReturn = GetMethod(iterator, 'return'); diff --git a/node_modules/es-abstract/2017/NormalCompletion.js b/node_modules/es-abstract/2017/NormalCompletion.js new file mode 100644 index 000000000..1e429dd65 --- /dev/null +++ b/node_modules/es-abstract/2017/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2017/NumberToRawBytes.js b/node_modules/es-abstract/2017/NumberToRawBytes.js new file mode 100644 index 000000000..b26cd22fd --- /dev/null +++ b/node_modules/es-abstract/2017/NumberToRawBytes.js @@ -0,0 +1,198 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $floor = GetIntrinsic('%Math.floor%'); +var $log = GetIntrinsic('%Math.log%'); +var $log2E = GetIntrinsic('%Math.LOG2E%'); +var $log2 = GetIntrinsic('%Math.log2%', true) || function log2(x) { + return $log(x) * $log2E; +}; +var $parseInt = GetIntrinsic('%parseInt%'); +var $pow = GetIntrinsic('%Math.pow%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $reverse = callBound('Array.prototype.reverse'); +var $numberToString = callBound('Number.prototype.toString'); +var $strSlice = callBound('String.prototype.slice'); + +var abs = require('./abs'); +var hasOwnProperty = require('./HasOwnProperty'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); +var isFinite = require('../helpers/isFinite'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +// https://262.ecma-international.org/8.0/#sec-numbertorawbytes + +module.exports = function NumberToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number') { + throw new $TypeError('Assertion failed: `value` must be a Number'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var rawBytes = []; + var exponent; + + if (type === 'Float32') { // step 1 + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded + } + + var leastSig; + + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + + if (!isFinite(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + + var sign = value < 0 ? 1 : 0; + value = abs(value); // eslint-disable-line no-param-reassign + + exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; // eslint-disable-line no-param-reassign + } + + while (value < 1) { + exponent -= 1; + value *= 2; // eslint-disable-line no-param-reassign + } + + var mantissa = value - 1; + mantissa *= $pow(2, 23); + mantissa = $floor(mantissa); + + exponent += 127; + exponent = exponent << 23; + + var result = sign << 31; + result |= exponent; + result |= mantissa; + + var byte0 = result & 255; + result = result >> 8; + var byte1 = result & 255; + result = result >> 8; + var byte2 = result & 255; + result = result >> 8; + var byte3 = result & 255; + + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; + } else if (type === 'Float64') { // step 2 + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 0, leastSig] : [leastSig, 0, 0, 0, 0, 0, 0, 0]; + } + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 248, 127] : [127, 248, 0, 0, 0, 0, 0, 0]; + } + if (!isFinite(value)) { + var infBytes = value < 0 ? [0, 0, 0, 0, 0, 0, 240, 255] : [0, 0, 0, 0, 0, 0, 240, 127]; + return isLittleEndian ? infBytes : $reverse(infBytes); + } + + var isNegative = value < 0; + if (isNegative) { value = -value; } // eslint-disable-line no-param-reassign + + exponent = $floor($log2(value)); + var significand = (value / $pow(2, exponent)) - 1; + + var bitString = ''; + for (var i = 0; i < 52; i++) { + significand *= 2; + if (significand >= 1) { + bitString += '1'; + significand -= 1; + } else { + bitString += '0'; + } + } + + exponent += 1023; + var exponentBits = $numberToString(exponent, 2); + while (exponentBits.length < 11) { exponentBits = '0' + exponentBits; } + + var fullBitString = (isNegative ? '1' : '0') + exponentBits + bitString; + while (fullBitString.length < 64) { fullBitString = '0' + fullBitString; } + + for (i = 0; i < 8; i++) { + rawBytes[i] = $parseInt($strSlice(fullBitString, i * 8, (i + 1) * 8), 2); + } + + return isLittleEndian ? $reverse(rawBytes) : rawBytes; + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + /* + if (intValue >= 0) { // step 3.d + // Let rawBytes be a List containing the n-byte binary encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } else { // step 3.e + // Let rawBytes be a List containing the n-byte binary 2's complement encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } + */ + if (intValue < 0) { + intValue = intValue >>> 0; + } + for (i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = intValue & 0xff; + intValue = intValue >> 8; + } + + return rawBytes; // step 4 +}; diff --git a/node_modules/es-abstract/2017/ObjectCreate.js b/node_modules/es-abstract/2017/ObjectCreate.js index 2851a646d..1f4bb16af 100644 --- a/node_modules/es-abstract/2017/ObjectCreate.js +++ b/node_modules/es-abstract/2017/ObjectCreate.js @@ -6,9 +6,14 @@ var $ObjectCreate = GetIntrinsic('%Object.create%', true); var $TypeError = GetIntrinsic('%TypeError%'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var IsArray = require('./IsArray'); var Type = require('./Type'); -var hasProto = !({ __proto__: null } instanceof Object); +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); // https://ecma-international.org/ecma-262/6.0/#sec-objectcreate @@ -16,22 +21,30 @@ module.exports = function ObjectCreate(proto, internalSlotsList) { if (proto !== null && Type(proto) !== 'Object') { throw new $TypeError('Assertion failed: `proto` must be null or an object'); } - var slots = arguments.length < 2 ? [] : internalSlotsList; - if (slots.length > 0) { - throw new $SyntaxError('es-abstract does not yet support internal slots'); + var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1 + if (arguments.length >= 2 && !IsArray(slots)) { + throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array'); } + var O; if ($ObjectCreate) { - return $ObjectCreate(proto); - } - if (hasProto) { - return { __proto__: proto }; + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); } - if (proto === null) { - throw new $SyntaxError('native Object.create support is required to create null objects'); + if (slots.length > 0) { + forEach(slots, function (slot) { + SLOT.set(O, slot, void undefined); + }); } - var T = function T() {}; - T.prototype = proto; - return new T(); + + return O; // step 6 }; diff --git a/node_modules/es-abstract/2017/ObjectDefineProperties.js b/node_modules/es-abstract/2017/ObjectDefineProperties.js new file mode 100644 index 000000000..f096f1ede --- /dev/null +++ b/node_modules/es-abstract/2017/ObjectDefineProperties.js @@ -0,0 +1,40 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + desc = FromPropertyDescriptor(desc); // TODO: remove this once DefinePropertyOrThrow is fixed + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2017/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2017/OrdinaryDefineOwnProperty.js index 5d33aa6d6..34f029f7e 100644 --- a/node_modules/es-abstract/2017/OrdinaryDefineOwnProperty.js +++ b/node_modules/es-abstract/2017/OrdinaryDefineOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); diff --git a/node_modules/es-abstract/2017/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2017/OrdinaryGetOwnProperty.js index 3d11e9fad..fd8035acb 100644 --- a/node_modules/es-abstract/2017/OrdinaryGetOwnProperty.js +++ b/node_modules/es-abstract/2017/OrdinaryGetOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var callBound = require('call-bind/callBound'); diff --git a/node_modules/es-abstract/2017/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2017/OrdinarySetPrototypeOf.js index d0ff7a7c2..d2b72306c 100644 --- a/node_modules/es-abstract/2017/OrdinarySetPrototypeOf.js +++ b/node_modules/es-abstract/2017/OrdinarySetPrototypeOf.js @@ -16,15 +16,15 @@ module.exports = function OrdinarySetPrototypeOf(O, V) { throw new $TypeError('Assertion failed: V must be Object or Null'); } /* - var extensible = IsExtensible(O); - var current = OrdinaryGetPrototypeOf(O); - if (SameValue(V, current)) { - return true; - } - if (!extensible) { - return false; - } - */ + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ try { $setProto(O, V); } catch (e) { @@ -32,22 +32,22 @@ module.exports = function OrdinarySetPrototypeOf(O, V) { } return OrdinaryGetPrototypeOf(O) === V; /* - var p = V; - var done = false; - while (!done) { - if (p === null) { - done = true; - } else if (SameValue(p, O)) { - return false; - } else { - if (wat) { - done = true; - } else { - p = p.[[Prototype]]; - } - } - } - O.[[Prototype]] = V; - return true; - */ + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ }; diff --git a/node_modules/es-abstract/2017/OrdinaryToPrimitive.js b/node_modules/es-abstract/2017/OrdinaryToPrimitive.js new file mode 100644 index 000000000..e1dbe1427 --- /dev/null +++ b/node_modules/es-abstract/2017/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2017/RawBytesToNumber.js b/node_modules/es-abstract/2017/RawBytesToNumber.js new file mode 100644 index 000000000..5811dae40 --- /dev/null +++ b/node_modules/es-abstract/2017/RawBytesToNumber.js @@ -0,0 +1,145 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $pow = GetIntrinsic('%Math.pow%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charAt = callBound('String.prototype.charAt'); +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/8.0/#sec-rawbytestonumber + +module.exports = function RawBytesToNumber(type, rawBytes, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + // eslint-disable-next-line no-param-reassign + rawBytes = $reverse(rawBytes); // step 2 + } + + /* eslint no-redeclare: 1 */ + if (type === 'Float32') { // step 3 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value. +If value is an IEEE 754-2008 binary32 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = (rawBytes[3] & 0x80) >> 7; // first bit + var exponent = ((rawBytes[3] & 0x7F) << 1) // 7 bits from index 3 + | ((rawBytes[2] & 0x80) >> 7); // 1 bit from index 2 + var mantissa = ((rawBytes[2] & 0x7F) << 16) // 7 bits from index 2 + | (rawBytes[1] << 8) // 8 bits from index 1 + | rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign === 0 ? 0 : -0; + } + if (exponent === 0xFF && mantissa === 0) { + return sign === 0 ? Infinity : -Infinity; + } + if (exponent === 0xFF && mantissa !== 0) { + return NaN; + } + + exponent -= 127; // subtract the bias + + // return $pow(-1, sign) * mantissa / $pow(2, 23) * $pow(2, exponent); + // return $pow(-1, sign) * (mantissa + 0x1000000) * $pow(2, exponent - 23); + return $pow(-1, sign) * (1 + (mantissa / $pow(2, 23))) * $pow(2, exponent); + } + + if (type === 'Float64') { // step 4 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value. +If value is an IEEE 754-2008 binary64 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[7] & 0x80 ? -1 : 1; // first bit + var exponent = ((rawBytes[7] & 0x7F) << 4) // 7 bits from index 7 + | ((rawBytes[6] & 0xF0) >> 4); // 4 bits from index 6 + var mantissa = ((rawBytes[6] & 0x0F) * 0x1000000000000) // 4 bits from index 6 + + (rawBytes[5] * 0x10000000000) // 8 bits from index 5 + + (rawBytes[4] * 0x100000000) // 8 bits from index 4 + + (rawBytes[3] * 0x1000000) // 8 bits from index 3 + + (rawBytes[2] * 0x10000) // 8 bits from index 2 + + (rawBytes[1] * 0x100) // 8 bits from index 1 + + rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 0x7FF && mantissa !== 0) { + return NaN; + } + if (exponent === 0x7FF && mantissa === 0) { + return sign * Infinity; + } + + exponent -= 1023; // subtract the bias + + return sign * (mantissa + 0x10000000000000) * $pow(2, exponent - 52); + } + + // this is common to both branches + var intValue = 0; + for (var i = 0; i < rawBytes.length; i++) { + intValue |= rawBytes[i] << (8 * i); + } + /* + Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. + */ + + if ($charAt(type, 0) !== 'U') { // steps 5-6 + // Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length elementSize × 8. + var bitLength = elementSize * 8; + if (bitLength < 32) { + intValue = (intValue << (32 - bitLength)) >> (32 - bitLength); + } + } + + return intValue; // step 7 +}; diff --git a/node_modules/es-abstract/2017/Set.js b/node_modules/es-abstract/2017/Set.js index ea49e813f..097149887 100644 --- a/node_modules/es-abstract/2017/Set.js +++ b/node_modules/es-abstract/2017/Set.js @@ -36,12 +36,12 @@ module.exports = function Set(O, P, V, Throw) { throw new $TypeError('Attempted to assign to readonly property.'); } return true; - } else { - try { - O[P] = V; // eslint-disable-line no-param-reassign - return noThrowOnStrictViolation ? SameValue(O[P], V) : true; - } catch (e) { - return false; - } } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + }; diff --git a/node_modules/es-abstract/2017/SetFunctionName.js b/node_modules/es-abstract/2017/SetFunctionName.js index f59cb7b9e..03ec2227c 100644 --- a/node_modules/es-abstract/2017/SetFunctionName.js +++ b/node_modules/es-abstract/2017/SetFunctionName.js @@ -6,7 +6,7 @@ var has = require('has'); var $TypeError = GetIntrinsic('%TypeError%'); -var getSymbolDescription = require('../helpers/getSymbolDescription'); +var getSymbolDescription = require('get-symbol-description'); var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); var IsExtensible = require('./IsExtensible'); diff --git a/node_modules/es-abstract/2017/SetIntegrityLevel.js b/node_modules/es-abstract/2017/SetIntegrityLevel.js index 1ac7d61e2..546f3e74f 100644 --- a/node_modules/es-abstract/2017/SetIntegrityLevel.js +++ b/node_modules/es-abstract/2017/SetIntegrityLevel.js @@ -4,9 +4,9 @@ var GetIntrinsic = require('get-intrinsic'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); -var $preventExtensions = GetIntrinsic('%Object.preventExtensions%'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); var forEach = require('../helpers/forEach'); diff --git a/node_modules/es-abstract/2017/StringCreate.js b/node_modules/es-abstract/2017/StringCreate.js index da0c0ea06..bd02820f7 100644 --- a/node_modules/es-abstract/2017/StringCreate.js +++ b/node_modules/es-abstract/2017/StringCreate.js @@ -20,7 +20,7 @@ module.exports = function StringCreate(value, prototype) { } var S = $Object(value); - if (S !== $StringPrototype) { + if (prototype !== $StringPrototype) { if (setProto) { setProto(S, prototype); } else { diff --git a/node_modules/es-abstract/2017/TestIntegrityLevel.js b/node_modules/es-abstract/2017/TestIntegrityLevel.js index cf1649c1b..7f95a6e1d 100644 --- a/node_modules/es-abstract/2017/TestIntegrityLevel.js +++ b/node_modules/es-abstract/2017/TestIntegrityLevel.js @@ -2,11 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); var IsDataDescriptor = require('./IsDataDescriptor'); var IsExtensible = require('./IsExtensible'); @@ -26,7 +26,7 @@ module.exports = function TestIntegrityLevel(O, level) { if (status) { return false; } - var theKeys = $gOPN(O); + var theKeys = OwnPropertyKeys(O); return theKeys.length === 0 || every(theKeys, function (k) { var currentDesc = $gOPD(O, k); if (typeof currentDesc !== 'undefined') { diff --git a/node_modules/es-abstract/2017/ToNumber.js b/node_modules/es-abstract/2017/ToNumber.js index e776bb2b7..95bdd9ecd 100644 --- a/node_modules/es-abstract/2017/ToNumber.js +++ b/node_modules/es-abstract/2017/ToNumber.js @@ -8,7 +8,7 @@ var $RegExp = GetIntrinsic('%RegExp%'); var $parseInteger = GetIntrinsic('%parseInt%'); var callBound = require('call-bind/callBound'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var isPrimitive = require('../helpers/isPrimitive'); var $strSlice = callBound('String.prototype.slice'); @@ -48,12 +48,12 @@ module.exports = function ToNumber(argument) { return ToNumber($parseInteger($strSlice(value, 2), 8)); } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { return NaN; - } else { - var trimmed = $trim(value); - if (trimmed !== value) { - return ToNumber(trimmed); - } } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + } return $Number(value); }; diff --git a/node_modules/es-abstract/2017/ValidateAtomicAccess.js b/node_modules/es-abstract/2017/ValidateAtomicAccess.js new file mode 100644 index 000000000..e1c51c776 --- /dev/null +++ b/node_modules/es-abstract/2017/ValidateAtomicAccess.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); + +var isTypedArray = require('is-typed-array'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/8.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1 + } + + var accessIndex = ToIndex(requestIndex); // step 2 + + var length = typedArrayLength(typedArray); // step 3 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 5 + } + + return accessIndex; // step 6 +}; diff --git a/node_modules/es-abstract/2017/ValidateTypedArray.js b/node_modules/es-abstract/2017/ValidateTypedArray.js new file mode 100644 index 000000000..83df3a81c --- /dev/null +++ b/node_modules/es-abstract/2017/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('%TypedArray.prototype.some%', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2017/max.js b/node_modules/es-abstract/2017/max.js new file mode 100644 index 000000000..b919d4e83 --- /dev/null +++ b/node_modules/es-abstract/2017/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2017/min.js b/node_modules/es-abstract/2017/min.js new file mode 100644 index 000000000..909de4b0e --- /dev/null +++ b/node_modules/es-abstract/2017/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2017/thisTimeValue.js b/node_modules/es-abstract/2017/thisTimeValue.js index 12548fa4f..4687950f1 100644 --- a/node_modules/es-abstract/2017/thisTimeValue.js +++ b/node_modules/es-abstract/2017/thisTimeValue.js @@ -1,9 +1,9 @@ 'use strict'; -var $DateValueOf = require('call-bind/callBound')('Date.prototype.valueOf'); +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object module.exports = function thisTimeValue(value) { - return $DateValueOf(value); + return $DateGetTime(value); }; diff --git a/node_modules/es-abstract/2018/AbstractRelationalComparison.js b/node_modules/es-abstract/2018/AbstractRelationalComparison.js index 0dfed5ffe..7c6472f56 100644 --- a/node_modules/es-abstract/2018/AbstractRelationalComparison.js +++ b/node_modules/es-abstract/2018/AbstractRelationalComparison.js @@ -7,15 +7,14 @@ var $TypeError = GetIntrinsic('%TypeError%'); var $isNaN = require('../helpers/isNaN'); var $isFinite = require('../helpers/isFinite'); -var isPrefixOf = require('../helpers/isPrefixOf'); +var IsStringPrefix = require('./IsStringPrefix'); var ToNumber = require('./ToNumber'); var ToPrimitive = require('./ToPrimitive'); var Type = require('./Type'); -// https://262.ecma-international.org/5.1/#sec-11.8.5 +// https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison -// eslint-disable-next-line max-statements module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { if (Type(LeftFirst) !== 'Boolean') { throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); @@ -29,35 +28,34 @@ module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { py = ToPrimitive(y, $Number); px = ToPrimitive(x, $Number); } - var bothStrings = Type(px) === 'String' && Type(py) === 'String'; - if (!bothStrings) { - var nx = ToNumber(px); - var ny = ToNumber(py); - if ($isNaN(nx) || $isNaN(ny)) { - return undefined; - } - if ($isFinite(nx) && $isFinite(ny) && nx === ny) { - return false; - } - if (nx === Infinity) { - return false; - } - if (ny === Infinity) { - return true; - } - if (ny === -Infinity) { + if (Type(px) === 'String' && Type(py) === 'String') { + if (IsStringPrefix(py, px)) { return false; } - if (nx === -Infinity) { + if (IsStringPrefix(px, py)) { return true; } - return nx < ny; // by now, these are both nonzero, finite, and not equal + return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f + } + var nx = ToNumber(px); + var ny = ToNumber(py); + if ($isNaN(nx) || $isNaN(ny)) { + return undefined; + } + if ($isFinite(nx) && $isFinite(ny) && nx === ny) { + return false; + } + if (nx === Infinity) { + return false; + } + if (ny === Infinity) { + return true; } - if (isPrefixOf(py, px)) { + if (ny === -Infinity) { return false; } - if (isPrefixOf(px, py)) { + if (nx === -Infinity) { return true; } - return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f + return nx < ny; // by now, these are both nonzero, finite, and not equal }; diff --git a/node_modules/es-abstract/2018/ArrayCreate.js b/node_modules/es-abstract/2018/ArrayCreate.js index 4d20e2e5e..cc890cafb 100644 --- a/node_modules/es-abstract/2018/ArrayCreate.js +++ b/node_modules/es-abstract/2018/ArrayCreate.js @@ -9,16 +9,17 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsInteger = require('./IsInteger'); +var hasProto = require('has-proto')(); + var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( - // eslint-disable-next-line no-proto, no-negated-condition - [].__proto__ !== $ArrayPrototype - ? null - : function (O, proto) { + hasProto + ? function (O, proto) { O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign return O; } + : null ); // https://ecma-international.org/ecma-262/6.0/#sec-arraycreate @@ -42,12 +43,12 @@ module.exports = function ArrayCreate(length) { A.length = length; } /* step 10, the above as a shortcut for the below - OrdinaryDefineOwnProperty(A, 'length', { - '[[Configurable]]': false, - '[[Enumerable]]': false, - '[[Value]]': length, - '[[Writable]]': true - }); - */ + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ return A; }; diff --git a/node_modules/es-abstract/2018/AsyncIteratorClose.js b/node_modules/es-abstract/2018/AsyncIteratorClose.js new file mode 100644 index 000000000..eb72ef938 --- /dev/null +++ b/node_modules/es-abstract/2018/AsyncIteratorClose.js @@ -0,0 +1,62 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/9.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return new $Promise(function (resolve) { + var ret = GetMethod(iterator, 'return'); // step 4 + + if (typeof ret === 'undefined') { + resolve(completion); // step 5 + } else { + resolve($then( + new $Promise(function (resolve2) { + // process.exit(42); + resolve2(Call(ret, iterator, [])); // step 6 + }), + function (innerResult) { + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + }, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 8 + } else { + throw e; // step 9 + } + } + )); + } + }); +}; diff --git a/node_modules/es-abstract/2018/CharacterRange.js b/node_modules/es-abstract/2018/CharacterRange.js new file mode 100644 index 000000000..70e4b5235 --- /dev/null +++ b/node_modules/es-abstract/2018/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('%String.prototype.charCodeAt%'); +var $push = callBound('%Array.prototype.push%'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2018/CompletionRecord.js b/node_modules/es-abstract/2018/CompletionRecord.js new file mode 100644 index 000000000..370a5677f --- /dev/null +++ b/node_modules/es-abstract/2018/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2018/CopyDataProperties.js b/node_modules/es-abstract/2018/CopyDataProperties.js index b8f2802bb..c267c3723 100644 --- a/node_modules/es-abstract/2018/CopyDataProperties.js +++ b/node_modules/es-abstract/2018/CopyDataProperties.js @@ -55,8 +55,8 @@ module.exports = function CopyDataProperties(target, source, excludedItems) { var enumerable = $isEnumerable(fromObj, nextKey) || ( // this is to handle string keys being non-enumerable in older engines typeof source === 'string' - && nextKey >= 0 - && IsInteger(ToNumber(nextKey)) + && nextKey >= 0 + && IsInteger(ToNumber(nextKey)) ); if (excluded === false && enumerable) { var propValue = Get(fromObj, nextKey); diff --git a/node_modules/es-abstract/2018/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2018/CreateAsyncFromSyncIterator.js new file mode 100644 index 000000000..90250d10d --- /dev/null +++ b/node_modules/es-abstract/2018/CreateAsyncFromSyncIterator.js @@ -0,0 +1,155 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); +var IteratorValue = require('./IteratorValue'); +var ObjectCreate = require('./ObjectCreate'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +var assertRecord = require('../helpers/assertRecord'); + +var AsyncFromSyncIteratorContinuation = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $TypeError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://ecma-international.org/ecma-262/9.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = ObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = ObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2018/CreateDataProperty.js b/node_modules/es-abstract/2018/CreateDataProperty.js index ff5ca3055..02c6cd1f8 100644 --- a/node_modules/es-abstract/2018/CreateDataProperty.js +++ b/node_modules/es-abstract/2018/CreateDataProperty.js @@ -25,8 +25,8 @@ module.exports = function CreateDataProperty(O, P, V) { } var oldDesc = OrdinaryGetOwnProperty(O, P); var extensible = !oldDesc || IsExtensible(O); - var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']); - if (immutable || !extensible) { + var nonConfigurable = oldDesc && !oldDesc['[[Configurable]]']; + if (nonConfigurable || !extensible) { return false; } return DefineOwnProperty( diff --git a/node_modules/es-abstract/2018/DetachArrayBuffer.js b/node_modules/es-abstract/2018/DetachArrayBuffer.js new file mode 100644 index 000000000..03284729b --- /dev/null +++ b/node_modules/es-abstract/2018/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2018/EnumerableOwnPropertyNames.js b/node_modules/es-abstract/2018/EnumerableOwnPropertyNames.js index 44171b9eb..8e3177b6a 100644 --- a/node_modules/es-abstract/2018/EnumerableOwnPropertyNames.js +++ b/node_modules/es-abstract/2018/EnumerableOwnPropertyNames.js @@ -19,7 +19,7 @@ var Type = require('./Type'); // https://262.ecma-international.org/8.0/#sec-enumerableownproperties -module.exports = function EnumerableOwnProperties(O, kind) { +module.exports = function EnumerableOwnPropertyNames(O, kind) { if (Type(O) !== 'Object') { throw new $TypeError('Assertion failed: Type(O) is not Object'); } diff --git a/node_modules/es-abstract/2018/FromPropertyDescriptor.js b/node_modules/es-abstract/2018/FromPropertyDescriptor.js index 9a69a2605..e142ed582 100644 --- a/node_modules/es-abstract/2018/FromPropertyDescriptor.js +++ b/node_modules/es-abstract/2018/FromPropertyDescriptor.js @@ -1,36 +1,16 @@ 'use strict'; var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); var Type = require('./Type'); // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor module.exports = function FromPropertyDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return Desc; + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); } - assertRecord(Type, 'Property Descriptor', 'Desc', Desc); - - var obj = {}; - if ('[[Value]]' in Desc) { - obj.value = Desc['[[Value]]']; - } - if ('[[Writable]]' in Desc) { - obj.writable = Desc['[[Writable]]']; - } - if ('[[Get]]' in Desc) { - obj.get = Desc['[[Get]]']; - } - if ('[[Set]]' in Desc) { - obj.set = Desc['[[Set]]']; - } - if ('[[Enumerable]]' in Desc) { - obj.enumerable = Desc['[[Enumerable]]']; - } - if ('[[Configurable]]' in Desc) { - obj.configurable = Desc['[[Configurable]]']; - } - return obj; + return fromPropertyDescriptor(Desc); }; diff --git a/node_modules/es-abstract/2018/Get.js b/node_modules/es-abstract/2018/Get.js index 681055a2f..297968643 100644 --- a/node_modules/es-abstract/2018/Get.js +++ b/node_modules/es-abstract/2018/Get.js @@ -9,12 +9,7 @@ var inspect = require('object-inspect'); var IsPropertyKey = require('./IsPropertyKey'); var Type = require('./Type'); -/** - * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p - * 1. Assert: Type(O) is Object. - * 2. Assert: IsPropertyKey(P) is true. - * 3. Return O.[[Get]](P, O). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p module.exports = function Get(O, P) { // 7.3.1.1 diff --git a/node_modules/es-abstract/2018/GetGlobalObject.js b/node_modules/es-abstract/2018/GetGlobalObject.js new file mode 100644 index 000000000..0541ede0c --- /dev/null +++ b/node_modules/es-abstract/2018/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2018/GetIterator.js b/node_modules/es-abstract/2018/GetIterator.js index a2d3b16cb..892197a23 100644 --- a/node_modules/es-abstract/2018/GetIterator.js +++ b/node_modules/es-abstract/2018/GetIterator.js @@ -20,8 +20,7 @@ module.exports = function GetIterator(obj, method) { { AdvanceStringIndex: AdvanceStringIndex, GetMethod: GetMethod, - IsArray: IsArray, - Type: Type + IsArray: IsArray }, obj ); diff --git a/node_modules/es-abstract/2018/GetMethod.js b/node_modules/es-abstract/2018/GetMethod.js index 775d3fb95..d3775178e 100644 --- a/node_modules/es-abstract/2018/GetMethod.js +++ b/node_modules/es-abstract/2018/GetMethod.js @@ -8,15 +8,9 @@ var GetV = require('./GetV'); var IsCallable = require('./IsCallable'); var IsPropertyKey = require('./IsPropertyKey'); -/** - * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let func be GetV(O, P). - * 3. ReturnIfAbrupt(func). - * 4. If func is either undefined or null, return undefined. - * 5. If IsCallable(func) is false, throw a TypeError exception. - * 6. Return func. - */ +var debug = require('object-inspect'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getmethod module.exports = function GetMethod(O, P) { // 7.3.9.1 @@ -34,7 +28,7 @@ module.exports = function GetMethod(O, P) { // 7.3.9.5 if (!IsCallable(func)) { - throw new $TypeError(P + 'is not a function'); + throw new $TypeError(P + ' is not a function: ' + debug(func)); } // 7.3.9.6 diff --git a/node_modules/es-abstract/2018/GetOwnPropertyKeys.js b/node_modules/es-abstract/2018/GetOwnPropertyKeys.js index b8f4167f7..40c0b367f 100644 --- a/node_modules/es-abstract/2018/GetOwnPropertyKeys.js +++ b/node_modules/es-abstract/2018/GetOwnPropertyKeys.js @@ -6,8 +6,8 @@ var hasSymbols = require('has-symbols')(); var $TypeError = GetIntrinsic('%TypeError%'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); -var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); var keys = require('object-keys'); var esType = require('./Type'); diff --git a/node_modules/es-abstract/2018/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2018/GetPrototypeFromConstructor.js index 5f369cad8..25ee12f35 100644 --- a/node_modules/es-abstract/2018/GetPrototypeFromConstructor.js +++ b/node_modules/es-abstract/2018/GetPrototypeFromConstructor.js @@ -4,6 +4,7 @@ var GetIntrinsic = require('get-intrinsic'); var $Function = GetIntrinsic('%Function%'); var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); var Get = require('./Get'); var IsConstructor = require('./IsConstructor'); @@ -20,7 +21,7 @@ module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefa if (Type(proto) !== 'Object') { if (!(constructor instanceof $Function)) { // ignore other realms, for now - throw new $TypeError('cross-realm constructors not currently supported'); + throw new $SyntaxError('cross-realm constructors not currently supported'); } proto = intrinsic; } diff --git a/node_modules/es-abstract/2018/GetSubstitution.js b/node_modules/es-abstract/2018/GetSubstitution.js index a5a7a1bee..96bdcaafe 100644 --- a/node_modules/es-abstract/2018/GetSubstitution.js +++ b/node_modules/es-abstract/2018/GetSubstitution.js @@ -5,7 +5,7 @@ var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var callBound = require('call-bind/callBound'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var every = require('../helpers/every'); var $charAt = callBound('String.prototype.charAt'); diff --git a/node_modules/es-abstract/2018/GetV.js b/node_modules/es-abstract/2018/GetV.js index 2d8cc8246..2dcddb351 100644 --- a/node_modules/es-abstract/2018/GetV.js +++ b/node_modules/es-abstract/2018/GetV.js @@ -7,13 +7,7 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsPropertyKey = require('./IsPropertyKey'); var ToObject = require('./ToObject'); -/** - * 7.3.2 GetV (V, P) - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let O be ToObject(V). - * 3. ReturnIfAbrupt(O). - * 4. Return O.[[Get]](P, V). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-getv module.exports = function GetV(V, P) { // 7.3.2.1 diff --git a/node_modules/es-abstract/2018/IsArray.js b/node_modules/es-abstract/2018/IsArray.js index f933cec03..600ffa002 100644 --- a/node_modules/es-abstract/2018/IsArray.js +++ b/node_modules/es-abstract/2018/IsArray.js @@ -1,14 +1,4 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $Array = GetIntrinsic('%Array%'); - -// eslint-disable-next-line global-require -var toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString'); - // https://ecma-international.org/ecma-262/6.0/#sec-isarray - -module.exports = $Array.isArray || function IsArray(argument) { - return toStr(argument) === '[object Array]'; -}; +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2018/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2018/IsCompatiblePropertyDescriptor.js new file mode 100644 index 000000000..8bdaf3eb4 --- /dev/null +++ b/node_modules/es-abstract/2018/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2018/IsDetachedBuffer.js b/node_modules/es-abstract/2018/IsDetachedBuffer.js new file mode 100644 index 000000000..4b373e9ab --- /dev/null +++ b/node_modules/es-abstract/2018/IsDetachedBuffer.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('%ArrayBuffer.prototype.byteLength%', true) + || function byteLength(ab) { return ab.byteLength; }; // in node < 0.11, byteLength is an own nonconfigurable property + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2018/IsExtensible.js b/node_modules/es-abstract/2018/IsExtensible.js index 9df5b80b1..d6e363840 100644 --- a/node_modules/es-abstract/2018/IsExtensible.js +++ b/node_modules/es-abstract/2018/IsExtensible.js @@ -2,13 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $Object = GetIntrinsic('%Object%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); var isPrimitive = require('../helpers/isPrimitive'); -var $preventExtensions = $Object.preventExtensions; -var $isExtensible = $Object.isExtensible; - // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o module.exports = $preventExtensions diff --git a/node_modules/es-abstract/2018/IsSharedArrayBuffer.js b/node_modules/es-abstract/2018/IsSharedArrayBuffer.js new file mode 100644 index 000000000..8e96e33f3 --- /dev/null +++ b/node_modules/es-abstract/2018/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2018/IteratorClose.js b/node_modules/es-abstract/2018/IteratorClose.js index dd1118df7..f703ea632 100644 --- a/node_modules/es-abstract/2018/IteratorClose.js +++ b/node_modules/es-abstract/2018/IteratorClose.js @@ -5,6 +5,7 @@ var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); var GetMethod = require('./GetMethod'); var IsCallable = require('./IsCallable'); var Type = require('./Type'); @@ -15,10 +16,10 @@ module.exports = function IteratorClose(iterator, completion) { if (Type(iterator) !== 'Object') { throw new $TypeError('Assertion failed: Type(iterator) is not Object'); } - if (!IsCallable(completion)) { - throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); } - var completionThunk = completion; + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; var iteratorReturn = GetMethod(iterator, 'return'); diff --git a/node_modules/es-abstract/2018/NormalCompletion.js b/node_modules/es-abstract/2018/NormalCompletion.js new file mode 100644 index 000000000..1e429dd65 --- /dev/null +++ b/node_modules/es-abstract/2018/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2018/NumberToRawBytes.js b/node_modules/es-abstract/2018/NumberToRawBytes.js new file mode 100644 index 000000000..b26cd22fd --- /dev/null +++ b/node_modules/es-abstract/2018/NumberToRawBytes.js @@ -0,0 +1,198 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $floor = GetIntrinsic('%Math.floor%'); +var $log = GetIntrinsic('%Math.log%'); +var $log2E = GetIntrinsic('%Math.LOG2E%'); +var $log2 = GetIntrinsic('%Math.log2%', true) || function log2(x) { + return $log(x) * $log2E; +}; +var $parseInt = GetIntrinsic('%parseInt%'); +var $pow = GetIntrinsic('%Math.pow%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $reverse = callBound('Array.prototype.reverse'); +var $numberToString = callBound('Number.prototype.toString'); +var $strSlice = callBound('String.prototype.slice'); + +var abs = require('./abs'); +var hasOwnProperty = require('./HasOwnProperty'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); +var isFinite = require('../helpers/isFinite'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +// https://262.ecma-international.org/8.0/#sec-numbertorawbytes + +module.exports = function NumberToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number') { + throw new $TypeError('Assertion failed: `value` must be a Number'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var rawBytes = []; + var exponent; + + if (type === 'Float32') { // step 1 + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded + } + + var leastSig; + + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + + if (!isFinite(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + + var sign = value < 0 ? 1 : 0; + value = abs(value); // eslint-disable-line no-param-reassign + + exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; // eslint-disable-line no-param-reassign + } + + while (value < 1) { + exponent -= 1; + value *= 2; // eslint-disable-line no-param-reassign + } + + var mantissa = value - 1; + mantissa *= $pow(2, 23); + mantissa = $floor(mantissa); + + exponent += 127; + exponent = exponent << 23; + + var result = sign << 31; + result |= exponent; + result |= mantissa; + + var byte0 = result & 255; + result = result >> 8; + var byte1 = result & 255; + result = result >> 8; + var byte2 = result & 255; + result = result >> 8; + var byte3 = result & 255; + + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; + } else if (type === 'Float64') { // step 2 + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 0, leastSig] : [leastSig, 0, 0, 0, 0, 0, 0, 0]; + } + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 248, 127] : [127, 248, 0, 0, 0, 0, 0, 0]; + } + if (!isFinite(value)) { + var infBytes = value < 0 ? [0, 0, 0, 0, 0, 0, 240, 255] : [0, 0, 0, 0, 0, 0, 240, 127]; + return isLittleEndian ? infBytes : $reverse(infBytes); + } + + var isNegative = value < 0; + if (isNegative) { value = -value; } // eslint-disable-line no-param-reassign + + exponent = $floor($log2(value)); + var significand = (value / $pow(2, exponent)) - 1; + + var bitString = ''; + for (var i = 0; i < 52; i++) { + significand *= 2; + if (significand >= 1) { + bitString += '1'; + significand -= 1; + } else { + bitString += '0'; + } + } + + exponent += 1023; + var exponentBits = $numberToString(exponent, 2); + while (exponentBits.length < 11) { exponentBits = '0' + exponentBits; } + + var fullBitString = (isNegative ? '1' : '0') + exponentBits + bitString; + while (fullBitString.length < 64) { fullBitString = '0' + fullBitString; } + + for (i = 0; i < 8; i++) { + rawBytes[i] = $parseInt($strSlice(fullBitString, i * 8, (i + 1) * 8), 2); + } + + return isLittleEndian ? $reverse(rawBytes) : rawBytes; + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + /* + if (intValue >= 0) { // step 3.d + // Let rawBytes be a List containing the n-byte binary encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } else { // step 3.e + // Let rawBytes be a List containing the n-byte binary 2's complement encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } + */ + if (intValue < 0) { + intValue = intValue >>> 0; + } + for (i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = intValue & 0xff; + intValue = intValue >> 8; + } + + return rawBytes; // step 4 +}; diff --git a/node_modules/es-abstract/2018/ObjectCreate.js b/node_modules/es-abstract/2018/ObjectCreate.js index 2851a646d..1f4bb16af 100644 --- a/node_modules/es-abstract/2018/ObjectCreate.js +++ b/node_modules/es-abstract/2018/ObjectCreate.js @@ -6,9 +6,14 @@ var $ObjectCreate = GetIntrinsic('%Object.create%', true); var $TypeError = GetIntrinsic('%TypeError%'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var IsArray = require('./IsArray'); var Type = require('./Type'); -var hasProto = !({ __proto__: null } instanceof Object); +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); // https://ecma-international.org/ecma-262/6.0/#sec-objectcreate @@ -16,22 +21,30 @@ module.exports = function ObjectCreate(proto, internalSlotsList) { if (proto !== null && Type(proto) !== 'Object') { throw new $TypeError('Assertion failed: `proto` must be null or an object'); } - var slots = arguments.length < 2 ? [] : internalSlotsList; - if (slots.length > 0) { - throw new $SyntaxError('es-abstract does not yet support internal slots'); + var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1 + if (arguments.length >= 2 && !IsArray(slots)) { + throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array'); } + var O; if ($ObjectCreate) { - return $ObjectCreate(proto); - } - if (hasProto) { - return { __proto__: proto }; + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); } - if (proto === null) { - throw new $SyntaxError('native Object.create support is required to create null objects'); + if (slots.length > 0) { + forEach(slots, function (slot) { + SLOT.set(O, slot, void undefined); + }); } - var T = function T() {}; - T.prototype = proto; - return new T(); + + return O; // step 6 }; diff --git a/node_modules/es-abstract/2018/ObjectDefineProperties.js b/node_modules/es-abstract/2018/ObjectDefineProperties.js new file mode 100644 index 000000000..f096f1ede --- /dev/null +++ b/node_modules/es-abstract/2018/ObjectDefineProperties.js @@ -0,0 +1,40 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + desc = FromPropertyDescriptor(desc); // TODO: remove this once DefinePropertyOrThrow is fixed + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2018/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2018/OrdinaryDefineOwnProperty.js index 5d33aa6d6..34f029f7e 100644 --- a/node_modules/es-abstract/2018/OrdinaryDefineOwnProperty.js +++ b/node_modules/es-abstract/2018/OrdinaryDefineOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); diff --git a/node_modules/es-abstract/2018/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2018/OrdinaryGetOwnProperty.js index 3d11e9fad..fd8035acb 100644 --- a/node_modules/es-abstract/2018/OrdinaryGetOwnProperty.js +++ b/node_modules/es-abstract/2018/OrdinaryGetOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var callBound = require('call-bind/callBound'); diff --git a/node_modules/es-abstract/2018/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2018/OrdinarySetPrototypeOf.js index d0ff7a7c2..d2b72306c 100644 --- a/node_modules/es-abstract/2018/OrdinarySetPrototypeOf.js +++ b/node_modules/es-abstract/2018/OrdinarySetPrototypeOf.js @@ -16,15 +16,15 @@ module.exports = function OrdinarySetPrototypeOf(O, V) { throw new $TypeError('Assertion failed: V must be Object or Null'); } /* - var extensible = IsExtensible(O); - var current = OrdinaryGetPrototypeOf(O); - if (SameValue(V, current)) { - return true; - } - if (!extensible) { - return false; - } - */ + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ try { $setProto(O, V); } catch (e) { @@ -32,22 +32,22 @@ module.exports = function OrdinarySetPrototypeOf(O, V) { } return OrdinaryGetPrototypeOf(O) === V; /* - var p = V; - var done = false; - while (!done) { - if (p === null) { - done = true; - } else if (SameValue(p, O)) { - return false; - } else { - if (wat) { - done = true; - } else { - p = p.[[Prototype]]; - } - } - } - O.[[Prototype]] = V; - return true; - */ + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ }; diff --git a/node_modules/es-abstract/2018/OrdinaryToPrimitive.js b/node_modules/es-abstract/2018/OrdinaryToPrimitive.js new file mode 100644 index 000000000..e1dbe1427 --- /dev/null +++ b/node_modules/es-abstract/2018/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2018/RawBytesToNumber.js b/node_modules/es-abstract/2018/RawBytesToNumber.js new file mode 100644 index 000000000..5811dae40 --- /dev/null +++ b/node_modules/es-abstract/2018/RawBytesToNumber.js @@ -0,0 +1,145 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $pow = GetIntrinsic('%Math.pow%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charAt = callBound('String.prototype.charAt'); +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/8.0/#sec-rawbytestonumber + +module.exports = function RawBytesToNumber(type, rawBytes, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + // eslint-disable-next-line no-param-reassign + rawBytes = $reverse(rawBytes); // step 2 + } + + /* eslint no-redeclare: 1 */ + if (type === 'Float32') { // step 3 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value. +If value is an IEEE 754-2008 binary32 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = (rawBytes[3] & 0x80) >> 7; // first bit + var exponent = ((rawBytes[3] & 0x7F) << 1) // 7 bits from index 3 + | ((rawBytes[2] & 0x80) >> 7); // 1 bit from index 2 + var mantissa = ((rawBytes[2] & 0x7F) << 16) // 7 bits from index 2 + | (rawBytes[1] << 8) // 8 bits from index 1 + | rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign === 0 ? 0 : -0; + } + if (exponent === 0xFF && mantissa === 0) { + return sign === 0 ? Infinity : -Infinity; + } + if (exponent === 0xFF && mantissa !== 0) { + return NaN; + } + + exponent -= 127; // subtract the bias + + // return $pow(-1, sign) * mantissa / $pow(2, 23) * $pow(2, exponent); + // return $pow(-1, sign) * (mantissa + 0x1000000) * $pow(2, exponent - 23); + return $pow(-1, sign) * (1 + (mantissa / $pow(2, 23))) * $pow(2, exponent); + } + + if (type === 'Float64') { // step 4 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value. +If value is an IEEE 754-2008 binary64 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[7] & 0x80 ? -1 : 1; // first bit + var exponent = ((rawBytes[7] & 0x7F) << 4) // 7 bits from index 7 + | ((rawBytes[6] & 0xF0) >> 4); // 4 bits from index 6 + var mantissa = ((rawBytes[6] & 0x0F) * 0x1000000000000) // 4 bits from index 6 + + (rawBytes[5] * 0x10000000000) // 8 bits from index 5 + + (rawBytes[4] * 0x100000000) // 8 bits from index 4 + + (rawBytes[3] * 0x1000000) // 8 bits from index 3 + + (rawBytes[2] * 0x10000) // 8 bits from index 2 + + (rawBytes[1] * 0x100) // 8 bits from index 1 + + rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 0x7FF && mantissa !== 0) { + return NaN; + } + if (exponent === 0x7FF && mantissa === 0) { + return sign * Infinity; + } + + exponent -= 1023; // subtract the bias + + return sign * (mantissa + 0x10000000000000) * $pow(2, exponent - 52); + } + + // this is common to both branches + var intValue = 0; + for (var i = 0; i < rawBytes.length; i++) { + intValue |= rawBytes[i] << (8 * i); + } + /* + Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. + */ + + if ($charAt(type, 0) !== 'U') { // steps 5-6 + // Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length elementSize × 8. + var bitLength = elementSize * 8; + if (bitLength < 32) { + intValue = (intValue << (32 - bitLength)) >> (32 - bitLength); + } + } + + return intValue; // step 7 +}; diff --git a/node_modules/es-abstract/2018/Set.js b/node_modules/es-abstract/2018/Set.js index ea49e813f..097149887 100644 --- a/node_modules/es-abstract/2018/Set.js +++ b/node_modules/es-abstract/2018/Set.js @@ -36,12 +36,12 @@ module.exports = function Set(O, P, V, Throw) { throw new $TypeError('Attempted to assign to readonly property.'); } return true; - } else { - try { - O[P] = V; // eslint-disable-line no-param-reassign - return noThrowOnStrictViolation ? SameValue(O[P], V) : true; - } catch (e) { - return false; - } } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + }; diff --git a/node_modules/es-abstract/2018/SetFunctionName.js b/node_modules/es-abstract/2018/SetFunctionName.js index f59cb7b9e..03ec2227c 100644 --- a/node_modules/es-abstract/2018/SetFunctionName.js +++ b/node_modules/es-abstract/2018/SetFunctionName.js @@ -6,7 +6,7 @@ var has = require('has'); var $TypeError = GetIntrinsic('%TypeError%'); -var getSymbolDescription = require('../helpers/getSymbolDescription'); +var getSymbolDescription = require('get-symbol-description'); var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); var IsExtensible = require('./IsExtensible'); diff --git a/node_modules/es-abstract/2018/SetIntegrityLevel.js b/node_modules/es-abstract/2018/SetIntegrityLevel.js index 1ac7d61e2..546f3e74f 100644 --- a/node_modules/es-abstract/2018/SetIntegrityLevel.js +++ b/node_modules/es-abstract/2018/SetIntegrityLevel.js @@ -4,9 +4,9 @@ var GetIntrinsic = require('get-intrinsic'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); -var $preventExtensions = GetIntrinsic('%Object.preventExtensions%'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); var forEach = require('../helpers/forEach'); diff --git a/node_modules/es-abstract/2018/StringCreate.js b/node_modules/es-abstract/2018/StringCreate.js index da0c0ea06..bd02820f7 100644 --- a/node_modules/es-abstract/2018/StringCreate.js +++ b/node_modules/es-abstract/2018/StringCreate.js @@ -20,7 +20,7 @@ module.exports = function StringCreate(value, prototype) { } var S = $Object(value); - if (S !== $StringPrototype) { + if (prototype !== $StringPrototype) { if (setProto) { setProto(S, prototype); } else { diff --git a/node_modules/es-abstract/2018/TestIntegrityLevel.js b/node_modules/es-abstract/2018/TestIntegrityLevel.js index cf1649c1b..7f95a6e1d 100644 --- a/node_modules/es-abstract/2018/TestIntegrityLevel.js +++ b/node_modules/es-abstract/2018/TestIntegrityLevel.js @@ -2,11 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); var IsDataDescriptor = require('./IsDataDescriptor'); var IsExtensible = require('./IsExtensible'); @@ -26,7 +26,7 @@ module.exports = function TestIntegrityLevel(O, level) { if (status) { return false; } - var theKeys = $gOPN(O); + var theKeys = OwnPropertyKeys(O); return theKeys.length === 0 || every(theKeys, function (k) { var currentDesc = $gOPD(O, k); if (typeof currentDesc !== 'undefined') { diff --git a/node_modules/es-abstract/2018/ThrowCompletion.js b/node_modules/es-abstract/2018/ThrowCompletion.js new file mode 100644 index 000000000..b7d388a35 --- /dev/null +++ b/node_modules/es-abstract/2018/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2018/ToNumber.js b/node_modules/es-abstract/2018/ToNumber.js index e776bb2b7..95bdd9ecd 100644 --- a/node_modules/es-abstract/2018/ToNumber.js +++ b/node_modules/es-abstract/2018/ToNumber.js @@ -8,7 +8,7 @@ var $RegExp = GetIntrinsic('%RegExp%'); var $parseInteger = GetIntrinsic('%parseInt%'); var callBound = require('call-bind/callBound'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var isPrimitive = require('../helpers/isPrimitive'); var $strSlice = callBound('String.prototype.slice'); @@ -48,12 +48,12 @@ module.exports = function ToNumber(argument) { return ToNumber($parseInteger($strSlice(value, 2), 8)); } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { return NaN; - } else { - var trimmed = $trim(value); - if (trimmed !== value) { - return ToNumber(trimmed); - } } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + } return $Number(value); }; diff --git a/node_modules/es-abstract/2018/ValidateAtomicAccess.js b/node_modules/es-abstract/2018/ValidateAtomicAccess.js new file mode 100644 index 000000000..e1c51c776 --- /dev/null +++ b/node_modules/es-abstract/2018/ValidateAtomicAccess.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); + +var isTypedArray = require('is-typed-array'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/8.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1 + } + + var accessIndex = ToIndex(requestIndex); // step 2 + + var length = typedArrayLength(typedArray); // step 3 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 5 + } + + return accessIndex; // step 6 +}; diff --git a/node_modules/es-abstract/2018/ValidateTypedArray.js b/node_modules/es-abstract/2018/ValidateTypedArray.js new file mode 100644 index 000000000..83df3a81c --- /dev/null +++ b/node_modules/es-abstract/2018/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('%TypedArray.prototype.some%', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2018/max.js b/node_modules/es-abstract/2018/max.js new file mode 100644 index 000000000..b919d4e83 --- /dev/null +++ b/node_modules/es-abstract/2018/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2018/min.js b/node_modules/es-abstract/2018/min.js new file mode 100644 index 000000000..909de4b0e --- /dev/null +++ b/node_modules/es-abstract/2018/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2018/thisTimeValue.js b/node_modules/es-abstract/2018/thisTimeValue.js index 12548fa4f..4687950f1 100644 --- a/node_modules/es-abstract/2018/thisTimeValue.js +++ b/node_modules/es-abstract/2018/thisTimeValue.js @@ -1,9 +1,9 @@ 'use strict'; -var $DateValueOf = require('call-bind/callBound')('Date.prototype.valueOf'); +var $DateGetTime = require('call-bind/callBound')('Date.prototype.getTime'); // https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-date-prototype-object module.exports = function thisTimeValue(value) { - return $DateValueOf(value); + return $DateGetTime(value); }; diff --git a/node_modules/es-abstract/2019/AbstractRelationalComparison.js b/node_modules/es-abstract/2019/AbstractRelationalComparison.js index 0dfed5ffe..7c6472f56 100644 --- a/node_modules/es-abstract/2019/AbstractRelationalComparison.js +++ b/node_modules/es-abstract/2019/AbstractRelationalComparison.js @@ -7,15 +7,14 @@ var $TypeError = GetIntrinsic('%TypeError%'); var $isNaN = require('../helpers/isNaN'); var $isFinite = require('../helpers/isFinite'); -var isPrefixOf = require('../helpers/isPrefixOf'); +var IsStringPrefix = require('./IsStringPrefix'); var ToNumber = require('./ToNumber'); var ToPrimitive = require('./ToPrimitive'); var Type = require('./Type'); -// https://262.ecma-international.org/5.1/#sec-11.8.5 +// https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison -// eslint-disable-next-line max-statements module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { if (Type(LeftFirst) !== 'Boolean') { throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); @@ -29,35 +28,34 @@ module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { py = ToPrimitive(y, $Number); px = ToPrimitive(x, $Number); } - var bothStrings = Type(px) === 'String' && Type(py) === 'String'; - if (!bothStrings) { - var nx = ToNumber(px); - var ny = ToNumber(py); - if ($isNaN(nx) || $isNaN(ny)) { - return undefined; - } - if ($isFinite(nx) && $isFinite(ny) && nx === ny) { - return false; - } - if (nx === Infinity) { - return false; - } - if (ny === Infinity) { - return true; - } - if (ny === -Infinity) { + if (Type(px) === 'String' && Type(py) === 'String') { + if (IsStringPrefix(py, px)) { return false; } - if (nx === -Infinity) { + if (IsStringPrefix(px, py)) { return true; } - return nx < ny; // by now, these are both nonzero, finite, and not equal + return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f + } + var nx = ToNumber(px); + var ny = ToNumber(py); + if ($isNaN(nx) || $isNaN(ny)) { + return undefined; + } + if ($isFinite(nx) && $isFinite(ny) && nx === ny) { + return false; + } + if (nx === Infinity) { + return false; + } + if (ny === Infinity) { + return true; } - if (isPrefixOf(py, px)) { + if (ny === -Infinity) { return false; } - if (isPrefixOf(px, py)) { + if (nx === -Infinity) { return true; } - return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f + return nx < ny; // by now, these are both nonzero, finite, and not equal }; diff --git a/node_modules/es-abstract/2019/ArrayCreate.js b/node_modules/es-abstract/2019/ArrayCreate.js index 4d20e2e5e..cc890cafb 100644 --- a/node_modules/es-abstract/2019/ArrayCreate.js +++ b/node_modules/es-abstract/2019/ArrayCreate.js @@ -9,16 +9,17 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsInteger = require('./IsInteger'); +var hasProto = require('has-proto')(); + var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( - // eslint-disable-next-line no-proto, no-negated-condition - [].__proto__ !== $ArrayPrototype - ? null - : function (O, proto) { + hasProto + ? function (O, proto) { O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign return O; } + : null ); // https://ecma-international.org/ecma-262/6.0/#sec-arraycreate @@ -42,12 +43,12 @@ module.exports = function ArrayCreate(length) { A.length = length; } /* step 10, the above as a shortcut for the below - OrdinaryDefineOwnProperty(A, 'length', { - '[[Configurable]]': false, - '[[Enumerable]]': false, - '[[Value]]': length, - '[[Writable]]': true - }); - */ + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ return A; }; diff --git a/node_modules/es-abstract/2019/AsyncFromSyncIteratorContinuation.js b/node_modules/es-abstract/2019/AsyncFromSyncIteratorContinuation.js new file mode 100644 index 000000000..c1cc7a111 --- /dev/null +++ b/node_modules/es-abstract/2019/AsyncFromSyncIteratorContinuation.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var callBound = require('call-bind/callBound'); + +var CreateIterResultObject = require('./CreateIterResultObject'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorValue = require('./IteratorValue'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var $then = callBound('Promise.prototype.then', true); + +// https://ecma-international.org/ecma-262/10.0/#sec-asyncfromsynciteratorcontinuation + +module.exports = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; diff --git a/node_modules/es-abstract/2019/AsyncIteratorClose.js b/node_modules/es-abstract/2019/AsyncIteratorClose.js new file mode 100644 index 000000000..eb72ef938 --- /dev/null +++ b/node_modules/es-abstract/2019/AsyncIteratorClose.js @@ -0,0 +1,62 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/9.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return new $Promise(function (resolve) { + var ret = GetMethod(iterator, 'return'); // step 4 + + if (typeof ret === 'undefined') { + resolve(completion); // step 5 + } else { + resolve($then( + new $Promise(function (resolve2) { + // process.exit(42); + resolve2(Call(ret, iterator, [])); // step 6 + }), + function (innerResult) { + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + }, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 8 + } else { + throw e; // step 9 + } + } + )); + } + }); +}; diff --git a/node_modules/es-abstract/2019/CharacterRange.js b/node_modules/es-abstract/2019/CharacterRange.js new file mode 100644 index 000000000..70e4b5235 --- /dev/null +++ b/node_modules/es-abstract/2019/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('%String.prototype.charCodeAt%'); +var $push = callBound('%Array.prototype.push%'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2019/CompletionRecord.js b/node_modules/es-abstract/2019/CompletionRecord.js new file mode 100644 index 000000000..370a5677f --- /dev/null +++ b/node_modules/es-abstract/2019/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2019/CopyDataProperties.js b/node_modules/es-abstract/2019/CopyDataProperties.js index b8f2802bb..c267c3723 100644 --- a/node_modules/es-abstract/2019/CopyDataProperties.js +++ b/node_modules/es-abstract/2019/CopyDataProperties.js @@ -55,8 +55,8 @@ module.exports = function CopyDataProperties(target, source, excludedItems) { var enumerable = $isEnumerable(fromObj, nextKey) || ( // this is to handle string keys being non-enumerable in older engines typeof source === 'string' - && nextKey >= 0 - && IsInteger(ToNumber(nextKey)) + && nextKey >= 0 + && IsInteger(ToNumber(nextKey)) ); if (excluded === false && enumerable) { var propValue = Get(fromObj, nextKey); diff --git a/node_modules/es-abstract/2019/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2019/CreateAsyncFromSyncIterator.js new file mode 100644 index 000000000..dbdce9736 --- /dev/null +++ b/node_modules/es-abstract/2019/CreateAsyncFromSyncIterator.js @@ -0,0 +1,121 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation'); +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorNext = require('./IteratorNext'); +var ObjectCreate = require('./ObjectCreate'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var assertRecord = require('../helpers/assertRecord'); + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://ecma-international.org/ecma-262/10.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = ObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = ObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2019/CreateDataProperty.js b/node_modules/es-abstract/2019/CreateDataProperty.js index ff5ca3055..02c6cd1f8 100644 --- a/node_modules/es-abstract/2019/CreateDataProperty.js +++ b/node_modules/es-abstract/2019/CreateDataProperty.js @@ -25,8 +25,8 @@ module.exports = function CreateDataProperty(O, P, V) { } var oldDesc = OrdinaryGetOwnProperty(O, P); var extensible = !oldDesc || IsExtensible(O); - var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']); - if (immutable || !extensible) { + var nonConfigurable = oldDesc && !oldDesc['[[Configurable]]']; + if (nonConfigurable || !extensible) { return false; } return DefineOwnProperty( diff --git a/node_modules/es-abstract/2019/DetachArrayBuffer.js b/node_modules/es-abstract/2019/DetachArrayBuffer.js new file mode 100644 index 000000000..03284729b --- /dev/null +++ b/node_modules/es-abstract/2019/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js b/node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js index 44171b9eb..8e3177b6a 100644 --- a/node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js +++ b/node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js @@ -19,7 +19,7 @@ var Type = require('./Type'); // https://262.ecma-international.org/8.0/#sec-enumerableownproperties -module.exports = function EnumerableOwnProperties(O, kind) { +module.exports = function EnumerableOwnPropertyNames(O, kind) { if (Type(O) !== 'Object') { throw new $TypeError('Assertion failed: Type(O) is not Object'); } diff --git a/node_modules/es-abstract/2019/FromPropertyDescriptor.js b/node_modules/es-abstract/2019/FromPropertyDescriptor.js index 9a69a2605..e142ed582 100644 --- a/node_modules/es-abstract/2019/FromPropertyDescriptor.js +++ b/node_modules/es-abstract/2019/FromPropertyDescriptor.js @@ -1,36 +1,16 @@ 'use strict'; var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); var Type = require('./Type'); // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor module.exports = function FromPropertyDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return Desc; + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); } - assertRecord(Type, 'Property Descriptor', 'Desc', Desc); - - var obj = {}; - if ('[[Value]]' in Desc) { - obj.value = Desc['[[Value]]']; - } - if ('[[Writable]]' in Desc) { - obj.writable = Desc['[[Writable]]']; - } - if ('[[Get]]' in Desc) { - obj.get = Desc['[[Get]]']; - } - if ('[[Set]]' in Desc) { - obj.set = Desc['[[Set]]']; - } - if ('[[Enumerable]]' in Desc) { - obj.enumerable = Desc['[[Enumerable]]']; - } - if ('[[Configurable]]' in Desc) { - obj.configurable = Desc['[[Configurable]]']; - } - return obj; + return fromPropertyDescriptor(Desc); }; diff --git a/node_modules/es-abstract/2019/Get.js b/node_modules/es-abstract/2019/Get.js index 681055a2f..297968643 100644 --- a/node_modules/es-abstract/2019/Get.js +++ b/node_modules/es-abstract/2019/Get.js @@ -9,12 +9,7 @@ var inspect = require('object-inspect'); var IsPropertyKey = require('./IsPropertyKey'); var Type = require('./Type'); -/** - * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p - * 1. Assert: Type(O) is Object. - * 2. Assert: IsPropertyKey(P) is true. - * 3. Return O.[[Get]](P, O). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p module.exports = function Get(O, P) { // 7.3.1.1 diff --git a/node_modules/es-abstract/2019/GetGlobalObject.js b/node_modules/es-abstract/2019/GetGlobalObject.js new file mode 100644 index 000000000..0541ede0c --- /dev/null +++ b/node_modules/es-abstract/2019/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2019/GetIterator.js b/node_modules/es-abstract/2019/GetIterator.js index a2d3b16cb..892197a23 100644 --- a/node_modules/es-abstract/2019/GetIterator.js +++ b/node_modules/es-abstract/2019/GetIterator.js @@ -20,8 +20,7 @@ module.exports = function GetIterator(obj, method) { { AdvanceStringIndex: AdvanceStringIndex, GetMethod: GetMethod, - IsArray: IsArray, - Type: Type + IsArray: IsArray }, obj ); diff --git a/node_modules/es-abstract/2019/GetMethod.js b/node_modules/es-abstract/2019/GetMethod.js index 775d3fb95..d3775178e 100644 --- a/node_modules/es-abstract/2019/GetMethod.js +++ b/node_modules/es-abstract/2019/GetMethod.js @@ -8,15 +8,9 @@ var GetV = require('./GetV'); var IsCallable = require('./IsCallable'); var IsPropertyKey = require('./IsPropertyKey'); -/** - * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let func be GetV(O, P). - * 3. ReturnIfAbrupt(func). - * 4. If func is either undefined or null, return undefined. - * 5. If IsCallable(func) is false, throw a TypeError exception. - * 6. Return func. - */ +var debug = require('object-inspect'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getmethod module.exports = function GetMethod(O, P) { // 7.3.9.1 @@ -34,7 +28,7 @@ module.exports = function GetMethod(O, P) { // 7.3.9.5 if (!IsCallable(func)) { - throw new $TypeError(P + 'is not a function'); + throw new $TypeError(P + ' is not a function: ' + debug(func)); } // 7.3.9.6 diff --git a/node_modules/es-abstract/2019/GetOwnPropertyKeys.js b/node_modules/es-abstract/2019/GetOwnPropertyKeys.js index b8f4167f7..40c0b367f 100644 --- a/node_modules/es-abstract/2019/GetOwnPropertyKeys.js +++ b/node_modules/es-abstract/2019/GetOwnPropertyKeys.js @@ -6,8 +6,8 @@ var hasSymbols = require('has-symbols')(); var $TypeError = GetIntrinsic('%TypeError%'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); -var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); var keys = require('object-keys'); var esType = require('./Type'); diff --git a/node_modules/es-abstract/2019/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2019/GetPrototypeFromConstructor.js index 5f369cad8..25ee12f35 100644 --- a/node_modules/es-abstract/2019/GetPrototypeFromConstructor.js +++ b/node_modules/es-abstract/2019/GetPrototypeFromConstructor.js @@ -4,6 +4,7 @@ var GetIntrinsic = require('get-intrinsic'); var $Function = GetIntrinsic('%Function%'); var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); var Get = require('./Get'); var IsConstructor = require('./IsConstructor'); @@ -20,7 +21,7 @@ module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefa if (Type(proto) !== 'Object') { if (!(constructor instanceof $Function)) { // ignore other realms, for now - throw new $TypeError('cross-realm constructors not currently supported'); + throw new $SyntaxError('cross-realm constructors not currently supported'); } proto = intrinsic; } diff --git a/node_modules/es-abstract/2019/GetSubstitution.js b/node_modules/es-abstract/2019/GetSubstitution.js index a5a7a1bee..96bdcaafe 100644 --- a/node_modules/es-abstract/2019/GetSubstitution.js +++ b/node_modules/es-abstract/2019/GetSubstitution.js @@ -5,7 +5,7 @@ var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var callBound = require('call-bind/callBound'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var every = require('../helpers/every'); var $charAt = callBound('String.prototype.charAt'); diff --git a/node_modules/es-abstract/2019/GetV.js b/node_modules/es-abstract/2019/GetV.js index 2d8cc8246..2dcddb351 100644 --- a/node_modules/es-abstract/2019/GetV.js +++ b/node_modules/es-abstract/2019/GetV.js @@ -7,13 +7,7 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsPropertyKey = require('./IsPropertyKey'); var ToObject = require('./ToObject'); -/** - * 7.3.2 GetV (V, P) - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let O be ToObject(V). - * 3. ReturnIfAbrupt(O). - * 4. Return O.[[Get]](P, V). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-getv module.exports = function GetV(V, P) { // 7.3.2.1 diff --git a/node_modules/es-abstract/2019/IsArray.js b/node_modules/es-abstract/2019/IsArray.js index f933cec03..600ffa002 100644 --- a/node_modules/es-abstract/2019/IsArray.js +++ b/node_modules/es-abstract/2019/IsArray.js @@ -1,14 +1,4 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $Array = GetIntrinsic('%Array%'); - -// eslint-disable-next-line global-require -var toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString'); - // https://ecma-international.org/ecma-262/6.0/#sec-isarray - -module.exports = $Array.isArray || function IsArray(argument) { - return toStr(argument) === '[object Array]'; -}; +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2019/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2019/IsCompatiblePropertyDescriptor.js new file mode 100644 index 000000000..8bdaf3eb4 --- /dev/null +++ b/node_modules/es-abstract/2019/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2019/IsDetachedBuffer.js b/node_modules/es-abstract/2019/IsDetachedBuffer.js new file mode 100644 index 000000000..4b373e9ab --- /dev/null +++ b/node_modules/es-abstract/2019/IsDetachedBuffer.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('%ArrayBuffer.prototype.byteLength%', true) + || function byteLength(ab) { return ab.byteLength; }; // in node < 0.11, byteLength is an own nonconfigurable property + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2019/IsExtensible.js b/node_modules/es-abstract/2019/IsExtensible.js index 9df5b80b1..d6e363840 100644 --- a/node_modules/es-abstract/2019/IsExtensible.js +++ b/node_modules/es-abstract/2019/IsExtensible.js @@ -2,13 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $Object = GetIntrinsic('%Object%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); var isPrimitive = require('../helpers/isPrimitive'); -var $preventExtensions = $Object.preventExtensions; -var $isExtensible = $Object.isExtensible; - // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o module.exports = $preventExtensions diff --git a/node_modules/es-abstract/2019/IsSharedArrayBuffer.js b/node_modules/es-abstract/2019/IsSharedArrayBuffer.js new file mode 100644 index 000000000..8e96e33f3 --- /dev/null +++ b/node_modules/es-abstract/2019/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2019/IteratorClose.js b/node_modules/es-abstract/2019/IteratorClose.js index dd1118df7..f703ea632 100644 --- a/node_modules/es-abstract/2019/IteratorClose.js +++ b/node_modules/es-abstract/2019/IteratorClose.js @@ -5,6 +5,7 @@ var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); var GetMethod = require('./GetMethod'); var IsCallable = require('./IsCallable'); var Type = require('./Type'); @@ -15,10 +16,10 @@ module.exports = function IteratorClose(iterator, completion) { if (Type(iterator) !== 'Object') { throw new $TypeError('Assertion failed: Type(iterator) is not Object'); } - if (!IsCallable(completion)) { - throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); } - var completionThunk = completion; + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; var iteratorReturn = GetMethod(iterator, 'return'); diff --git a/node_modules/es-abstract/2019/NormalCompletion.js b/node_modules/es-abstract/2019/NormalCompletion.js new file mode 100644 index 000000000..1e429dd65 --- /dev/null +++ b/node_modules/es-abstract/2019/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2019/NumberToRawBytes.js b/node_modules/es-abstract/2019/NumberToRawBytes.js new file mode 100644 index 000000000..b26cd22fd --- /dev/null +++ b/node_modules/es-abstract/2019/NumberToRawBytes.js @@ -0,0 +1,198 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $floor = GetIntrinsic('%Math.floor%'); +var $log = GetIntrinsic('%Math.log%'); +var $log2E = GetIntrinsic('%Math.LOG2E%'); +var $log2 = GetIntrinsic('%Math.log2%', true) || function log2(x) { + return $log(x) * $log2E; +}; +var $parseInt = GetIntrinsic('%parseInt%'); +var $pow = GetIntrinsic('%Math.pow%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $reverse = callBound('Array.prototype.reverse'); +var $numberToString = callBound('Number.prototype.toString'); +var $strSlice = callBound('String.prototype.slice'); + +var abs = require('./abs'); +var hasOwnProperty = require('./HasOwnProperty'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); +var isFinite = require('../helpers/isFinite'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32 +}; + +// https://262.ecma-international.org/8.0/#sec-numbertorawbytes + +module.exports = function NumberToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number') { + throw new $TypeError('Assertion failed: `value` must be a Number'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var rawBytes = []; + var exponent; + + if (type === 'Float32') { // step 1 + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded + } + + var leastSig; + + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + + if (!isFinite(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + + var sign = value < 0 ? 1 : 0; + value = abs(value); // eslint-disable-line no-param-reassign + + exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; // eslint-disable-line no-param-reassign + } + + while (value < 1) { + exponent -= 1; + value *= 2; // eslint-disable-line no-param-reassign + } + + var mantissa = value - 1; + mantissa *= $pow(2, 23); + mantissa = $floor(mantissa); + + exponent += 127; + exponent = exponent << 23; + + var result = sign << 31; + result |= exponent; + result |= mantissa; + + var byte0 = result & 255; + result = result >> 8; + var byte1 = result & 255; + result = result >> 8; + var byte2 = result & 255; + result = result >> 8; + var byte3 = result & 255; + + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; + } else if (type === 'Float64') { // step 2 + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 0, leastSig] : [leastSig, 0, 0, 0, 0, 0, 0, 0]; + } + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 248, 127] : [127, 248, 0, 0, 0, 0, 0, 0]; + } + if (!isFinite(value)) { + var infBytes = value < 0 ? [0, 0, 0, 0, 0, 0, 240, 255] : [0, 0, 0, 0, 0, 0, 240, 127]; + return isLittleEndian ? infBytes : $reverse(infBytes); + } + + var isNegative = value < 0; + if (isNegative) { value = -value; } // eslint-disable-line no-param-reassign + + exponent = $floor($log2(value)); + var significand = (value / $pow(2, exponent)) - 1; + + var bitString = ''; + for (var i = 0; i < 52; i++) { + significand *= 2; + if (significand >= 1) { + bitString += '1'; + significand -= 1; + } else { + bitString += '0'; + } + } + + exponent += 1023; + var exponentBits = $numberToString(exponent, 2); + while (exponentBits.length < 11) { exponentBits = '0' + exponentBits; } + + var fullBitString = (isNegative ? '1' : '0') + exponentBits + bitString; + while (fullBitString.length < 64) { fullBitString = '0' + fullBitString; } + + for (i = 0; i < 8; i++) { + rawBytes[i] = $parseInt($strSlice(fullBitString, i * 8, (i + 1) * 8), 2); + } + + return isLittleEndian ? $reverse(rawBytes) : rawBytes; + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + /* + if (intValue >= 0) { // step 3.d + // Let rawBytes be a List containing the n-byte binary encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } else { // step 3.e + // Let rawBytes be a List containing the n-byte binary 2's complement encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } + */ + if (intValue < 0) { + intValue = intValue >>> 0; + } + for (i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = intValue & 0xff; + intValue = intValue >> 8; + } + + return rawBytes; // step 4 +}; diff --git a/node_modules/es-abstract/2019/ObjectCreate.js b/node_modules/es-abstract/2019/ObjectCreate.js index 2851a646d..1f4bb16af 100644 --- a/node_modules/es-abstract/2019/ObjectCreate.js +++ b/node_modules/es-abstract/2019/ObjectCreate.js @@ -6,9 +6,14 @@ var $ObjectCreate = GetIntrinsic('%Object.create%', true); var $TypeError = GetIntrinsic('%TypeError%'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var IsArray = require('./IsArray'); var Type = require('./Type'); -var hasProto = !({ __proto__: null } instanceof Object); +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); // https://ecma-international.org/ecma-262/6.0/#sec-objectcreate @@ -16,22 +21,30 @@ module.exports = function ObjectCreate(proto, internalSlotsList) { if (proto !== null && Type(proto) !== 'Object') { throw new $TypeError('Assertion failed: `proto` must be null or an object'); } - var slots = arguments.length < 2 ? [] : internalSlotsList; - if (slots.length > 0) { - throw new $SyntaxError('es-abstract does not yet support internal slots'); + var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1 + if (arguments.length >= 2 && !IsArray(slots)) { + throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array'); } + var O; if ($ObjectCreate) { - return $ObjectCreate(proto); - } - if (hasProto) { - return { __proto__: proto }; + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); } - if (proto === null) { - throw new $SyntaxError('native Object.create support is required to create null objects'); + if (slots.length > 0) { + forEach(slots, function (slot) { + SLOT.set(O, slot, void undefined); + }); } - var T = function T() {}; - T.prototype = proto; - return new T(); + + return O; // step 6 }; diff --git a/node_modules/es-abstract/2019/ObjectDefineProperties.js b/node_modules/es-abstract/2019/ObjectDefineProperties.js new file mode 100644 index 000000000..f096f1ede --- /dev/null +++ b/node_modules/es-abstract/2019/ObjectDefineProperties.js @@ -0,0 +1,40 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + desc = FromPropertyDescriptor(desc); // TODO: remove this once DefinePropertyOrThrow is fixed + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2019/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2019/OrdinaryDefineOwnProperty.js index 5d33aa6d6..34f029f7e 100644 --- a/node_modules/es-abstract/2019/OrdinaryDefineOwnProperty.js +++ b/node_modules/es-abstract/2019/OrdinaryDefineOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); diff --git a/node_modules/es-abstract/2019/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2019/OrdinaryGetOwnProperty.js index 3d11e9fad..fd8035acb 100644 --- a/node_modules/es-abstract/2019/OrdinaryGetOwnProperty.js +++ b/node_modules/es-abstract/2019/OrdinaryGetOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var callBound = require('call-bind/callBound'); diff --git a/node_modules/es-abstract/2019/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2019/OrdinarySetPrototypeOf.js index d0ff7a7c2..d2b72306c 100644 --- a/node_modules/es-abstract/2019/OrdinarySetPrototypeOf.js +++ b/node_modules/es-abstract/2019/OrdinarySetPrototypeOf.js @@ -16,15 +16,15 @@ module.exports = function OrdinarySetPrototypeOf(O, V) { throw new $TypeError('Assertion failed: V must be Object or Null'); } /* - var extensible = IsExtensible(O); - var current = OrdinaryGetPrototypeOf(O); - if (SameValue(V, current)) { - return true; - } - if (!extensible) { - return false; - } - */ + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ try { $setProto(O, V); } catch (e) { @@ -32,22 +32,22 @@ module.exports = function OrdinarySetPrototypeOf(O, V) { } return OrdinaryGetPrototypeOf(O) === V; /* - var p = V; - var done = false; - while (!done) { - if (p === null) { - done = true; - } else if (SameValue(p, O)) { - return false; - } else { - if (wat) { - done = true; - } else { - p = p.[[Prototype]]; - } - } - } - O.[[Prototype]] = V; - return true; - */ + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ }; diff --git a/node_modules/es-abstract/2019/OrdinaryToPrimitive.js b/node_modules/es-abstract/2019/OrdinaryToPrimitive.js new file mode 100644 index 000000000..e1dbe1427 --- /dev/null +++ b/node_modules/es-abstract/2019/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2019/RawBytesToNumber.js b/node_modules/es-abstract/2019/RawBytesToNumber.js new file mode 100644 index 000000000..5811dae40 --- /dev/null +++ b/node_modules/es-abstract/2019/RawBytesToNumber.js @@ -0,0 +1,145 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $pow = GetIntrinsic('%Math.pow%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $charAt = callBound('String.prototype.charAt'); +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/8.0/#table-50 +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/8.0/#sec-rawbytestonumber + +module.exports = function RawBytesToNumber(type, rawBytes, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + // eslint-disable-next-line no-param-reassign + rawBytes = $reverse(rawBytes); // step 2 + } + + /* eslint no-redeclare: 1 */ + if (type === 'Float32') { // step 3 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value. +If value is an IEEE 754-2008 binary32 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = (rawBytes[3] & 0x80) >> 7; // first bit + var exponent = ((rawBytes[3] & 0x7F) << 1) // 7 bits from index 3 + | ((rawBytes[2] & 0x80) >> 7); // 1 bit from index 2 + var mantissa = ((rawBytes[2] & 0x7F) << 16) // 7 bits from index 2 + | (rawBytes[1] << 8) // 8 bits from index 1 + | rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign === 0 ? 0 : -0; + } + if (exponent === 0xFF && mantissa === 0) { + return sign === 0 ? Infinity : -Infinity; + } + if (exponent === 0xFF && mantissa !== 0) { + return NaN; + } + + exponent -= 127; // subtract the bias + + // return $pow(-1, sign) * mantissa / $pow(2, 23) * $pow(2, exponent); + // return $pow(-1, sign) * (mantissa + 0x1000000) * $pow(2, exponent - 23); + return $pow(-1, sign) * (1 + (mantissa / $pow(2, 23))) * $pow(2, exponent); + } + + if (type === 'Float64') { // step 4 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value. +If value is an IEEE 754-2008 binary64 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[7] & 0x80 ? -1 : 1; // first bit + var exponent = ((rawBytes[7] & 0x7F) << 4) // 7 bits from index 7 + | ((rawBytes[6] & 0xF0) >> 4); // 4 bits from index 6 + var mantissa = ((rawBytes[6] & 0x0F) * 0x1000000000000) // 4 bits from index 6 + + (rawBytes[5] * 0x10000000000) // 8 bits from index 5 + + (rawBytes[4] * 0x100000000) // 8 bits from index 4 + + (rawBytes[3] * 0x1000000) // 8 bits from index 3 + + (rawBytes[2] * 0x10000) // 8 bits from index 2 + + (rawBytes[1] * 0x100) // 8 bits from index 1 + + rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 0x7FF && mantissa !== 0) { + return NaN; + } + if (exponent === 0x7FF && mantissa === 0) { + return sign * Infinity; + } + + exponent -= 1023; // subtract the bias + + return sign * (mantissa + 0x10000000000000) * $pow(2, exponent - 52); + } + + // this is common to both branches + var intValue = 0; + for (var i = 0; i < rawBytes.length; i++) { + intValue |= rawBytes[i] << (8 * i); + } + /* + Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. + */ + + if ($charAt(type, 0) !== 'U') { // steps 5-6 + // Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length elementSize × 8. + var bitLength = elementSize * 8; + if (bitLength < 32) { + intValue = (intValue << (32 - bitLength)) >> (32 - bitLength); + } + } + + return intValue; // step 7 +}; diff --git a/node_modules/es-abstract/2019/Set.js b/node_modules/es-abstract/2019/Set.js index ea49e813f..097149887 100644 --- a/node_modules/es-abstract/2019/Set.js +++ b/node_modules/es-abstract/2019/Set.js @@ -36,12 +36,12 @@ module.exports = function Set(O, P, V, Throw) { throw new $TypeError('Attempted to assign to readonly property.'); } return true; - } else { - try { - O[P] = V; // eslint-disable-line no-param-reassign - return noThrowOnStrictViolation ? SameValue(O[P], V) : true; - } catch (e) { - return false; - } } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + }; diff --git a/node_modules/es-abstract/2019/SetFunctionName.js b/node_modules/es-abstract/2019/SetFunctionName.js index f59cb7b9e..03ec2227c 100644 --- a/node_modules/es-abstract/2019/SetFunctionName.js +++ b/node_modules/es-abstract/2019/SetFunctionName.js @@ -6,7 +6,7 @@ var has = require('has'); var $TypeError = GetIntrinsic('%TypeError%'); -var getSymbolDescription = require('../helpers/getSymbolDescription'); +var getSymbolDescription = require('get-symbol-description'); var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); var IsExtensible = require('./IsExtensible'); diff --git a/node_modules/es-abstract/2019/SetIntegrityLevel.js b/node_modules/es-abstract/2019/SetIntegrityLevel.js index 1ac7d61e2..546f3e74f 100644 --- a/node_modules/es-abstract/2019/SetIntegrityLevel.js +++ b/node_modules/es-abstract/2019/SetIntegrityLevel.js @@ -4,9 +4,9 @@ var GetIntrinsic = require('get-intrinsic'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); -var $preventExtensions = GetIntrinsic('%Object.preventExtensions%'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); var forEach = require('../helpers/forEach'); diff --git a/node_modules/es-abstract/2019/StringCreate.js b/node_modules/es-abstract/2019/StringCreate.js index da0c0ea06..bd02820f7 100644 --- a/node_modules/es-abstract/2019/StringCreate.js +++ b/node_modules/es-abstract/2019/StringCreate.js @@ -20,7 +20,7 @@ module.exports = function StringCreate(value, prototype) { } var S = $Object(value); - if (S !== $StringPrototype) { + if (prototype !== $StringPrototype) { if (setProto) { setProto(S, prototype); } else { diff --git a/node_modules/es-abstract/2019/TestIntegrityLevel.js b/node_modules/es-abstract/2019/TestIntegrityLevel.js index cf1649c1b..7f95a6e1d 100644 --- a/node_modules/es-abstract/2019/TestIntegrityLevel.js +++ b/node_modules/es-abstract/2019/TestIntegrityLevel.js @@ -2,11 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); var IsDataDescriptor = require('./IsDataDescriptor'); var IsExtensible = require('./IsExtensible'); @@ -26,7 +26,7 @@ module.exports = function TestIntegrityLevel(O, level) { if (status) { return false; } - var theKeys = $gOPN(O); + var theKeys = OwnPropertyKeys(O); return theKeys.length === 0 || every(theKeys, function (k) { var currentDesc = $gOPD(O, k); if (typeof currentDesc !== 'undefined') { diff --git a/node_modules/es-abstract/2019/ThrowCompletion.js b/node_modules/es-abstract/2019/ThrowCompletion.js new file mode 100644 index 000000000..b7d388a35 --- /dev/null +++ b/node_modules/es-abstract/2019/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2019/ToNumber.js b/node_modules/es-abstract/2019/ToNumber.js index e776bb2b7..95bdd9ecd 100644 --- a/node_modules/es-abstract/2019/ToNumber.js +++ b/node_modules/es-abstract/2019/ToNumber.js @@ -8,7 +8,7 @@ var $RegExp = GetIntrinsic('%RegExp%'); var $parseInteger = GetIntrinsic('%parseInt%'); var callBound = require('call-bind/callBound'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var isPrimitive = require('../helpers/isPrimitive'); var $strSlice = callBound('String.prototype.slice'); @@ -48,12 +48,12 @@ module.exports = function ToNumber(argument) { return ToNumber($parseInteger($strSlice(value, 2), 8)); } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { return NaN; - } else { - var trimmed = $trim(value); - if (trimmed !== value) { - return ToNumber(trimmed); - } } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + } return $Number(value); }; diff --git a/node_modules/es-abstract/2019/ValidateAtomicAccess.js b/node_modules/es-abstract/2019/ValidateAtomicAccess.js new file mode 100644 index 000000000..e1c51c776 --- /dev/null +++ b/node_modules/es-abstract/2019/ValidateAtomicAccess.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); + +var isTypedArray = require('is-typed-array'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/8.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1 + } + + var accessIndex = ToIndex(requestIndex); // step 2 + + var length = typedArrayLength(typedArray); // step 3 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 5 + } + + return accessIndex; // step 6 +}; diff --git a/node_modules/es-abstract/2019/ValidateTypedArray.js b/node_modules/es-abstract/2019/ValidateTypedArray.js new file mode 100644 index 000000000..83df3a81c --- /dev/null +++ b/node_modules/es-abstract/2019/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('%TypedArray.prototype.some%', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2019/max.js b/node_modules/es-abstract/2019/max.js new file mode 100644 index 000000000..b919d4e83 --- /dev/null +++ b/node_modules/es-abstract/2019/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2019/min.js b/node_modules/es-abstract/2019/min.js new file mode 100644 index 000000000..909de4b0e --- /dev/null +++ b/node_modules/es-abstract/2019/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2020/AbstractEqualityComparison.js b/node_modules/es-abstract/2020/AbstractEqualityComparison.js index c776194c1..83b294967 100644 --- a/node_modules/es-abstract/2020/AbstractEqualityComparison.js +++ b/node_modules/es-abstract/2020/AbstractEqualityComparison.js @@ -1,16 +1,20 @@ 'use strict'; +var StrictEqualityComparison = require('./StrictEqualityComparison'); +var StringToBigInt = require('./StringToBigInt'); var ToNumber = require('./ToNumber'); var ToPrimitive = require('./ToPrimitive'); var Type = require('./Type'); -// https://ecma-international.org/ecma-262/6.0/#sec-abstract-equality-comparison +var isNaN = require('../helpers/isNaN'); + +// https://ecma-international.org/ecma-262/11.0/#sec-abstract-equality-comparison module.exports = function AbstractEqualityComparison(x, y) { var xType = Type(x); var yType = Type(y); if (xType === yType) { - return x === y; // ES6+ specified this shortcut anyways. + return StrictEqualityComparison(x, y); } if (x == null && y == null) { return true; @@ -21,17 +25,33 @@ module.exports = function AbstractEqualityComparison(x, y) { if (xType === 'String' && yType === 'Number') { return AbstractEqualityComparison(ToNumber(x), y); } + if (xType === 'BigInt' && yType === 'String') { + var n = StringToBigInt(y); + if (isNaN(n)) { + return false; + } + return AbstractEqualityComparison(x, n); + } + if (xType === 'String' && yType === 'BigInt') { + return AbstractEqualityComparison(y, x); + } if (xType === 'Boolean') { return AbstractEqualityComparison(ToNumber(x), y); } if (yType === 'Boolean') { return AbstractEqualityComparison(x, ToNumber(y)); } - if ((xType === 'String' || xType === 'Number' || xType === 'Symbol') && yType === 'Object') { + if ((xType === 'String' || xType === 'Number' || xType === 'BigInt' || xType === 'Symbol') && yType === 'Object') { return AbstractEqualityComparison(x, ToPrimitive(y)); } - if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol')) { + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'BigInt' || yType === 'Symbol')) { return AbstractEqualityComparison(ToPrimitive(x), y); } + if ((xType === 'BigInt' && yType === 'Number') || (xType === 'Number' && yType === 'BigInt')) { + if (isNaN(x) || isNaN(y) || x === Infinity || y === Infinity || x === -Infinity || y === -Infinity) { + return false; + } + return x == y; // eslint-disable-line eqeqeq + } return false; }; diff --git a/node_modules/es-abstract/2020/AbstractRelationalComparison.js b/node_modules/es-abstract/2020/AbstractRelationalComparison.js index 0dfed5ffe..9076d71e2 100644 --- a/node_modules/es-abstract/2020/AbstractRelationalComparison.js +++ b/node_modules/es-abstract/2020/AbstractRelationalComparison.js @@ -6,16 +6,19 @@ var $Number = GetIntrinsic('%Number%'); var $TypeError = GetIntrinsic('%TypeError%'); var $isNaN = require('../helpers/isNaN'); -var $isFinite = require('../helpers/isFinite'); -var isPrefixOf = require('../helpers/isPrefixOf'); -var ToNumber = require('./ToNumber'); +var IsStringPrefix = require('./IsStringPrefix'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumeric = require('./ToNumeric'); var ToPrimitive = require('./ToPrimitive'); var Type = require('./Type'); -// https://262.ecma-international.org/5.1/#sec-11.8.5 +var BigIntLessThan = require('./BigInt/lessThan'); +var NumberLessThan = require('./Number/lessThan'); -// eslint-disable-next-line max-statements +// https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison + +// eslint-disable-next-line max-statements, max-lines-per-function module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { if (Type(LeftFirst) !== 'Boolean') { throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); @@ -29,35 +32,51 @@ module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { py = ToPrimitive(y, $Number); px = ToPrimitive(x, $Number); } - var bothStrings = Type(px) === 'String' && Type(py) === 'String'; - if (!bothStrings) { - var nx = ToNumber(px); - var ny = ToNumber(py); - if ($isNaN(nx) || $isNaN(ny)) { - return undefined; - } - if ($isFinite(nx) && $isFinite(ny) && nx === ny) { - return false; - } - if (nx === Infinity) { + if (Type(px) === 'String' && Type(py) === 'String') { + if (IsStringPrefix(py, px)) { return false; } - if (ny === Infinity) { + if (IsStringPrefix(px, py)) { return true; } - if (ny === -Infinity) { - return false; + return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f + } + + var pxType = Type(px); + var pyType = Type(py); + var nx; + var ny; + if (pxType === 'BigInt' && pyType === 'String') { + ny = StringToBigInt(py); + if ($isNaN(ny)) { + return void undefined; } - if (nx === -Infinity) { - return true; + return BigIntLessThan(px, ny); + } + if (pxType === 'String' && pyType === 'BigInt') { + nx = StringToBigInt(px); + if ($isNaN(nx)) { + return void undefined; } - return nx < ny; // by now, these are both nonzero, finite, and not equal + return BigIntLessThan(nx, py); } - if (isPrefixOf(py, px)) { - return false; + + nx = ToNumeric(px); + ny = ToNumeric(py); + var nxType = Type(nx); + if (nxType === Type(ny)) { + return nxType === 'Number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny); + } + + if ($isNaN(nx) || $isNaN(ny)) { + return void undefined; } - if (isPrefixOf(px, py)) { + if (nx === -Infinity || ny === Infinity) { return true; } - return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f + if (nx === Infinity || ny === -Infinity) { + return false; + } + + return nx < ny; // by now, these are both nonzero, finite, and not equal }; diff --git a/node_modules/es-abstract/2020/ArrayCreate.js b/node_modules/es-abstract/2020/ArrayCreate.js index 4d20e2e5e..cc890cafb 100644 --- a/node_modules/es-abstract/2020/ArrayCreate.js +++ b/node_modules/es-abstract/2020/ArrayCreate.js @@ -9,16 +9,17 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsInteger = require('./IsInteger'); +var hasProto = require('has-proto')(); + var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( - // eslint-disable-next-line no-proto, no-negated-condition - [].__proto__ !== $ArrayPrototype - ? null - : function (O, proto) { + hasProto + ? function (O, proto) { O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign return O; } + : null ); // https://ecma-international.org/ecma-262/6.0/#sec-arraycreate @@ -42,12 +43,12 @@ module.exports = function ArrayCreate(length) { A.length = length; } /* step 10, the above as a shortcut for the below - OrdinaryDefineOwnProperty(A, 'length', { - '[[Configurable]]': false, - '[[Enumerable]]': false, - '[[Value]]': length, - '[[Writable]]': true - }); - */ + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ return A; }; diff --git a/node_modules/es-abstract/2020/AsyncFromSyncIteratorContinuation.js b/node_modules/es-abstract/2020/AsyncFromSyncIteratorContinuation.js new file mode 100644 index 000000000..c1cc7a111 --- /dev/null +++ b/node_modules/es-abstract/2020/AsyncFromSyncIteratorContinuation.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var callBound = require('call-bind/callBound'); + +var CreateIterResultObject = require('./CreateIterResultObject'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorValue = require('./IteratorValue'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var $then = callBound('Promise.prototype.then', true); + +// https://ecma-international.org/ecma-262/10.0/#sec-asyncfromsynciteratorcontinuation + +module.exports = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; diff --git a/node_modules/es-abstract/2020/AsyncIteratorClose.js b/node_modules/es-abstract/2020/AsyncIteratorClose.js new file mode 100644 index 000000000..eb72ef938 --- /dev/null +++ b/node_modules/es-abstract/2020/AsyncIteratorClose.js @@ -0,0 +1,62 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/9.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return new $Promise(function (resolve) { + var ret = GetMethod(iterator, 'return'); // step 4 + + if (typeof ret === 'undefined') { + resolve(completion); // step 5 + } else { + resolve($then( + new $Promise(function (resolve2) { + // process.exit(42); + resolve2(Call(ret, iterator, [])); // step 6 + }), + function (innerResult) { + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + }, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 8 + } else { + throw e; // step 9 + } + } + )); + } + }); +}; diff --git a/node_modules/es-abstract/2020/BigIntBitwiseOp.js b/node_modules/es-abstract/2020/BigIntBitwiseOp.js index 1af4cad88..0b1c03a91 100644 --- a/node_modules/es-abstract/2020/BigIntBitwiseOp.js +++ b/node_modules/es-abstract/2020/BigIntBitwiseOp.js @@ -61,6 +61,6 @@ module.exports = function BigIntBitwiseOp(op, x, y) { if (tmp !== 0) { result -= $pow(2, shift); } - return result; - */ + return result; + */ }; diff --git a/node_modules/es-abstract/2020/CharacterRange.js b/node_modules/es-abstract/2020/CharacterRange.js new file mode 100644 index 000000000..70e4b5235 --- /dev/null +++ b/node_modules/es-abstract/2020/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('%String.prototype.charCodeAt%'); +var $push = callBound('%Array.prototype.push%'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2020/CompletionRecord.js b/node_modules/es-abstract/2020/CompletionRecord.js new file mode 100644 index 000000000..370a5677f --- /dev/null +++ b/node_modules/es-abstract/2020/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2020/CopyDataProperties.js b/node_modules/es-abstract/2020/CopyDataProperties.js index 7bd7ddaed..47a426c0c 100644 --- a/node_modules/es-abstract/2020/CopyDataProperties.js +++ b/node_modules/es-abstract/2020/CopyDataProperties.js @@ -51,8 +51,8 @@ module.exports = function CopyDataProperties(target, source, excludedItems) { var enumerable = $isEnumerable(from, nextKey) || ( // this is to handle string keys being non-enumerable in older engines typeof source === 'string' - && nextKey >= 0 - && IsInteger(ToNumber(nextKey)) + && nextKey >= 0 + && IsInteger(ToNumber(nextKey)) ); if (excluded === false && enumerable) { var propValue = Get(from, nextKey); diff --git a/node_modules/es-abstract/2020/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2020/CreateAsyncFromSyncIterator.js new file mode 100644 index 000000000..693321d51 --- /dev/null +++ b/node_modules/es-abstract/2020/CreateAsyncFromSyncIterator.js @@ -0,0 +1,121 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation'); +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorNext = require('./IteratorNext'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var assertRecord = require('../helpers/assertRecord'); + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://ecma-international.org/ecma-262/11.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2020/CreateDataProperty.js b/node_modules/es-abstract/2020/CreateDataProperty.js index ff5ca3055..02c6cd1f8 100644 --- a/node_modules/es-abstract/2020/CreateDataProperty.js +++ b/node_modules/es-abstract/2020/CreateDataProperty.js @@ -25,8 +25,8 @@ module.exports = function CreateDataProperty(O, P, V) { } var oldDesc = OrdinaryGetOwnProperty(O, P); var extensible = !oldDesc || IsExtensible(O); - var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']); - if (immutable || !extensible) { + var nonConfigurable = oldDesc && !oldDesc['[[Configurable]]']; + if (nonConfigurable || !extensible) { return false; } return DefineOwnProperty( diff --git a/node_modules/es-abstract/2020/CreateListFromArrayLike.js b/node_modules/es-abstract/2020/CreateListFromArrayLike.js index 3e9f5f403..40293127d 100644 --- a/node_modules/es-abstract/2020/CreateListFromArrayLike.js +++ b/node_modules/es-abstract/2020/CreateListFromArrayLike.js @@ -19,7 +19,7 @@ var Type = require('./Type'); module.exports = function CreateListFromArrayLike(obj) { var elementTypes = arguments.length > 1 ? arguments[1] - : ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object']; + : ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object']; if (Type(obj) !== 'Object') { throw new $TypeError('Assertion failed: `obj` must be an Object'); diff --git a/node_modules/es-abstract/2020/CreateRegExpStringIterator.js b/node_modules/es-abstract/2020/CreateRegExpStringIterator.js new file mode 100644 index 000000000..cdfae5621 --- /dev/null +++ b/node_modules/es-abstract/2020/CreateRegExpStringIterator.js @@ -0,0 +1,100 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); +var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true); + +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var CreateMethodProperty = require('./CreateMethodProperty'); +var Get = require('./Get'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var RegExpExec = require('./RegExpExec'); +var Set = require('./Set'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); +var setToStringTag = require('es-set-tostringtag'); + +var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) { + if (Type(S) !== 'String') { + throw new $TypeError('`S` must be a string'); + } + if (Type(global) !== 'Boolean') { + throw new $TypeError('`global` must be a boolean'); + } + if (Type(fullUnicode) !== 'Boolean') { + throw new $TypeError('`fullUnicode` must be a boolean'); + } + SLOT.set(this, '[[IteratingRegExp]]', R); + SLOT.set(this, '[[IteratedString]]', S); + SLOT.set(this, '[[Global]]', global); + SLOT.set(this, '[[Unicode]]', fullUnicode); + SLOT.set(this, '[[Done]]', false); +}; + +if (IteratorPrototype) { + RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype); +} + +var RegExpStringIteratorNext = function next() { + var O = this; // eslint-disable-line no-invalid-this + if (Type(O) !== 'Object') { + throw new $TypeError('receiver must be an object'); + } + if ( + !(O instanceof RegExpStringIterator) + || !SLOT.has(O, '[[IteratingRegExp]]') + || !SLOT.has(O, '[[IteratedString]]') + || !SLOT.has(O, '[[Global]]') + || !SLOT.has(O, '[[Unicode]]') + || !SLOT.has(O, '[[Done]]') + ) { + throw new $TypeError('"this" value must be a RegExpStringIterator instance'); + } + if (SLOT.get(O, '[[Done]]')) { + return CreateIterResultObject(undefined, true); + } + var R = SLOT.get(O, '[[IteratingRegExp]]'); + var S = SLOT.get(O, '[[IteratedString]]'); + var global = SLOT.get(O, '[[Global]]'); + var fullUnicode = SLOT.get(O, '[[Unicode]]'); + var match = RegExpExec(R, S); + if (match === null) { + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(undefined, true); + } + if (global) { + var matchStr = ToString(Get(match, '0')); + if (matchStr === '') { + var thisIndex = ToLength(Get(R, 'lastIndex')); + var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode); + Set(R, 'lastIndex', nextIndex, true); + } + return CreateIterResultObject(match, false); + } + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(match, false); +}; +CreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext); + +if (hasSymbols) { + setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator'); + + if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') { + var iteratorFn = function SymbolIterator() { + return this; + }; + CreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn); + } +} + +// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator +module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) { + // assert R.global === global && R.unicode === fullUnicode? + return new RegExpStringIterator(R, S, global, fullUnicode); +}; diff --git a/node_modules/es-abstract/2020/DetachArrayBuffer.js b/node_modules/es-abstract/2020/DetachArrayBuffer.js new file mode 100644 index 000000000..03284729b --- /dev/null +++ b/node_modules/es-abstract/2020/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2020/EnumerableOwnPropertyNames.js b/node_modules/es-abstract/2020/EnumerableOwnPropertyNames.js index 44171b9eb..8e3177b6a 100644 --- a/node_modules/es-abstract/2020/EnumerableOwnPropertyNames.js +++ b/node_modules/es-abstract/2020/EnumerableOwnPropertyNames.js @@ -19,7 +19,7 @@ var Type = require('./Type'); // https://262.ecma-international.org/8.0/#sec-enumerableownproperties -module.exports = function EnumerableOwnProperties(O, kind) { +module.exports = function EnumerableOwnPropertyNames(O, kind) { if (Type(O) !== 'Object') { throw new $TypeError('Assertion failed: Type(O) is not Object'); } diff --git a/node_modules/es-abstract/2020/FromPropertyDescriptor.js b/node_modules/es-abstract/2020/FromPropertyDescriptor.js index 9a69a2605..e142ed582 100644 --- a/node_modules/es-abstract/2020/FromPropertyDescriptor.js +++ b/node_modules/es-abstract/2020/FromPropertyDescriptor.js @@ -1,36 +1,16 @@ 'use strict'; var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); var Type = require('./Type'); // https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor module.exports = function FromPropertyDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return Desc; + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); } - assertRecord(Type, 'Property Descriptor', 'Desc', Desc); - - var obj = {}; - if ('[[Value]]' in Desc) { - obj.value = Desc['[[Value]]']; - } - if ('[[Writable]]' in Desc) { - obj.writable = Desc['[[Writable]]']; - } - if ('[[Get]]' in Desc) { - obj.get = Desc['[[Get]]']; - } - if ('[[Set]]' in Desc) { - obj.set = Desc['[[Set]]']; - } - if ('[[Enumerable]]' in Desc) { - obj.enumerable = Desc['[[Enumerable]]']; - } - if ('[[Configurable]]' in Desc) { - obj.configurable = Desc['[[Configurable]]']; - } - return obj; + return fromPropertyDescriptor(Desc); }; diff --git a/node_modules/es-abstract/2020/Get.js b/node_modules/es-abstract/2020/Get.js index 681055a2f..297968643 100644 --- a/node_modules/es-abstract/2020/Get.js +++ b/node_modules/es-abstract/2020/Get.js @@ -9,12 +9,7 @@ var inspect = require('object-inspect'); var IsPropertyKey = require('./IsPropertyKey'); var Type = require('./Type'); -/** - * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p - * 1. Assert: Type(O) is Object. - * 2. Assert: IsPropertyKey(P) is true. - * 3. Return O.[[Get]](P, O). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p module.exports = function Get(O, P) { // 7.3.1.1 diff --git a/node_modules/es-abstract/2020/GetGlobalObject.js b/node_modules/es-abstract/2020/GetGlobalObject.js new file mode 100644 index 000000000..0541ede0c --- /dev/null +++ b/node_modules/es-abstract/2020/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2020/GetIterator.js b/node_modules/es-abstract/2020/GetIterator.js index 0e74c1736..51439e448 100644 --- a/node_modules/es-abstract/2020/GetIterator.js +++ b/node_modules/es-abstract/2020/GetIterator.js @@ -3,6 +3,7 @@ var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true); var inspect = require('object-inspect'); @@ -32,15 +33,14 @@ module.exports = function GetIterator(obj, hint, method) { actualMethod = GetMethod(obj, $asyncIterator); } if (actualMethod === undefined) { - throw new $TypeError("async from sync iterators aren't currently supported"); + throw new $SyntaxError("async from sync iterators aren't currently supported"); } } else { actualMethod = getIteratorMethod( { AdvanceStringIndex: AdvanceStringIndex, GetMethod: GetMethod, - IsArray: IsArray, - Type: Type + IsArray: IsArray }, obj ); diff --git a/node_modules/es-abstract/2020/GetMethod.js b/node_modules/es-abstract/2020/GetMethod.js index 775d3fb95..d3775178e 100644 --- a/node_modules/es-abstract/2020/GetMethod.js +++ b/node_modules/es-abstract/2020/GetMethod.js @@ -8,15 +8,9 @@ var GetV = require('./GetV'); var IsCallable = require('./IsCallable'); var IsPropertyKey = require('./IsPropertyKey'); -/** - * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let func be GetV(O, P). - * 3. ReturnIfAbrupt(func). - * 4. If func is either undefined or null, return undefined. - * 5. If IsCallable(func) is false, throw a TypeError exception. - * 6. Return func. - */ +var debug = require('object-inspect'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getmethod module.exports = function GetMethod(O, P) { // 7.3.9.1 @@ -34,7 +28,7 @@ module.exports = function GetMethod(O, P) { // 7.3.9.5 if (!IsCallable(func)) { - throw new $TypeError(P + 'is not a function'); + throw new $TypeError(P + ' is not a function: ' + debug(func)); } // 7.3.9.6 diff --git a/node_modules/es-abstract/2020/GetOwnPropertyKeys.js b/node_modules/es-abstract/2020/GetOwnPropertyKeys.js index b8f4167f7..40c0b367f 100644 --- a/node_modules/es-abstract/2020/GetOwnPropertyKeys.js +++ b/node_modules/es-abstract/2020/GetOwnPropertyKeys.js @@ -6,8 +6,8 @@ var hasSymbols = require('has-symbols')(); var $TypeError = GetIntrinsic('%TypeError%'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); -var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); var keys = require('object-keys'); var esType = require('./Type'); diff --git a/node_modules/es-abstract/2020/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2020/GetPrototypeFromConstructor.js index 5f369cad8..25ee12f35 100644 --- a/node_modules/es-abstract/2020/GetPrototypeFromConstructor.js +++ b/node_modules/es-abstract/2020/GetPrototypeFromConstructor.js @@ -4,6 +4,7 @@ var GetIntrinsic = require('get-intrinsic'); var $Function = GetIntrinsic('%Function%'); var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); var Get = require('./Get'); var IsConstructor = require('./IsConstructor'); @@ -20,7 +21,7 @@ module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefa if (Type(proto) !== 'Object') { if (!(constructor instanceof $Function)) { // ignore other realms, for now - throw new $TypeError('cross-realm constructors not currently supported'); + throw new $SyntaxError('cross-realm constructors not currently supported'); } proto = intrinsic; } diff --git a/node_modules/es-abstract/2020/GetSubstitution.js b/node_modules/es-abstract/2020/GetSubstitution.js index a5a7a1bee..96bdcaafe 100644 --- a/node_modules/es-abstract/2020/GetSubstitution.js +++ b/node_modules/es-abstract/2020/GetSubstitution.js @@ -5,7 +5,7 @@ var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var callBound = require('call-bind/callBound'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var every = require('../helpers/every'); var $charAt = callBound('String.prototype.charAt'); diff --git a/node_modules/es-abstract/2020/GetV.js b/node_modules/es-abstract/2020/GetV.js index 2d8cc8246..2dcddb351 100644 --- a/node_modules/es-abstract/2020/GetV.js +++ b/node_modules/es-abstract/2020/GetV.js @@ -7,13 +7,7 @@ var $TypeError = GetIntrinsic('%TypeError%'); var IsPropertyKey = require('./IsPropertyKey'); var ToObject = require('./ToObject'); -/** - * 7.3.2 GetV (V, P) - * 1. Assert: IsPropertyKey(P) is true. - * 2. Let O be ToObject(V). - * 3. ReturnIfAbrupt(O). - * 4. Return O.[[Get]](P, V). - */ +// https://ecma-international.org/ecma-262/6.0/#sec-getv module.exports = function GetV(V, P) { // 7.3.2.1 diff --git a/node_modules/es-abstract/2020/IsArray.js b/node_modules/es-abstract/2020/IsArray.js index f933cec03..600ffa002 100644 --- a/node_modules/es-abstract/2020/IsArray.js +++ b/node_modules/es-abstract/2020/IsArray.js @@ -1,14 +1,4 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var $Array = GetIntrinsic('%Array%'); - -// eslint-disable-next-line global-require -var toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString'); - // https://ecma-international.org/ecma-262/6.0/#sec-isarray - -module.exports = $Array.isArray || function IsArray(argument) { - return toStr(argument) === '[object Array]'; -}; +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2020/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2020/IsCompatiblePropertyDescriptor.js new file mode 100644 index 000000000..8bdaf3eb4 --- /dev/null +++ b/node_modules/es-abstract/2020/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2020/IsDetachedBuffer.js b/node_modules/es-abstract/2020/IsDetachedBuffer.js new file mode 100644 index 000000000..4b373e9ab --- /dev/null +++ b/node_modules/es-abstract/2020/IsDetachedBuffer.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('%ArrayBuffer.prototype.byteLength%', true) + || function byteLength(ab) { return ab.byteLength; }; // in node < 0.11, byteLength is an own nonconfigurable property + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2020/IsExtensible.js b/node_modules/es-abstract/2020/IsExtensible.js index 9df5b80b1..d6e363840 100644 --- a/node_modules/es-abstract/2020/IsExtensible.js +++ b/node_modules/es-abstract/2020/IsExtensible.js @@ -2,13 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $Object = GetIntrinsic('%Object%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); var isPrimitive = require('../helpers/isPrimitive'); -var $preventExtensions = $Object.preventExtensions; -var $isExtensible = $Object.isExtensible; - // https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o module.exports = $preventExtensions diff --git a/node_modules/es-abstract/2020/IsSharedArrayBuffer.js b/node_modules/es-abstract/2020/IsSharedArrayBuffer.js new file mode 100644 index 000000000..8e96e33f3 --- /dev/null +++ b/node_modules/es-abstract/2020/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2020/IsUnclampedIntegerElementType.js b/node_modules/es-abstract/2020/IsUnclampedIntegerElementType.js index 15237b1f2..4e3a38425 100644 --- a/node_modules/es-abstract/2020/IsUnclampedIntegerElementType.js +++ b/node_modules/es-abstract/2020/IsUnclampedIntegerElementType.js @@ -4,9 +4,9 @@ module.exports = function IsUnclampedIntegerElementType(type) { return type === 'Int8' - || type === 'Uint8' - || type === 'Int16' - || type === 'Uint16' - || type === 'Int32' - || type === 'Uint32'; + || type === 'Uint8' + || type === 'Int16' + || type === 'Uint16' + || type === 'Int32' + || type === 'Uint32'; }; diff --git a/node_modules/es-abstract/2020/IsUnsignedElementType.js b/node_modules/es-abstract/2020/IsUnsignedElementType.js index 5eb1e7c45..b1ff194d7 100644 --- a/node_modules/es-abstract/2020/IsUnsignedElementType.js +++ b/node_modules/es-abstract/2020/IsUnsignedElementType.js @@ -4,8 +4,8 @@ module.exports = function IsUnsignedElementType(type) { return type === 'Uint8' - || type === 'Uint8C' - || type === 'Uint16' - || type === 'Uint32' - || type === 'BigUint64'; + || type === 'Uint8C' + || type === 'Uint16' + || type === 'Uint32' + || type === 'BigUint64'; }; diff --git a/node_modules/es-abstract/2020/IteratorClose.js b/node_modules/es-abstract/2020/IteratorClose.js index dd1118df7..f703ea632 100644 --- a/node_modules/es-abstract/2020/IteratorClose.js +++ b/node_modules/es-abstract/2020/IteratorClose.js @@ -5,6 +5,7 @@ var GetIntrinsic = require('get-intrinsic'); var $TypeError = GetIntrinsic('%TypeError%'); var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); var GetMethod = require('./GetMethod'); var IsCallable = require('./IsCallable'); var Type = require('./Type'); @@ -15,10 +16,10 @@ module.exports = function IteratorClose(iterator, completion) { if (Type(iterator) !== 'Object') { throw new $TypeError('Assertion failed: Type(iterator) is not Object'); } - if (!IsCallable(completion)) { - throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); } - var completionThunk = completion; + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; var iteratorReturn = GetMethod(iterator, 'return'); diff --git a/node_modules/es-abstract/2020/NormalCompletion.js b/node_modules/es-abstract/2020/NormalCompletion.js new file mode 100644 index 000000000..1e429dd65 --- /dev/null +++ b/node_modules/es-abstract/2020/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2020/Number/exponentiate.js b/node_modules/es-abstract/2020/Number/exponentiate.js index bafa7b11f..256865103 100644 --- a/node_modules/es-abstract/2020/Number/exponentiate.js +++ b/node_modules/es-abstract/2020/Number/exponentiate.js @@ -72,6 +72,6 @@ module.exports = function NumberExponentiate(base, exponent) { } if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) { return NaN; - } - */ + } + */ }; diff --git a/node_modules/es-abstract/2020/NumberToBigInt.js b/node_modules/es-abstract/2020/NumberToBigInt.js index a186988c1..84649847c 100644 --- a/node_modules/es-abstract/2020/NumberToBigInt.js +++ b/node_modules/es-abstract/2020/NumberToBigInt.js @@ -4,6 +4,7 @@ var GetIntrinsic = require('get-intrinsic'); var $BigInt = GetIntrinsic('%BigInt%', true); var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); var IsInteger = require('./IsInteger'); @@ -18,5 +19,8 @@ module.exports = function NumberToBigInt(number) { if (!IsInteger(number)) { throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer'); } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } return $BigInt(number); }; diff --git a/node_modules/es-abstract/2020/NumericToRawBytes.js b/node_modules/es-abstract/2020/NumericToRawBytes.js new file mode 100644 index 000000000..91549fb99 --- /dev/null +++ b/node_modules/es-abstract/2020/NumericToRawBytes.js @@ -0,0 +1,209 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $floor = GetIntrinsic('%Math.floor%'); +var $log = GetIntrinsic('%Math.log%'); +var $log2E = GetIntrinsic('%Math.LOG2E%'); +var $log2 = GetIntrinsic('%Math.log2%', true) || function log2(x) { + return $log(x) * $log2E; +}; +var $parseInt = GetIntrinsic('%parseInt%'); +var $pow = GetIntrinsic('%Math.pow%'); +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var callBound = require('call-bind/callBound'); + +var $reverse = callBound('Array.prototype.reverse'); +var $numberToString = callBound('Number.prototype.toString'); +var $strSlice = callBound('String.prototype.slice'); + +var abs = require('./abs'); +var hasOwnProperty = require('./HasOwnProperty'); +var ToBigInt64 = require('./ToBigInt64'); +var ToBigUint64 = require('./ToBigUint64'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); +var isFinite = require('../helpers/isFinite'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32, + BigInt64: ToBigInt64, + BigUint64: ToBigUint64 +}; + +// https://262.ecma-international.org/11.0/#sec-numerictorawbytes + +module.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number' && Type(value) !== 'BigInt') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var rawBytes = []; + var exponent; + + if (type === 'Float32') { // step 1 + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded + } + + var leastSig; + + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + + if (!isFinite(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + + var sign = value < 0 ? 1 : 0; + value = abs(value); // eslint-disable-line no-param-reassign + + exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; // eslint-disable-line no-param-reassign + } + + while (value < 1) { + exponent -= 1; + value *= 2; // eslint-disable-line no-param-reassign + } + + var mantissa = value - 1; + mantissa *= $pow(2, 23); + mantissa = $floor(mantissa); + + exponent += 127; + exponent = exponent << 23; + + var result = sign << 31; + result |= exponent; + result |= mantissa; + + var byte0 = result & 255; + result = result >> 8; + var byte1 = result & 255; + result = result >> 8; + var byte2 = result & 255; + result = result >> 8; + var byte3 = result & 255; + + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; + } else if (type === 'Float64') { // step 2 + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 0, leastSig] : [leastSig, 0, 0, 0, 0, 0, 0, 0]; + } + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 248, 127] : [127, 248, 0, 0, 0, 0, 0, 0]; + } + if (!isFinite(value)) { + var infBytes = value < 0 ? [0, 0, 0, 0, 0, 0, 240, 255] : [0, 0, 0, 0, 0, 0, 240, 127]; + return isLittleEndian ? infBytes : $reverse(infBytes); + } + + var isNegative = value < 0; + if (isNegative) { value = -value; } // eslint-disable-line no-param-reassign + + exponent = $floor($log2(value)); + var significand = (value / $pow(2, exponent)) - 1; + + var bitString = ''; + for (var i = 0; i < 52; i++) { + significand *= 2; + if (significand >= 1) { + bitString += '1'; + significand -= 1; + } else { + bitString += '0'; + } + } + + exponent += 1023; + var exponentBits = $numberToString(exponent, 2); + while (exponentBits.length < 11) { exponentBits = '0' + exponentBits; } + + var fullBitString = (isNegative ? '1' : '0') + exponentBits + bitString; + while (fullBitString.length < 64) { fullBitString = '0' + fullBitString; } + + for (i = 0; i < 8; i++) { + rawBytes[i] = $parseInt($strSlice(fullBitString, i * 8, (i + 1) * 8), 2); + } + + return isLittleEndian ? $reverse(rawBytes) : rawBytes; + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + var isBigInt = type === 'BigInt64' || type === 'BigUint64'; + /* + if (intValue >= 0) { // step 3.d + // Let rawBytes be a List containing the n-byte binary encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } else { // step 3.e + // Let rawBytes be a List containing the n-byte binary 2's complement encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } + */ + if (intValue < 0) { + intValue = intValue >>> 0; + } + var OxFF = isBigInt ? $BigInt(0xFF) : 0xFF; + var eight = isBigInt ? $BigInt(8) : 8; + for (i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = $Number(intValue & OxFF); + intValue = intValue >> eight; + } + + return rawBytes; // step 4 +}; diff --git a/node_modules/es-abstract/2020/ObjectDefineProperties.js b/node_modules/es-abstract/2020/ObjectDefineProperties.js new file mode 100644 index 000000000..f096f1ede --- /dev/null +++ b/node_modules/es-abstract/2020/ObjectDefineProperties.js @@ -0,0 +1,40 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + desc = FromPropertyDescriptor(desc); // TODO: remove this once DefinePropertyOrThrow is fixed + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2020/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2020/OrdinaryDefineOwnProperty.js index 5d33aa6d6..34f029f7e 100644 --- a/node_modules/es-abstract/2020/OrdinaryDefineOwnProperty.js +++ b/node_modules/es-abstract/2020/OrdinaryDefineOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); diff --git a/node_modules/es-abstract/2020/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2020/OrdinaryGetOwnProperty.js index 3d11e9fad..fd8035acb 100644 --- a/node_modules/es-abstract/2020/OrdinaryGetOwnProperty.js +++ b/node_modules/es-abstract/2020/OrdinaryGetOwnProperty.js @@ -2,7 +2,7 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var callBound = require('call-bind/callBound'); diff --git a/node_modules/es-abstract/2020/OrdinaryObjectCreate.js b/node_modules/es-abstract/2020/OrdinaryObjectCreate.js index 34810cd11..140534083 100644 --- a/node_modules/es-abstract/2020/OrdinaryObjectCreate.js +++ b/node_modules/es-abstract/2020/OrdinaryObjectCreate.js @@ -9,9 +9,13 @@ var $SyntaxError = GetIntrinsic('%SyntaxError%'); var IsArray = require('./IsArray'); var Type = require('./Type'); -var hasProto = !({ __proto__: null } instanceof Object); +var forEach = require('../helpers/forEach'); -// https://262.ecma-international.org/6.0/#sec-objectcreate +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/11.0/#sec-objectcreate module.exports = function OrdinaryObjectCreate(proto) { if (proto !== null && Type(proto) !== 'Object') { @@ -21,26 +25,32 @@ module.exports = function OrdinaryObjectCreate(proto) { if (!IsArray(additionalInternalSlotsList)) { throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array'); } - // var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; - if (additionalInternalSlotsList.length > 0) { - throw new $SyntaxError('es-abstract does not yet support internal slots'); - // internalSlotsList.push(...additionalInternalSlotsList); - } - // var O = MakeBasicObject(internalSlotsList); - // setProto(O, proto); - // return O; + // var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1 + // internalSlotsList.push(...additionalInternalSlotsList); // step 2 + // var O = MakeBasicObject(internalSlotsList); // step 3 + // setProto(O, proto); // step 4 + // return O; // step 5 + + var O; if ($ObjectCreate) { - return $ObjectCreate(proto); - } - if (hasProto) { - return { __proto__: proto }; + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); } - if (proto === null) { - throw new $SyntaxError('native Object.create support is required to create null objects'); + if (additionalInternalSlotsList.length > 0) { + forEach(additionalInternalSlotsList, function (slot) { + SLOT.set(O, slot, void undefined); + }); } - var T = function T() {}; - T.prototype = proto; - return new T(); + + return O; }; diff --git a/node_modules/es-abstract/2020/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2020/OrdinarySetPrototypeOf.js index d0ff7a7c2..d2b72306c 100644 --- a/node_modules/es-abstract/2020/OrdinarySetPrototypeOf.js +++ b/node_modules/es-abstract/2020/OrdinarySetPrototypeOf.js @@ -16,15 +16,15 @@ module.exports = function OrdinarySetPrototypeOf(O, V) { throw new $TypeError('Assertion failed: V must be Object or Null'); } /* - var extensible = IsExtensible(O); - var current = OrdinaryGetPrototypeOf(O); - if (SameValue(V, current)) { - return true; - } - if (!extensible) { - return false; - } - */ + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ try { $setProto(O, V); } catch (e) { @@ -32,22 +32,22 @@ module.exports = function OrdinarySetPrototypeOf(O, V) { } return OrdinaryGetPrototypeOf(O) === V; /* - var p = V; - var done = false; - while (!done) { - if (p === null) { - done = true; - } else if (SameValue(p, O)) { - return false; - } else { - if (wat) { - done = true; - } else { - p = p.[[Prototype]]; - } - } - } - O.[[Prototype]] = V; - return true; - */ + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ }; diff --git a/node_modules/es-abstract/2020/OrdinaryToPrimitive.js b/node_modules/es-abstract/2020/OrdinaryToPrimitive.js new file mode 100644 index 000000000..e1dbe1427 --- /dev/null +++ b/node_modules/es-abstract/2020/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2020/RawBytesToNumeric.js b/node_modules/es-abstract/2020/RawBytesToNumeric.js new file mode 100644 index 000000000..c253b5d70 --- /dev/null +++ b/node_modules/es-abstract/2020/RawBytesToNumeric.js @@ -0,0 +1,156 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $pow = GetIntrinsic('%Math.pow%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnsignedElementType = require('./IsUnsignedElementType'); +var Type = require('./Type'); + +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric + +module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError('this environment does not support BigInts'); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + // eslint-disable-next-line no-param-reassign + rawBytes = $reverse(rawBytes); // step 2 + } + + /* eslint no-redeclare: 1 */ + if (type === 'Float32') { // step 3 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value. +If value is an IEEE 754-2008 binary32 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = (rawBytes[3] & 0x80) >> 7; // first bit + var exponent = ((rawBytes[3] & 0x7F) << 1) // 7 bits from index 3 + | ((rawBytes[2] & 0x80) >> 7); // 1 bit from index 2 + var mantissa = ((rawBytes[2] & 0x7F) << 16) // 7 bits from index 2 + | (rawBytes[1] << 8) // 8 bits from index 1 + | rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign === 0 ? 0 : -0; + } + if (exponent === 0xFF && mantissa === 0) { + return sign === 0 ? Infinity : -Infinity; + } + if (exponent === 0xFF && mantissa !== 0) { + return NaN; + } + + exponent -= 127; // subtract the bias + + // return $pow(-1, sign) * mantissa / $pow(2, 23) * $pow(2, exponent); + // return $pow(-1, sign) * (mantissa + 0x1000000) * $pow(2, exponent - 23); + return $pow(-1, sign) * (1 + (mantissa / $pow(2, 23))) * $pow(2, exponent); + } + + if (type === 'Float64') { // step 4 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value. +If value is an IEEE 754-2008 binary64 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[7] & 0x80 ? -1 : 1; // first bit + var exponent = ((rawBytes[7] & 0x7F) << 4) // 7 bits from index 7 + | ((rawBytes[6] & 0xF0) >> 4); // 4 bits from index 6 + var mantissa = ((rawBytes[6] & 0x0F) * 0x1000000000000) // 4 bits from index 6 + + (rawBytes[5] * 0x10000000000) // 8 bits from index 5 + + (rawBytes[4] * 0x100000000) // 8 bits from index 4 + + (rawBytes[3] * 0x1000000) // 8 bits from index 3 + + (rawBytes[2] * 0x10000) // 8 bits from index 2 + + (rawBytes[1] * 0x100) // 8 bits from index 1 + + rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 0x7FF && mantissa !== 0) { + return NaN; + } + if (exponent === 0x7FF && mantissa === 0) { + return sign * Infinity; + } + + exponent -= 1023; // subtract the bias + + return sign * (mantissa + 0x10000000000000) * $pow(2, exponent - 52); + } + + // this is common to both branches + var intValue = isBigInt ? $BigInt(0) : 0; + for (var i = 0; i < rawBytes.length; i++) { + intValue |= isBigInt ? $BigInt(rawBytes[i]) << $BigInt(8 * i) : rawBytes[i] << (8 * i); + } + /* + Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. + */ + + if (!IsUnsignedElementType(type)) { // steps 5-6 + // Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length elementSize × 8. + var bitLength = elementSize * 8; + if (bitLength < 32) { + var x = isBigInt ? $BigInt(32 - bitLength) : 32 - bitLength; + intValue = (intValue << x) >> x; + } + } + + return intValue; // step 7 +}; diff --git a/node_modules/es-abstract/2020/SameValueNonNumeric.js b/node_modules/es-abstract/2020/SameValueNonNumeric.js index f7ef12c01..04f6cbfbe 100644 --- a/node_modules/es-abstract/2020/SameValueNonNumeric.js +++ b/node_modules/es-abstract/2020/SameValueNonNumeric.js @@ -11,7 +11,7 @@ var Type = require('./Type'); module.exports = function SameValueNonNumeric(x, y) { var xType = Type(x); - if (xType === 'Number' || xType === 'Bigint') { + if (xType === 'Number' || xType === 'BigInt') { throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values'); } if (xType !== Type(y)) { diff --git a/node_modules/es-abstract/2020/Set.js b/node_modules/es-abstract/2020/Set.js index ea49e813f..097149887 100644 --- a/node_modules/es-abstract/2020/Set.js +++ b/node_modules/es-abstract/2020/Set.js @@ -36,12 +36,12 @@ module.exports = function Set(O, P, V, Throw) { throw new $TypeError('Attempted to assign to readonly property.'); } return true; - } else { - try { - O[P] = V; // eslint-disable-line no-param-reassign - return noThrowOnStrictViolation ? SameValue(O[P], V) : true; - } catch (e) { - return false; - } } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + }; diff --git a/node_modules/es-abstract/2020/SetFunctionName.js b/node_modules/es-abstract/2020/SetFunctionName.js index f59cb7b9e..03ec2227c 100644 --- a/node_modules/es-abstract/2020/SetFunctionName.js +++ b/node_modules/es-abstract/2020/SetFunctionName.js @@ -6,7 +6,7 @@ var has = require('has'); var $TypeError = GetIntrinsic('%TypeError%'); -var getSymbolDescription = require('../helpers/getSymbolDescription'); +var getSymbolDescription = require('get-symbol-description'); var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); var IsExtensible = require('./IsExtensible'); diff --git a/node_modules/es-abstract/2020/SetIntegrityLevel.js b/node_modules/es-abstract/2020/SetIntegrityLevel.js index 1ac7d61e2..546f3e74f 100644 --- a/node_modules/es-abstract/2020/SetIntegrityLevel.js +++ b/node_modules/es-abstract/2020/SetIntegrityLevel.js @@ -4,9 +4,9 @@ var GetIntrinsic = require('get-intrinsic'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $TypeError = GetIntrinsic('%TypeError%'); -var $preventExtensions = GetIntrinsic('%Object.preventExtensions%'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); var forEach = require('../helpers/forEach'); diff --git a/node_modules/es-abstract/2020/StringCreate.js b/node_modules/es-abstract/2020/StringCreate.js index da0c0ea06..bd02820f7 100644 --- a/node_modules/es-abstract/2020/StringCreate.js +++ b/node_modules/es-abstract/2020/StringCreate.js @@ -20,7 +20,7 @@ module.exports = function StringCreate(value, prototype) { } var S = $Object(value); - if (S !== $StringPrototype) { + if (prototype !== $StringPrototype) { if (setProto) { setProto(S, prototype); } else { diff --git a/node_modules/es-abstract/2020/StringToBigInt.js b/node_modules/es-abstract/2020/StringToBigInt.js new file mode 100644 index 000000000..0bc3cec01 --- /dev/null +++ b/node_modules/es-abstract/2020/StringToBigInt.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +// https://262.ecma-international.org/11.0/#sec-stringtobigint + +module.exports = function StringToBigInt(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('`argument` must be a string'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + try { + return $BigInt(argument); + } catch (e) { + return NaN; + } +}; diff --git a/node_modules/es-abstract/2020/TestIntegrityLevel.js b/node_modules/es-abstract/2020/TestIntegrityLevel.js index cf1649c1b..7f95a6e1d 100644 --- a/node_modules/es-abstract/2020/TestIntegrityLevel.js +++ b/node_modules/es-abstract/2020/TestIntegrityLevel.js @@ -2,11 +2,11 @@ var GetIntrinsic = require('get-intrinsic'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%'); +var $gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); var IsDataDescriptor = require('./IsDataDescriptor'); var IsExtensible = require('./IsExtensible'); @@ -26,7 +26,7 @@ module.exports = function TestIntegrityLevel(O, level) { if (status) { return false; } - var theKeys = $gOPN(O); + var theKeys = OwnPropertyKeys(O); return theKeys.length === 0 || every(theKeys, function (k) { var currentDesc = $gOPD(O, k); if (typeof currentDesc !== 'undefined') { diff --git a/node_modules/es-abstract/2020/ThrowCompletion.js b/node_modules/es-abstract/2020/ThrowCompletion.js new file mode 100644 index 000000000..b7d388a35 --- /dev/null +++ b/node_modules/es-abstract/2020/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2020/ToBigInt.js b/node_modules/es-abstract/2020/ToBigInt.js new file mode 100644 index 000000000..aa24d7b71 --- /dev/null +++ b/node_modules/es-abstract/2020/ToBigInt.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $asIntN = GetIntrinsic('%BigInt.asIntN%', true); +var $Number = GetIntrinsic('%Number%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var ToPrimitive = require('./ToPrimitive'); + +// https://262.ecma-international.org/11.0/#sec-tobigint + +module.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + + var prim = ToPrimitive(argument, $Number); + + if (typeof prim === 'number') { + return $asIntN(0, prim); + } + return $BigInt(prim); +}; diff --git a/node_modules/es-abstract/2020/ToBigInt64.js b/node_modules/es-abstract/2020/ToBigInt64.js new file mode 100644 index 000000000..65c1c55d9 --- /dev/null +++ b/node_modules/es-abstract/2020/ToBigInt64.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31))); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobigint64 + +module.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; +}; diff --git a/node_modules/es-abstract/2020/ToBigUint64.js b/node_modules/es-abstract/2020/ToBigUint64.js new file mode 100644 index 000000000..ff68236a8 --- /dev/null +++ b/node_modules/es-abstract/2020/ToBigUint64.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobiguint64 + +module.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; +}; diff --git a/node_modules/es-abstract/2020/ToNumber.js b/node_modules/es-abstract/2020/ToNumber.js index fcddeb66f..c9e29f2c4 100644 --- a/node_modules/es-abstract/2020/ToNumber.js +++ b/node_modules/es-abstract/2020/ToNumber.js @@ -8,7 +8,7 @@ var $RegExp = GetIntrinsic('%RegExp%'); var $parseInteger = GetIntrinsic('%parseInt%'); var callBound = require('call-bind/callBound'); -var regexTester = require('../helpers/regexTester'); +var regexTester = require('safe-regex-test'); var isPrimitive = require('../helpers/isPrimitive'); var $strSlice = callBound('String.prototype.slice'); @@ -51,12 +51,12 @@ module.exports = function ToNumber(argument) { return ToNumber($parseInteger($strSlice(value, 2), 8)); } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { return NaN; - } else { - var trimmed = $trim(value); - if (trimmed !== value) { - return ToNumber(trimmed); - } } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + } return $Number(value); }; diff --git a/node_modules/es-abstract/2020/ValidateAtomicAccess.js b/node_modules/es-abstract/2020/ValidateAtomicAccess.js new file mode 100644 index 000000000..e1c51c776 --- /dev/null +++ b/node_modules/es-abstract/2020/ValidateAtomicAccess.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToIndex = require('./ToIndex'); + +var isTypedArray = require('is-typed-array'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/8.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1 + } + + var accessIndex = ToIndex(requestIndex); // step 2 + + var length = typedArrayLength(typedArray); // step 3 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 5 + } + + return accessIndex; // step 6 +}; diff --git a/node_modules/es-abstract/2020/ValidateTypedArray.js b/node_modules/es-abstract/2020/ValidateTypedArray.js new file mode 100644 index 000000000..83df3a81c --- /dev/null +++ b/node_modules/es-abstract/2020/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('%TypedArray.prototype.some%', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2020/floor.js b/node_modules/es-abstract/2020/floor.js index 8439df064..625548e93 100644 --- a/node_modules/es-abstract/2020/floor.js +++ b/node_modules/es-abstract/2020/floor.js @@ -1,11 +1,16 @@ 'use strict'; +var Type = require('./Type'); + // var modulo = require('./modulo'); var $floor = Math.floor; -// http://262.ecma-international.org/5.1/#sec-5.2 +// http://262.ecma-international.org/11.0/#eqn-floor module.exports = function floor(x) { // return x - modulo(x, 1); + if (Type(x) === 'BigInt') { + return x; + } return $floor(x); }; diff --git a/node_modules/es-abstract/2020/max.js b/node_modules/es-abstract/2020/max.js new file mode 100644 index 000000000..b919d4e83 --- /dev/null +++ b/node_modules/es-abstract/2020/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2020/min.js b/node_modules/es-abstract/2020/min.js new file mode 100644 index 000000000..909de4b0e --- /dev/null +++ b/node_modules/es-abstract/2020/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2021/AbstractEqualityComparison.js b/node_modules/es-abstract/2021/AbstractEqualityComparison.js new file mode 100644 index 000000000..83b294967 --- /dev/null +++ b/node_modules/es-abstract/2021/AbstractEqualityComparison.js @@ -0,0 +1,57 @@ +'use strict'; + +var StrictEqualityComparison = require('./StrictEqualityComparison'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); + +// https://ecma-international.org/ecma-262/11.0/#sec-abstract-equality-comparison + +module.exports = function AbstractEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return StrictEqualityComparison(x, y); + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (xType === 'BigInt' && yType === 'String') { + var n = StringToBigInt(y); + if (isNaN(n)) { + return false; + } + return AbstractEqualityComparison(x, n); + } + if (xType === 'String' && yType === 'BigInt') { + return AbstractEqualityComparison(y, x); + } + if (xType === 'Boolean') { + return AbstractEqualityComparison(ToNumber(x), y); + } + if (yType === 'Boolean') { + return AbstractEqualityComparison(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'BigInt' || xType === 'Symbol') && yType === 'Object') { + return AbstractEqualityComparison(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'BigInt' || yType === 'Symbol')) { + return AbstractEqualityComparison(ToPrimitive(x), y); + } + if ((xType === 'BigInt' && yType === 'Number') || (xType === 'Number' && yType === 'BigInt')) { + if (isNaN(x) || isNaN(y) || x === Infinity || y === Infinity || x === -Infinity || y === -Infinity) { + return false; + } + return x == y; // eslint-disable-line eqeqeq + } + return false; +}; diff --git a/node_modules/es-abstract/2021/AbstractRelationalComparison.js b/node_modules/es-abstract/2021/AbstractRelationalComparison.js new file mode 100644 index 000000000..9076d71e2 --- /dev/null +++ b/node_modules/es-abstract/2021/AbstractRelationalComparison.js @@ -0,0 +1,82 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); + +var IsStringPrefix = require('./IsStringPrefix'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +var BigIntLessThan = require('./BigInt/lessThan'); +var NumberLessThan = require('./Number/lessThan'); + +// https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function AbstractRelationalComparison(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + if (Type(px) === 'String' && Type(py) === 'String') { + if (IsStringPrefix(py, px)) { + return false; + } + if (IsStringPrefix(px, py)) { + return true; + } + return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f + } + + var pxType = Type(px); + var pyType = Type(py); + var nx; + var ny; + if (pxType === 'BigInt' && pyType === 'String') { + ny = StringToBigInt(py); + if ($isNaN(ny)) { + return void undefined; + } + return BigIntLessThan(px, ny); + } + if (pxType === 'String' && pyType === 'BigInt') { + nx = StringToBigInt(px); + if ($isNaN(nx)) { + return void undefined; + } + return BigIntLessThan(nx, py); + } + + nx = ToNumeric(px); + ny = ToNumeric(py); + var nxType = Type(nx); + if (nxType === Type(ny)) { + return nxType === 'Number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny); + } + + if ($isNaN(nx) || $isNaN(ny)) { + return void undefined; + } + if (nx === -Infinity || ny === Infinity) { + return true; + } + if (nx === Infinity || ny === -Infinity) { + return false; + } + + return nx < ny; // by now, these are both nonzero, finite, and not equal +}; diff --git a/node_modules/es-abstract/2021/AddEntriesFromIterable.js b/node_modules/es-abstract/2021/AddEntriesFromIterable.js new file mode 100644 index 000000000..a0a5e71bd --- /dev/null +++ b/node_modules/es-abstract/2021/AddEntriesFromIterable.js @@ -0,0 +1,52 @@ +'use strict'; + +var inspect = require('object-inspect'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var GetIterator = require('./GetIterator'); +var IsCallable = require('./IsCallable'); +var IteratorClose = require('./IteratorClose'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/10.0//#sec-add-entries-from-iterable + +module.exports = function AddEntriesFromIterable(target, iterable, adder) { + if (!IsCallable(adder)) { + throw new $TypeError('Assertion failed: `adder` is not callable'); + } + if (iterable == null) { + throw new $TypeError('Assertion failed: `iterable` is present, and not nullish'); + } + var iteratorRecord = GetIterator(iterable); + while (true) { // eslint-disable-line no-constant-condition + var next = IteratorStep(iteratorRecord); + if (!next) { + return target; + } + var nextItem = IteratorValue(next); + if (Type(nextItem) !== 'Object') { + var error = new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)); + return IteratorClose( + iteratorRecord, + function () { throw error; } // eslint-disable-line no-loop-func + ); + } + try { + var k = Get(nextItem, '0'); + var v = Get(nextItem, '1'); + Call(adder, target, [k, v]); + } catch (e) { + return IteratorClose( + iteratorRecord, + function () { throw e; } + ); + } + } +}; diff --git a/node_modules/es-abstract/2021/AddToKeptObjects.js b/node_modules/es-abstract/2021/AddToKeptObjects.js new file mode 100644 index 000000000..c3088d999 --- /dev/null +++ b/node_modules/es-abstract/2021/AddToKeptObjects.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var SLOT = require('internal-slot'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ClearKeptObjects = require('./ClearKeptObjects'); +var Type = require('./Type'); + +var $push = callBound('Array.prototype.push'); + +// https://ecma-international.org/ecma-262/12.0/#sec-addtokeptobjects + +module.exports = function AddToKeptObjects(object) { + if (Type(object) !== 'Object') { + throw new $TypeError('Assertion failed: `object` must be an Object'); + } + $push(SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]'), object); +}; diff --git a/node_modules/es-abstract/2021/AdvanceStringIndex.js b/node_modules/es-abstract/2021/AdvanceStringIndex.js new file mode 100644 index 000000000..eeae53125 --- /dev/null +++ b/node_modules/es-abstract/2021/AdvanceStringIndex.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var CodePointAt = require('./CodePointAt'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://ecma-international.org/ecma-262/12.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!IsIntegralNumber(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + var cp = CodePointAt(S, index); + return index + cp['[[CodeUnitCount]]']; +}; diff --git a/node_modules/es-abstract/2021/ApplyStringOrNumericBinaryOperator.js b/node_modules/es-abstract/2021/ApplyStringOrNumericBinaryOperator.js new file mode 100644 index 000000000..824a10543 --- /dev/null +++ b/node_modules/es-abstract/2021/ApplyStringOrNumericBinaryOperator.js @@ -0,0 +1,80 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var HasOwnProperty = require('./HasOwnProperty'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var NumberAdd = require('./Number/add'); +var NumberBitwiseAND = require('./Number/bitwiseAND'); +var NumberBitwiseOR = require('./Number/bitwiseOR'); +var NumberBitwiseXOR = require('./Number/bitwiseXOR'); +var NumberDivide = require('./Number/divide'); +var NumberExponentiate = require('./Number/exponentiate'); +var NumberLeftShift = require('./Number/leftShift'); +var NumberMultiply = require('./Number/multiply'); +var NumberRemainder = require('./Number/remainder'); +var NumberSignedRightShift = require('./Number/signedRightShift'); +var NumberSubtract = require('./Number/subtract'); +var NumberUnsignedRightShift = require('./Number/unsignedRightShift'); +var BigIntAdd = require('./BigInt/add'); +var BigIntBitwiseAND = require('./BigInt/bitwiseAND'); +var BigIntBitwiseOR = require('./BigInt/bitwiseOR'); +var BigIntBitwiseXOR = require('./BigInt/bitwiseXOR'); +var BigIntDivide = require('./BigInt/divide'); +var BigIntExponentiate = require('./BigInt/exponentiate'); +var BigIntLeftShift = require('./BigInt/leftShift'); +var BigIntMultiply = require('./BigInt/multiply'); +var BigIntRemainder = require('./BigInt/remainder'); +var BigIntSignedRightShift = require('./BigInt/signedRightShift'); +var BigIntSubtract = require('./BigInt/subtract'); +var BigIntUnsignedRightShift = require('./BigInt/unsignedRightShift'); + +// https://ecma-international.org/ecma-262/12.0/#sec-applystringornumericbinaryoperator + +// https://ecma-international.org/ecma-262/12.0/#step-applystringornumericbinaryoperator-operations-table +var table = { + '**': [NumberExponentiate, BigIntExponentiate], + '*': [NumberMultiply, BigIntMultiply], + '/': [NumberDivide, BigIntDivide], + '%': [NumberRemainder, BigIntRemainder], + '+': [NumberAdd, BigIntAdd], + '-': [NumberSubtract, BigIntSubtract], + '<<': [NumberLeftShift, BigIntLeftShift], + '>>': [NumberSignedRightShift, BigIntSignedRightShift], + '>>>': [NumberUnsignedRightShift, BigIntUnsignedRightShift], + '&': [NumberBitwiseAND, BigIntBitwiseAND], + '^': [NumberBitwiseXOR, BigIntBitwiseXOR], + '|': [NumberBitwiseOR, BigIntBitwiseOR] +}; + +module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) { + if (Type(opText) !== 'String' || !HasOwnProperty(table, opText)) { + throw new $TypeError('Assertion failed: `opText` must be a valid operation string'); + } + if (opText === '+') { + var lprim = ToPrimitive(lval); + var rprim = ToPrimitive(rval); + if (Type(lprim) === 'String' || Type(rprim) === 'String') { + var lstr = ToString(lprim); + var rstr = ToString(rprim); + return lstr + rstr; + } + /* eslint no-param-reassign: 1 */ + lval = lprim; + rval = rprim; + } + var lnum = ToNumeric(lval); + var rnum = ToNumeric(rval); + var T = Type(lnum); + if (T !== Type(rnum)) { + throw new $TypeError('types of ' + lnum + ' and ' + rnum + ' differ'); + } + var Operation = table[opText][T === 'BigInt' ? 1 : 0]; + return Operation(lnum, rnum); +}; diff --git a/node_modules/es-abstract/2021/ArrayCreate.js b/node_modules/es-abstract/2021/ArrayCreate.js new file mode 100644 index 000000000..e138d2db9 --- /dev/null +++ b/node_modules/es-abstract/2021/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var hasProto = require('has-proto')(); + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://www.ecma-international.org/ecma-262/12.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!IsIntegralNumber(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 3, 5 + if (proto !== $ArrayPrototype) { // step 4 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 6 + A.length = length; + } + /* step 6, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2021/ArraySetLength.js b/node_modules/es-abstract/2021/ArraySetLength.js new file mode 100644 index 000000000..08db9c2e9 --- /dev/null +++ b/node_modules/es-abstract/2021/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2021/ArraySpeciesCreate.js b/node_modules/es-abstract/2021/ArraySpeciesCreate.js new file mode 100644 index 000000000..d908fa351 --- /dev/null +++ b/node_modules/es-abstract/2021/ArraySpeciesCreate.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ArrayCreate = require('./ArrayCreate'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/12.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!IsIntegralNumber(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + + var isArray = IsArray(originalArray); + if (!isArray) { + return ArrayCreate(length); + } + + var C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + + if (typeof C === 'undefined') { + return ArrayCreate(length); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(length); // Construct(C, length); +}; + diff --git a/node_modules/es-abstract/2021/AsyncFromSyncIteratorContinuation.js b/node_modules/es-abstract/2021/AsyncFromSyncIteratorContinuation.js new file mode 100644 index 000000000..c1cc7a111 --- /dev/null +++ b/node_modules/es-abstract/2021/AsyncFromSyncIteratorContinuation.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var callBound = require('call-bind/callBound'); + +var CreateIterResultObject = require('./CreateIterResultObject'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorValue = require('./IteratorValue'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var $then = callBound('Promise.prototype.then', true); + +// https://ecma-international.org/ecma-262/10.0/#sec-asyncfromsynciteratorcontinuation + +module.exports = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; diff --git a/node_modules/es-abstract/2021/AsyncIteratorClose.js b/node_modules/es-abstract/2021/AsyncIteratorClose.js new file mode 100644 index 000000000..1ae42c0c5 --- /dev/null +++ b/node_modules/es-abstract/2021/AsyncIteratorClose.js @@ -0,0 +1,68 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/12.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return $then( + $then( + $then( + new $Promise(function (resolve) { + resolve(GetMethod(iterator, 'return')); // step 4 + // resolve(Call(ret, iterator, [])); // step 6 + }), + function (returnV) { // step 5.a + if (typeof returnV === 'undefined') { + return completion; // step 5.b + } + return Call(returnV, iterator); // step 5.c, 5.d. + } + ), + null, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 6 + } else { + throw e; // step 7 + } + } + ), + function (innerResult) { // step 8 + if (completion.type() === 'throw') { + completion['?'](); // step 6 + } + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + } + ); +}; diff --git a/node_modules/es-abstract/2021/BigInt/add.js b/node_modules/es-abstract/2021/BigInt/add.js new file mode 100644 index 000000000..22b5db4b3 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/add.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add + +module.exports = function BigIntAdd(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/bitwiseAND.js b/node_modules/es-abstract/2021/BigInt/bitwiseAND.js new file mode 100644 index 000000000..83cd2c3ca --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND + +module.exports = function BigIntBitwiseAND(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/bitwiseNOT.js b/node_modules/es-abstract/2021/BigInt/bitwiseNOT.js new file mode 100644 index 000000000..9a444dfea --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/bitwiseNOT.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT + +module.exports = function BigIntBitwiseNOT(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + return -x - $BigInt(1); +}; diff --git a/node_modules/es-abstract/2021/BigInt/bitwiseOR.js b/node_modules/es-abstract/2021/BigInt/bitwiseOR.js new file mode 100644 index 000000000..3c1b57193 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR + +module.exports = function BigIntBitwiseOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/bitwiseXOR.js b/node_modules/es-abstract/2021/BigInt/bitwiseXOR.js new file mode 100644 index 000000000..45f8217ef --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR + +module.exports = function BigIntBitwiseXOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/divide.js b/node_modules/es-abstract/2021/BigInt/divide.js new file mode 100644 index 000000000..5706e7d72 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide + +module.exports = function BigIntDivide(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + if (y === $BigInt(0)) { + throw new $RangeError('Division by zero'); + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/equal.js b/node_modules/es-abstract/2021/BigInt/equal.js new file mode 100644 index 000000000..a28826d67 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/equal.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal + +module.exports = function BigIntEqual(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/exponentiate.js b/node_modules/es-abstract/2021/BigInt/exponentiate.js new file mode 100644 index 000000000..2365838c2 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/exponentiate.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate + +module.exports = function BigIntExponentiate(base, exponent) { + if (Type(base) !== 'BigInt' || Type(exponent) !== 'BigInt') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts'); + } + if (exponent < $BigInt(0)) { + throw new $RangeError('Exponent must be positive'); + } + if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) { + return $BigInt(1); + } + + var square = base; + var remaining = exponent; + while (remaining > $BigInt(0)) { + square += exponent; + --remaining; // eslint-disable-line no-plusplus + } + return square; +}; diff --git a/node_modules/es-abstract/2021/BigInt/index.js b/node_modules/es-abstract/2021/BigInt/index.js new file mode 100644 index 000000000..63ec52da6 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2021/BigInt/leftShift.js b/node_modules/es-abstract/2021/BigInt/leftShift.js new file mode 100644 index 000000000..d2a570223 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/leftShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift + +module.exports = function BigIntLeftShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x << y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/lessThan.js b/node_modules/es-abstract/2021/BigInt/lessThan.js new file mode 100644 index 000000000..0b3cd6ba0 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/lessThan.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan + +module.exports = function BigIntLessThan(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/multiply.js b/node_modules/es-abstract/2021/BigInt/multiply.js new file mode 100644 index 000000000..6e5d56c83 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/multiply.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply + +module.exports = function BigIntMultiply(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/remainder.js b/node_modules/es-abstract/2021/BigInt/remainder.js new file mode 100644 index 000000000..d2dc678ca --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/remainder.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder + +module.exports = function BigIntRemainder(n, d) { + if (Type(n) !== 'BigInt' || Type(d) !== 'BigInt') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts'); + } + + if (d === zero) { + throw new $RangeError('Division by zero'); + } + + if (n === zero) { + return zero; + } + + // shortcut for the actual spec mechanics + return n % d; +}; diff --git a/node_modules/es-abstract/2021/BigInt/sameValue.js b/node_modules/es-abstract/2021/BigInt/sameValue.js new file mode 100644 index 000000000..63ff06393 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/sameValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntEqual = require('./equal'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue + +module.exports = function BigIntSameValue(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntEqual(x, y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/sameValueZero.js b/node_modules/es-abstract/2021/BigInt/sameValueZero.js new file mode 100644 index 000000000..39f262c6d --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/sameValueZero.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntEqual = require('./equal'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero + +module.exports = function BigIntSameValueZero(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntEqual(x, y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/signedRightShift.js b/node_modules/es-abstract/2021/BigInt/signedRightShift.js new file mode 100644 index 000000000..f63c642f0 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/signedRightShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntLeftShift = require('./leftShift'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift + +module.exports = function BigIntSignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntLeftShift(x, -y); +}; diff --git a/node_modules/es-abstract/2021/BigInt/subtract.js b/node_modules/es-abstract/2021/BigInt/subtract.js new file mode 100644 index 000000000..0490784f6 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/subtract.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract + +module.exports = function BigIntSubtract(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x - y; +}; diff --git a/node_modules/es-abstract/2021/BigInt/toString.js b/node_modules/es-abstract/2021/BigInt/toString.js new file mode 100644 index 000000000..858d95545 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/toString.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring + +module.exports = function BigIntToString(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` must be a BigInt'); + } + + return $String(x); +}; diff --git a/node_modules/es-abstract/2021/BigInt/unaryMinus.js b/node_modules/es-abstract/2021/BigInt/unaryMinus.js new file mode 100644 index 000000000..ee0f7ef19 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/unaryMinus.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus + +module.exports = function BigIntUnaryMinus(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + + if (x === zero) { + return zero; + } + + return -x; +}; diff --git a/node_modules/es-abstract/2021/BigInt/unsignedRightShift.js b/node_modules/es-abstract/2021/BigInt/unsignedRightShift.js new file mode 100644 index 000000000..7ad94f7a8 --- /dev/null +++ b/node_modules/es-abstract/2021/BigInt/unsignedRightShift.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift + +module.exports = function BigIntUnsignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + throw new $TypeError('BigInts have no unsigned right shift, use >> instead'); +}; diff --git a/node_modules/es-abstract/2021/BigIntBitwiseOp.js b/node_modules/es-abstract/2021/BigIntBitwiseOp.js new file mode 100644 index 000000000..0b1c03a91 --- /dev/null +++ b/node_modules/es-abstract/2021/BigIntBitwiseOp.js @@ -0,0 +1,66 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +// var $BigInt = GetIntrinsic('%BigInt%', true); +// var $pow = GetIntrinsic('%Math.pow%'); + +// var BinaryAnd = require('./BinaryAnd'); +// var BinaryOr = require('./BinaryOr'); +// var BinaryXor = require('./BinaryXor'); +var Type = require('./Type'); +// var modulo = require('./modulo'); + +// var zero = $BigInt && $BigInt(0); +// var negOne = $BigInt && $BigInt(-1); +// var two = $BigInt && $BigInt(2); + +// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop + +module.exports = function BigIntBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('`x` and `y` must be BigInts'); + } + + if (op === '&') { + return x & y; + } + if (op === '|') { + return x | y; + } + return x ^ y; + /* + var result = zero; + var shift = 0; + while (x !== zero && x !== negOne && y !== zero && y !== negOne) { + var xDigit = modulo(x, two); + var yDigit = modulo(y, two); + if (op === '&') { + result += $pow(2, shift) * BinaryAnd(xDigit, yDigit); + } else if (op === '|') { + result += $pow(2, shift) * BinaryOr(xDigit, yDigit); + } else if (op === '^') { + result += $pow(2, shift) * BinaryXor(xDigit, yDigit); + } + shift += 1; + x = (x - xDigit) / two; + y = (y - yDigit) / two; + } + var tmp; + if (op === '&') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else if (op === '|') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else { + tmp = BinaryXor(modulo(x, two), modulo(y, two)); + } + if (tmp !== 0) { + result -= $pow(2, shift); + } + return result; + */ +}; diff --git a/node_modules/es-abstract/2021/BinaryAnd.js b/node_modules/es-abstract/2021/BinaryAnd.js new file mode 100644 index 000000000..c617f388d --- /dev/null +++ b/node_modules/es-abstract/2021/BinaryAnd.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryand + +module.exports = function BinaryAnd(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x & y; +}; diff --git a/node_modules/es-abstract/2021/BinaryOr.js b/node_modules/es-abstract/2021/BinaryOr.js new file mode 100644 index 000000000..6de0955f1 --- /dev/null +++ b/node_modules/es-abstract/2021/BinaryOr.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryor + +module.exports = function BinaryOr(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x | y; +}; diff --git a/node_modules/es-abstract/2021/BinaryXor.js b/node_modules/es-abstract/2021/BinaryXor.js new file mode 100644 index 000000000..189d7d846 --- /dev/null +++ b/node_modules/es-abstract/2021/BinaryXor.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryxor + +module.exports = function BinaryXor(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x ^ y; +}; diff --git a/node_modules/es-abstract/2021/ByteListBitwiseOp.js b/node_modules/es-abstract/2021/ByteListBitwiseOp.js new file mode 100644 index 000000000..4e3c1f10b --- /dev/null +++ b/node_modules/es-abstract/2021/ByteListBitwiseOp.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $push = callBound('Array.prototype.push'); + +var IsArray = require('./IsArray'); + +var isByteValue = require('../helpers/isByteValue'); + +// https://ecma-international.org/ecma-262/12.0/#sec-bytelistbitwiseop + +module.exports = function ByteListBitwiseOp(op, xBytes, yBytes) { + if (op !== '&' && op !== '^' && op !== '|') { + throw new $TypeError('Assertion failed: `op` must be `&`, `^`, or `|`'); + } + if (!IsArray(xBytes) || !IsArray(yBytes) || xBytes.length !== yBytes.length) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)'); + } + + var result = []; + + for (var i = 0; i < xBytes.length; i += 1) { + var xByte = xBytes[i]; + var yByte = yBytes[i]; + if (!isByteValue(xByte) || !isByteValue(yByte)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)'); + } + var resultByte; + if (op === '&') { + resultByte = xByte & yByte; + } else if (op === '^') { + resultByte = xByte ^ yByte; + } else { + resultByte = xByte | yByte; + } + $push(result, resultByte); + } + + return result; +}; diff --git a/node_modules/es-abstract/2021/ByteListEqual.js b/node_modules/es-abstract/2021/ByteListEqual.js new file mode 100644 index 000000000..adc2378e7 --- /dev/null +++ b/node_modules/es-abstract/2021/ByteListEqual.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var isByteValue = require('../helpers/isByteValue'); + +// https://ecma-international.org/ecma-262/12.0/#sec-bytelistequal + +module.exports = function ByteListEqual(xBytes, yBytes) { + if (!IsArray(xBytes) || !IsArray(yBytes)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)'); + } + + if (xBytes.length !== yBytes.length) { + return false; + } + + for (var i = 0; i < xBytes.length; i += 1) { + var xByte = xBytes[i]; + var yByte = yBytes[i]; + if (!isByteValue(xByte) || !isByteValue(yByte)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)'); + } + if (xByte !== yByte) { + return false; + } + } + return true; +}; diff --git a/node_modules/es-abstract/2021/Call.js b/node_modules/es-abstract/2021/Call.js new file mode 100644 index 000000000..4b238c691 --- /dev/null +++ b/node_modules/es-abstract/2021/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('%Function.prototype.apply%'); + +// https://ecma-international.org/ecma-262/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2021/CanonicalNumericIndexString.js b/node_modules/es-abstract/2021/CanonicalNumericIndexString.js new file mode 100644 index 000000000..feb878c03 --- /dev/null +++ b/node_modules/es-abstract/2021/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2021/CharacterRange.js b/node_modules/es-abstract/2021/CharacterRange.js new file mode 100644 index 000000000..70e4b5235 --- /dev/null +++ b/node_modules/es-abstract/2021/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('%String.prototype.charCodeAt%'); +var $push = callBound('%Array.prototype.push%'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2021/ClearKeptObjects.js b/node_modules/es-abstract/2021/ClearKeptObjects.js new file mode 100644 index 000000000..9397f5966 --- /dev/null +++ b/node_modules/es-abstract/2021/ClearKeptObjects.js @@ -0,0 +1,12 @@ +'use strict'; + +var SLOT = require('internal-slot'); +var keptObjects = []; + +// https://ecma-international.org/ecma-262/12.0/#sec-clear-kept-objects + +module.exports = function ClearKeptObjects() { + keptObjects.length = 0; +}; + +SLOT.set(module.exports, '[[es-abstract internal: KeptAlive]]', keptObjects); diff --git a/node_modules/es-abstract/2021/CodePointAt.js b/node_modules/es-abstract/2021/CodePointAt.js new file mode 100644 index 000000000..7a9ac1be7 --- /dev/null +++ b/node_modules/es-abstract/2021/CodePointAt.js @@ -0,0 +1,58 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var callBound = require('call-bind/callBound'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var Type = require('./Type'); +var UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint'); + +var $charAt = callBound('String.prototype.charAt'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +// https://ecma-international.org/ecma-262/12.0/#sec-codepointat + +module.exports = function CodePointAt(string, position) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var size = string.length; + if (position < 0 || position >= size) { + throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`'); + } + var first = $charCodeAt(string, position); + var cp = $charAt(string, position); + var firstIsLeading = isLeadingSurrogate(first); + var firstIsTrailing = isTrailingSurrogate(first); + if (!firstIsLeading && !firstIsTrailing) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': false + }; + } + if (firstIsTrailing || (position + 1 === size)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + var second = $charCodeAt(string, position + 1); + if (!isTrailingSurrogate(second)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + + return { + '[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second), + '[[CodeUnitCount]]': 2, + '[[IsUnpairedSurrogate]]': false + }; +}; diff --git a/node_modules/es-abstract/2021/CodePointsToString.js b/node_modules/es-abstract/2021/CodePointsToString.js new file mode 100644 index 000000000..403126cd2 --- /dev/null +++ b/node_modules/es-abstract/2021/CodePointsToString.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint'); +var IsArray = require('./IsArray'); + +var forEach = require('../helpers/forEach'); +var isCodePoint = require('../helpers/isCodePoint'); + +// https://ecma-international.org/ecma-262/12.0/#sec-codepointstostring + +module.exports = function CodePointsToString(text) { + if (!IsArray(text)) { + throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points'); + } + var result = ''; + forEach(text, function (cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points'); + } + result += UTF16EncodeCodePoint(cp); + }); + return result; +}; diff --git a/node_modules/es-abstract/2021/CompletePropertyDescriptor.js b/node_modules/es-abstract/2021/CompletePropertyDescriptor.js new file mode 100644 index 000000000..548bf415a --- /dev/null +++ b/node_modules/es-abstract/2021/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var has = require('has'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!has(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!has(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!has(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!has(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!has(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!has(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2021/CompletionRecord.js b/node_modules/es-abstract/2021/CompletionRecord.js new file mode 100644 index 000000000..370a5677f --- /dev/null +++ b/node_modules/es-abstract/2021/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2021/CopyDataProperties.js b/node_modules/es-abstract/2021/CopyDataProperties.js new file mode 100644 index 000000000..bbb5d6f0a --- /dev/null +++ b/node_modules/es-abstract/2021/CopyDataProperties.js @@ -0,0 +1,70 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var every = require('../helpers/every'); +var some = require('../helpers/some'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var Type = require('./Type'); + +// https://www.ecma-international.org/ecma-262/12.0/#sec-copydataproperties + +module.exports = function CopyDataProperties(target, source, excludedItems) { + if (Type(target) !== 'Object') { + throw new $TypeError('Assertion failed: "target" must be an Object'); + } + + if (!IsArray(excludedItems) || !every(excludedItems, IsPropertyKey)) { + throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); + } + + if (typeof source === 'undefined' || source === null) { + return target; + } + + var from = ToObject(source); + + var keys = OwnPropertyKeys(from); + forEach(keys, function (nextKey) { + var excluded = some(excludedItems, function (e) { + return SameValue(e, nextKey) === true; + }); + /* + var excluded = false; + + forEach(excludedItems, function (e) { + if (SameValue(e, nextKey) === true) { + excluded = true; + } + }); + */ + + var enumerable = $isEnumerable(from, nextKey) || ( + // this is to handle string keys being non-enumerable in older engines + typeof source === 'string' + && nextKey >= 0 + && IsIntegralNumber(ToNumber(nextKey)) + ); + if (excluded === false && enumerable) { + var propValue = Get(from, nextKey); + CreateDataPropertyOrThrow(target, nextKey, propValue); + } + }); + + return target; +}; diff --git a/node_modules/es-abstract/2021/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2021/CreateAsyncFromSyncIterator.js new file mode 100644 index 000000000..693321d51 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateAsyncFromSyncIterator.js @@ -0,0 +1,121 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation'); +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorNext = require('./IteratorNext'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var assertRecord = require('../helpers/assertRecord'); + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://ecma-international.org/ecma-262/11.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2021/CreateDataProperty.js b/node_modules/es-abstract/2021/CreateDataProperty.js new file mode 100644 index 000000000..02c6cd1f8 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateDataProperty.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var oldDesc = OrdinaryGetOwnProperty(O, P); + var extensible = !oldDesc || IsExtensible(O); + var nonConfigurable = oldDesc && !oldDesc['[[Configurable]]']; + if (nonConfigurable || !extensible) { + return false; + } + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + } + ); +}; diff --git a/node_modules/es-abstract/2021/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2021/CreateDataPropertyOrThrow.js new file mode 100644 index 000000000..2f7c410ba --- /dev/null +++ b/node_modules/es-abstract/2021/CreateDataPropertyOrThrow.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; +}; diff --git a/node_modules/es-abstract/2021/CreateHTML.js b/node_modules/es-abstract/2021/CreateHTML.js new file mode 100644 index 000000000..ccded1e65 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2021/CreateIterResultObject.js b/node_modules/es-abstract/2021/CreateIterResultObject.js new file mode 100644 index 000000000..eea77a512 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2021/CreateListFromArrayLike.js b/node_modules/es-abstract/2021/CreateListFromArrayLike.js new file mode 100644 index 000000000..40293127d --- /dev/null +++ b/node_modules/es-abstract/2021/CreateListFromArrayLike.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-createlistfromarraylike + +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object']; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = LengthOfArrayLike(obj); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2021/CreateMethodProperty.js b/node_modules/es-abstract/2021/CreateMethodProperty.js new file mode 100644 index 000000000..53274a561 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2021/CreateRegExpStringIterator.js b/node_modules/es-abstract/2021/CreateRegExpStringIterator.js new file mode 100644 index 000000000..cdfae5621 --- /dev/null +++ b/node_modules/es-abstract/2021/CreateRegExpStringIterator.js @@ -0,0 +1,100 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); +var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true); + +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var CreateMethodProperty = require('./CreateMethodProperty'); +var Get = require('./Get'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var RegExpExec = require('./RegExpExec'); +var Set = require('./Set'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); +var setToStringTag = require('es-set-tostringtag'); + +var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) { + if (Type(S) !== 'String') { + throw new $TypeError('`S` must be a string'); + } + if (Type(global) !== 'Boolean') { + throw new $TypeError('`global` must be a boolean'); + } + if (Type(fullUnicode) !== 'Boolean') { + throw new $TypeError('`fullUnicode` must be a boolean'); + } + SLOT.set(this, '[[IteratingRegExp]]', R); + SLOT.set(this, '[[IteratedString]]', S); + SLOT.set(this, '[[Global]]', global); + SLOT.set(this, '[[Unicode]]', fullUnicode); + SLOT.set(this, '[[Done]]', false); +}; + +if (IteratorPrototype) { + RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype); +} + +var RegExpStringIteratorNext = function next() { + var O = this; // eslint-disable-line no-invalid-this + if (Type(O) !== 'Object') { + throw new $TypeError('receiver must be an object'); + } + if ( + !(O instanceof RegExpStringIterator) + || !SLOT.has(O, '[[IteratingRegExp]]') + || !SLOT.has(O, '[[IteratedString]]') + || !SLOT.has(O, '[[Global]]') + || !SLOT.has(O, '[[Unicode]]') + || !SLOT.has(O, '[[Done]]') + ) { + throw new $TypeError('"this" value must be a RegExpStringIterator instance'); + } + if (SLOT.get(O, '[[Done]]')) { + return CreateIterResultObject(undefined, true); + } + var R = SLOT.get(O, '[[IteratingRegExp]]'); + var S = SLOT.get(O, '[[IteratedString]]'); + var global = SLOT.get(O, '[[Global]]'); + var fullUnicode = SLOT.get(O, '[[Unicode]]'); + var match = RegExpExec(R, S); + if (match === null) { + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(undefined, true); + } + if (global) { + var matchStr = ToString(Get(match, '0')); + if (matchStr === '') { + var thisIndex = ToLength(Get(R, 'lastIndex')); + var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode); + Set(R, 'lastIndex', nextIndex, true); + } + return CreateIterResultObject(match, false); + } + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(match, false); +}; +CreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext); + +if (hasSymbols) { + setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator'); + + if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') { + var iteratorFn = function SymbolIterator() { + return this; + }; + CreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn); + } +} + +// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator +module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) { + // assert R.global === global && R.unicode === fullUnicode? + return new RegExpStringIterator(R, S, global, fullUnicode); +}; diff --git a/node_modules/es-abstract/2021/DateFromTime.js b/node_modules/es-abstract/2021/DateFromTime.js new file mode 100644 index 000000000..20e4f2e4d --- /dev/null +++ b/node_modules/es-abstract/2021/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2021/DateString.js b/node_modules/es-abstract/2021/DateString.js new file mode 100644 index 000000000..939c14c0c --- /dev/null +++ b/node_modules/es-abstract/2021/DateString.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var Type = require('./Type'); +var WeekDay = require('./WeekDay'); +var MonthFromTime = require('./MonthFromTime'); +var YearFromTime = require('./YearFromTime'); +var DateFromTime = require('./DateFromTime'); + +// https://262.ecma-international.org/9.0/#sec-datestring + +module.exports = function DateString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var weekday = weekdays[WeekDay(tv)]; + var month = months[MonthFromTime(tv)]; + var day = padTimeComponent(DateFromTime(tv)); + var year = padTimeComponent(YearFromTime(tv), 4); + return weekday + '\x20' + month + '\x20' + day + '\x20' + year; +}; diff --git a/node_modules/es-abstract/2021/Day.js b/node_modules/es-abstract/2021/Day.js new file mode 100644 index 000000000..51d01033c --- /dev/null +++ b/node_modules/es-abstract/2021/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2021/DayFromYear.js b/node_modules/es-abstract/2021/DayFromYear.js new file mode 100644 index 000000000..341bf22a6 --- /dev/null +++ b/node_modules/es-abstract/2021/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2021/DayWithinYear.js b/node_modules/es-abstract/2021/DayWithinYear.js new file mode 100644 index 000000000..4c580940a --- /dev/null +++ b/node_modules/es-abstract/2021/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2021/DaysInYear.js b/node_modules/es-abstract/2021/DaysInYear.js new file mode 100644 index 000000000..7116c6902 --- /dev/null +++ b/node_modules/es-abstract/2021/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2021/DefinePropertyOrThrow.js b/node_modules/es-abstract/2021/DefinePropertyOrThrow.js new file mode 100644 index 000000000..26f2714bb --- /dev/null +++ b/node_modules/es-abstract/2021/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2021/DeletePropertyOrThrow.js b/node_modules/es-abstract/2021/DeletePropertyOrThrow.js new file mode 100644 index 000000000..30d5e57c7 --- /dev/null +++ b/node_modules/es-abstract/2021/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2021/DetachArrayBuffer.js b/node_modules/es-abstract/2021/DetachArrayBuffer.js new file mode 100644 index 000000000..03284729b --- /dev/null +++ b/node_modules/es-abstract/2021/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2021/EnumerableOwnPropertyNames.js b/node_modules/es-abstract/2021/EnumerableOwnPropertyNames.js new file mode 100644 index 000000000..8e3177b6a --- /dev/null +++ b/node_modules/es-abstract/2021/EnumerableOwnPropertyNames.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var objectKeys = require('object-keys'); + +var callBound = require('call-bind/callBound'); + +var callBind = require('call-bind'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); + +var forEach = require('../helpers/forEach'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/8.0/#sec-enumerableownproperties + +module.exports = function EnumerableOwnPropertyNames(O, kind) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + var keys = objectKeys(O); + if (kind === 'key') { + return keys; + } + if (kind === 'value' || kind === 'key+value') { + var results = []; + forEach(keys, function (key) { + if ($isEnumerable(O, key)) { + $pushApply(results, [ + kind === 'value' ? O[key] : [key, O[key]] + ]); + } + }); + return results; + } + throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); +}; diff --git a/node_modules/es-abstract/2021/FlattenIntoArray.js b/node_modules/es-abstract/2021/FlattenIntoArray.js new file mode 100644 index 000000000..6429ee797 --- /dev/null +++ b/node_modules/es-abstract/2021/FlattenIntoArray.js @@ -0,0 +1,58 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var Call = require('./Call'); +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/11.0/#sec-flattenintoarray + +// eslint-disable-next-line max-params +module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) { + var mapperFunction; + if (arguments.length > 5) { + mapperFunction = arguments[5]; + } + + var targetIndex = start; + var sourceIndex = 0; + while (sourceIndex < sourceLen) { + var P = ToString(sourceIndex); + var exists = HasProperty(source, P); + if (exists === true) { + var element = Get(source, P); + if (typeof mapperFunction !== 'undefined') { + if (arguments.length <= 6) { + throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided'); + } + element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]); + } + var shouldFlatten = false; + if (depth > 0) { + shouldFlatten = IsArray(element); + } + if (shouldFlatten) { + var elementLen = LengthOfArrayLike(element); + targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1); + } else { + if (targetIndex >= MAX_SAFE_INTEGER) { + throw new $TypeError('index too large'); + } + CreateDataPropertyOrThrow(target, ToString(targetIndex), element); + targetIndex += 1; + } + } + sourceIndex += 1; + } + + return targetIndex; +}; diff --git a/node_modules/es-abstract/2021/FromPropertyDescriptor.js b/node_modules/es-abstract/2021/FromPropertyDescriptor.js new file mode 100644 index 000000000..e142ed582 --- /dev/null +++ b/node_modules/es-abstract/2021/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2021/Get.js b/node_modules/es-abstract/2021/Get.js new file mode 100644 index 000000000..297968643 --- /dev/null +++ b/node_modules/es-abstract/2021/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2021/GetGlobalObject.js b/node_modules/es-abstract/2021/GetGlobalObject.js new file mode 100644 index 000000000..0541ede0c --- /dev/null +++ b/node_modules/es-abstract/2021/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2021/GetIterator.js b/node_modules/es-abstract/2021/GetIterator.js new file mode 100644 index 000000000..51439e448 --- /dev/null +++ b/node_modules/es-abstract/2021/GetIterator.js @@ -0,0 +1,65 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true); + +var inspect = require('object-inspect'); +var hasSymbols = require('has-symbols')(); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-getiterator +module.exports = function GetIterator(obj, hint, method) { + var actualHint = hint; + if (arguments.length < 2) { + actualHint = 'sync'; + } + if (actualHint !== 'sync' && actualHint !== 'async') { + throw new $TypeError("Assertion failed: `hint` must be one of 'sync' or 'async', got " + inspect(hint)); + } + + var actualMethod = method; + if (arguments.length < 3) { + if (actualHint === 'async') { + if (hasSymbols && $asyncIterator) { + actualMethod = GetMethod(obj, $asyncIterator); + } + if (actualMethod === undefined) { + throw new $SyntaxError("async from sync iterators aren't currently supported"); + } + } else { + actualMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + } + } + var iterator = Call(actualMethod, obj); + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; + + // TODO: This should return an IteratorRecord + /* + var nextMethod = GetV(iterator, 'next'); + return { + '[[Iterator]]': iterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; + */ +}; diff --git a/node_modules/es-abstract/2021/GetMethod.js b/node_modules/es-abstract/2021/GetMethod.js new file mode 100644 index 000000000..d3775178e --- /dev/null +++ b/node_modules/es-abstract/2021/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var debug = require('object-inspect'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(P + ' is not a function: ' + debug(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2021/GetOwnPropertyKeys.js b/node_modules/es-abstract/2021/GetOwnPropertyKeys.js new file mode 100644 index 000000000..40c0b367f --- /dev/null +++ b/node_modules/es-abstract/2021/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2021/GetPromiseResolve.js b/node_modules/es-abstract/2021/GetPromiseResolve.js new file mode 100644 index 000000000..6efc10288 --- /dev/null +++ b/node_modules/es-abstract/2021/GetPromiseResolve.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://ecma-international.org/ecma-262/12.0/#sec-getpromiseresolve + +module.exports = function GetPromiseResolve(promiseConstructor) { + if (!IsConstructor(promiseConstructor)) { + throw new $TypeError('Assertion failed: `promiseConstructor` must be a constructor'); + } + var promiseResolve = Get(promiseConstructor, 'resolve'); + if (IsCallable(promiseResolve) === false) { + throw new $TypeError('`resolve` method is not callable'); + } + return promiseResolve; +}; diff --git a/node_modules/es-abstract/2021/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2021/GetPrototypeFromConstructor.js new file mode 100644 index 000000000..25ee12f35 --- /dev/null +++ b/node_modules/es-abstract/2021/GetPrototypeFromConstructor.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2021/GetSubstitution.js b/node_modules/es-abstract/2021/GetSubstitution.js new file mode 100644 index 000000000..6ac3ec7f3 --- /dev/null +++ b/node_modules/es-abstract/2021/GetSubstitution.js @@ -0,0 +1,128 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var every = require('../helpers/every'); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); +var $indexOf = callBound('String.prototype.indexOf'); +var $parseInt = parseInt; + +var isDigit = regexTester(/^[0-9]$/); + +var inspect = require('object-inspect'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false + +var isStringOrHole = function (capture, index, arr) { + return Type(capture) === 'String' || (canDistinguishSparseFromUndefined ? !(index in arr) : Type(capture) === 'Undefined'); +}; + +// http://www.ecma-international.org/ecma-262/12.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-params, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!IsIntegralNumber(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrHole)) { + throw new $TypeError('Assertion failed: `captures` must be a possibly-empty List of Strings, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + if (Type(namedCaptures) !== 'Undefined') { + namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign + } + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else if (next === '<') { + // eslint-disable-next-line max-depth + if (Type(namedCaptures) === 'Undefined') { + result += '$<'; + i += 2; + } else { + var endIndex = $indexOf(replacement, '>', i); + // eslint-disable-next-line max-depth + if (endIndex > -1) { + var groupName = $strSlice(replacement, i + '$<'.length, endIndex); + var capture = Get(namedCaptures, groupName); + // eslint-disable-next-line max-depth + if (Type(capture) !== 'Undefined') { + result += ToString(capture); + } + i += ('<' + groupName + '>').length; + } + } + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2021/GetV.js b/node_modules/es-abstract/2021/GetV.js new file mode 100644 index 000000000..2dcddb351 --- /dev/null +++ b/node_modules/es-abstract/2021/GetV.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var ToObject = require('./ToObject'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.2.2-3 + var O = ToObject(V); + + // 7.3.2.4 + return O[P]; +}; diff --git a/node_modules/es-abstract/2021/HasOwnProperty.js b/node_modules/es-abstract/2021/HasOwnProperty.js new file mode 100644 index 000000000..04d28495f --- /dev/null +++ b/node_modules/es-abstract/2021/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var has = require('has'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return has(O, P); +}; diff --git a/node_modules/es-abstract/2021/HasProperty.js b/node_modules/es-abstract/2021/HasProperty.js new file mode 100644 index 000000000..b341654e7 --- /dev/null +++ b/node_modules/es-abstract/2021/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2021/HourFromTime.js b/node_modules/es-abstract/2021/HourFromTime.js new file mode 100644 index 000000000..f963bfb68 --- /dev/null +++ b/node_modules/es-abstract/2021/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2021/InLeapYear.js b/node_modules/es-abstract/2021/InLeapYear.js new file mode 100644 index 000000000..bfe0c451f --- /dev/null +++ b/node_modules/es-abstract/2021/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2021/InstanceofOperator.js b/node_modules/es-abstract/2021/InstanceofOperator.js new file mode 100644 index 000000000..a3c4d2375 --- /dev/null +++ b/node_modules/es-abstract/2021/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2021/Invoke.js b/node_modules/es-abstract/2021/Invoke.js new file mode 100644 index 000000000..d4214ee51 --- /dev/null +++ b/node_modules/es-abstract/2021/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://ecma-international.org/ecma-262/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2021/IsAccessorDescriptor.js b/node_modules/es-abstract/2021/IsAccessorDescriptor.js new file mode 100644 index 000000000..78563e7ec --- /dev/null +++ b/node_modules/es-abstract/2021/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var has = require('has'); + +var assertRecord = require('../helpers/assertRecord'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isaccessordescriptor + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2021/IsArray.js b/node_modules/es-abstract/2021/IsArray.js new file mode 100644 index 000000000..600ffa002 --- /dev/null +++ b/node_modules/es-abstract/2021/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://ecma-international.org/ecma-262/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2021/IsBigIntElementType.js b/node_modules/es-abstract/2021/IsBigIntElementType.js new file mode 100644 index 000000000..e3f58a949 --- /dev/null +++ b/node_modules/es-abstract/2021/IsBigIntElementType.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isbigintelementtype + +module.exports = function IsBigIntElementType(type) { + return type === 'BigUint64' || type === 'BigInt64'; +}; diff --git a/node_modules/es-abstract/2021/IsCallable.js b/node_modules/es-abstract/2021/IsCallable.js new file mode 100644 index 000000000..3a69b1926 --- /dev/null +++ b/node_modules/es-abstract/2021/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2021/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2021/IsCompatiblePropertyDescriptor.js new file mode 100644 index 000000000..8bdaf3eb4 --- /dev/null +++ b/node_modules/es-abstract/2021/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2021/IsConcatSpreadable.js b/node_modules/es-abstract/2021/IsConcatSpreadable.js new file mode 100644 index 000000000..141b33414 --- /dev/null +++ b/node_modules/es-abstract/2021/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2021/IsConstructor.js b/node_modules/es-abstract/2021/IsConstructor.js new file mode 100644 index 000000000..fe626e183 --- /dev/null +++ b/node_modules/es-abstract/2021/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://ecma-international.org/ecma-262/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2021/IsDataDescriptor.js b/node_modules/es-abstract/2021/IsDataDescriptor.js new file mode 100644 index 000000000..00d14a60e --- /dev/null +++ b/node_modules/es-abstract/2021/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var has = require('has'); + +var assertRecord = require('../helpers/assertRecord'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2021/IsDetachedBuffer.js b/node_modules/es-abstract/2021/IsDetachedBuffer.js new file mode 100644 index 000000000..4b373e9ab --- /dev/null +++ b/node_modules/es-abstract/2021/IsDetachedBuffer.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('%ArrayBuffer.prototype.byteLength%', true) + || function byteLength(ab) { return ab.byteLength; }; // in node < 0.11, byteLength is an own nonconfigurable property + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2021/IsExtensible.js b/node_modules/es-abstract/2021/IsExtensible.js new file mode 100644 index 000000000..d6e363840 --- /dev/null +++ b/node_modules/es-abstract/2021/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2021/IsGenericDescriptor.js b/node_modules/es-abstract/2021/IsGenericDescriptor.js new file mode 100644 index 000000000..95b1d353c --- /dev/null +++ b/node_modules/es-abstract/2021/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2021/IsIntegralNumber.js b/node_modules/es-abstract/2021/IsIntegralNumber.js new file mode 100644 index 000000000..0a02bfe0f --- /dev/null +++ b/node_modules/es-abstract/2021/IsIntegralNumber.js @@ -0,0 +1,18 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var Type = require('./Type'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); + +// https://tc39.es/ecma262/#sec-isintegralnumber + +module.exports = function IsIntegralNumber(argument) { + if (Type(argument) !== 'Number' || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var absValue = abs(argument); + return floor(absValue) === absValue; +}; diff --git a/node_modules/es-abstract/2021/IsNoTearConfiguration.js b/node_modules/es-abstract/2021/IsNoTearConfiguration.js new file mode 100644 index 000000000..f0d280873 --- /dev/null +++ b/node_modules/es-abstract/2021/IsNoTearConfiguration.js @@ -0,0 +1,16 @@ +'use strict'; + +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var IsBigIntElementType = require('./IsBigIntElementType'); + +// https://262.ecma-international.org/11.0/#sec-isnotearconfiguration + +module.exports = function IsNoTearConfiguration(type, order) { + if (IsUnclampedIntegerElementType(type)) { + return true; + } + if (IsBigIntElementType(type) && order !== 'Init' && order !== 'Unordered') { + return true; + } + return false; +}; diff --git a/node_modules/es-abstract/2021/IsPromise.js b/node_modules/es-abstract/2021/IsPromise.js new file mode 100644 index 000000000..a551ae0c8 --- /dev/null +++ b/node_modules/es-abstract/2021/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2021/IsPropertyKey.js b/node_modules/es-abstract/2021/IsPropertyKey.js new file mode 100644 index 000000000..f43ab581c --- /dev/null +++ b/node_modules/es-abstract/2021/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2021/IsRegExp.js b/node_modules/es-abstract/2021/IsRegExp.js new file mode 100644 index 000000000..e1054813f --- /dev/null +++ b/node_modules/es-abstract/2021/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2021/IsSharedArrayBuffer.js b/node_modules/es-abstract/2021/IsSharedArrayBuffer.js new file mode 100644 index 000000000..8e96e33f3 --- /dev/null +++ b/node_modules/es-abstract/2021/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2021/IsStringPrefix.js b/node_modules/es-abstract/2021/IsStringPrefix.js new file mode 100644 index 000000000..4958544ce --- /dev/null +++ b/node_modules/es-abstract/2021/IsStringPrefix.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPrefixOf = require('../helpers/isPrefixOf'); + +// var callBound = require('call-bind/callBound'); + +// var $charAt = callBound('String.prototype.charAt'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-isstringprefix + +module.exports = function IsStringPrefix(p, q) { + if (Type(p) !== 'String') { + throw new $TypeError('Assertion failed: "p" must be a String'); + } + + if (Type(q) !== 'String') { + throw new $TypeError('Assertion failed: "q" must be a String'); + } + + return isPrefixOf(p, q); + /* + if (p === q || p === '') { + return true; + } + + var pLength = p.length; + var qLength = q.length; + if (pLength >= qLength) { + return false; + } + + // assert: pLength < qLength + + for (var i = 0; i < pLength; i += 1) { + if ($charAt(p, i) !== $charAt(q, i)) { + return false; + } + } + return true; + */ +}; diff --git a/node_modules/es-abstract/2021/IsUnclampedIntegerElementType.js b/node_modules/es-abstract/2021/IsUnclampedIntegerElementType.js new file mode 100644 index 000000000..4e3a38425 --- /dev/null +++ b/node_modules/es-abstract/2021/IsUnclampedIntegerElementType.js @@ -0,0 +1,12 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunclampedintegerelementtype + +module.exports = function IsUnclampedIntegerElementType(type) { + return type === 'Int8' + || type === 'Uint8' + || type === 'Int16' + || type === 'Uint16' + || type === 'Int32' + || type === 'Uint32'; +}; diff --git a/node_modules/es-abstract/2021/IsUnsignedElementType.js b/node_modules/es-abstract/2021/IsUnsignedElementType.js new file mode 100644 index 000000000..b1ff194d7 --- /dev/null +++ b/node_modules/es-abstract/2021/IsUnsignedElementType.js @@ -0,0 +1,11 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunsignedelementtype + +module.exports = function IsUnsignedElementType(type) { + return type === 'Uint8' + || type === 'Uint8C' + || type === 'Uint16' + || type === 'Uint32' + || type === 'BigUint64'; +}; diff --git a/node_modules/es-abstract/2021/IterableToList.js b/node_modules/es-abstract/2021/IterableToList.js new file mode 100644 index 000000000..320ab4712 --- /dev/null +++ b/node_modules/es-abstract/2021/IterableToList.js @@ -0,0 +1,29 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $arrayPush = callBound('Array.prototype.push'); + +var GetIterator = require('./GetIterator'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); + +// https://262.ecma-international.org/12.0/#sec-iterabletolist + +module.exports = function IterableToList(items) { + var iterator; + if (arguments.length > 1) { + iterator = GetIterator(items, 'sync', arguments[1]); + } else { + iterator = GetIterator(items, 'sync'); + } + var values = []; + var next = true; + while (next) { + next = IteratorStep(iterator); + if (next) { + var nextValue = IteratorValue(next); + $arrayPush(values, nextValue); + } + } + return values; +}; diff --git a/node_modules/es-abstract/2021/IteratorClose.js b/node_modules/es-abstract/2021/IteratorClose.js new file mode 100644 index 000000000..f703ea632 --- /dev/null +++ b/node_modules/es-abstract/2021/IteratorClose.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose + +module.exports = function IteratorClose(iterator, completion) { + if (Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iteratorReturn = GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2021/IteratorComplete.js b/node_modules/es-abstract/2021/IteratorComplete.js new file mode 100644 index 000000000..ed4efa37d --- /dev/null +++ b/node_modules/es-abstract/2021/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2021/IteratorNext.js b/node_modules/es-abstract/2021/IteratorNext.js new file mode 100644 index 000000000..cf80655b9 --- /dev/null +++ b/node_modules/es-abstract/2021/IteratorNext.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Invoke = require('./Invoke'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-iteratornext + +module.exports = function IteratorNext(iterator, value) { + var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; +}; diff --git a/node_modules/es-abstract/2021/IteratorStep.js b/node_modules/es-abstract/2021/IteratorStep.js new file mode 100644 index 000000000..41b9d1b25 --- /dev/null +++ b/node_modules/es-abstract/2021/IteratorStep.js @@ -0,0 +1,13 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); + +// https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep + +module.exports = function IteratorStep(iterator) { + var result = IteratorNext(iterator); + var done = IteratorComplete(result); + return done === true ? false : result; +}; + diff --git a/node_modules/es-abstract/2021/IteratorValue.js b/node_modules/es-abstract/2021/IteratorValue.js new file mode 100644 index 000000000..d15d8aebb --- /dev/null +++ b/node_modules/es-abstract/2021/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2021/LengthOfArrayLike.js b/node_modules/es-abstract/2021/LengthOfArrayLike.js new file mode 100644 index 000000000..132c4d584 --- /dev/null +++ b/node_modules/es-abstract/2021/LengthOfArrayLike.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToLength = require('./ToLength'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-lengthofarraylike + +module.exports = function LengthOfArrayLike(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + return ToLength(Get(obj, 'length')); +}; + +// TODO: use this all over diff --git a/node_modules/es-abstract/2021/MakeDate.js b/node_modules/es-abstract/2021/MakeDate.js new file mode 100644 index 000000000..efeb6452e --- /dev/null +++ b/node_modules/es-abstract/2021/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2021/MakeDay.js b/node_modules/es-abstract/2021/MakeDay.js new file mode 100644 index 000000000..db78bbc74 --- /dev/null +++ b/node_modules/es-abstract/2021/MakeDay.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); +var YearFromTime = require('./YearFromTime'); + +// https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToIntegerOrInfinity(year); + var m = ToIntegerOrInfinity(month); + var dt = ToIntegerOrInfinity(date); + var ym = y + floor(m / 12); + if (!$isFinite(ym)) { + return NaN; + } + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2021/MakeTime.js b/node_modules/es-abstract/2021/MakeTime.js new file mode 100644 index 000000000..330d3bdbc --- /dev/null +++ b/node_modules/es-abstract/2021/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); + +// https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.11 + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToIntegerOrInfinity(hour); + var m = ToIntegerOrInfinity(min); + var s = ToIntegerOrInfinity(sec); + var milli = ToIntegerOrInfinity(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2021/MinFromTime.js b/node_modules/es-abstract/2021/MinFromTime.js new file mode 100644 index 000000000..a0c631d4c --- /dev/null +++ b/node_modules/es-abstract/2021/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2021/MonthFromTime.js b/node_modules/es-abstract/2021/MonthFromTime.js new file mode 100644 index 000000000..a482a7df9 --- /dev/null +++ b/node_modules/es-abstract/2021/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2021/NormalCompletion.js b/node_modules/es-abstract/2021/NormalCompletion.js new file mode 100644 index 000000000..1e429dd65 --- /dev/null +++ b/node_modules/es-abstract/2021/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2021/Number/add.js b/node_modules/es-abstract/2021/Number/add.js new file mode 100644 index 000000000..8d6271f54 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/add.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-add + +module.exports = function NumberAdd(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) { + return NaN; + } + + if (!isFinite(x)) { + return x; + } + if (!isFinite(y)) { + return y; + } + + if (x === y && x === 0) { // both zeroes + return Infinity / x === -Infinity && Infinity / y === -Infinity ? -0 : +0; + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2021/Number/bitwiseAND.js b/node_modules/es-abstract/2021/Number/bitwiseAND.js new file mode 100644 index 000000000..a7159802d --- /dev/null +++ b/node_modules/es-abstract/2021/Number/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND + +module.exports = function NumberBitwiseAND(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2021/Number/bitwiseNOT.js b/node_modules/es-abstract/2021/Number/bitwiseNOT.js new file mode 100644 index 000000000..ae8032a78 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/bitwiseNOT.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT + +module.exports = function NumberBitwiseNOT(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + var oldValue = ToInt32(x); + // Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer. + return ~oldValue; +}; diff --git a/node_modules/es-abstract/2021/Number/bitwiseOR.js b/node_modules/es-abstract/2021/Number/bitwiseOR.js new file mode 100644 index 000000000..c5e67b968 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR + +module.exports = function NumberBitwiseOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2021/Number/bitwiseXOR.js b/node_modules/es-abstract/2021/Number/bitwiseXOR.js new file mode 100644 index 000000000..a4030e9a4 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR + +module.exports = function NumberBitwiseXOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2021/Number/divide.js b/node_modules/es-abstract/2021/Number/divide.js new file mode 100644 index 000000000..65244625d --- /dev/null +++ b/node_modules/es-abstract/2021/Number/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide + +module.exports = function NumberDivide(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) { + return NaN; + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2021/Number/equal.js b/node_modules/es-abstract/2021/Number/equal.js new file mode 100644 index 000000000..db68afa46 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/equal.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal + +module.exports = function NumberEqual(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y)) { + return false; + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2021/Number/exponentiate.js b/node_modules/es-abstract/2021/Number/exponentiate.js new file mode 100644 index 000000000..256865103 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/exponentiate.js @@ -0,0 +1,77 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +// var isNegativeZero = require('is-negative-zero'); + +var $pow = GetIntrinsic('%Math.pow%'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +/* +var abs = require('../../helpers/abs'); +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var IsInteger = require('../IsInteger'); +*/ +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate + +/* eslint max-lines-per-function: 0, max-statements: 0 */ + +module.exports = function NumberExponentiate(base, exponent) { + if (Type(base) !== 'Number' || Type(exponent) !== 'Number') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers'); + } + return $pow(base, exponent); + /* + if (isNaN(exponent)) { + return NaN; + } + if (exponent === 0) { + return 1; + } + if (isNaN(base)) { + return NaN; + } + var aB = abs(base); + if (aB > 1 && exponent === Infinity) { + return Infinity; + } + if (aB > 1 && exponent === -Infinity) { + return 0; + } + if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) { + return NaN; + } + if (aB < 1 && exponent === Infinity) { + return +0; + } + if (aB < 1 && exponent === -Infinity) { + return Infinity; + } + if (base === Infinity) { + return exponent > 0 ? Infinity : 0; + } + if (base === -Infinity) { + var isOdd = true; + if (exponent > 0) { + return isOdd ? -Infinity : Infinity; + } + return isOdd ? -0 : 0; + } + if (exponent > 0) { + return isNegativeZero(base) ? Infinity : 0; + } + if (isNegativeZero(base)) { + if (exponent > 0) { + return isOdd ? -0 : 0; + } + return isOdd ? -Infinity : Infinity; + } + if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) { + return NaN; + } + */ +}; diff --git a/node_modules/es-abstract/2021/Number/index.js b/node_modules/es-abstract/2021/Number/index.js new file mode 100644 index 000000000..63ec52da6 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2021/Number/leftShift.js b/node_modules/es-abstract/2021/Number/leftShift.js new file mode 100644 index 000000000..023b3390f --- /dev/null +++ b/node_modules/es-abstract/2021/Number/leftShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift + +module.exports = function NumberLeftShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum << shiftCount; +}; diff --git a/node_modules/es-abstract/2021/Number/lessThan.js b/node_modules/es-abstract/2021/Number/lessThan.js new file mode 100644 index 000000000..5fcac24e9 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/lessThan.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan + +module.exports = function NumberLessThan(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + // If x is NaN, return undefined. + // If y is NaN, return undefined. + if (isNaN(x) || isNaN(y)) { + return void undefined; + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2021/Number/multiply.js b/node_modules/es-abstract/2021/Number/multiply.js new file mode 100644 index 000000000..2a6c478a5 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/multiply.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply + +module.exports = function NumberMultiply(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) { + return NaN; + } + if (!isFinite(x) && !isFinite(y)) { + return x === y ? Infinity : -Infinity; + } + if (!isFinite(x) && y !== 0) { + return x > 0 ? Infinity : -Infinity; + } + if (!isFinite(y) && x !== 0) { + return y > 0 ? Infinity : -Infinity; + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2021/Number/remainder.js b/node_modules/es-abstract/2021/Number/remainder.js new file mode 100644 index 000000000..c9a7c2d7d --- /dev/null +++ b/node_modules/es-abstract/2021/Number/remainder.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-remainder + +module.exports = function NumberRemainder(n, d) { + if (Type(n) !== 'Number' || Type(d) !== 'Number') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers'); + } + + // If either operand is NaN, the result is NaN. + // If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN. + if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) { + return NaN; + } + + // If the dividend is finite and the divisor is an infinity, the result equals the dividend. + // If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend. + if (!isFinite(d) || n === 0) { + return n; + } + + // In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved… + return n % d; +}; diff --git a/node_modules/es-abstract/2021/Number/sameValue.js b/node_modules/es-abstract/2021/Number/sameValue.js new file mode 100644 index 000000000..19efc379d --- /dev/null +++ b/node_modules/es-abstract/2021/Number/sameValue.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var isNegativeZero = require('is-negative-zero'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var NumberSameValueZero = require('./sameValueZero'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue + +module.exports = function NumberSameValue(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (x === 0 && y === 0) { + return !(isNegativeZero(x) ^ isNegativeZero(y)); + } + return NumberSameValueZero(x, y); +}; diff --git a/node_modules/es-abstract/2021/Number/sameValueZero.js b/node_modules/es-abstract/2021/Number/sameValueZero.js new file mode 100644 index 000000000..5688198fe --- /dev/null +++ b/node_modules/es-abstract/2021/Number/sameValueZero.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero + +module.exports = function NumberSameValueZero(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var xNaN = isNaN(x); + var yNaN = isNaN(y); + if (xNaN || yNaN) { + return xNaN === yNaN; + } + return x === y; +}; diff --git a/node_modules/es-abstract/2021/Number/signedRightShift.js b/node_modules/es-abstract/2021/Number/signedRightShift.js new file mode 100644 index 000000000..025f39a1c --- /dev/null +++ b/node_modules/es-abstract/2021/Number/signedRightShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift + +module.exports = function NumberSignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum >> shiftCount; +}; diff --git a/node_modules/es-abstract/2021/Number/subtract.js b/node_modules/es-abstract/2021/Number/subtract.js new file mode 100644 index 000000000..29a29e619 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/subtract.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var NumberAdd = require('./add'); +var NumberUnaryMinus = require('./unaryMinus'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract + +module.exports = function NumberSubtract(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberAdd(x, NumberUnaryMinus(y)); +}; diff --git a/node_modules/es-abstract/2021/Number/toString.js b/node_modules/es-abstract/2021/Number/toString.js new file mode 100644 index 000000000..4f133160a --- /dev/null +++ b/node_modules/es-abstract/2021/Number/toString.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring + +module.exports = function NumberToString(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` must be a Number'); + } + + return $String(x); +}; diff --git a/node_modules/es-abstract/2021/Number/unaryMinus.js b/node_modules/es-abstract/2021/Number/unaryMinus.js new file mode 100644 index 000000000..794582ad8 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/unaryMinus.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus + +module.exports = function NumberUnaryMinus(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + if (isNaN(x)) { + return NaN; + } + return -x; +}; diff --git a/node_modules/es-abstract/2021/Number/unsignedRightShift.js b/node_modules/es-abstract/2021/Number/unsignedRightShift.js new file mode 100644 index 000000000..2eb967ac2 --- /dev/null +++ b/node_modules/es-abstract/2021/Number/unsignedRightShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift + +module.exports = function NumberUnsignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum >>> shiftCount; +}; diff --git a/node_modules/es-abstract/2021/NumberBitwiseOp.js b/node_modules/es-abstract/2021/NumberBitwiseOp.js new file mode 100644 index 000000000..11425ffde --- /dev/null +++ b/node_modules/es-abstract/2021/NumberBitwiseOp.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('./ToInt32'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-numberbitwiseop + +module.exports = function NumberBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + var lnum = ToInt32(x); + var rnum = ToUint32(y); + if (op === '&') { + return lnum & rnum; + } + if (op === '|') { + return lnum | rnum; + } + return lnum ^ rnum; +}; diff --git a/node_modules/es-abstract/2021/NumberToBigInt.js b/node_modules/es-abstract/2021/NumberToBigInt.js new file mode 100644 index 000000000..9ed8ed9a9 --- /dev/null +++ b/node_modules/es-abstract/2021/NumberToBigInt.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-numbertobigint + +module.exports = function NumberToBigInt(number) { + if (Type(number) !== 'Number') { + throw new $TypeError('Assertion failed: `number` must be a String'); + } + if (!IsIntegralNumber(number)) { + throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + return $BigInt(number); +}; diff --git a/node_modules/es-abstract/2021/NumericToRawBytes.js b/node_modules/es-abstract/2021/NumericToRawBytes.js new file mode 100644 index 000000000..91549fb99 --- /dev/null +++ b/node_modules/es-abstract/2021/NumericToRawBytes.js @@ -0,0 +1,209 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $floor = GetIntrinsic('%Math.floor%'); +var $log = GetIntrinsic('%Math.log%'); +var $log2E = GetIntrinsic('%Math.LOG2E%'); +var $log2 = GetIntrinsic('%Math.log2%', true) || function log2(x) { + return $log(x) * $log2E; +}; +var $parseInt = GetIntrinsic('%parseInt%'); +var $pow = GetIntrinsic('%Math.pow%'); +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var callBound = require('call-bind/callBound'); + +var $reverse = callBound('Array.prototype.reverse'); +var $numberToString = callBound('Number.prototype.toString'); +var $strSlice = callBound('String.prototype.slice'); + +var abs = require('./abs'); +var hasOwnProperty = require('./HasOwnProperty'); +var ToBigInt64 = require('./ToBigInt64'); +var ToBigUint64 = require('./ToBigUint64'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); +var isFinite = require('../helpers/isFinite'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32, + BigInt64: ToBigInt64, + BigUint64: ToBigUint64 +}; + +// https://262.ecma-international.org/11.0/#sec-numerictorawbytes + +module.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number' && Type(value) !== 'BigInt') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var rawBytes = []; + var exponent; + + if (type === 'Float32') { // step 1 + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded + } + + var leastSig; + + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + + if (!isFinite(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + + var sign = value < 0 ? 1 : 0; + value = abs(value); // eslint-disable-line no-param-reassign + + exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; // eslint-disable-line no-param-reassign + } + + while (value < 1) { + exponent -= 1; + value *= 2; // eslint-disable-line no-param-reassign + } + + var mantissa = value - 1; + mantissa *= $pow(2, 23); + mantissa = $floor(mantissa); + + exponent += 127; + exponent = exponent << 23; + + var result = sign << 31; + result |= exponent; + result |= mantissa; + + var byte0 = result & 255; + result = result >> 8; + var byte1 = result & 255; + result = result >> 8; + var byte2 = result & 255; + result = result >> 8; + var byte3 = result & 255; + + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; + } else if (type === 'Float64') { // step 2 + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 0, leastSig] : [leastSig, 0, 0, 0, 0, 0, 0, 0]; + } + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 248, 127] : [127, 248, 0, 0, 0, 0, 0, 0]; + } + if (!isFinite(value)) { + var infBytes = value < 0 ? [0, 0, 0, 0, 0, 0, 240, 255] : [0, 0, 0, 0, 0, 0, 240, 127]; + return isLittleEndian ? infBytes : $reverse(infBytes); + } + + var isNegative = value < 0; + if (isNegative) { value = -value; } // eslint-disable-line no-param-reassign + + exponent = $floor($log2(value)); + var significand = (value / $pow(2, exponent)) - 1; + + var bitString = ''; + for (var i = 0; i < 52; i++) { + significand *= 2; + if (significand >= 1) { + bitString += '1'; + significand -= 1; + } else { + bitString += '0'; + } + } + + exponent += 1023; + var exponentBits = $numberToString(exponent, 2); + while (exponentBits.length < 11) { exponentBits = '0' + exponentBits; } + + var fullBitString = (isNegative ? '1' : '0') + exponentBits + bitString; + while (fullBitString.length < 64) { fullBitString = '0' + fullBitString; } + + for (i = 0; i < 8; i++) { + rawBytes[i] = $parseInt($strSlice(fullBitString, i * 8, (i + 1) * 8), 2); + } + + return isLittleEndian ? $reverse(rawBytes) : rawBytes; + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + var isBigInt = type === 'BigInt64' || type === 'BigUint64'; + /* + if (intValue >= 0) { // step 3.d + // Let rawBytes be a List containing the n-byte binary encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } else { // step 3.e + // Let rawBytes be a List containing the n-byte binary 2's complement encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } + */ + if (intValue < 0) { + intValue = intValue >>> 0; + } + var OxFF = isBigInt ? $BigInt(0xFF) : 0xFF; + var eight = isBigInt ? $BigInt(8) : 8; + for (i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = $Number(intValue & OxFF); + intValue = intValue >> eight; + } + + return rawBytes; // step 4 +}; diff --git a/node_modules/es-abstract/2021/ObjectDefineProperties.js b/node_modules/es-abstract/2021/ObjectDefineProperties.js new file mode 100644 index 000000000..f096f1ede --- /dev/null +++ b/node_modules/es-abstract/2021/ObjectDefineProperties.js @@ -0,0 +1,40 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + desc = FromPropertyDescriptor(desc); // TODO: remove this once DefinePropertyOrThrow is fixed + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2021/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2021/OrdinaryCreateFromConstructor.js new file mode 100644 index 000000000..8f3bb829d --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return OrdinaryObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2021/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2021/OrdinaryDefineOwnProperty.js new file mode 100644 index 000000000..34f029f7e --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://ecma-international.org/ecma-262/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2021/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2021/OrdinaryGetOwnProperty.js new file mode 100644 index 000000000..fd8035acb --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var has = require('has'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!has(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2021/OrdinaryGetPrototypeOf.js b/node_modules/es-abstract/2021/OrdinaryGetPrototypeOf.js new file mode 100644 index 000000000..ba17b9887 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryGetPrototypeOf.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $getProto = require('../helpers/getProto'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof + +module.exports = function OrdinaryGetPrototypeOf(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!$getProto) { + throw new $TypeError('This environment does not support fetching prototypes.'); + } + return $getProto(O); +}; diff --git a/node_modules/es-abstract/2021/OrdinaryHasInstance.js b/node_modules/es-abstract/2021/OrdinaryHasInstance.js new file mode 100644 index 000000000..85a240ca2 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (IsCallable(C) === false) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2021/OrdinaryHasProperty.js b/node_modules/es-abstract/2021/OrdinaryHasProperty.js new file mode 100644 index 000000000..dd09ca3b1 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2021/OrdinaryObjectCreate.js b/node_modules/es-abstract/2021/OrdinaryObjectCreate.js new file mode 100644 index 000000000..140534083 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryObjectCreate.js @@ -0,0 +1,56 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/11.0/#sec-objectcreate + +module.exports = function OrdinaryObjectCreate(proto) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1]; + if (!IsArray(additionalInternalSlotsList)) { + throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array'); + } + + // var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1 + // internalSlotsList.push(...additionalInternalSlotsList); // step 2 + // var O = MakeBasicObject(internalSlotsList); // step 3 + // setProto(O, proto); // step 4 + // return O; // step 5 + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (additionalInternalSlotsList.length > 0) { + forEach(additionalInternalSlotsList, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; +}; diff --git a/node_modules/es-abstract/2021/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2021/OrdinarySetPrototypeOf.js new file mode 100644 index 000000000..d2b72306c --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinarySetPrototypeOf.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $setProto = require('../helpers/setProto'); + +var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof + +module.exports = function OrdinarySetPrototypeOf(O, V) { + if (Type(V) !== 'Object' && Type(V) !== 'Null') { + throw new $TypeError('Assertion failed: V must be Object or Null'); + } + /* + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ + try { + $setProto(O, V); + } catch (e) { + return false; + } + return OrdinaryGetPrototypeOf(O) === V; + /* + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ +}; diff --git a/node_modules/es-abstract/2021/OrdinaryToPrimitive.js b/node_modules/es-abstract/2021/OrdinaryToPrimitive.js new file mode 100644 index 000000000..e1dbe1427 --- /dev/null +++ b/node_modules/es-abstract/2021/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2021/PromiseResolve.js b/node_modules/es-abstract/2021/PromiseResolve.js new file mode 100644 index 000000000..6474b79c4 --- /dev/null +++ b/node_modules/es-abstract/2021/PromiseResolve.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBind = require('call-bind'); + +var $resolve = GetIntrinsic('%Promise.resolve%', true); +var $PromiseResolve = $resolve && callBind($resolve); + +// https://262.ecma-international.org/9.0/#sec-promise-resolve + +module.exports = function PromiseResolve(C, x) { + if (!$PromiseResolve) { + throw new SyntaxError('This environment does not support Promises.'); + } + return $PromiseResolve(C, x); +}; + diff --git a/node_modules/es-abstract/2021/QuoteJSONString.js b/node_modules/es-abstract/2021/QuoteJSONString.js new file mode 100644 index 000000000..0deebecf2 --- /dev/null +++ b/node_modules/es-abstract/2021/QuoteJSONString.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +var StringToCodePoints = require('./StringToCodePoints'); +var Type = require('./Type'); +var UnicodeEscape = require('./UnicodeEscape'); +var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint'); + +var has = require('has'); + +// https://ecma-international.org/ecma-262/12.0/#sec-quotejsonstring + +var escapes = { + '\u0008': '\\b', + '\u0009': '\\t', + '\u000A': '\\n', + '\u000C': '\\f', + '\u000D': '\\r', + '\u0022': '\\"', + '\u005c': '\\\\' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach(StringToCodePoints(value), function (C) { + if (has(escapes, C)) { + product += escapes[C]; + } else { + var cCharCode = $charCodeAt(C, 0); + if (cCharCode < 0x20 || isLeadingSurrogate(C) || isTrailingSurrogate(C)) { + product += UnicodeEscape(C); + } else { + product += UTF16EncodeCodePoint(cCharCode); + } + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2021/RawBytesToNumeric.js b/node_modules/es-abstract/2021/RawBytesToNumeric.js new file mode 100644 index 000000000..c253b5d70 --- /dev/null +++ b/node_modules/es-abstract/2021/RawBytesToNumeric.js @@ -0,0 +1,156 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $pow = GetIntrinsic('%Math.pow%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnsignedElementType = require('./IsUnsignedElementType'); +var Type = require('./Type'); + +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric + +module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError('this environment does not support BigInts'); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + // eslint-disable-next-line no-param-reassign + rawBytes = $reverse(rawBytes); // step 2 + } + + /* eslint no-redeclare: 1 */ + if (type === 'Float32') { // step 3 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value. +If value is an IEEE 754-2008 binary32 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = (rawBytes[3] & 0x80) >> 7; // first bit + var exponent = ((rawBytes[3] & 0x7F) << 1) // 7 bits from index 3 + | ((rawBytes[2] & 0x80) >> 7); // 1 bit from index 2 + var mantissa = ((rawBytes[2] & 0x7F) << 16) // 7 bits from index 2 + | (rawBytes[1] << 8) // 8 bits from index 1 + | rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign === 0 ? 0 : -0; + } + if (exponent === 0xFF && mantissa === 0) { + return sign === 0 ? Infinity : -Infinity; + } + if (exponent === 0xFF && mantissa !== 0) { + return NaN; + } + + exponent -= 127; // subtract the bias + + // return $pow(-1, sign) * mantissa / $pow(2, 23) * $pow(2, exponent); + // return $pow(-1, sign) * (mantissa + 0x1000000) * $pow(2, exponent - 23); + return $pow(-1, sign) * (1 + (mantissa / $pow(2, 23))) * $pow(2, exponent); + } + + if (type === 'Float64') { // step 4 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value. +If value is an IEEE 754-2008 binary64 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[7] & 0x80 ? -1 : 1; // first bit + var exponent = ((rawBytes[7] & 0x7F) << 4) // 7 bits from index 7 + | ((rawBytes[6] & 0xF0) >> 4); // 4 bits from index 6 + var mantissa = ((rawBytes[6] & 0x0F) * 0x1000000000000) // 4 bits from index 6 + + (rawBytes[5] * 0x10000000000) // 8 bits from index 5 + + (rawBytes[4] * 0x100000000) // 8 bits from index 4 + + (rawBytes[3] * 0x1000000) // 8 bits from index 3 + + (rawBytes[2] * 0x10000) // 8 bits from index 2 + + (rawBytes[1] * 0x100) // 8 bits from index 1 + + rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 0x7FF && mantissa !== 0) { + return NaN; + } + if (exponent === 0x7FF && mantissa === 0) { + return sign * Infinity; + } + + exponent -= 1023; // subtract the bias + + return sign * (mantissa + 0x10000000000000) * $pow(2, exponent - 52); + } + + // this is common to both branches + var intValue = isBigInt ? $BigInt(0) : 0; + for (var i = 0; i < rawBytes.length; i++) { + intValue |= isBigInt ? $BigInt(rawBytes[i]) << $BigInt(8 * i) : rawBytes[i] << (8 * i); + } + /* + Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. + */ + + if (!IsUnsignedElementType(type)) { // steps 5-6 + // Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length elementSize × 8. + var bitLength = elementSize * 8; + if (bitLength < 32) { + var x = isBigInt ? $BigInt(32 - bitLength) : 32 - bitLength; + intValue = (intValue << x) >> x; + } + } + + return intValue; // step 7 +}; diff --git a/node_modules/es-abstract/2021/RegExpCreate.js b/node_modules/es-abstract/2021/RegExpCreate.js new file mode 100644 index 000000000..68e31605e --- /dev/null +++ b/node_modules/es-abstract/2021/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2021/RegExpExec.js b/node_modules/es-abstract/2021/RegExpExec.js new file mode 100644 index 000000000..29fee1720 --- /dev/null +++ b/node_modules/es-abstract/2021/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2021/RequireObjectCoercible.js b/node_modules/es-abstract/2021/RequireObjectCoercible.js new file mode 100644 index 000000000..9008359db --- /dev/null +++ b/node_modules/es-abstract/2021/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2021/SameValue.js b/node_modules/es-abstract/2021/SameValue.js new file mode 100644 index 000000000..b73939b20 --- /dev/null +++ b/node_modules/es-abstract/2021/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2021/SameValueNonNumeric.js b/node_modules/es-abstract/2021/SameValueNonNumeric.js new file mode 100644 index 000000000..04f6cbfbe --- /dev/null +++ b/node_modules/es-abstract/2021/SameValueNonNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric + +module.exports = function SameValueNonNumeric(x, y) { + var xType = Type(x); + if (xType === 'Number' || xType === 'BigInt') { + throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values'); + } + if (xType !== Type(y)) { + throw new $TypeError('SameValueNonNumeric requires two non-numeric values of the same type.'); + } + return SameValue(x, y); +}; diff --git a/node_modules/es-abstract/2021/SameValueZero.js b/node_modules/es-abstract/2021/SameValueZero.js new file mode 100644 index 000000000..bf1a1486a --- /dev/null +++ b/node_modules/es-abstract/2021/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://ecma-international.org/ecma-262/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2021/SecFromTime.js b/node_modules/es-abstract/2021/SecFromTime.js new file mode 100644 index 000000000..fc2e44560 --- /dev/null +++ b/node_modules/es-abstract/2021/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2021/Set.js b/node_modules/es-abstract/2021/Set.js new file mode 100644 index 000000000..097149887 --- /dev/null +++ b/node_modules/es-abstract/2021/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2021/SetFunctionLength.js b/node_modules/es-abstract/2021/SetFunctionLength.js new file mode 100644 index 000000000..8c06b2423 --- /dev/null +++ b/node_modules/es-abstract/2021/SetFunctionLength.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var HasOwnProperty = require('./HasOwnProperty'); +var IsExtensible = require('./IsExtensible'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/12.0/#sec-setfunctionlength + +module.exports = function SetFunctionLength(F, length) { + if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) { + throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property'); + } + if (Type(length) !== 'Number') { + throw new $TypeError('Assertion failed: `length` must be a Number'); + } + if (length !== Infinity && (!IsIntegralNumber(length) || length < 0)) { + throw new $TypeError('Assertion failed: `length` must be ∞, or an integer >= 0'); + } + return DefinePropertyOrThrow(F, 'length', { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); +}; diff --git a/node_modules/es-abstract/2021/SetFunctionName.js b/node_modules/es-abstract/2021/SetFunctionName.js new file mode 100644 index 000000000..03ec2227c --- /dev/null +++ b/node_modules/es-abstract/2021/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var has = require('has'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || has(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2021/SetIntegrityLevel.js b/node_modules/es-abstract/2021/SetIntegrityLevel.js new file mode 100644 index 000000000..546f3e74f --- /dev/null +++ b/node_modules/es-abstract/2021/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2021/SpeciesConstructor.js b/node_modules/es-abstract/2021/SpeciesConstructor.js new file mode 100644 index 000000000..491eb9b87 --- /dev/null +++ b/node_modules/es-abstract/2021/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2021/SplitMatch.js b/node_modules/es-abstract/2021/SplitMatch.js new file mode 100644 index 000000000..a1bc6c4d5 --- /dev/null +++ b/node_modules/es-abstract/2021/SplitMatch.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +var $charAt = callBound('String.prototype.charAt'); + +// https://262.ecma-international.org/6.0/#sec-splitmatch + +module.exports = function SplitMatch(S, q, R) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!IsIntegralNumber(q)) { + throw new $TypeError('Assertion failed: `q` must be an integer'); + } + if (Type(R) !== 'String') { + throw new $TypeError('Assertion failed: `R` must be a String'); + } + var r = R.length; + var s = S.length; + if (q + r > s) { + return false; + } + + for (var i = 0; i < r; i += 1) { + if ($charAt(S, q + i) !== $charAt(R, i)) { + return false; + } + } + + return q + r; +}; diff --git a/node_modules/es-abstract/2021/StrictEqualityComparison.js b/node_modules/es-abstract/2021/StrictEqualityComparison.js new file mode 100644 index 000000000..f3435ba9d --- /dev/null +++ b/node_modules/es-abstract/2021/StrictEqualityComparison.js @@ -0,0 +1,17 @@ +'use strict'; + +var Type = require('./Type'); + +// https://262.ecma-international.org/5.1/#sec-11.9.6 + +module.exports = function StrictEqualityComparison(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Undefined' || xType === 'Null') { + return true; + } + return x === y; // shortcut for steps 4-7 +}; diff --git a/node_modules/es-abstract/2021/StringCreate.js b/node_modules/es-abstract/2021/StringCreate.js new file mode 100644 index 000000000..bd02820f7 --- /dev/null +++ b/node_modules/es-abstract/2021/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2021/StringGetOwnProperty.js b/node_modules/es-abstract/2021/StringGetOwnProperty.js new file mode 100644 index 000000000..ecffb0b77 --- /dev/null +++ b/node_modules/es-abstract/2021/StringGetOwnProperty.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $charAt = callBound('String.prototype.charAt'); +var $stringToString = callBound('String.prototype.toString'); + +var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +var isNegativeZero = require('is-negative-zero'); + +// https://ecma-international.org/ecma-262/12.0/#sec-stringgetownproperty + +module.exports = function StringGetOwnProperty(S, P) { + var str; + if (Type(S) === 'Object') { + try { + str = $stringToString(S); + } catch (e) { /**/ } + } + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a boxed string object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + if (Type(P) !== 'String') { + return void undefined; + } + var index = CanonicalNumericIndexString(P); + var len = str.length; + if (typeof index === 'undefined' || !IsIntegralNumber(index) || isNegativeZero(index) || index < 0 || len <= index) { + return void undefined; + } + var resultStr = $charAt(S, index); + return { + '[[Configurable]]': false, + '[[Enumerable]]': true, + '[[Value]]': resultStr, + '[[Writable]]': false + }; +}; diff --git a/node_modules/es-abstract/2021/StringIndexOf.js b/node_modules/es-abstract/2021/StringIndexOf.js new file mode 100644 index 000000000..371d5aa38 --- /dev/null +++ b/node_modules/es-abstract/2021/StringIndexOf.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +var $slice = callBound('String.prototype.slice'); + +// https://ecma-international.org/ecma-262/12.0/#sec-stringindexof + +module.exports = function StringIndexOf(string, searchValue, fromIndex) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + if (Type(searchValue) !== 'String') { + throw new $TypeError('Assertion failed: `searchValue` must be a String'); + } + if (!IsIntegralNumber(fromIndex) || fromIndex < 0) { + throw new $TypeError('Assertion failed: `fromIndex` must be a non-negative integer'); + } + + var len = string.length; + if (searchValue === '' && fromIndex <= len) { + return fromIndex; + } + + var searchLen = searchValue.length; + for (var i = fromIndex; i <= (len - searchLen); i += 1) { + var candidate = $slice(string, i, i + searchLen); + if (candidate === searchValue) { + return i; + } + } + return -1; +}; diff --git a/node_modules/es-abstract/2021/StringPad.js b/node_modules/es-abstract/2021/StringPad.js new file mode 100644 index 000000000..cdf69001b --- /dev/null +++ b/node_modules/es-abstract/2021/StringPad.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); + +var $strSlice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/11.0/#sec-stringpad + +module.exports = function StringPad(O, maxLength, fillString, placement) { + if (placement !== 'start' && placement !== 'end') { + throw new $TypeError('Assertion failed: `placement` must be "start" or "end"'); + } + var S = ToString(O); + var intMaxLength = ToLength(maxLength); + var stringLength = S.length; + if (intMaxLength <= stringLength) { + return S; + } + var filler = typeof fillString === 'undefined' ? ' ' : ToString(fillString); + if (filler === '') { + return S; + } + var fillLen = intMaxLength - stringLength; + + // the String value consisting of repeated concatenations of filler truncated to length fillLen. + var truncatedStringFiller = ''; + while (truncatedStringFiller.length < fillLen) { + truncatedStringFiller += filler; + } + truncatedStringFiller = $strSlice(truncatedStringFiller, 0, fillLen); + + if (placement === 'start') { + return truncatedStringFiller + S; + } + return S + truncatedStringFiller; +}; diff --git a/node_modules/es-abstract/2021/StringToBigInt.js b/node_modules/es-abstract/2021/StringToBigInt.js new file mode 100644 index 000000000..0bc3cec01 --- /dev/null +++ b/node_modules/es-abstract/2021/StringToBigInt.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +// https://262.ecma-international.org/11.0/#sec-stringtobigint + +module.exports = function StringToBigInt(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('`argument` must be a string'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + try { + return $BigInt(argument); + } catch (e) { + return NaN; + } +}; diff --git a/node_modules/es-abstract/2021/StringToCodePoints.js b/node_modules/es-abstract/2021/StringToCodePoints.js new file mode 100644 index 000000000..336bd06fb --- /dev/null +++ b/node_modules/es-abstract/2021/StringToCodePoints.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $push = callBound('Array.prototype.push'); + +var CodePointAt = require('./CodePointAt'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/12.0/#sec-stringtocodepoints + +module.exports = function StringToCodePoints(string) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var codePoints = []; + var size = string.length; + var position = 0; + while (position < size) { + var cp = CodePointAt(string, position); + $push(codePoints, cp['[[CodePoint]]']); + position += cp['[[CodeUnitCount]]']; + } + return codePoints; +}; diff --git a/node_modules/es-abstract/2021/SymbolDescriptiveString.js b/node_modules/es-abstract/2021/SymbolDescriptiveString.js new file mode 100644 index 000000000..1efd1316b --- /dev/null +++ b/node_modules/es-abstract/2021/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2021/TestIntegrityLevel.js b/node_modules/es-abstract/2021/TestIntegrityLevel.js new file mode 100644 index 000000000..7f95a6e1d --- /dev/null +++ b/node_modules/es-abstract/2021/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2021/ThrowCompletion.js b/node_modules/es-abstract/2021/ThrowCompletion.js new file mode 100644 index 000000000..b7d388a35 --- /dev/null +++ b/node_modules/es-abstract/2021/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2021/TimeClip.js b/node_modules/es-abstract/2021/TimeClip.js new file mode 100644 index 000000000..e416cab4b --- /dev/null +++ b/node_modules/es-abstract/2021/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2021/TimeFromYear.js b/node_modules/es-abstract/2021/TimeFromYear.js new file mode 100644 index 000000000..f3518a41a --- /dev/null +++ b/node_modules/es-abstract/2021/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2021/TimeString.js b/node_modules/es-abstract/2021/TimeString.js new file mode 100644 index 000000000..051c4728e --- /dev/null +++ b/node_modules/es-abstract/2021/TimeString.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var HourFromTime = require('./HourFromTime'); +var MinFromTime = require('./MinFromTime'); +var SecFromTime = require('./SecFromTime'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-timestring + +module.exports = function TimeString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var hour = HourFromTime(tv); + var minute = MinFromTime(tv); + var second = SecFromTime(tv); + return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT'; +}; diff --git a/node_modules/es-abstract/2021/TimeWithinDay.js b/node_modules/es-abstract/2021/TimeWithinDay.js new file mode 100644 index 000000000..2bba83386 --- /dev/null +++ b/node_modules/es-abstract/2021/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2021/ToBigInt.js b/node_modules/es-abstract/2021/ToBigInt.js new file mode 100644 index 000000000..aa24d7b71 --- /dev/null +++ b/node_modules/es-abstract/2021/ToBigInt.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $asIntN = GetIntrinsic('%BigInt.asIntN%', true); +var $Number = GetIntrinsic('%Number%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var ToPrimitive = require('./ToPrimitive'); + +// https://262.ecma-international.org/11.0/#sec-tobigint + +module.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + + var prim = ToPrimitive(argument, $Number); + + if (typeof prim === 'number') { + return $asIntN(0, prim); + } + return $BigInt(prim); +}; diff --git a/node_modules/es-abstract/2021/ToBigInt64.js b/node_modules/es-abstract/2021/ToBigInt64.js new file mode 100644 index 000000000..65c1c55d9 --- /dev/null +++ b/node_modules/es-abstract/2021/ToBigInt64.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31))); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobigint64 + +module.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; +}; diff --git a/node_modules/es-abstract/2021/ToBigUint64.js b/node_modules/es-abstract/2021/ToBigUint64.js new file mode 100644 index 000000000..ff68236a8 --- /dev/null +++ b/node_modules/es-abstract/2021/ToBigUint64.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobiguint64 + +module.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; +}; diff --git a/node_modules/es-abstract/2021/ToBoolean.js b/node_modules/es-abstract/2021/ToBoolean.js new file mode 100644 index 000000000..466404bf9 --- /dev/null +++ b/node_modules/es-abstract/2021/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2021/ToDateString.js b/node_modules/es-abstract/2021/ToDateString.js new file mode 100644 index 000000000..e636a9ba6 --- /dev/null +++ b/node_modules/es-abstract/2021/ToDateString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $Date(tv); +}; diff --git a/node_modules/es-abstract/2021/ToIndex.js b/node_modules/es-abstract/2021/ToIndex.js new file mode 100644 index 000000000..cc747e225 --- /dev/null +++ b/node_modules/es-abstract/2021/ToIndex.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); +var ToLength = require('./ToLength'); +var SameValue = require('./SameValue'); + +// https://www.ecma-international.org/ecma-262/8.0/#sec-toindex + +module.exports = function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = ToIntegerOrInfinity(value); + if (integerIndex < 0) { + throw new $RangeError('index must be >= 0'); + } + var index = ToLength(integerIndex); + if (!SameValue(integerIndex, index)) { + throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; +}; diff --git a/node_modules/es-abstract/2021/ToInt16.js b/node_modules/es-abstract/2021/ToInt16.js new file mode 100644 index 000000000..cb8e7934b --- /dev/null +++ b/node_modules/es-abstract/2021/ToInt16.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint16 = require('./ToUint16'); + +// https://ecma-international.org/ecma-262/6.0/#sec-toint16 + +module.exports = function ToInt16(argument) { + var int16bit = ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; +}; diff --git a/node_modules/es-abstract/2021/ToInt32.js b/node_modules/es-abstract/2021/ToInt32.js new file mode 100644 index 000000000..b879ccc47 --- /dev/null +++ b/node_modules/es-abstract/2021/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/2021/ToInt8.js b/node_modules/es-abstract/2021/ToInt8.js new file mode 100644 index 000000000..bc452d826 --- /dev/null +++ b/node_modules/es-abstract/2021/ToInt8.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint8 = require('./ToUint8'); + +// https://ecma-international.org/ecma-262/6.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var int8bit = ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2021/ToIntegerOrInfinity.js b/node_modules/es-abstract/2021/ToIntegerOrInfinity.js new file mode 100644 index 000000000..5f55e1ea0 --- /dev/null +++ b/node_modules/es-abstract/2021/ToIntegerOrInfinity.js @@ -0,0 +1,20 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// https://262.ecma-international.org/12.0/#sec-tointegerorinfinity + +module.exports = function ToIntegerOrInfinity(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0) { return 0; } + if (!$isFinite(number)) { return number; } + var integer = floor(abs(number)); + if (integer === 0) { return 0; } + return $sign(number) * integer; +}; diff --git a/node_modules/es-abstract/2021/ToLength.js b/node_modules/es-abstract/2021/ToLength.js new file mode 100644 index 000000000..0468c3e71 --- /dev/null +++ b/node_modules/es-abstract/2021/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); + +module.exports = function ToLength(argument) { + var len = ToIntegerOrInfinity(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2021/ToNumber.js b/node_modules/es-abstract/2021/ToNumber.js new file mode 100644 index 000000000..c9e29f2c4 --- /dev/null +++ b/node_modules/es-abstract/2021/ToNumber.js @@ -0,0 +1,62 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var isPrimitive = require('../helpers/isPrimitive'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +// whitespace from: https://es5.github.io/#x15.5.4.20 +// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324 +var ws = [ + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003', + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028', + '\u2029\uFEFF' +].join(''); +var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g'); +var $replace = callBound('String.prototype.replace'); +var $trim = function (value) { + return $replace(value, trimRegex, ''); +}; + +var ToPrimitive = require('./ToPrimitive'); + +// https://ecma-international.org/ecma-262/6.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'bigint') { + throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2021/ToNumeric.js b/node_modules/es-abstract/2021/ToNumeric.js new file mode 100644 index 000000000..c18776094 --- /dev/null +++ b/node_modules/es-abstract/2021/ToNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); + +var isPrimitive = require('../helpers/isPrimitive'); + +var ToPrimitive = require('./ToPrimitive'); +var ToNumber = require('./ToNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-tonumber + +module.exports = function ToNumeric(argument) { + var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (Type(primValue) === 'BigInt') { + return primValue; + } + return ToNumber(primValue); +}; diff --git a/node_modules/es-abstract/2021/ToObject.js b/node_modules/es-abstract/2021/ToObject.js new file mode 100644 index 000000000..cb26bac06 --- /dev/null +++ b/node_modules/es-abstract/2021/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://ecma-international.org/ecma-262/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2021/ToPrimitive.js b/node_modules/es-abstract/2021/ToPrimitive.js new file mode 100644 index 000000000..0fbe9b807 --- /dev/null +++ b/node_modules/es-abstract/2021/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://ecma-international.org/ecma-262/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2021/ToPropertyDescriptor.js b/node_modules/es-abstract/2021/ToPropertyDescriptor.js new file mode 100644 index 000000000..53db87450 --- /dev/null +++ b/node_modules/es-abstract/2021/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var has = require('has'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (has(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (has(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (has(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (has(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (has(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (has(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2021/ToPropertyKey.js b/node_modules/es-abstract/2021/ToPropertyKey.js new file mode 100644 index 000000000..fc1bf7d86 --- /dev/null +++ b/node_modules/es-abstract/2021/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://ecma-international.org/ecma-262/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2021/ToString.js b/node_modules/es-abstract/2021/ToString.js new file mode 100644 index 000000000..4d494e1e2 --- /dev/null +++ b/node_modules/es-abstract/2021/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://ecma-international.org/ecma-262/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2021/ToUint16.js b/node_modules/es-abstract/2021/ToUint16.js new file mode 100644 index 000000000..633ca8464 --- /dev/null +++ b/node_modules/es-abstract/2021/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/2021/ToUint32.js b/node_modules/es-abstract/2021/ToUint32.js new file mode 100644 index 000000000..2a8e9dd6a --- /dev/null +++ b/node_modules/es-abstract/2021/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/2021/ToUint8.js b/node_modules/es-abstract/2021/ToUint8.js new file mode 100644 index 000000000..2dfd97cb3 --- /dev/null +++ b/node_modules/es-abstract/2021/ToUint8.js @@ -0,0 +1,20 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); + +// https://ecma-international.org/ecma-262/6.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x100); +}; diff --git a/node_modules/es-abstract/2021/ToUint8Clamp.js b/node_modules/es-abstract/2021/ToUint8Clamp.js new file mode 100644 index 000000000..b0b8ce8ed --- /dev/null +++ b/node_modules/es-abstract/2021/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://ecma-international.org/ecma-262/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(argument); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2021/TrimString.js b/node_modules/es-abstract/2021/TrimString.js new file mode 100644 index 000000000..113dcf82b --- /dev/null +++ b/node_modules/es-abstract/2021/TrimString.js @@ -0,0 +1,29 @@ +'use strict'; + +var trimStart = require('string.prototype.trimstart'); +var trimEnd = require('string.prototype.trimend'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/10.0/#sec-trimstring + +module.exports = function TrimString(string, where) { + var str = RequireObjectCoercible(string); + var S = ToString(str); + var T; + if (where === 'start') { + T = trimStart(S); + } else if (where === 'end') { + T = trimEnd(S); + } else if (where === 'start+end') { + T = trimStart(trimEnd(S)); + } else { + throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"'); + } + return T; +}; diff --git a/node_modules/es-abstract/2021/Type.js b/node_modules/es-abstract/2021/Type.js new file mode 100644 index 000000000..555ca74ea --- /dev/null +++ b/node_modules/es-abstract/2021/Type.js @@ -0,0 +1,15 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2021/UTF16EncodeCodePoint.js b/node_modules/es-abstract/2021/UTF16EncodeCodePoint.js new file mode 100644 index 000000000..0c7fb11e0 --- /dev/null +++ b/node_modules/es-abstract/2021/UTF16EncodeCodePoint.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var isCodePoint = require('../helpers/isCodePoint'); + +// https://ecma-international.org/ecma-262/12.0/#sec-utf16encoding + +module.exports = function UTF16EncodeCodePoint(cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); + } + if (cp <= 65535) { + return $fromCharCode(cp); + } + var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800); + var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00); + return cu1 + cu2; +}; diff --git a/node_modules/es-abstract/2021/UTF16SurrogatePairToCodePoint.js b/node_modules/es-abstract/2021/UTF16SurrogatePairToCodePoint.js new file mode 100644 index 000000000..6a247a239 --- /dev/null +++ b/node_modules/es-abstract/2021/UTF16SurrogatePairToCodePoint.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair + +module.exports = function UTF16SurrogatePairToCodePoint(lead, trail) { + if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) { + throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code'); + } + // var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return $fromCharCode(lead) + $fromCharCode(trail); +}; diff --git a/node_modules/es-abstract/2021/UnicodeEscape.js b/node_modules/es-abstract/2021/UnicodeEscape.js new file mode 100644 index 000000000..b708c90df --- /dev/null +++ b/node_modules/es-abstract/2021/UnicodeEscape.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); + +var StringPad = require('./StringPad'); + +// https://262.ecma-international.org/11.0/#sec-unicodeescape + +module.exports = function UnicodeEscape(C) { + if (typeof C !== 'string' || C.length !== 1) { + throw new $TypeError('Assertion failed: `C` must be a single code unit'); + } + var n = $charCodeAt(C, 0); + if (n > 0xFFFF) { + throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF'); + } + + return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start'); +}; diff --git a/node_modules/es-abstract/2021/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2021/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 000000000..a7fd218ad --- /dev/null +++ b/node_modules/es-abstract/2021/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,170 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var isSamePropertyDescriptor = require('../helpers/isSamePropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-validateandapplypropertydescriptor +// https://ecma-international.org/ecma-262/8.0/#sec-validateandapplypropertydescriptor + +// eslint-disable-next-line max-lines-per-function, max-statements, max-params +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + // this uses the ES2017+ logic, since it fixes a number of bugs in the ES2015 logic. + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + if (oType !== 'Undefined' && !IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: if O is not undefined, P must be a Property Key'); + } + if (Type(current) === 'Undefined') { + if (!extensible) { + return false; + } + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': Desc['[[Configurable]]'], + '[[Enumerable]]': Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': Desc['[[Writable]]'] + } + ); + } + } else { + if (!IsAccessorDescriptor(Desc)) { + throw new $TypeError('Assertion failed: Desc is not an accessor descriptor'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + } + return true; + } + if (IsGenericDescriptor(Desc) && !('[[Configurable]]' in Desc) && !('[[Enumerable]]' in Desc)) { + return true; + } + if (isSamePropertyDescriptor({ SameValue: SameValue }, Desc, current)) { + return true; // removed by ES2017, but should still be correct + } + // "if every field in Desc is absent, return true" can't really match the assertion that it's a Property Descriptor + if (!current['[[Configurable]]']) { + if (Desc['[[Configurable]]']) { + return false; + } + if ('[[Enumerable]]' in Desc && !Desc['[[Enumerable]]'] === !!current['[[Enumerable]]']) { + return false; + } + } + if (IsGenericDescriptor(Desc)) { + // no further validation is required. + } else if (IsDataDescriptor(current) !== IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + return false; + } + if (IsDataDescriptor(current)) { + if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Get]]': undefined + } + ); + } + } else if (oType !== 'Undefined') { + DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': current['[[Configurable]]'], + '[[Enumerable]]': current['[[Enumerable]]'], + '[[Value]]': undefined + } + ); + } + } else if (IsDataDescriptor(current) && IsDataDescriptor(Desc)) { + if (!current['[[Configurable]]'] && !current['[[Writable]]']) { + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + return true; + } + } else if (IsAccessorDescriptor(current) && IsAccessorDescriptor(Desc)) { + if (!current['[[Configurable]]']) { + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + return true; + } + } else { + throw new $TypeError('Assertion failed: current and Desc are not both data, both accessors, or one accessor and one data.'); + } + if (oType !== 'Undefined') { + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + return true; +}; diff --git a/node_modules/es-abstract/2021/ValidateAtomicAccess.js b/node_modules/es-abstract/2021/ValidateAtomicAccess.js new file mode 100644 index 000000000..45379ff17 --- /dev/null +++ b/node_modules/es-abstract/2021/ValidateAtomicAccess.js @@ -0,0 +1,63 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +// node 0.10 doesn't have a prototype method +var $byteOffset = callBound('%TypedArray.prototype.byteOffset%', true) || function (x) { return x.byteOffset; }; + +var ToIndex = require('./ToIndex'); + +var isTypedArray = require('is-typed-array'); +var typedArrayLength = require('typed-array-length'); +var whichTypedArray = require('which-typed-array'); + +var table60 = { + __proto__: null, + $Int8Array: 1, + $Uint8Array: 1, + $Uint8ClampedArray: 1, + $Int16Array: 2, + $Uint16Array: 2, + $Int32Array: 4, + $Uint32Array: 4, + $BigInt64Array: 8, + $BigUint64Array: 8, + $Float32Array: 4, + $Float64Array: 8 +}; + +// https://262.ecma-international.org/12.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1 + } + + var length = typedArrayLength(typedArray); // step 2 + + var accessIndex = ToIndex(requestIndex); // step 3 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 5 + } + + var arrayTypeName = whichTypedArray(typedArray); // step 6 + + var elementSize = table60['$' + arrayTypeName]; // step 7 + + var offset = $byteOffset(typedArray); // step 8 + + return (accessIndex * elementSize) + offset; // step 9 +}; diff --git a/node_modules/es-abstract/2021/ValidateIntegerTypedArray.js b/node_modules/es-abstract/2021/ValidateIntegerTypedArray.js new file mode 100644 index 000000000..0bcc0aff4 --- /dev/null +++ b/node_modules/es-abstract/2021/ValidateIntegerTypedArray.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var Type = require('./Type'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/12.0/#sec-validateintegertypedarray + +var table60 = { + __proto__: null, + $Int8Array: 'Int8', + $Uint8Array: 'Uint8', + $Uint8ClampedArray: 'Uint8C', + $Int16Array: 'Int16', + $Uint16Array: 'Uint16', + $Int32Array: 'Int32', + $Uint32Array: 'Uint32', + $BigInt64Array: 'BigInt64', + $BigUint64Array: 'BigUint64', + $Float32Array: 'Float32', + $Float64Array: 'Float64' +}; + +module.exports = function ValidateIntegerTypedArray(typedArray) { + var waitable = arguments.length > 1 ? arguments[1] : false; // step 1 + + if (Type(waitable) !== 'Boolean') { + throw new $TypeError('Assertion failed: `waitable` must be a Boolean'); + } + + var buffer = ValidateTypedArray(typedArray); // step 2 + + var typeName = whichTypedArray(typedArray); // step 3 + + var type = table60['$' + typeName]; // step 4 + + if (waitable) { // step 5 + if (typeName !== 'Int32Array' && typeName !== 'BigInt64Array') { + throw new $TypeError('Assertion failed: `typedArray` must be an Int32Array or BigInt64Array when `waitable` is true'); // step 5.a + } + } else if (!IsUnclampedIntegerElementType(type) && !IsBigIntElementType(type)) { + throw new $TypeError('Assertion failed: `typedArray` must be an integer TypedArray'); // step 6.a + } + + return buffer; // step 7 +}; diff --git a/node_modules/es-abstract/2021/ValidateTypedArray.js b/node_modules/es-abstract/2021/ValidateTypedArray.js new file mode 100644 index 000000000..83df3a81c --- /dev/null +++ b/node_modules/es-abstract/2021/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('%TypedArray.prototype.some%', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2021/WeakRefDeref.js b/node_modules/es-abstract/2021/WeakRefDeref.js new file mode 100644 index 000000000..66d2d1723 --- /dev/null +++ b/node_modules/es-abstract/2021/WeakRefDeref.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $deref = callBound('WeakRef.prototype.deref', true); + +var isWeakRef = require('is-weakref'); + +var AddToKeptObjects = require('./AddToKeptObjects'); + +// https://ecma-international.org/ecma-262/12.0/#sec-weakrefderef + +module.exports = function WeakRefDeref(weakRef) { + if (!isWeakRef(weakRef)) { + throw new $TypeError('Assertion failed: `weakRef` must be a WeakRef'); + } + var target = $deref(weakRef); + if (target) { + AddToKeptObjects(target); + } + return target; +}; diff --git a/node_modules/es-abstract/2021/WeekDay.js b/node_modules/es-abstract/2021/WeekDay.js new file mode 100644 index 000000000..17cf94ca3 --- /dev/null +++ b/node_modules/es-abstract/2021/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2021/YearFromTime.js b/node_modules/es-abstract/2021/YearFromTime.js new file mode 100644 index 000000000..be06ecbc3 --- /dev/null +++ b/node_modules/es-abstract/2021/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2021/abs.js b/node_modules/es-abstract/2021/abs.js new file mode 100644 index 000000000..8bc45434d --- /dev/null +++ b/node_modules/es-abstract/2021/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2021/clamp.js b/node_modules/es-abstract/2021/clamp.js new file mode 100644 index 000000000..8da139484 --- /dev/null +++ b/node_modules/es-abstract/2021/clamp.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var max = GetIntrinsic('%Math.max%'); +var min = GetIntrinsic('%Math.min%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#clamping + +module.exports = function clamp(x, lower, upper) { + if (Type(x) !== 'Number' || Type(lower) !== 'Number' || Type(upper) !== 'Number' || !(lower <= upper)) { + throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`'); + } + return min(max(lower, x), upper); +}; diff --git a/node_modules/es-abstract/2021/floor.js b/node_modules/es-abstract/2021/floor.js new file mode 100644 index 000000000..625548e93 --- /dev/null +++ b/node_modules/es-abstract/2021/floor.js @@ -0,0 +1,16 @@ +'use strict'; + +var Type = require('./Type'); + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/11.0/#eqn-floor + +module.exports = function floor(x) { + // return x - modulo(x, 1); + if (Type(x) === 'BigInt') { + return x; + } + return $floor(x); +}; diff --git a/node_modules/es-abstract/2021/max.js b/node_modules/es-abstract/2021/max.js new file mode 100644 index 000000000..b919d4e83 --- /dev/null +++ b/node_modules/es-abstract/2021/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2021/min.js b/node_modules/es-abstract/2021/min.js new file mode 100644 index 000000000..909de4b0e --- /dev/null +++ b/node_modules/es-abstract/2021/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2021/modulo.js b/node_modules/es-abstract/2021/modulo.js new file mode 100644 index 000000000..b94bb52bb --- /dev/null +++ b/node_modules/es-abstract/2021/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2021/msFromTime.js b/node_modules/es-abstract/2021/msFromTime.js new file mode 100644 index 000000000..a6bae767a --- /dev/null +++ b/node_modules/es-abstract/2021/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2021/substring.js b/node_modules/es-abstract/2021/substring.js new file mode 100644 index 000000000..a2c724ad8 --- /dev/null +++ b/node_modules/es-abstract/2021/substring.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/12.0/#substring +module.exports = function substring(S, inclusiveStart, exclusiveEnd) { + if (Type(S) !== 'String' || !IsIntegralNumber(inclusiveStart) || (arguments.length > 2 && !IsIntegralNumber(exclusiveEnd))) { + throw new $TypeError('`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers'); + } + return $slice(S, inclusiveStart, arguments.length > 2 ? exclusiveEnd : S.length); +}; diff --git a/node_modules/es-abstract/2021/thisBigIntValue.js b/node_modules/es-abstract/2021/thisBigIntValue.js new file mode 100644 index 000000000..1fd12980e --- /dev/null +++ b/node_modules/es-abstract/2021/thisBigIntValue.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-thisbigintvalue + +module.exports = function thisBigIntValue(value) { + var type = Type(value); + if (type === 'BigInt') { + return value; + } + if (!$bigIntValueOf) { + throw new $TypeError('BigInt is not supported'); + } + return $bigIntValueOf(value); +}; diff --git a/node_modules/es-abstract/2021/thisBooleanValue.js b/node_modules/es-abstract/2021/thisBooleanValue.js new file mode 100644 index 000000000..27075b9c4 --- /dev/null +++ b/node_modules/es-abstract/2021/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2021/thisNumberValue.js b/node_modules/es-abstract/2021/thisNumberValue.js new file mode 100644 index 000000000..92968dcdf --- /dev/null +++ b/node_modules/es-abstract/2021/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2021/thisStringValue.js b/node_modules/es-abstract/2021/thisStringValue.js new file mode 100644 index 000000000..8e4274d81 --- /dev/null +++ b/node_modules/es-abstract/2021/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2021/thisSymbolValue.js b/node_modules/es-abstract/2021/thisSymbolValue.js new file mode 100644 index 000000000..91a552542 --- /dev/null +++ b/node_modules/es-abstract/2021/thisSymbolValue.js @@ -0,0 +1,19 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-thissymbolvalue + +module.exports = function thisSymbolValue(value) { + if (!$SymbolValueOf) { + throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object'); + } + if (Type(value) === 'Symbol') { + return value; + } + return $SymbolValueOf(value); +}; diff --git a/node_modules/es-abstract/2021/thisTimeValue.js b/node_modules/es-abstract/2021/thisTimeValue.js new file mode 100644 index 000000000..a9a47ace2 --- /dev/null +++ b/node_modules/es-abstract/2021/thisTimeValue.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../2018/thisTimeValue'); diff --git a/node_modules/es-abstract/2022/AddEntriesFromIterable.js b/node_modules/es-abstract/2022/AddEntriesFromIterable.js new file mode 100644 index 000000000..a0a5e71bd --- /dev/null +++ b/node_modules/es-abstract/2022/AddEntriesFromIterable.js @@ -0,0 +1,52 @@ +'use strict'; + +var inspect = require('object-inspect'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var GetIterator = require('./GetIterator'); +var IsCallable = require('./IsCallable'); +var IteratorClose = require('./IteratorClose'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/10.0//#sec-add-entries-from-iterable + +module.exports = function AddEntriesFromIterable(target, iterable, adder) { + if (!IsCallable(adder)) { + throw new $TypeError('Assertion failed: `adder` is not callable'); + } + if (iterable == null) { + throw new $TypeError('Assertion failed: `iterable` is present, and not nullish'); + } + var iteratorRecord = GetIterator(iterable); + while (true) { // eslint-disable-line no-constant-condition + var next = IteratorStep(iteratorRecord); + if (!next) { + return target; + } + var nextItem = IteratorValue(next); + if (Type(nextItem) !== 'Object') { + var error = new $TypeError('iterator next must return an Object, got ' + inspect(nextItem)); + return IteratorClose( + iteratorRecord, + function () { throw error; } // eslint-disable-line no-loop-func + ); + } + try { + var k = Get(nextItem, '0'); + var v = Get(nextItem, '1'); + Call(adder, target, [k, v]); + } catch (e) { + return IteratorClose( + iteratorRecord, + function () { throw e; } + ); + } + } +}; diff --git a/node_modules/es-abstract/2022/AddToKeptObjects.js b/node_modules/es-abstract/2022/AddToKeptObjects.js new file mode 100644 index 000000000..c3088d999 --- /dev/null +++ b/node_modules/es-abstract/2022/AddToKeptObjects.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var SLOT = require('internal-slot'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ClearKeptObjects = require('./ClearKeptObjects'); +var Type = require('./Type'); + +var $push = callBound('Array.prototype.push'); + +// https://ecma-international.org/ecma-262/12.0/#sec-addtokeptobjects + +module.exports = function AddToKeptObjects(object) { + if (Type(object) !== 'Object') { + throw new $TypeError('Assertion failed: `object` must be an Object'); + } + $push(SLOT.get(ClearKeptObjects, '[[es-abstract internal: KeptAlive]]'), object); +}; diff --git a/node_modules/es-abstract/2022/AdvanceStringIndex.js b/node_modules/es-abstract/2022/AdvanceStringIndex.js new file mode 100644 index 000000000..eeae53125 --- /dev/null +++ b/node_modules/es-abstract/2022/AdvanceStringIndex.js @@ -0,0 +1,34 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var CodePointAt = require('./CodePointAt'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://ecma-international.org/ecma-262/12.0/#sec-advancestringindex + +module.exports = function AdvanceStringIndex(S, index, unicode) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!IsIntegralNumber(index) || index < 0 || index > MAX_SAFE_INTEGER) { + throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53'); + } + if (Type(unicode) !== 'Boolean') { + throw new $TypeError('Assertion failed: `unicode` must be a Boolean'); + } + if (!unicode) { + return index + 1; + } + var length = S.length; + if ((index + 1) >= length) { + return index + 1; + } + var cp = CodePointAt(S, index); + return index + cp['[[CodeUnitCount]]']; +}; diff --git a/node_modules/es-abstract/2022/ApplyStringOrNumericBinaryOperator.js b/node_modules/es-abstract/2022/ApplyStringOrNumericBinaryOperator.js new file mode 100644 index 000000000..824a10543 --- /dev/null +++ b/node_modules/es-abstract/2022/ApplyStringOrNumericBinaryOperator.js @@ -0,0 +1,80 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var HasOwnProperty = require('./HasOwnProperty'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var NumberAdd = require('./Number/add'); +var NumberBitwiseAND = require('./Number/bitwiseAND'); +var NumberBitwiseOR = require('./Number/bitwiseOR'); +var NumberBitwiseXOR = require('./Number/bitwiseXOR'); +var NumberDivide = require('./Number/divide'); +var NumberExponentiate = require('./Number/exponentiate'); +var NumberLeftShift = require('./Number/leftShift'); +var NumberMultiply = require('./Number/multiply'); +var NumberRemainder = require('./Number/remainder'); +var NumberSignedRightShift = require('./Number/signedRightShift'); +var NumberSubtract = require('./Number/subtract'); +var NumberUnsignedRightShift = require('./Number/unsignedRightShift'); +var BigIntAdd = require('./BigInt/add'); +var BigIntBitwiseAND = require('./BigInt/bitwiseAND'); +var BigIntBitwiseOR = require('./BigInt/bitwiseOR'); +var BigIntBitwiseXOR = require('./BigInt/bitwiseXOR'); +var BigIntDivide = require('./BigInt/divide'); +var BigIntExponentiate = require('./BigInt/exponentiate'); +var BigIntLeftShift = require('./BigInt/leftShift'); +var BigIntMultiply = require('./BigInt/multiply'); +var BigIntRemainder = require('./BigInt/remainder'); +var BigIntSignedRightShift = require('./BigInt/signedRightShift'); +var BigIntSubtract = require('./BigInt/subtract'); +var BigIntUnsignedRightShift = require('./BigInt/unsignedRightShift'); + +// https://ecma-international.org/ecma-262/12.0/#sec-applystringornumericbinaryoperator + +// https://ecma-international.org/ecma-262/12.0/#step-applystringornumericbinaryoperator-operations-table +var table = { + '**': [NumberExponentiate, BigIntExponentiate], + '*': [NumberMultiply, BigIntMultiply], + '/': [NumberDivide, BigIntDivide], + '%': [NumberRemainder, BigIntRemainder], + '+': [NumberAdd, BigIntAdd], + '-': [NumberSubtract, BigIntSubtract], + '<<': [NumberLeftShift, BigIntLeftShift], + '>>': [NumberSignedRightShift, BigIntSignedRightShift], + '>>>': [NumberUnsignedRightShift, BigIntUnsignedRightShift], + '&': [NumberBitwiseAND, BigIntBitwiseAND], + '^': [NumberBitwiseXOR, BigIntBitwiseXOR], + '|': [NumberBitwiseOR, BigIntBitwiseOR] +}; + +module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) { + if (Type(opText) !== 'String' || !HasOwnProperty(table, opText)) { + throw new $TypeError('Assertion failed: `opText` must be a valid operation string'); + } + if (opText === '+') { + var lprim = ToPrimitive(lval); + var rprim = ToPrimitive(rval); + if (Type(lprim) === 'String' || Type(rprim) === 'String') { + var lstr = ToString(lprim); + var rstr = ToString(rprim); + return lstr + rstr; + } + /* eslint no-param-reassign: 1 */ + lval = lprim; + rval = rprim; + } + var lnum = ToNumeric(lval); + var rnum = ToNumeric(rval); + var T = Type(lnum); + if (T !== Type(rnum)) { + throw new $TypeError('types of ' + lnum + ' and ' + rnum + ' differ'); + } + var Operation = table[opText][T === 'BigInt' ? 1 : 0]; + return Operation(lnum, rnum); +}; diff --git a/node_modules/es-abstract/2022/ArrayCreate.js b/node_modules/es-abstract/2022/ArrayCreate.js new file mode 100644 index 000000000..e138d2db9 --- /dev/null +++ b/node_modules/es-abstract/2022/ArrayCreate.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +var hasProto = require('has-proto')(); + +var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( + hasProto + ? function (O, proto) { + O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign + return O; + } + : null +); + +// https://www.ecma-international.org/ecma-262/12.0/#sec-arraycreate + +module.exports = function ArrayCreate(length) { + if (!IsIntegralNumber(length) || length < 0) { + throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); + } + if (length > MAX_ARRAY_LENGTH) { + throw new $RangeError('length is greater than (2**32 - 1)'); + } + var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; + var A = []; // steps 3, 5 + if (proto !== $ArrayPrototype) { // step 4 + if (!$setProto) { + throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + $setProto(A, proto); + } + if (length !== 0) { // bypasses the need for step 6 + A.length = length; + } + /* step 6, the above as a shortcut for the below + OrdinaryDefineOwnProperty(A, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': true + }); + */ + return A; +}; diff --git a/node_modules/es-abstract/2022/ArraySetLength.js b/node_modules/es-abstract/2022/ArraySetLength.js new file mode 100644 index 000000000..08db9c2e9 --- /dev/null +++ b/node_modules/es-abstract/2022/ArraySetLength.js @@ -0,0 +1,85 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var assign = require('object.assign'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsArray = require('./IsArray'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-arraysetlength + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function ArraySetLength(A, Desc) { + if (!IsArray(A)) { + throw new $TypeError('Assertion failed: A must be an Array'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!('[[Value]]' in Desc)) { + return OrdinaryDefineOwnProperty(A, 'length', Desc); + } + var newLenDesc = assign({}, Desc); + var newLen = ToUint32(Desc['[[Value]]']); + var numberLen = ToNumber(Desc['[[Value]]']); + if (newLen !== numberLen) { + throw new $RangeError('Invalid array length'); + } + newLenDesc['[[Value]]'] = newLen; + var oldLenDesc = OrdinaryGetOwnProperty(A, 'length'); + if (!IsDataDescriptor(oldLenDesc)) { + throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`'); + } + var oldLen = oldLenDesc['[[Value]]']; + if (newLen >= oldLen) { + return OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + } + if (!oldLenDesc['[[Writable]]']) { + return false; + } + var newWritable; + if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) { + newWritable = true; + } else { + newWritable = false; + newLenDesc['[[Writable]]'] = true; + } + var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + if (!succeeded) { + return false; + } + while (newLen < oldLen) { + oldLen -= 1; + // eslint-disable-next-line no-param-reassign + var deleteSucceeded = delete A[ToString(oldLen)]; + if (!deleteSucceeded) { + newLenDesc['[[Value]]'] = oldLen + 1; + if (!newWritable) { + newLenDesc['[[Writable]]'] = false; + OrdinaryDefineOwnProperty(A, 'length', newLenDesc); + return false; + } + } + } + if (!newWritable) { + return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false }); + } + return true; +}; diff --git a/node_modules/es-abstract/2022/ArraySpeciesCreate.js b/node_modules/es-abstract/2022/ArraySpeciesCreate.js new file mode 100644 index 000000000..d908fa351 --- /dev/null +++ b/node_modules/es-abstract/2022/ArraySpeciesCreate.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var ArrayCreate = require('./ArrayCreate'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsConstructor = require('./IsConstructor'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/12.0/#sec-arrayspeciescreate + +module.exports = function ArraySpeciesCreate(originalArray, length) { + if (!IsIntegralNumber(length) || length < 0) { + throw new $TypeError('Assertion failed: length must be an integer >= 0'); + } + + var isArray = IsArray(originalArray); + if (!isArray) { + return ArrayCreate(length); + } + + var C = Get(originalArray, 'constructor'); + // TODO: figure out how to make a cross-realm normal Array, a same-realm Array + // if (IsConstructor(C)) { + // if C is another realm's Array, C = undefined + // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? + // } + if ($species && Type(C) === 'Object') { + C = Get(C, $species); + if (C === null) { + C = void 0; + } + } + + if (typeof C === 'undefined') { + return ArrayCreate(length); + } + if (!IsConstructor(C)) { + throw new $TypeError('C must be a constructor'); + } + return new C(length); // Construct(C, length); +}; + diff --git a/node_modules/es-abstract/2022/AsyncFromSyncIteratorContinuation.js b/node_modules/es-abstract/2022/AsyncFromSyncIteratorContinuation.js new file mode 100644 index 000000000..c1cc7a111 --- /dev/null +++ b/node_modules/es-abstract/2022/AsyncFromSyncIteratorContinuation.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var callBound = require('call-bind/callBound'); + +var CreateIterResultObject = require('./CreateIterResultObject'); +var IteratorComplete = require('./IteratorComplete'); +var IteratorValue = require('./IteratorValue'); +var PromiseResolve = require('./PromiseResolve'); +var Type = require('./Type'); + +var $then = callBound('Promise.prototype.then', true); + +// https://ecma-international.org/ecma-262/10.0/#sec-asyncfromsynciteratorcontinuation + +module.exports = function AsyncFromSyncIteratorContinuation(result) { + if (Type(result) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (arguments.length > 1) { + throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation'); + } + + if (!$Promise) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + return new Promise(function (resolve) { + var done = IteratorComplete(result); // step 2 + var value = IteratorValue(result); // step 4 + var valueWrapper = PromiseResolve($Promise, value); // step 6 + + // eslint-disable-next-line no-shadow + var onFulfilled = function (value) { // steps 8-9 + return CreateIterResultObject(value, done); // step 8.a + }; + resolve($then(valueWrapper, onFulfilled)); // step 11 + }); // step 12 +}; diff --git a/node_modules/es-abstract/2022/AsyncIteratorClose.js b/node_modules/es-abstract/2022/AsyncIteratorClose.js new file mode 100644 index 000000000..1ae42c0c5 --- /dev/null +++ b/node_modules/es-abstract/2022/AsyncIteratorClose.js @@ -0,0 +1,68 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $Promise = GetIntrinsic('%Promise%', true); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +var callBound = require('call-bind/callBound'); + +var $then = callBound('Promise.prototype.then', true); + +// https://262.ecma-international.org/12.0/#sec-asynciteratorclose + +module.exports = function AsyncIteratorClose(iteratorRecord, completion) { + assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1 + + if (!(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2 + } + + if (!$then) { + throw new $SyntaxError('This environment does not support Promises.'); + } + + var iterator = iteratorRecord['[[Iterator]]']; // step 3 + + return $then( + $then( + $then( + new $Promise(function (resolve) { + resolve(GetMethod(iterator, 'return')); // step 4 + // resolve(Call(ret, iterator, [])); // step 6 + }), + function (returnV) { // step 5.a + if (typeof returnV === 'undefined') { + return completion; // step 5.b + } + return Call(returnV, iterator); // step 5.c, 5.d. + } + ), + null, + function (e) { + if (completion.type() === 'throw') { + completion['?'](); // step 6 + } else { + throw e; // step 7 + } + } + ), + function (innerResult) { // step 8 + if (completion.type() === 'throw') { + completion['?'](); // step 6 + } + if (Type(innerResult) !== 'Object') { + throw new $TypeError('`innerResult` must be an Object'); // step 10 + } + return completion; + } + ); +}; diff --git a/node_modules/es-abstract/2022/BigInt/add.js b/node_modules/es-abstract/2022/BigInt/add.js new file mode 100644 index 000000000..22b5db4b3 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/add.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add + +module.exports = function BigIntAdd(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/bitwiseAND.js b/node_modules/es-abstract/2022/BigInt/bitwiseAND.js new file mode 100644 index 000000000..83cd2c3ca --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND + +module.exports = function BigIntBitwiseAND(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/bitwiseNOT.js b/node_modules/es-abstract/2022/BigInt/bitwiseNOT.js new file mode 100644 index 000000000..9a444dfea --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/bitwiseNOT.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT + +module.exports = function BigIntBitwiseNOT(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + return -x - $BigInt(1); +}; diff --git a/node_modules/es-abstract/2022/BigInt/bitwiseOR.js b/node_modules/es-abstract/2022/BigInt/bitwiseOR.js new file mode 100644 index 000000000..3c1b57193 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR + +module.exports = function BigIntBitwiseOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/bitwiseXOR.js b/node_modules/es-abstract/2022/BigInt/bitwiseXOR.js new file mode 100644 index 000000000..45f8217ef --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var BigIntBitwiseOp = require('../BigIntBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR + +module.exports = function BigIntBitwiseXOR(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + return BigIntBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/divide.js b/node_modules/es-abstract/2022/BigInt/divide.js new file mode 100644 index 000000000..5706e7d72 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide + +module.exports = function BigIntDivide(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + if (y === $BigInt(0)) { + throw new $RangeError('Division by zero'); + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/equal.js b/node_modules/es-abstract/2022/BigInt/equal.js new file mode 100644 index 000000000..a28826d67 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/equal.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal + +module.exports = function BigIntEqual(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/exponentiate.js b/node_modules/es-abstract/2022/BigInt/exponentiate.js new file mode 100644 index 000000000..2365838c2 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/exponentiate.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate + +module.exports = function BigIntExponentiate(base, exponent) { + if (Type(base) !== 'BigInt' || Type(exponent) !== 'BigInt') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts'); + } + if (exponent < $BigInt(0)) { + throw new $RangeError('Exponent must be positive'); + } + if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) { + return $BigInt(1); + } + + var square = base; + var remaining = exponent; + while (remaining > $BigInt(0)) { + square += exponent; + --remaining; // eslint-disable-line no-plusplus + } + return square; +}; diff --git a/node_modules/es-abstract/2022/BigInt/index.js b/node_modules/es-abstract/2022/BigInt/index.js new file mode 100644 index 000000000..63ec52da6 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2022/BigInt/leftShift.js b/node_modules/es-abstract/2022/BigInt/leftShift.js new file mode 100644 index 000000000..d2a570223 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/leftShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift + +module.exports = function BigIntLeftShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x << y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/lessThan.js b/node_modules/es-abstract/2022/BigInt/lessThan.js new file mode 100644 index 000000000..0b3cd6ba0 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/lessThan.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan + +module.exports = function BigIntLessThan(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/multiply.js b/node_modules/es-abstract/2022/BigInt/multiply.js new file mode 100644 index 000000000..6e5d56c83 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/multiply.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply + +module.exports = function BigIntMultiply(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/remainder.js b/node_modules/es-abstract/2022/BigInt/remainder.js new file mode 100644 index 000000000..d2dc678ca --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/remainder.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder + +module.exports = function BigIntRemainder(n, d) { + if (Type(n) !== 'BigInt' || Type(d) !== 'BigInt') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts'); + } + + if (d === zero) { + throw new $RangeError('Division by zero'); + } + + if (n === zero) { + return zero; + } + + // shortcut for the actual spec mechanics + return n % d; +}; diff --git a/node_modules/es-abstract/2022/BigInt/sameValue.js b/node_modules/es-abstract/2022/BigInt/sameValue.js new file mode 100644 index 000000000..63ff06393 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/sameValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntEqual = require('./equal'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue + +module.exports = function BigIntSameValue(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntEqual(x, y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/sameValueZero.js b/node_modules/es-abstract/2022/BigInt/sameValueZero.js new file mode 100644 index 000000000..39f262c6d --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/sameValueZero.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntEqual = require('./equal'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero + +module.exports = function BigIntSameValueZero(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntEqual(x, y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/signedRightShift.js b/node_modules/es-abstract/2022/BigInt/signedRightShift.js new file mode 100644 index 000000000..f63c642f0 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/signedRightShift.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var BigIntLeftShift = require('./leftShift'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift + +module.exports = function BigIntSignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + return BigIntLeftShift(x, -y); +}; diff --git a/node_modules/es-abstract/2022/BigInt/subtract.js b/node_modules/es-abstract/2022/BigInt/subtract.js new file mode 100644 index 000000000..0490784f6 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/subtract.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract + +module.exports = function BigIntSubtract(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + // shortcut for the actual spec mechanics + return x - y; +}; diff --git a/node_modules/es-abstract/2022/BigInt/toString.js b/node_modules/es-abstract/2022/BigInt/toString.js new file mode 100644 index 000000000..858d95545 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/toString.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring + +module.exports = function BigIntToString(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` must be a BigInt'); + } + + return $String(x); +}; diff --git a/node_modules/es-abstract/2022/BigInt/unaryMinus.js b/node_modules/es-abstract/2022/BigInt/unaryMinus.js new file mode 100644 index 000000000..ee0f7ef19 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/unaryMinus.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var zero = $BigInt && $BigInt(0); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus + +module.exports = function BigIntUnaryMinus(x) { + if (Type(x) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` argument must be a BigInt'); + } + + if (x === zero) { + return zero; + } + + return -x; +}; diff --git a/node_modules/es-abstract/2022/BigInt/unsignedRightShift.js b/node_modules/es-abstract/2022/BigInt/unsignedRightShift.js new file mode 100644 index 000000000..7ad94f7a8 --- /dev/null +++ b/node_modules/es-abstract/2022/BigInt/unsignedRightShift.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift + +module.exports = function BigIntUnsignedRightShift(x, y) { + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts'); + } + + throw new $TypeError('BigInts have no unsigned right shift, use >> instead'); +}; diff --git a/node_modules/es-abstract/2022/BigIntBitwiseOp.js b/node_modules/es-abstract/2022/BigIntBitwiseOp.js new file mode 100644 index 000000000..0b1c03a91 --- /dev/null +++ b/node_modules/es-abstract/2022/BigIntBitwiseOp.js @@ -0,0 +1,66 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +// var $BigInt = GetIntrinsic('%BigInt%', true); +// var $pow = GetIntrinsic('%Math.pow%'); + +// var BinaryAnd = require('./BinaryAnd'); +// var BinaryOr = require('./BinaryOr'); +// var BinaryXor = require('./BinaryXor'); +var Type = require('./Type'); +// var modulo = require('./modulo'); + +// var zero = $BigInt && $BigInt(0); +// var negOne = $BigInt && $BigInt(-1); +// var two = $BigInt && $BigInt(2); + +// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop + +module.exports = function BigIntBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') { + throw new $TypeError('`x` and `y` must be BigInts'); + } + + if (op === '&') { + return x & y; + } + if (op === '|') { + return x | y; + } + return x ^ y; + /* + var result = zero; + var shift = 0; + while (x !== zero && x !== negOne && y !== zero && y !== negOne) { + var xDigit = modulo(x, two); + var yDigit = modulo(y, two); + if (op === '&') { + result += $pow(2, shift) * BinaryAnd(xDigit, yDigit); + } else if (op === '|') { + result += $pow(2, shift) * BinaryOr(xDigit, yDigit); + } else if (op === '^') { + result += $pow(2, shift) * BinaryXor(xDigit, yDigit); + } + shift += 1; + x = (x - xDigit) / two; + y = (y - yDigit) / two; + } + var tmp; + if (op === '&') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else if (op === '|') { + tmp = BinaryAnd(modulo(x, two), modulo(y, two)); + } else { + tmp = BinaryXor(modulo(x, two), modulo(y, two)); + } + if (tmp !== 0) { + result -= $pow(2, shift); + } + return result; + */ +}; diff --git a/node_modules/es-abstract/2022/BinaryAnd.js b/node_modules/es-abstract/2022/BinaryAnd.js new file mode 100644 index 000000000..c617f388d --- /dev/null +++ b/node_modules/es-abstract/2022/BinaryAnd.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryand + +module.exports = function BinaryAnd(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x & y; +}; diff --git a/node_modules/es-abstract/2022/BinaryOr.js b/node_modules/es-abstract/2022/BinaryOr.js new file mode 100644 index 000000000..6de0955f1 --- /dev/null +++ b/node_modules/es-abstract/2022/BinaryOr.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryor + +module.exports = function BinaryOr(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x | y; +}; diff --git a/node_modules/es-abstract/2022/BinaryXor.js b/node_modules/es-abstract/2022/BinaryXor.js new file mode 100644 index 000000000..189d7d846 --- /dev/null +++ b/node_modules/es-abstract/2022/BinaryXor.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://262.ecma-international.org/11.0/#sec-binaryxor + +module.exports = function BinaryXor(x, y) { + if ((x !== 0 && x !== 1) || (y !== 0 && y !== 1)) { + throw new $TypeError('Assertion failed: `x` and `y` must be either 0 or 1'); + } + return x ^ y; +}; diff --git a/node_modules/es-abstract/2022/ByteListBitwiseOp.js b/node_modules/es-abstract/2022/ByteListBitwiseOp.js new file mode 100644 index 000000000..4e3c1f10b --- /dev/null +++ b/node_modules/es-abstract/2022/ByteListBitwiseOp.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $push = callBound('Array.prototype.push'); + +var IsArray = require('./IsArray'); + +var isByteValue = require('../helpers/isByteValue'); + +// https://ecma-international.org/ecma-262/12.0/#sec-bytelistbitwiseop + +module.exports = function ByteListBitwiseOp(op, xBytes, yBytes) { + if (op !== '&' && op !== '^' && op !== '|') { + throw new $TypeError('Assertion failed: `op` must be `&`, `^`, or `|`'); + } + if (!IsArray(xBytes) || !IsArray(yBytes) || xBytes.length !== yBytes.length) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)'); + } + + var result = []; + + for (var i = 0; i < xBytes.length; i += 1) { + var xByte = xBytes[i]; + var yByte = yBytes[i]; + if (!isByteValue(xByte) || !isByteValue(yByte)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be same-length sequences of byte values (an integer 0-255, inclusive)'); + } + var resultByte; + if (op === '&') { + resultByte = xByte & yByte; + } else if (op === '^') { + resultByte = xByte ^ yByte; + } else { + resultByte = xByte | yByte; + } + $push(result, resultByte); + } + + return result; +}; diff --git a/node_modules/es-abstract/2022/ByteListEqual.js b/node_modules/es-abstract/2022/ByteListEqual.js new file mode 100644 index 000000000..adc2378e7 --- /dev/null +++ b/node_modules/es-abstract/2022/ByteListEqual.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var isByteValue = require('../helpers/isByteValue'); + +// https://ecma-international.org/ecma-262/12.0/#sec-bytelistequal + +module.exports = function ByteListEqual(xBytes, yBytes) { + if (!IsArray(xBytes) || !IsArray(yBytes)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)'); + } + + if (xBytes.length !== yBytes.length) { + return false; + } + + for (var i = 0; i < xBytes.length; i += 1) { + var xByte = xBytes[i]; + var yByte = yBytes[i]; + if (!isByteValue(xByte) || !isByteValue(yByte)) { + throw new $TypeError('Assertion failed: `xBytes` and `yBytes` must be sequences of byte values (an integer 0-255, inclusive)'); + } + if (xByte !== yByte) { + return false; + } + } + return true; +}; diff --git a/node_modules/es-abstract/2022/Call.js b/node_modules/es-abstract/2022/Call.js new file mode 100644 index 000000000..4b238c691 --- /dev/null +++ b/node_modules/es-abstract/2022/Call.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = require('./IsArray'); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('%Function.prototype.apply%'); + +// https://ecma-international.org/ecma-262/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; diff --git a/node_modules/es-abstract/2022/CanonicalNumericIndexString.js b/node_modules/es-abstract/2022/CanonicalNumericIndexString.js new file mode 100644 index 000000000..feb878c03 --- /dev/null +++ b/node_modules/es-abstract/2022/CanonicalNumericIndexString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring + +module.exports = function CanonicalNumericIndexString(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` must be a String'); + } + if (argument === '-0') { return -0; } + var n = ToNumber(argument); + if (SameValue(ToString(n), argument)) { return n; } + return void 0; +}; diff --git a/node_modules/es-abstract/2022/CharacterRange.js b/node_modules/es-abstract/2022/CharacterRange.js new file mode 100644 index 000000000..70e4b5235 --- /dev/null +++ b/node_modules/es-abstract/2022/CharacterRange.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $charCodeAt = callBound('%String.prototype.charCodeAt%'); +var $push = callBound('%Array.prototype.push%'); + +module.exports = function CharacterRange(A, B) { + if (A.length !== 1 || B.length !== 1) { + throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character'); + } + + var a = A[0]; + var b = B[0]; + + var i = $charCodeAt(a, 0); + var j = $charCodeAt(b, 0); + + if (!(i <= j)) { + throw new $TypeError('Assertion failed: i is not <= j'); + } + + var arr = []; + for (var k = i; k <= j; k += 1) { + $push(arr, $fromCharCode(k)); + } + return arr; +}; diff --git a/node_modules/es-abstract/2022/ClearKeptObjects.js b/node_modules/es-abstract/2022/ClearKeptObjects.js new file mode 100644 index 000000000..9397f5966 --- /dev/null +++ b/node_modules/es-abstract/2022/ClearKeptObjects.js @@ -0,0 +1,12 @@ +'use strict'; + +var SLOT = require('internal-slot'); +var keptObjects = []; + +// https://ecma-international.org/ecma-262/12.0/#sec-clear-kept-objects + +module.exports = function ClearKeptObjects() { + keptObjects.length = 0; +}; + +SLOT.set(module.exports, '[[es-abstract internal: KeptAlive]]', keptObjects); diff --git a/node_modules/es-abstract/2022/CodePointAt.js b/node_modules/es-abstract/2022/CodePointAt.js new file mode 100644 index 000000000..7a9ac1be7 --- /dev/null +++ b/node_modules/es-abstract/2022/CodePointAt.js @@ -0,0 +1,58 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var callBound = require('call-bind/callBound'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var Type = require('./Type'); +var UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint'); + +var $charAt = callBound('String.prototype.charAt'); +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +// https://ecma-international.org/ecma-262/12.0/#sec-codepointat + +module.exports = function CodePointAt(string, position) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var size = string.length; + if (position < 0 || position >= size) { + throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`'); + } + var first = $charCodeAt(string, position); + var cp = $charAt(string, position); + var firstIsLeading = isLeadingSurrogate(first); + var firstIsTrailing = isTrailingSurrogate(first); + if (!firstIsLeading && !firstIsTrailing) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': false + }; + } + if (firstIsTrailing || (position + 1 === size)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + var second = $charCodeAt(string, position + 1); + if (!isTrailingSurrogate(second)) { + return { + '[[CodePoint]]': cp, + '[[CodeUnitCount]]': 1, + '[[IsUnpairedSurrogate]]': true + }; + } + + return { + '[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second), + '[[CodeUnitCount]]': 2, + '[[IsUnpairedSurrogate]]': false + }; +}; diff --git a/node_modules/es-abstract/2022/CodePointsToString.js b/node_modules/es-abstract/2022/CodePointsToString.js new file mode 100644 index 000000000..403126cd2 --- /dev/null +++ b/node_modules/es-abstract/2022/CodePointsToString.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint'); +var IsArray = require('./IsArray'); + +var forEach = require('../helpers/forEach'); +var isCodePoint = require('../helpers/isCodePoint'); + +// https://ecma-international.org/ecma-262/12.0/#sec-codepointstostring + +module.exports = function CodePointsToString(text) { + if (!IsArray(text)) { + throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points'); + } + var result = ''; + forEach(text, function (cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `text` must be a sequence of Unicode Code Points'); + } + result += UTF16EncodeCodePoint(cp); + }); + return result; +}; diff --git a/node_modules/es-abstract/2022/CompletePropertyDescriptor.js b/node_modules/es-abstract/2022/CompletePropertyDescriptor.js new file mode 100644 index 000000000..548bf415a --- /dev/null +++ b/node_modules/es-abstract/2022/CompletePropertyDescriptor.js @@ -0,0 +1,39 @@ +'use strict'; + +var has = require('has'); + +var assertRecord = require('../helpers/assertRecord'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor + +module.exports = function CompletePropertyDescriptor(Desc) { + /* eslint no-param-reassign: 0 */ + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) { + if (!has(Desc, '[[Value]]')) { + Desc['[[Value]]'] = void 0; + } + if (!has(Desc, '[[Writable]]')) { + Desc['[[Writable]]'] = false; + } + } else { + if (!has(Desc, '[[Get]]')) { + Desc['[[Get]]'] = void 0; + } + if (!has(Desc, '[[Set]]')) { + Desc['[[Set]]'] = void 0; + } + } + if (!has(Desc, '[[Enumerable]]')) { + Desc['[[Enumerable]]'] = false; + } + if (!has(Desc, '[[Configurable]]')) { + Desc['[[Configurable]]'] = false; + } + return Desc; +}; diff --git a/node_modules/es-abstract/2022/CompletionRecord.js b/node_modules/es-abstract/2022/CompletionRecord.js new file mode 100644 index 000000000..370a5677f --- /dev/null +++ b/node_modules/es-abstract/2022/CompletionRecord.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var SLOT = require('internal-slot'); + +// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type + +var CompletionRecord = function CompletionRecord(type, value) { + if (!(this instanceof CompletionRecord)) { + return new CompletionRecord(type, value); + } + if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { + throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); + } + SLOT.set(this, '[[Type]]', type); + SLOT.set(this, '[[Value]]', value); + // [[Target]] slot? +}; + +CompletionRecord.prototype.type = function Type() { + return SLOT.get(this, '[[Type]]'); +}; + +CompletionRecord.prototype.value = function Value() { + return SLOT.get(this, '[[Value]]'); +}; + +CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { + var type = SLOT.get(this, '[[Type]]'); + var value = SLOT.get(this, '[[Value]]'); + + if (type === 'normal') { + return value; + } + if (type === 'throw') { + throw value; + } + throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); +}; + +CompletionRecord.prototype['!'] = function assert() { + var type = SLOT.get(this, '[[Type]]'); + + if (type !== 'normal') { + throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); + } + return SLOT.get(this, '[[Value]]'); +}; + +module.exports = CompletionRecord; diff --git a/node_modules/es-abstract/2022/CopyDataProperties.js b/node_modules/es-abstract/2022/CopyDataProperties.js new file mode 100644 index 000000000..bbb5d6f0a --- /dev/null +++ b/node_modules/es-abstract/2022/CopyDataProperties.js @@ -0,0 +1,70 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var every = require('../helpers/every'); +var some = require('../helpers/some'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToNumber = require('./ToNumber'); +var ToObject = require('./ToObject'); +var Type = require('./Type'); + +// https://www.ecma-international.org/ecma-262/12.0/#sec-copydataproperties + +module.exports = function CopyDataProperties(target, source, excludedItems) { + if (Type(target) !== 'Object') { + throw new $TypeError('Assertion failed: "target" must be an Object'); + } + + if (!IsArray(excludedItems) || !every(excludedItems, IsPropertyKey)) { + throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys'); + } + + if (typeof source === 'undefined' || source === null) { + return target; + } + + var from = ToObject(source); + + var keys = OwnPropertyKeys(from); + forEach(keys, function (nextKey) { + var excluded = some(excludedItems, function (e) { + return SameValue(e, nextKey) === true; + }); + /* + var excluded = false; + + forEach(excludedItems, function (e) { + if (SameValue(e, nextKey) === true) { + excluded = true; + } + }); + */ + + var enumerable = $isEnumerable(from, nextKey) || ( + // this is to handle string keys being non-enumerable in older engines + typeof source === 'string' + && nextKey >= 0 + && IsIntegralNumber(ToNumber(nextKey)) + ); + if (excluded === false && enumerable) { + var propValue = Get(from, nextKey); + CreateDataPropertyOrThrow(target, nextKey, propValue); + } + }); + + return target; +}; diff --git a/node_modules/es-abstract/2022/CreateAsyncFromSyncIterator.js b/node_modules/es-abstract/2022/CreateAsyncFromSyncIterator.js new file mode 100644 index 000000000..693321d51 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateAsyncFromSyncIterator.js @@ -0,0 +1,121 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var AsyncFromSyncIteratorContinuation = require('./AsyncFromSyncIteratorContinuation'); +var Call = require('./Call'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var Get = require('./Get'); +var GetMethod = require('./GetMethod'); +var IteratorNext = require('./IteratorNext'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); + +var assertRecord = require('../helpers/assertRecord'); + +var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || { + next: function next(value) { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var argsLength = arguments.length; + + return new Promise(function (resolve) { // step 3 + var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4 + var result; + if (argsLength > 0) { + result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a + } else { // step 6 + result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a + } + resolve(AsyncFromSyncIteratorContinuation(result)); // step 8 + }); + }, + 'return': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5 + + if (typeof iteratorReturn === 'undefined') { // step 7 + var iterResult = CreateIterResultObject(value, true); // step 7.a + Call(resolve, undefined, [iterResult]); // step 7.b + return; + } + var result; + if (valueIsPresent) { // step 8 + result = Call(iteratorReturn, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(iteratorReturn, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result)); // step 12 + }); + }, + 'throw': function () { + var O = this; // step 1 + + SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2 + + var valueIsPresent = arguments.length > 0; + var value = valueIsPresent ? arguments[0] : void undefined; + + return new Promise(function (resolve, reject) { // step 3 + var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4 + + var throwMethod = GetMethod(syncIterator, 'throw'); // step 5 + + if (typeof throwMethod === 'undefined') { // step 7 + Call(reject, undefined, [value]); // step 7.a + return; + } + + var result; + if (valueIsPresent) { // step 8 + result = Call(throwMethod, syncIterator, [value]); // step 8.a + } else { // step 9 + result = Call(throwMethod, syncIterator); // step 9.a + } + if (Type(result) !== 'Object') { // step 11 + Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a + return; + } + + resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12 + }); + } +}; + +// https://ecma-international.org/ecma-262/11.0/#sec-createasyncfromsynciterator + +module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) { + assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord); + + // var asyncIterator = OrdinaryObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1 + var asyncIterator = OrdinaryObjectCreate($AsyncFromSyncIteratorPrototype); + + SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2 + + var nextMethod = Get(asyncIterator, 'next'); // step 3 + + return { // steps 3-4 + '[[Iterator]]': asyncIterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; +}; diff --git a/node_modules/es-abstract/2022/CreateDataProperty.js b/node_modules/es-abstract/2022/CreateDataProperty.js new file mode 100644 index 000000000..02c6cd1f8 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateDataProperty.js @@ -0,0 +1,45 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty + +module.exports = function CreateDataProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var oldDesc = OrdinaryGetOwnProperty(O, P); + var extensible = !oldDesc || IsExtensible(O); + var nonConfigurable = oldDesc && !oldDesc['[[Configurable]]']; + if (nonConfigurable || !extensible) { + return false; + } + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Value]]': V, + '[[Writable]]': true + } + ); +}; diff --git a/node_modules/es-abstract/2022/CreateDataPropertyOrThrow.js b/node_modules/es-abstract/2022/CreateDataPropertyOrThrow.js new file mode 100644 index 000000000..2f7c410ba --- /dev/null +++ b/node_modules/es-abstract/2022/CreateDataPropertyOrThrow.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateDataProperty = require('./CreateDataProperty'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow + +module.exports = function CreateDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + var success = CreateDataProperty(O, P, V); + if (!success) { + throw new $TypeError('unable to create data property'); + } + return success; +}; diff --git a/node_modules/es-abstract/2022/CreateHTML.js b/node_modules/es-abstract/2022/CreateHTML.js new file mode 100644 index 000000000..ccded1e65 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateHTML.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $replace = callBound('String.prototype.replace'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-createhtml + +module.exports = function CreateHTML(string, tag, attribute, value) { + if (Type(tag) !== 'String' || Type(attribute) !== 'String') { + throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings'); + } + var str = RequireObjectCoercible(string); + var S = ToString(str); + var p1 = '<' + tag; + if (attribute !== '') { + var V = ToString(value); + var escapedV = $replace(V, /\x22/g, '"'); + p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22'; + } + return p1 + '>' + S + ''; +}; diff --git a/node_modules/es-abstract/2022/CreateIterResultObject.js b/node_modules/es-abstract/2022/CreateIterResultObject.js new file mode 100644 index 000000000..eea77a512 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateIterResultObject.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject + +module.exports = function CreateIterResultObject(value, done) { + if (Type(done) !== 'Boolean') { + throw new $TypeError('Assertion failed: Type(done) is not Boolean'); + } + return { + value: value, + done: done + }; +}; diff --git a/node_modules/es-abstract/2022/CreateListFromArrayLike.js b/node_modules/es-abstract/2022/CreateListFromArrayLike.js new file mode 100644 index 000000000..40293127d --- /dev/null +++ b/node_modules/es-abstract/2022/CreateListFromArrayLike.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf'); +var $push = callBound('Array.prototype.push'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-createlistfromarraylike + +module.exports = function CreateListFromArrayLike(obj) { + var elementTypes = arguments.length > 1 + ? arguments[1] + : ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'BigInt', 'Object']; + + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + if (!IsArray(elementTypes)) { + throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array'); + } + var len = LengthOfArrayLike(obj); + var list = []; + var index = 0; + while (index < len) { + var indexName = ToString(index); + var next = Get(obj, indexName); + var nextType = Type(next); + if ($indexOf(elementTypes, nextType) < 0) { + throw new $TypeError('item type ' + nextType + ' is not a valid elementType'); + } + $push(list, next); + index += 1; + } + return list; +}; diff --git a/node_modules/es-abstract/2022/CreateMethodProperty.js b/node_modules/es-abstract/2022/CreateMethodProperty.js new file mode 100644 index 000000000..53274a561 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateMethodProperty.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-createmethodproperty + +module.exports = function CreateMethodProperty(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + newDesc + ); +}; diff --git a/node_modules/es-abstract/2022/CreateNonEnumerableDataPropertyOrThrow.js b/node_modules/es-abstract/2022/CreateNonEnumerableDataPropertyOrThrow.js new file mode 100644 index 000000000..59a16ef00 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateNonEnumerableDataPropertyOrThrow.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-createnonenumerabledatapropertyorthrow + +module.exports = function CreateNonEnumerableDataPropertyOrThrow(O, P, V) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var newDesc = { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': V, + '[[Writable]]': true + }; + return DefinePropertyOrThrow(O, P, newDesc); +}; diff --git a/node_modules/es-abstract/2022/CreateRegExpStringIterator.js b/node_modules/es-abstract/2022/CreateRegExpStringIterator.js new file mode 100644 index 000000000..cdfae5621 --- /dev/null +++ b/node_modules/es-abstract/2022/CreateRegExpStringIterator.js @@ -0,0 +1,100 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); +var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true); + +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var CreateIterResultObject = require('./CreateIterResultObject'); +var CreateMethodProperty = require('./CreateMethodProperty'); +var Get = require('./Get'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var RegExpExec = require('./RegExpExec'); +var Set = require('./Set'); +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var SLOT = require('internal-slot'); +var setToStringTag = require('es-set-tostringtag'); + +var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) { + if (Type(S) !== 'String') { + throw new $TypeError('`S` must be a string'); + } + if (Type(global) !== 'Boolean') { + throw new $TypeError('`global` must be a boolean'); + } + if (Type(fullUnicode) !== 'Boolean') { + throw new $TypeError('`fullUnicode` must be a boolean'); + } + SLOT.set(this, '[[IteratingRegExp]]', R); + SLOT.set(this, '[[IteratedString]]', S); + SLOT.set(this, '[[Global]]', global); + SLOT.set(this, '[[Unicode]]', fullUnicode); + SLOT.set(this, '[[Done]]', false); +}; + +if (IteratorPrototype) { + RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype); +} + +var RegExpStringIteratorNext = function next() { + var O = this; // eslint-disable-line no-invalid-this + if (Type(O) !== 'Object') { + throw new $TypeError('receiver must be an object'); + } + if ( + !(O instanceof RegExpStringIterator) + || !SLOT.has(O, '[[IteratingRegExp]]') + || !SLOT.has(O, '[[IteratedString]]') + || !SLOT.has(O, '[[Global]]') + || !SLOT.has(O, '[[Unicode]]') + || !SLOT.has(O, '[[Done]]') + ) { + throw new $TypeError('"this" value must be a RegExpStringIterator instance'); + } + if (SLOT.get(O, '[[Done]]')) { + return CreateIterResultObject(undefined, true); + } + var R = SLOT.get(O, '[[IteratingRegExp]]'); + var S = SLOT.get(O, '[[IteratedString]]'); + var global = SLOT.get(O, '[[Global]]'); + var fullUnicode = SLOT.get(O, '[[Unicode]]'); + var match = RegExpExec(R, S); + if (match === null) { + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(undefined, true); + } + if (global) { + var matchStr = ToString(Get(match, '0')); + if (matchStr === '') { + var thisIndex = ToLength(Get(R, 'lastIndex')); + var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode); + Set(R, 'lastIndex', nextIndex, true); + } + return CreateIterResultObject(match, false); + } + SLOT.set(O, '[[Done]]', true); + return CreateIterResultObject(match, false); +}; +CreateMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext); + +if (hasSymbols) { + setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator'); + + if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') { + var iteratorFn = function SymbolIterator() { + return this; + }; + CreateMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn); + } +} + +// https://262.ecma-international.org/11.0/#sec-createregexpstringiterator +module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) { + // assert R.global === global && R.unicode === fullUnicode? + return new RegExpStringIterator(R, S, global, fullUnicode); +}; diff --git a/node_modules/es-abstract/2022/DateFromTime.js b/node_modules/es-abstract/2022/DateFromTime.js new file mode 100644 index 000000000..20e4f2e4d --- /dev/null +++ b/node_modules/es-abstract/2022/DateFromTime.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); +var MonthFromTime = require('./MonthFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.5 + +module.exports = function DateFromTime(t) { + var m = MonthFromTime(t); + var d = DayWithinYear(t); + if (m === 0) { + return d + 1; + } + if (m === 1) { + return d - 30; + } + var leap = InLeapYear(t); + if (m === 2) { + return d - 58 - leap; + } + if (m === 3) { + return d - 89 - leap; + } + if (m === 4) { + return d - 119 - leap; + } + if (m === 5) { + return d - 150 - leap; + } + if (m === 6) { + return d - 180 - leap; + } + if (m === 7) { + return d - 211 - leap; + } + if (m === 8) { + return d - 242 - leap; + } + if (m === 9) { + return d - 272 - leap; + } + if (m === 10) { + return d - 303 - leap; + } + if (m === 11) { + return d - 333 - leap; + } + throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m); +}; diff --git a/node_modules/es-abstract/2022/DateString.js b/node_modules/es-abstract/2022/DateString.js new file mode 100644 index 000000000..939c14c0c --- /dev/null +++ b/node_modules/es-abstract/2022/DateString.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var Type = require('./Type'); +var WeekDay = require('./WeekDay'); +var MonthFromTime = require('./MonthFromTime'); +var YearFromTime = require('./YearFromTime'); +var DateFromTime = require('./DateFromTime'); + +// https://262.ecma-international.org/9.0/#sec-datestring + +module.exports = function DateString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var weekday = weekdays[WeekDay(tv)]; + var month = months[MonthFromTime(tv)]; + var day = padTimeComponent(DateFromTime(tv)); + var year = padTimeComponent(YearFromTime(tv), 4); + return weekday + '\x20' + month + '\x20' + day + '\x20' + year; +}; diff --git a/node_modules/es-abstract/2022/Day.js b/node_modules/es-abstract/2022/Day.js new file mode 100644 index 000000000..51d01033c --- /dev/null +++ b/node_modules/es-abstract/2022/Day.js @@ -0,0 +1,11 @@ +'use strict'; + +var floor = require('./floor'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function Day(t) { + return floor(t / msPerDay); +}; diff --git a/node_modules/es-abstract/2022/DayFromYear.js b/node_modules/es-abstract/2022/DayFromYear.js new file mode 100644 index 000000000..341bf22a6 --- /dev/null +++ b/node_modules/es-abstract/2022/DayFromYear.js @@ -0,0 +1,10 @@ +'use strict'; + +var floor = require('./floor'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400); +}; + diff --git a/node_modules/es-abstract/2022/DayWithinYear.js b/node_modules/es-abstract/2022/DayWithinYear.js new file mode 100644 index 000000000..4c580940a --- /dev/null +++ b/node_modules/es-abstract/2022/DayWithinYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var Day = require('./Day'); +var DayFromYear = require('./DayFromYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); +}; diff --git a/node_modules/es-abstract/2022/DaysInYear.js b/node_modules/es-abstract/2022/DaysInYear.js new file mode 100644 index 000000000..7116c6902 --- /dev/null +++ b/node_modules/es-abstract/2022/DaysInYear.js @@ -0,0 +1,18 @@ +'use strict'; + +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function DaysInYear(y) { + if (modulo(y, 4) !== 0) { + return 365; + } + if (modulo(y, 100) !== 0) { + return 366; + } + if (modulo(y, 400) !== 0) { + return 365; + } + return 366; +}; diff --git a/node_modules/es-abstract/2022/DefinePropertyOrThrow.js b/node_modules/es-abstract/2022/DefinePropertyOrThrow.js new file mode 100644 index 000000000..26f2714bb --- /dev/null +++ b/node_modules/es-abstract/2022/DefinePropertyOrThrow.js @@ -0,0 +1,50 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow + +module.exports = function DefinePropertyOrThrow(O, P, desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + var Desc = isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); + } + + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); +}; diff --git a/node_modules/es-abstract/2022/DeletePropertyOrThrow.js b/node_modules/es-abstract/2022/DeletePropertyOrThrow.js new file mode 100644 index 000000000..30d5e57c7 --- /dev/null +++ b/node_modules/es-abstract/2022/DeletePropertyOrThrow.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-deletepropertyorthrow + +module.exports = function DeletePropertyOrThrow(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // eslint-disable-next-line no-param-reassign + var success = delete O[P]; + if (!success) { + throw new $TypeError('Attempt to delete property failed.'); + } + return success; +}; diff --git a/node_modules/es-abstract/2022/DetachArrayBuffer.js b/node_modules/es-abstract/2022/DetachArrayBuffer.js new file mode 100644 index 000000000..03284729b --- /dev/null +++ b/node_modules/es-abstract/2022/DetachArrayBuffer.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isArrayBuffer = require('is-array-buffer'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +var MessageChannel; +try { + // eslint-disable-next-line global-require + MessageChannel = require('worker_threads').MessageChannel; +} catch (e) { /**/ } + +// https://262.ecma-international.org/9.0/#sec-detacharraybuffer + +/* globals postMessage */ + +module.exports = function DetachArrayBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer'); + } + + // commented out since there's no way to set or access this key + // var key = arguments.length > 1 ? arguments[1] : void undefined; + + // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) { + // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`'); + // } + + if (typeof structuredClone === 'function') { + structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); + } else if (typeof postMessage === 'function') { + postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners + } else if (MessageChannel) { + (new MessageChannel()).port1.postMessage(null, [arrayBuffer]); + } else { + throw new $SyntaxError('DetachArrayBuffer is not supported in this environment'); + } + return null; +}; diff --git a/node_modules/es-abstract/2022/EnumerableOwnPropertyNames.js b/node_modules/es-abstract/2022/EnumerableOwnPropertyNames.js new file mode 100644 index 000000000..8e3177b6a --- /dev/null +++ b/node_modules/es-abstract/2022/EnumerableOwnPropertyNames.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var objectKeys = require('object-keys'); + +var callBound = require('call-bind/callBound'); + +var callBind = require('call-bind'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%')); + +var forEach = require('../helpers/forEach'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/8.0/#sec-enumerableownproperties + +module.exports = function EnumerableOwnPropertyNames(O, kind) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + var keys = objectKeys(O); + if (kind === 'key') { + return keys; + } + if (kind === 'value' || kind === 'key+value') { + var results = []; + forEach(keys, function (key) { + if ($isEnumerable(O, key)) { + $pushApply(results, [ + kind === 'value' ? O[key] : [key, O[key]] + ]); + } + }); + return results; + } + throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind); +}; diff --git a/node_modules/es-abstract/2022/FlattenIntoArray.js b/node_modules/es-abstract/2022/FlattenIntoArray.js new file mode 100644 index 000000000..6429ee797 --- /dev/null +++ b/node_modules/es-abstract/2022/FlattenIntoArray.js @@ -0,0 +1,58 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var Call = require('./Call'); +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var IsArray = require('./IsArray'); +var LengthOfArrayLike = require('./LengthOfArrayLike'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/11.0/#sec-flattenintoarray + +// eslint-disable-next-line max-params +module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) { + var mapperFunction; + if (arguments.length > 5) { + mapperFunction = arguments[5]; + } + + var targetIndex = start; + var sourceIndex = 0; + while (sourceIndex < sourceLen) { + var P = ToString(sourceIndex); + var exists = HasProperty(source, P); + if (exists === true) { + var element = Get(source, P); + if (typeof mapperFunction !== 'undefined') { + if (arguments.length <= 6) { + throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided'); + } + element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]); + } + var shouldFlatten = false; + if (depth > 0) { + shouldFlatten = IsArray(element); + } + if (shouldFlatten) { + var elementLen = LengthOfArrayLike(element); + targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1); + } else { + if (targetIndex >= MAX_SAFE_INTEGER) { + throw new $TypeError('index too large'); + } + CreateDataPropertyOrThrow(target, ToString(targetIndex), element); + targetIndex += 1; + } + } + sourceIndex += 1; + } + + return targetIndex; +}; diff --git a/node_modules/es-abstract/2022/FromPropertyDescriptor.js b/node_modules/es-abstract/2022/FromPropertyDescriptor.js new file mode 100644 index 000000000..e142ed582 --- /dev/null +++ b/node_modules/es-abstract/2022/FromPropertyDescriptor.js @@ -0,0 +1,16 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); +var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor + +module.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== 'undefined') { + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + } + + return fromPropertyDescriptor(Desc); +}; diff --git a/node_modules/es-abstract/2022/Get.js b/node_modules/es-abstract/2022/Get.js new file mode 100644 index 000000000..297968643 --- /dev/null +++ b/node_modules/es-abstract/2022/Get.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = require('object-inspect'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; diff --git a/node_modules/es-abstract/2022/GetGlobalObject.js b/node_modules/es-abstract/2022/GetGlobalObject.js new file mode 100644 index 000000000..0541ede0c --- /dev/null +++ b/node_modules/es-abstract/2022/GetGlobalObject.js @@ -0,0 +1,9 @@ +'use strict'; + +var getGlobal = require('globalthis/polyfill'); + +// https://262.ecma-international.org/6.0/#sec-getglobalobject + +module.exports = function GetGlobalObject() { + return getGlobal(); +}; diff --git a/node_modules/es-abstract/2022/GetIterator.js b/node_modules/es-abstract/2022/GetIterator.js new file mode 100644 index 000000000..51439e448 --- /dev/null +++ b/node_modules/es-abstract/2022/GetIterator.js @@ -0,0 +1,65 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $asyncIterator = GetIntrinsic('%Symbol.asyncIterator%', true); + +var inspect = require('object-inspect'); +var hasSymbols = require('has-symbols')(); + +var getIteratorMethod = require('../helpers/getIteratorMethod'); +var AdvanceStringIndex = require('./AdvanceStringIndex'); +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-getiterator +module.exports = function GetIterator(obj, hint, method) { + var actualHint = hint; + if (arguments.length < 2) { + actualHint = 'sync'; + } + if (actualHint !== 'sync' && actualHint !== 'async') { + throw new $TypeError("Assertion failed: `hint` must be one of 'sync' or 'async', got " + inspect(hint)); + } + + var actualMethod = method; + if (arguments.length < 3) { + if (actualHint === 'async') { + if (hasSymbols && $asyncIterator) { + actualMethod = GetMethod(obj, $asyncIterator); + } + if (actualMethod === undefined) { + throw new $SyntaxError("async from sync iterators aren't currently supported"); + } + } else { + actualMethod = getIteratorMethod( + { + AdvanceStringIndex: AdvanceStringIndex, + GetMethod: GetMethod, + IsArray: IsArray + }, + obj + ); + } + } + var iterator = Call(actualMethod, obj); + if (Type(iterator) !== 'Object') { + throw new $TypeError('iterator must return an object'); + } + + return iterator; + + // TODO: This should return an IteratorRecord + /* + var nextMethod = GetV(iterator, 'next'); + return { + '[[Iterator]]': iterator, + '[[NextMethod]]': nextMethod, + '[[Done]]': false + }; + */ +}; diff --git a/node_modules/es-abstract/2022/GetMatchIndexPair.js b/node_modules/es-abstract/2022/GetMatchIndexPair.js new file mode 100644 index 000000000..14bcb612f --- /dev/null +++ b/node_modules/es-abstract/2022/GetMatchIndexPair.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://ecma-international.org/ecma-262/13.0/#sec-getmatchindexpair + +module.exports = function GetMatchIndexPair(S, match) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + assertRecord(Type, 'Match Record', 'match', match); + + if (!(match['[[StartIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S'); + } + if (!(match['[[EndIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive'); + } + return [match['[[StartIndex]]'], match['[[EndIndex]]']]; +}; diff --git a/node_modules/es-abstract/2022/GetMatchString.js b/node_modules/es-abstract/2022/GetMatchString.js new file mode 100644 index 000000000..ba49306e7 --- /dev/null +++ b/node_modules/es-abstract/2022/GetMatchString.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var substring = require('./substring'); +var Type = require('./Type'); + +var assertRecord = require('../helpers/assertRecord'); + +// https://ecma-international.org/ecma-262/13.0/#sec-getmatchstring + +module.exports = function GetMatchString(S, match) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + assertRecord(Type, 'Match Record', 'match', match); + + if (!(match['[[StartIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[StartIndex]] must be a non-negative integer <= the length of S'); + } + if (!(match['[[EndIndex]]'] <= S.length)) { + throw new $TypeError('`match` [[EndIndex]] must be an integer between [[StartIndex]] and the length of S, inclusive'); + } + return substring(S, match['[[StartIndex]]'], match['[[EndIndex]]']); +}; diff --git a/node_modules/es-abstract/2022/GetMethod.js b/node_modules/es-abstract/2022/GetMethod.js new file mode 100644 index 000000000..d3775178e --- /dev/null +++ b/node_modules/es-abstract/2022/GetMethod.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetV = require('./GetV'); +var IsCallable = require('./IsCallable'); +var IsPropertyKey = require('./IsPropertyKey'); + +var debug = require('object-inspect'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getmethod + +module.exports = function GetMethod(O, P) { + // 7.3.9.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.9.2 + var func = GetV(O, P); + + // 7.3.9.4 + if (func == null) { + return void 0; + } + + // 7.3.9.5 + if (!IsCallable(func)) { + throw new $TypeError(P + ' is not a function: ' + debug(func)); + } + + // 7.3.9.6 + return func; +}; diff --git a/node_modules/es-abstract/2022/GetOwnPropertyKeys.js b/node_modules/es-abstract/2022/GetOwnPropertyKeys.js new file mode 100644 index 000000000..40c0b367f --- /dev/null +++ b/node_modules/es-abstract/2022/GetOwnPropertyKeys.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var hasSymbols = require('has-symbols')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); +var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true); +var keys = require('object-keys'); + +var esType = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getownpropertykeys + +module.exports = function GetOwnPropertyKeys(O, Type) { + if (esType(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (Type === 'Symbol') { + return $gOPS ? $gOPS(O) : []; + } + if (Type === 'String') { + if (!$gOPN) { + return keys(O); + } + return $gOPN(O); + } + throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`'); +}; diff --git a/node_modules/es-abstract/2022/GetPromiseResolve.js b/node_modules/es-abstract/2022/GetPromiseResolve.js new file mode 100644 index 000000000..6efc10288 --- /dev/null +++ b/node_modules/es-abstract/2022/GetPromiseResolve.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var IsConstructor = require('./IsConstructor'); + +// https://ecma-international.org/ecma-262/12.0/#sec-getpromiseresolve + +module.exports = function GetPromiseResolve(promiseConstructor) { + if (!IsConstructor(promiseConstructor)) { + throw new $TypeError('Assertion failed: `promiseConstructor` must be a constructor'); + } + var promiseResolve = Get(promiseConstructor, 'resolve'); + if (IsCallable(promiseResolve) === false) { + throw new $TypeError('`resolve` method is not callable'); + } + return promiseResolve; +}; diff --git a/node_modules/es-abstract/2022/GetPrototypeFromConstructor.js b/node_modules/es-abstract/2022/GetPrototypeFromConstructor.js new file mode 100644 index 000000000..25ee12f35 --- /dev/null +++ b/node_modules/es-abstract/2022/GetPrototypeFromConstructor.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Function = GetIntrinsic('%Function%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var Get = require('./Get'); +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getprototypefromconstructor + +module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) { + var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + if (!IsConstructor(constructor)) { + throw new $TypeError('Assertion failed: `constructor` must be a constructor'); + } + var proto = Get(constructor, 'prototype'); + if (Type(proto) !== 'Object') { + if (!(constructor instanceof $Function)) { + // ignore other realms, for now + throw new $SyntaxError('cross-realm constructors not currently supported'); + } + proto = intrinsic; + } + return proto; +}; diff --git a/node_modules/es-abstract/2022/GetStringIndex.js b/node_modules/es-abstract/2022/GetStringIndex.js new file mode 100644 index 000000000..e596d438a --- /dev/null +++ b/node_modules/es-abstract/2022/GetStringIndex.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var StringToCodePoints = require('./StringToCodePoints'); +var Type = require('./Type'); + +var $indexOf = callBound('String.prototype.indexOf'); + +// https://ecma-international.org/ecma-262/13.0/#sec-getstringindex + +module.exports = function GetStringIndex(S, e) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!IsIntegralNumber(e) || e < 0) { + throw new $TypeError('Assertion failed: `e` must be a non-negative integer'); + } + + if (S === '') { + return 0; + } + var codepoints = StringToCodePoints(S); + var eUTF = e >= codepoints.length ? S.length : $indexOf(S, codepoints[e]); + return eUTF; +}; diff --git a/node_modules/es-abstract/2022/GetSubstitution.js b/node_modules/es-abstract/2022/GetSubstitution.js new file mode 100644 index 000000000..6ac3ec7f3 --- /dev/null +++ b/node_modules/es-abstract/2022/GetSubstitution.js @@ -0,0 +1,128 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); +var every = require('../helpers/every'); + +var $charAt = callBound('String.prototype.charAt'); +var $strSlice = callBound('String.prototype.slice'); +var $indexOf = callBound('String.prototype.indexOf'); +var $parseInt = parseInt; + +var isDigit = regexTester(/^[0-9]$/); + +var inspect = require('object-inspect'); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var ToObject = require('./ToObject'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false + +var isStringOrHole = function (capture, index, arr) { + return Type(capture) === 'String' || (canDistinguishSparseFromUndefined ? !(index in arr) : Type(capture) === 'Undefined'); +}; + +// http://www.ecma-international.org/ecma-262/12.0/#sec-getsubstitution + +// eslint-disable-next-line max-statements, max-params, max-lines-per-function +module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) { + if (Type(matched) !== 'String') { + throw new $TypeError('Assertion failed: `matched` must be a String'); + } + var matchLength = matched.length; + + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `str` must be a String'); + } + var stringLength = str.length; + + if (!IsIntegralNumber(position) || position < 0 || position > stringLength) { + throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position)); + } + + if (!IsArray(captures) || !every(captures, isStringOrHole)) { + throw new $TypeError('Assertion failed: `captures` must be a possibly-empty List of Strings, got ' + inspect(captures)); + } + + if (Type(replacement) !== 'String') { + throw new $TypeError('Assertion failed: `replacement` must be a String'); + } + + var tailPos = position + matchLength; + var m = captures.length; + if (Type(namedCaptures) !== 'Undefined') { + namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign + } + + var result = ''; + for (var i = 0; i < replacement.length; i += 1) { + // if this is a $, and it's not the end of the replacement + var current = $charAt(replacement, i); + var isLast = (i + 1) >= replacement.length; + var nextIsLast = (i + 2) >= replacement.length; + if (current === '$' && !isLast) { + var next = $charAt(replacement, i + 1); + if (next === '$') { + result += '$'; + i += 1; + } else if (next === '&') { + result += matched; + i += 1; + } else if (next === '`') { + result += position === 0 ? '' : $strSlice(str, 0, position - 1); + i += 1; + } else if (next === "'") { + result += tailPos >= stringLength ? '' : $strSlice(str, tailPos); + i += 1; + } else { + var nextNext = nextIsLast ? null : $charAt(replacement, i + 2); + if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) { + // $1 through $9, and not followed by a digit + var n = $parseInt(next, 10); + // if (n > m, impl-defined) + result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1]; + i += 1; + } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) { + // $00 through $99 + var nn = next + nextNext; + var nnI = $parseInt(nn, 10) - 1; + // if nn === '00' or nn > m, impl-defined + result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI]; + i += 2; + } else if (next === '<') { + // eslint-disable-next-line max-depth + if (Type(namedCaptures) === 'Undefined') { + result += '$<'; + i += 2; + } else { + var endIndex = $indexOf(replacement, '>', i); + // eslint-disable-next-line max-depth + if (endIndex > -1) { + var groupName = $strSlice(replacement, i + '$<'.length, endIndex); + var capture = Get(namedCaptures, groupName); + // eslint-disable-next-line max-depth + if (Type(capture) !== 'Undefined') { + result += ToString(capture); + } + i += ('<' + groupName + '>').length; + } + } + } else { + result += '$'; + } + } + } else { + // the final $, or else not a $ + result += $charAt(replacement, i); + } + } + return result; +}; diff --git a/node_modules/es-abstract/2022/GetV.js b/node_modules/es-abstract/2022/GetV.js new file mode 100644 index 000000000..2dcddb351 --- /dev/null +++ b/node_modules/es-abstract/2022/GetV.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var ToObject = require('./ToObject'); + +// https://ecma-international.org/ecma-262/6.0/#sec-getv + +module.exports = function GetV(V, P) { + // 7.3.2.1 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + + // 7.3.2.2-3 + var O = ToObject(V); + + // 7.3.2.4 + return O[P]; +}; diff --git a/node_modules/es-abstract/2022/HasOwnProperty.js b/node_modules/es-abstract/2022/HasOwnProperty.js new file mode 100644 index 000000000..04d28495f --- /dev/null +++ b/node_modules/es-abstract/2022/HasOwnProperty.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var has = require('has'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty + +module.exports = function HasOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return has(O, P); +}; diff --git a/node_modules/es-abstract/2022/HasProperty.js b/node_modules/es-abstract/2022/HasProperty.js new file mode 100644 index 000000000..b341654e7 --- /dev/null +++ b/node_modules/es-abstract/2022/HasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2022/HourFromTime.js b/node_modules/es-abstract/2022/HourFromTime.js new file mode 100644 index 000000000..f963bfb68 --- /dev/null +++ b/node_modules/es-abstract/2022/HourFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerHour = timeConstants.msPerHour; +var HoursPerDay = timeConstants.HoursPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function HourFromTime(t) { + return modulo(floor(t / msPerHour), HoursPerDay); +}; diff --git a/node_modules/es-abstract/2022/InLeapYear.js b/node_modules/es-abstract/2022/InLeapYear.js new file mode 100644 index 000000000..bfe0c451f --- /dev/null +++ b/node_modules/es-abstract/2022/InLeapYear.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $EvalError = GetIntrinsic('%EvalError%'); + +var DaysInYear = require('./DaysInYear'); +var YearFromTime = require('./YearFromTime'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function InLeapYear(t) { + var days = DaysInYear(YearFromTime(t)); + if (days === 365) { + return 0; + } + if (days === 366) { + return 1; + } + throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days); +}; diff --git a/node_modules/es-abstract/2022/InstallErrorCause.js b/node_modules/es-abstract/2022/InstallErrorCause.js new file mode 100644 index 000000000..949ecc77e --- /dev/null +++ b/node_modules/es-abstract/2022/InstallErrorCause.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var CreateNonEnumerableDataPropertyOrThrow = require('./CreateNonEnumerableDataPropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-installerrorcause + +module.exports = function InstallErrorCause(O, options) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + if (Type(options) === 'Object' && HasProperty(options, 'cause')) { + var cause = Get(options, 'cause'); + CreateNonEnumerableDataPropertyOrThrow(O, 'cause', cause); + } +}; diff --git a/node_modules/es-abstract/2022/InstanceofOperator.js b/node_modules/es-abstract/2022/InstanceofOperator.js new file mode 100644 index 000000000..a3c4d2375 --- /dev/null +++ b/node_modules/es-abstract/2022/InstanceofOperator.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $hasInstance = GetIntrinsic('Symbol.hasInstance', true); + +var Call = require('./Call'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var OrdinaryHasInstance = require('./OrdinaryHasInstance'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-instanceofoperator + +module.exports = function InstanceofOperator(O, C) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0; + if (typeof instOfHandler !== 'undefined') { + return ToBoolean(Call(instOfHandler, C, [O])); + } + if (!IsCallable(C)) { + throw new $TypeError('`C` is not Callable'); + } + return OrdinaryHasInstance(C, O); +}; diff --git a/node_modules/es-abstract/2022/Invoke.js b/node_modules/es-abstract/2022/Invoke.js new file mode 100644 index 000000000..d4214ee51 --- /dev/null +++ b/node_modules/es-abstract/2022/Invoke.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var IsArray = require('./IsArray'); +var GetV = require('./GetV'); +var IsPropertyKey = require('./IsPropertyKey'); + +// https://ecma-international.org/ecma-262/6.0/#sec-invoke + +module.exports = function Invoke(O, P) { + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + var func = GetV(O, P); + return Call(func, O, argumentsList); +}; diff --git a/node_modules/es-abstract/2022/IsAccessorDescriptor.js b/node_modules/es-abstract/2022/IsAccessorDescriptor.js new file mode 100644 index 000000000..78563e7ec --- /dev/null +++ b/node_modules/es-abstract/2022/IsAccessorDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var has = require('has'); + +var assertRecord = require('../helpers/assertRecord'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isaccessordescriptor + +module.exports = function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2022/IsArray.js b/node_modules/es-abstract/2022/IsArray.js new file mode 100644 index 000000000..600ffa002 --- /dev/null +++ b/node_modules/es-abstract/2022/IsArray.js @@ -0,0 +1,4 @@ +'use strict'; + +// https://ecma-international.org/ecma-262/6.0/#sec-isarray +module.exports = require('../helpers/IsArray'); diff --git a/node_modules/es-abstract/2022/IsBigIntElementType.js b/node_modules/es-abstract/2022/IsBigIntElementType.js new file mode 100644 index 000000000..e3f58a949 --- /dev/null +++ b/node_modules/es-abstract/2022/IsBigIntElementType.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isbigintelementtype + +module.exports = function IsBigIntElementType(type) { + return type === 'BigUint64' || type === 'BigInt64'; +}; diff --git a/node_modules/es-abstract/2022/IsCallable.js b/node_modules/es-abstract/2022/IsCallable.js new file mode 100644 index 000000000..3a69b1926 --- /dev/null +++ b/node_modules/es-abstract/2022/IsCallable.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = require('is-callable'); diff --git a/node_modules/es-abstract/2022/IsCompatiblePropertyDescriptor.js b/node_modules/es-abstract/2022/IsCompatiblePropertyDescriptor.js new file mode 100644 index 000000000..48e719f3c --- /dev/null +++ b/node_modules/es-abstract/2022/IsCompatiblePropertyDescriptor.js @@ -0,0 +1,9 @@ +'use strict'; + +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://262.ecma-international.org/13.0/#sec-iscompatiblepropertydescriptor + +module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) { + return ValidateAndApplyPropertyDescriptor(undefined, '', Extensible, Desc, Current); +}; diff --git a/node_modules/es-abstract/2022/IsConcatSpreadable.js b/node_modules/es-abstract/2022/IsConcatSpreadable.js new file mode 100644 index 000000000..141b33414 --- /dev/null +++ b/node_modules/es-abstract/2022/IsConcatSpreadable.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true); + +var Get = require('./Get'); +var IsArray = require('./IsArray'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable + +module.exports = function IsConcatSpreadable(O) { + if (Type(O) !== 'Object') { + return false; + } + if ($isConcatSpreadable) { + var spreadable = Get(O, $isConcatSpreadable); + if (typeof spreadable !== 'undefined') { + return ToBoolean(spreadable); + } + } + return IsArray(O); +}; diff --git a/node_modules/es-abstract/2022/IsConstructor.js b/node_modules/es-abstract/2022/IsConstructor.js new file mode 100644 index 000000000..fe626e183 --- /dev/null +++ b/node_modules/es-abstract/2022/IsConstructor.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic.js'); + +var $construct = GetIntrinsic('%Reflect.construct%', true); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +try { + DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); +} catch (e) { + // Accessor properties aren't supported + DefinePropertyOrThrow = null; +} + +// https://ecma-international.org/ecma-262/6.0/#sec-isconstructor + +if (DefinePropertyOrThrow && $construct) { + var isConstructorMarker = {}; + var badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, 'length', { + '[[Get]]': function () { + throw isConstructorMarker; + }, + '[[Enumerable]]': true + }); + + module.exports = function IsConstructor(argument) { + try { + // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; +} else { + module.exports = function IsConstructor(argument) { + // unfortunately there's no way to truly check this without try/catch `new argument` in old environments + return typeof argument === 'function' && !!argument.prototype; + }; +} diff --git a/node_modules/es-abstract/2022/IsDataDescriptor.js b/node_modules/es-abstract/2022/IsDataDescriptor.js new file mode 100644 index 000000000..00d14a60e --- /dev/null +++ b/node_modules/es-abstract/2022/IsDataDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var has = require('has'); + +var assertRecord = require('../helpers/assertRecord'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor + +module.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) { + return false; + } + + return true; +}; diff --git a/node_modules/es-abstract/2022/IsDetachedBuffer.js b/node_modules/es-abstract/2022/IsDetachedBuffer.js new file mode 100644 index 000000000..4b373e9ab --- /dev/null +++ b/node_modules/es-abstract/2022/IsDetachedBuffer.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('%ArrayBuffer.prototype.byteLength%', true) + || function byteLength(ab) { return ab.byteLength; }; // in node < 0.11, byteLength is an own nonconfigurable property + +var isArrayBuffer = require('is-array-buffer'); + +var availableTypedArrays = require('available-typed-arrays')(); + +// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer + +module.exports = function IsDetachedBuffer(arrayBuffer) { + if (!isArrayBuffer(arrayBuffer)) { + throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot'); + } + if ($byteLength(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new + } catch (error) { + return error.name === 'TypeError'; + } + } + return false; +}; diff --git a/node_modules/es-abstract/2022/IsExtensible.js b/node_modules/es-abstract/2022/IsExtensible.js new file mode 100644 index 000000000..d6e363840 --- /dev/null +++ b/node_modules/es-abstract/2022/IsExtensible.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); + +var isPrimitive = require('../helpers/isPrimitive'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o + +module.exports = $preventExtensions + ? function IsExtensible(obj) { + return !isPrimitive(obj) && $isExtensible(obj); + } + : function IsExtensible(obj) { + return !isPrimitive(obj); + }; diff --git a/node_modules/es-abstract/2022/IsGenericDescriptor.js b/node_modules/es-abstract/2022/IsGenericDescriptor.js new file mode 100644 index 000000000..95b1d353c --- /dev/null +++ b/node_modules/es-abstract/2022/IsGenericDescriptor.js @@ -0,0 +1,23 @@ +'use strict'; + +var assertRecord = require('../helpers/assertRecord'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isgenericdescriptor + +module.exports = function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(Type, 'Property Descriptor', 'Desc', Desc); + + if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) { + return true; + } + + return false; +}; diff --git a/node_modules/es-abstract/2022/IsIntegralNumber.js b/node_modules/es-abstract/2022/IsIntegralNumber.js new file mode 100644 index 000000000..0a02bfe0f --- /dev/null +++ b/node_modules/es-abstract/2022/IsIntegralNumber.js @@ -0,0 +1,18 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var Type = require('./Type'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); + +// https://tc39.es/ecma262/#sec-isintegralnumber + +module.exports = function IsIntegralNumber(argument) { + if (Type(argument) !== 'Number' || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var absValue = abs(argument); + return floor(absValue) === absValue; +}; diff --git a/node_modules/es-abstract/2022/IsLessThan.js b/node_modules/es-abstract/2022/IsLessThan.js new file mode 100644 index 000000000..326b5a08c --- /dev/null +++ b/node_modules/es-abstract/2022/IsLessThan.js @@ -0,0 +1,90 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); + +var IsStringPrefix = require('./IsStringPrefix'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumeric = require('./ToNumeric'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +var BigIntLessThan = require('./BigInt/lessThan'); +var NumberLessThan = require('./Number/lessThan'); + +// https://262.ecma-international.org/13.0/#sec-islessthan + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function IsLessThan(x, y, LeftFirst) { + if (Type(LeftFirst) !== 'Boolean') { + throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean'); + } + var px; + var py; + if (LeftFirst) { + px = ToPrimitive(x, $Number); + py = ToPrimitive(y, $Number); + } else { + py = ToPrimitive(y, $Number); + px = ToPrimitive(x, $Number); + } + var pxType = Type(px); + var pyType = Type(py); + if (pxType === 'String' && pyType === 'String') { + if (IsStringPrefix(py, px)) { + return false; + } + if (IsStringPrefix(px, py)) { + return true; + } + /* + c. Let k be the smallest non-negative integer such that the code unit at index k within px is different from the code unit at index k within py. (There must be such a k, for neither String is a prefix of the other.) + d. Let m be the integer that is the numeric value of the code unit at index k within px. + e. Let n be the integer that is the numeric value of the code unit at index k within py. + f. If m < n, return true. Otherwise, return false. + */ + return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f + } + + var nx; + var ny; + if (pxType === 'BigInt' && pyType === 'String') { + ny = StringToBigInt(py); + if (typeof ny === 'undefined') { + return void undefined; + } + return BigIntLessThan(px, ny); + } + if (pxType === 'String' && pyType === 'BigInt') { + nx = StringToBigInt(px); + if (typeof nx === 'undefined') { + return void undefined; + } + return BigIntLessThan(nx, py); + } + + nx = ToNumeric(px); + ny = ToNumeric(py); + + var nxType = Type(nx); + if (nxType === Type(ny)) { + return nxType === 'Number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny); + } + + if ($isNaN(nx) || $isNaN(ny)) { + return void undefined; + } + + if (nx === -Infinity || ny === Infinity) { + return true; + } + if (nx === Infinity || ny === -Infinity) { + return false; + } + + return nx < ny; // by now, these are both nonzero, finite, and not equal +}; diff --git a/node_modules/es-abstract/2022/IsLooselyEqual.js b/node_modules/es-abstract/2022/IsLooselyEqual.js new file mode 100644 index 000000000..9d254ba68 --- /dev/null +++ b/node_modules/es-abstract/2022/IsLooselyEqual.js @@ -0,0 +1,58 @@ +'use strict'; + +var isFinite = require('../helpers/isFinite'); + +var IsStrictlyEqual = require('./IsStrictlyEqual'); +var StringToBigInt = require('./StringToBigInt'); +var ToNumber = require('./ToNumber'); +var ToPrimitive = require('./ToPrimitive'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-islooselyequal + +module.exports = function IsLooselyEqual(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType === yType) { + return IsStrictlyEqual(x, y); + } + if (x == null && y == null) { + return true; + } + if (xType === 'Number' && yType === 'String') { + return IsLooselyEqual(x, ToNumber(y)); + } + if (xType === 'String' && yType === 'Number') { + return IsLooselyEqual(ToNumber(x), y); + } + if (xType === 'BigInt' && yType === 'String') { + var n = StringToBigInt(y); + if (typeof n === 'undefined') { + return false; + } + return IsLooselyEqual(x, n); + } + if (xType === 'String' && yType === 'BigInt') { + return IsLooselyEqual(y, x); + } + if (xType === 'Boolean') { + return IsLooselyEqual(ToNumber(x), y); + } + if (yType === 'Boolean') { + return IsLooselyEqual(x, ToNumber(y)); + } + if ((xType === 'String' || xType === 'Number' || xType === 'Symbol' || xType === 'BigInt') && yType === 'Object') { + return IsLooselyEqual(x, ToPrimitive(y)); + } + if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol' || yType === 'BigInt')) { + return IsLooselyEqual(ToPrimitive(x), y); + } + if ((xType === 'BigInt' && yType === 'Number') || (xType === 'Number' && yType === 'BigInt')) { + if (!isFinite(x) || !isFinite(y)) { + return false; + } + // eslint-disable-next-line eqeqeq + return x == y; // shortcut for step 13.b. + } + return false; +}; diff --git a/node_modules/es-abstract/2022/IsNoTearConfiguration.js b/node_modules/es-abstract/2022/IsNoTearConfiguration.js new file mode 100644 index 000000000..f0d280873 --- /dev/null +++ b/node_modules/es-abstract/2022/IsNoTearConfiguration.js @@ -0,0 +1,16 @@ +'use strict'; + +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var IsBigIntElementType = require('./IsBigIntElementType'); + +// https://262.ecma-international.org/11.0/#sec-isnotearconfiguration + +module.exports = function IsNoTearConfiguration(type, order) { + if (IsUnclampedIntegerElementType(type)) { + return true; + } + if (IsBigIntElementType(type) && order !== 'Init' && order !== 'Unordered') { + return true; + } + return false; +}; diff --git a/node_modules/es-abstract/2022/IsPromise.js b/node_modules/es-abstract/2022/IsPromise.js new file mode 100644 index 000000000..a551ae0c8 --- /dev/null +++ b/node_modules/es-abstract/2022/IsPromise.js @@ -0,0 +1,24 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $PromiseThen = callBound('Promise.prototype.then', true); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-ispromise + +module.exports = function IsPromise(x) { + if (Type(x) !== 'Object') { + return false; + } + if (!$PromiseThen) { // Promises are not supported + return false; + } + try { + $PromiseThen(x); // throws if not a promise + } catch (e) { + return false; + } + return true; +}; diff --git a/node_modules/es-abstract/2022/IsPropertyKey.js b/node_modules/es-abstract/2022/IsPropertyKey.js new file mode 100644 index 000000000..f43ab581c --- /dev/null +++ b/node_modules/es-abstract/2022/IsPropertyKey.js @@ -0,0 +1,7 @@ +'use strict'; + +// https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; diff --git a/node_modules/es-abstract/2022/IsRegExp.js b/node_modules/es-abstract/2022/IsRegExp.js new file mode 100644 index 000000000..e1054813f --- /dev/null +++ b/node_modules/es-abstract/2022/IsRegExp.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $match = GetIntrinsic('%Symbol.match%', true); + +var hasRegExpMatcher = require('is-regex'); + +var ToBoolean = require('./ToBoolean'); + +// https://ecma-international.org/ecma-262/6.0/#sec-isregexp + +module.exports = function IsRegExp(argument) { + if (!argument || typeof argument !== 'object') { + return false; + } + if ($match) { + var isRegExp = argument[$match]; + if (typeof isRegExp !== 'undefined') { + return ToBoolean(isRegExp); + } + } + return hasRegExpMatcher(argument); +}; diff --git a/node_modules/es-abstract/2022/IsSharedArrayBuffer.js b/node_modules/es-abstract/2022/IsSharedArrayBuffer.js new file mode 100644 index 000000000..8e96e33f3 --- /dev/null +++ b/node_modules/es-abstract/2022/IsSharedArrayBuffer.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer + +module.exports = function IsSharedArrayBuffer(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + + return isSharedArrayBuffer(obj); +}; diff --git a/node_modules/es-abstract/2022/IsStrictlyEqual.js b/node_modules/es-abstract/2022/IsStrictlyEqual.js new file mode 100644 index 000000000..6f5e86a2f --- /dev/null +++ b/node_modules/es-abstract/2022/IsStrictlyEqual.js @@ -0,0 +1,20 @@ +'use strict'; + +var SameValueNonNumeric = require('./SameValueNonNumeric'); +var Type = require('./Type'); +var BigIntEqual = require('./BigInt/equal'); +var NumberEqual = require('./Number/equal'); + +// https://262.ecma-international.org/13.0/#sec-isstrictlyequal + +module.exports = function IsStrictlyEqual(x, y) { + var xType = Type(x); + var yType = Type(y); + if (xType !== yType) { + return false; + } + if (xType === 'Number' || xType === 'BigInt') { + return xType === 'Number' ? NumberEqual(x, y) : BigIntEqual(x, y); + } + return SameValueNonNumeric(x, y); +}; diff --git a/node_modules/es-abstract/2022/IsStringPrefix.js b/node_modules/es-abstract/2022/IsStringPrefix.js new file mode 100644 index 000000000..bb99c944e --- /dev/null +++ b/node_modules/es-abstract/2022/IsStringPrefix.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var StringIndexOf = require('./StringIndexOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-isstringprefix + +module.exports = function IsStringPrefix(p, q) { + if (Type(p) !== 'String') { + throw new $TypeError('Assertion failed: "p" must be a String'); + } + + if (Type(q) !== 'String') { + throw new $TypeError('Assertion failed: "q" must be a String'); + } + + return StringIndexOf(q, p, 0) === 0; +}; diff --git a/node_modules/es-abstract/2022/IsStringWellFormedUnicode.js b/node_modules/es-abstract/2022/IsStringWellFormedUnicode.js new file mode 100644 index 000000000..72213f659 --- /dev/null +++ b/node_modules/es-abstract/2022/IsStringWellFormedUnicode.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var CodePointAt = require('./CodePointAt'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-isstringwellformedunicode + +module.exports = function IsStringWellFormedUnicode(string) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var strLen = string.length; // step 1 + var k = 0; // step 2 + while (k !== strLen) { // step 3 + var cp = CodePointAt(string, k); // step 3.a + if (cp['[[IsUnpairedSurrogate]]']) { + return false; // step 3.b + } + k += cp['[[CodeUnitCount]]']; // step 3.c + } + return true; // step 4 +}; diff --git a/node_modules/es-abstract/2022/IsUnclampedIntegerElementType.js b/node_modules/es-abstract/2022/IsUnclampedIntegerElementType.js new file mode 100644 index 000000000..4e3a38425 --- /dev/null +++ b/node_modules/es-abstract/2022/IsUnclampedIntegerElementType.js @@ -0,0 +1,12 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunclampedintegerelementtype + +module.exports = function IsUnclampedIntegerElementType(type) { + return type === 'Int8' + || type === 'Uint8' + || type === 'Int16' + || type === 'Uint16' + || type === 'Int32' + || type === 'Uint32'; +}; diff --git a/node_modules/es-abstract/2022/IsUnsignedElementType.js b/node_modules/es-abstract/2022/IsUnsignedElementType.js new file mode 100644 index 000000000..b1ff194d7 --- /dev/null +++ b/node_modules/es-abstract/2022/IsUnsignedElementType.js @@ -0,0 +1,11 @@ +'use strict'; + +// https://262.ecma-international.org/11.0/#sec-isunsignedelementtype + +module.exports = function IsUnsignedElementType(type) { + return type === 'Uint8' + || type === 'Uint8C' + || type === 'Uint16' + || type === 'Uint32' + || type === 'BigUint64'; +}; diff --git a/node_modules/es-abstract/2022/IterableToList.js b/node_modules/es-abstract/2022/IterableToList.js new file mode 100644 index 000000000..320ab4712 --- /dev/null +++ b/node_modules/es-abstract/2022/IterableToList.js @@ -0,0 +1,29 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var $arrayPush = callBound('Array.prototype.push'); + +var GetIterator = require('./GetIterator'); +var IteratorStep = require('./IteratorStep'); +var IteratorValue = require('./IteratorValue'); + +// https://262.ecma-international.org/12.0/#sec-iterabletolist + +module.exports = function IterableToList(items) { + var iterator; + if (arguments.length > 1) { + iterator = GetIterator(items, 'sync', arguments[1]); + } else { + iterator = GetIterator(items, 'sync'); + } + var values = []; + var next = true; + while (next) { + next = IteratorStep(iterator); + if (next) { + var nextValue = IteratorValue(next); + $arrayPush(values, nextValue); + } + } + return values; +}; diff --git a/node_modules/es-abstract/2022/IteratorClose.js b/node_modules/es-abstract/2022/IteratorClose.js new file mode 100644 index 000000000..f703ea632 --- /dev/null +++ b/node_modules/es-abstract/2022/IteratorClose.js @@ -0,0 +1,51 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var CompletionRecord = require('./CompletionRecord'); +var GetMethod = require('./GetMethod'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose + +module.exports = function IteratorClose(iterator, completion) { + if (Type(iterator) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterator) is not Object'); + } + if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) { + throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance'); + } + var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion; + + var iteratorReturn = GetMethod(iterator, 'return'); + + if (typeof iteratorReturn === 'undefined') { + return completionThunk(); + } + + var completionRecord; + try { + var innerResult = Call(iteratorReturn, iterator, []); + } catch (e) { + // if we hit here, then "e" is the innerResult completion that needs re-throwing + + // if the completion is of type "throw", this will throw. + completionThunk(); + completionThunk = null; // ensure it's not called twice. + + // if not, then return the innerResult completion + throw e; + } + completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does + completionThunk = null; // ensure it's not called twice. + + if (Type(innerResult) !== 'Object') { + throw new $TypeError('iterator .return must return an object'); + } + + return completionRecord; +}; diff --git a/node_modules/es-abstract/2022/IteratorComplete.js b/node_modules/es-abstract/2022/IteratorComplete.js new file mode 100644 index 000000000..ed4efa37d --- /dev/null +++ b/node_modules/es-abstract/2022/IteratorComplete.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToBoolean = require('./ToBoolean'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete + +module.exports = function IteratorComplete(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return ToBoolean(Get(iterResult, 'done')); +}; diff --git a/node_modules/es-abstract/2022/IteratorNext.js b/node_modules/es-abstract/2022/IteratorNext.js new file mode 100644 index 000000000..cf80655b9 --- /dev/null +++ b/node_modules/es-abstract/2022/IteratorNext.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Invoke = require('./Invoke'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-iteratornext + +module.exports = function IteratorNext(iterator, value) { + var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); + if (Type(result) !== 'Object') { + throw new $TypeError('iterator next must return an object'); + } + return result; +}; diff --git a/node_modules/es-abstract/2022/IteratorStep.js b/node_modules/es-abstract/2022/IteratorStep.js new file mode 100644 index 000000000..41b9d1b25 --- /dev/null +++ b/node_modules/es-abstract/2022/IteratorStep.js @@ -0,0 +1,13 @@ +'use strict'; + +var IteratorComplete = require('./IteratorComplete'); +var IteratorNext = require('./IteratorNext'); + +// https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep + +module.exports = function IteratorStep(iterator) { + var result = IteratorNext(iterator); + var done = IteratorComplete(result); + return done === true ? false : result; +}; + diff --git a/node_modules/es-abstract/2022/IteratorValue.js b/node_modules/es-abstract/2022/IteratorValue.js new file mode 100644 index 000000000..d15d8aebb --- /dev/null +++ b/node_modules/es-abstract/2022/IteratorValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue + +module.exports = function IteratorValue(iterResult) { + if (Type(iterResult) !== 'Object') { + throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); + } + return Get(iterResult, 'value'); +}; + diff --git a/node_modules/es-abstract/2022/LengthOfArrayLike.js b/node_modules/es-abstract/2022/LengthOfArrayLike.js new file mode 100644 index 000000000..132c4d584 --- /dev/null +++ b/node_modules/es-abstract/2022/LengthOfArrayLike.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var ToLength = require('./ToLength'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-lengthofarraylike + +module.exports = function LengthOfArrayLike(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + return ToLength(Get(obj, 'length')); +}; + +// TODO: use this all over diff --git a/node_modules/es-abstract/2022/MakeDate.js b/node_modules/es-abstract/2022/MakeDate.js new file mode 100644 index 000000000..efeb6452e --- /dev/null +++ b/node_modules/es-abstract/2022/MakeDate.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.13 + +module.exports = function MakeDate(day, time) { + if (!$isFinite(day) || !$isFinite(time)) { + return NaN; + } + return (day * msPerDay) + time; +}; diff --git a/node_modules/es-abstract/2022/MakeDay.js b/node_modules/es-abstract/2022/MakeDay.js new file mode 100644 index 000000000..db78bbc74 --- /dev/null +++ b/node_modules/es-abstract/2022/MakeDay.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $DateUTC = GetIntrinsic('%Date.UTC%'); + +var $isFinite = require('../helpers/isFinite'); + +var DateFromTime = require('./DateFromTime'); +var Day = require('./Day'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var MonthFromTime = require('./MonthFromTime'); +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); +var YearFromTime = require('./YearFromTime'); + +// https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.12 + +module.exports = function MakeDay(year, month, date) { + if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) { + return NaN; + } + var y = ToIntegerOrInfinity(year); + var m = ToIntegerOrInfinity(month); + var dt = ToIntegerOrInfinity(date); + var ym = y + floor(m / 12); + if (!$isFinite(ym)) { + return NaN; + } + var mn = modulo(m, 12); + var t = $DateUTC(ym, mn, 1); + if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) { + return NaN; + } + return Day(t) + dt - 1; +}; diff --git a/node_modules/es-abstract/2022/MakeMatchIndicesIndexPairArray.js b/node_modules/es-abstract/2022/MakeMatchIndicesIndexPairArray.js new file mode 100644 index 000000000..3424203f9 --- /dev/null +++ b/node_modules/es-abstract/2022/MakeMatchIndicesIndexPairArray.js @@ -0,0 +1,69 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ArrayCreate = require('./ArrayCreate'); +var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow'); +var GetMatchIndexPair = require('./GetMatchIndexPair'); +var IsArray = require('./IsArray'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var every = require('../helpers/every'); +var isMatchRecord = require('../helpers/isMatchRecord'); + +var isStringOrUndefined = function isStringOrUndefined(s) { + return typeof s === 'undefined' || typeof s === 'string'; +}; + +var isMatchRecordOrUndefined = function isMatchRecordOrUndefined(m) { + return typeof m === 'undefined' || isMatchRecord(m); +}; + +var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; + +// https://ecma-international.org/ecma-262/13.0/#sec-getmatchindexpair + +module.exports = function MakeMatchIndicesIndexPairArray(S, indices, groupNames, hasGroups) { + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + if (!IsArray(indices) || !every(indices, isMatchRecordOrUndefined)) { + throw new $TypeError('Assertion failed: `indices` must be a List of either Match Records or `undefined`'); + } + if (!IsArray(groupNames) || !every(groupNames, isStringOrUndefined)) { + throw new $TypeError('Assertion failed: `groupNames` must be a List of either Strings or `undefined`'); + } + if (Type(hasGroups) !== 'Boolean') { + throw new $TypeError('Assertion failed: `hasGroups` must be a Boolean'); + } + + var n = indices.length; // step 1 + if (!(n < MAX_ARRAY_LENGTH)) { + throw new $TypeError('Assertion failed: `indices` length must be less than the max array size, 2**32 - 1'); + } + if (groupNames.length !== n - 1) { + throw new $TypeError('Assertion failed: `groupNames` must have exactly one fewer item than `indices`'); + } + + var A = ArrayCreate(n); // step 5 + var groups = hasGroups ? OrdinaryObjectCreate(null) : void undefined; // step 6-7 + CreateDataPropertyOrThrow(A, 'groups', groups); // step 8 + + for (var i = 0; i < n; i += 1) { // step 9 + var matchIndices = indices[i]; // step 9.a + // eslint-disable-next-line no-negated-condition + var matchIndexPair = typeof matchIndices !== 'undefined' ? GetMatchIndexPair(S, matchIndices) : void undefined; // step 9.b-9.c + CreateDataPropertyOrThrow(A, ToString(i), matchIndexPair); // step 9.d + if (i > 0 && typeof groupNames[i - 1] !== 'undefined') { // step 9.e + if (!groups) { + throw new $TypeError('if `hasGroups` is `false`, `groupNames` can only contain `undefined` values'); + } + CreateDataPropertyOrThrow(groups, groupNames[i - 1], matchIndexPair); // step 9.e.i + } + } + return A; // step 10 +}; diff --git a/node_modules/es-abstract/2022/MakeTime.js b/node_modules/es-abstract/2022/MakeTime.js new file mode 100644 index 000000000..330d3bdbc --- /dev/null +++ b/node_modules/es-abstract/2022/MakeTime.js @@ -0,0 +1,23 @@ +'use strict'; + +var $isFinite = require('../helpers/isFinite'); +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var msPerMinute = timeConstants.msPerMinute; +var msPerHour = timeConstants.msPerHour; + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); + +// https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.11 + +module.exports = function MakeTime(hour, min, sec, ms) { + if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) { + return NaN; + } + var h = ToIntegerOrInfinity(hour); + var m = ToIntegerOrInfinity(min); + var s = ToIntegerOrInfinity(sec); + var milli = ToIntegerOrInfinity(ms); + var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli; + return t; +}; diff --git a/node_modules/es-abstract/2022/MinFromTime.js b/node_modules/es-abstract/2022/MinFromTime.js new file mode 100644 index 000000000..a0c631d4c --- /dev/null +++ b/node_modules/es-abstract/2022/MinFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerMinute = timeConstants.msPerMinute; +var MinutesPerHour = timeConstants.MinutesPerHour; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function MinFromTime(t) { + return modulo(floor(t / msPerMinute), MinutesPerHour); +}; diff --git a/node_modules/es-abstract/2022/MonthFromTime.js b/node_modules/es-abstract/2022/MonthFromTime.js new file mode 100644 index 000000000..a482a7df9 --- /dev/null +++ b/node_modules/es-abstract/2022/MonthFromTime.js @@ -0,0 +1,47 @@ +'use strict'; + +var DayWithinYear = require('./DayWithinYear'); +var InLeapYear = require('./InLeapYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.4 + +module.exports = function MonthFromTime(t) { + var day = DayWithinYear(t); + if (0 <= day && day < 31) { + return 0; + } + var leap = InLeapYear(t); + if (31 <= day && day < (59 + leap)) { + return 1; + } + if ((59 + leap) <= day && day < (90 + leap)) { + return 2; + } + if ((90 + leap) <= day && day < (120 + leap)) { + return 3; + } + if ((120 + leap) <= day && day < (151 + leap)) { + return 4; + } + if ((151 + leap) <= day && day < (181 + leap)) { + return 5; + } + if ((181 + leap) <= day && day < (212 + leap)) { + return 6; + } + if ((212 + leap) <= day && day < (243 + leap)) { + return 7; + } + if ((243 + leap) <= day && day < (273 + leap)) { + return 8; + } + if ((273 + leap) <= day && day < (304 + leap)) { + return 9; + } + if ((304 + leap) <= day && day < (334 + leap)) { + return 10; + } + if ((334 + leap) <= day && day < (365 + leap)) { + return 11; + } +}; diff --git a/node_modules/es-abstract/2022/NormalCompletion.js b/node_modules/es-abstract/2022/NormalCompletion.js new file mode 100644 index 000000000..1e429dd65 --- /dev/null +++ b/node_modules/es-abstract/2022/NormalCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/6.0/#sec-normalcompletion + +module.exports = function NormalCompletion(value) { + return new CompletionRecord('normal', value); +}; diff --git a/node_modules/es-abstract/2022/Number/add.js b/node_modules/es-abstract/2022/Number/add.js new file mode 100644 index 000000000..8d6271f54 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/add.js @@ -0,0 +1,36 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-add + +module.exports = function NumberAdd(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === Infinity && y === -Infinity) || (x === -Infinity && y === Infinity)) { + return NaN; + } + + if (!isFinite(x)) { + return x; + } + if (!isFinite(y)) { + return y; + } + + if (x === y && x === 0) { // both zeroes + return Infinity / x === -Infinity && Infinity / y === -Infinity ? -0 : +0; + } + + // shortcut for the actual spec mechanics + return x + y; +}; diff --git a/node_modules/es-abstract/2022/Number/bitwiseAND.js b/node_modules/es-abstract/2022/Number/bitwiseAND.js new file mode 100644 index 000000000..a7159802d --- /dev/null +++ b/node_modules/es-abstract/2022/Number/bitwiseAND.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND + +module.exports = function NumberBitwiseAND(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('&', x, y); +}; diff --git a/node_modules/es-abstract/2022/Number/bitwiseNOT.js b/node_modules/es-abstract/2022/Number/bitwiseNOT.js new file mode 100644 index 000000000..ae8032a78 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/bitwiseNOT.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT + +module.exports = function NumberBitwiseNOT(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + var oldValue = ToInt32(x); + // Return the result of applying the bitwise operator op to lnum and rnum. The result is a signed 32-bit integer. + return ~oldValue; +}; diff --git a/node_modules/es-abstract/2022/Number/bitwiseOR.js b/node_modules/es-abstract/2022/Number/bitwiseOR.js new file mode 100644 index 000000000..c5e67b968 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/bitwiseOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR + +module.exports = function NumberBitwiseOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('|', x, y); +}; diff --git a/node_modules/es-abstract/2022/Number/bitwiseXOR.js b/node_modules/es-abstract/2022/Number/bitwiseXOR.js new file mode 100644 index 000000000..a4030e9a4 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/bitwiseXOR.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var NumberBitwiseOp = require('../NumberBitwiseOp'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR + +module.exports = function NumberBitwiseXOR(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberBitwiseOp('^', x, y); +}; diff --git a/node_modules/es-abstract/2022/Number/divide.js b/node_modules/es-abstract/2022/Number/divide.js new file mode 100644 index 000000000..65244625d --- /dev/null +++ b/node_modules/es-abstract/2022/Number/divide.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide + +module.exports = function NumberDivide(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y) || (!isFinite(x) && !isFinite(y))) { + return NaN; + } + // shortcut for the actual spec mechanics + return x / y; +}; diff --git a/node_modules/es-abstract/2022/Number/equal.js b/node_modules/es-abstract/2022/Number/equal.js new file mode 100644 index 000000000..db68afa46 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/equal.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal + +module.exports = function NumberEqual(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (isNaN(x) || isNaN(y)) { + return false; + } + // shortcut for the actual spec mechanics + return x === y; +}; diff --git a/node_modules/es-abstract/2022/Number/exponentiate.js b/node_modules/es-abstract/2022/Number/exponentiate.js new file mode 100644 index 000000000..256865103 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/exponentiate.js @@ -0,0 +1,77 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +// var isNegativeZero = require('is-negative-zero'); + +var $pow = GetIntrinsic('%Math.pow%'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +/* +var abs = require('../../helpers/abs'); +var isFinite = require('../../helpers/isFinite'); +var isNaN = require('../../helpers/isNaN'); + +var IsInteger = require('../IsInteger'); +*/ +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate + +/* eslint max-lines-per-function: 0, max-statements: 0 */ + +module.exports = function NumberExponentiate(base, exponent) { + if (Type(base) !== 'Number' || Type(exponent) !== 'Number') { + throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers'); + } + return $pow(base, exponent); + /* + if (isNaN(exponent)) { + return NaN; + } + if (exponent === 0) { + return 1; + } + if (isNaN(base)) { + return NaN; + } + var aB = abs(base); + if (aB > 1 && exponent === Infinity) { + return Infinity; + } + if (aB > 1 && exponent === -Infinity) { + return 0; + } + if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) { + return NaN; + } + if (aB < 1 && exponent === Infinity) { + return +0; + } + if (aB < 1 && exponent === -Infinity) { + return Infinity; + } + if (base === Infinity) { + return exponent > 0 ? Infinity : 0; + } + if (base === -Infinity) { + var isOdd = true; + if (exponent > 0) { + return isOdd ? -Infinity : Infinity; + } + return isOdd ? -0 : 0; + } + if (exponent > 0) { + return isNegativeZero(base) ? Infinity : 0; + } + if (isNegativeZero(base)) { + if (exponent > 0) { + return isOdd ? -0 : 0; + } + return isOdd ? -Infinity : Infinity; + } + if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) { + return NaN; + } + */ +}; diff --git a/node_modules/es-abstract/2022/Number/index.js b/node_modules/es-abstract/2022/Number/index.js new file mode 100644 index 000000000..63ec52da6 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var add = require('./add'); +var bitwiseAND = require('./bitwiseAND'); +var bitwiseNOT = require('./bitwiseNOT'); +var bitwiseOR = require('./bitwiseOR'); +var bitwiseXOR = require('./bitwiseXOR'); +var divide = require('./divide'); +var equal = require('./equal'); +var exponentiate = require('./exponentiate'); +var leftShift = require('./leftShift'); +var lessThan = require('./lessThan'); +var multiply = require('./multiply'); +var remainder = require('./remainder'); +var sameValue = require('./sameValue'); +var sameValueZero = require('./sameValueZero'); +var signedRightShift = require('./signedRightShift'); +var subtract = require('./subtract'); +var toString = require('./toString'); +var unaryMinus = require('./unaryMinus'); +var unsignedRightShift = require('./unsignedRightShift'); + +module.exports = { + add: add, + bitwiseAND: bitwiseAND, + bitwiseNOT: bitwiseNOT, + bitwiseOR: bitwiseOR, + bitwiseXOR: bitwiseXOR, + divide: divide, + equal: equal, + exponentiate: exponentiate, + leftShift: leftShift, + lessThan: lessThan, + multiply: multiply, + remainder: remainder, + sameValue: sameValue, + sameValueZero: sameValueZero, + signedRightShift: signedRightShift, + subtract: subtract, + toString: toString, + unaryMinus: unaryMinus, + unsignedRightShift: unsignedRightShift +}; diff --git a/node_modules/es-abstract/2022/Number/leftShift.js b/node_modules/es-abstract/2022/Number/leftShift.js new file mode 100644 index 000000000..023b3390f --- /dev/null +++ b/node_modules/es-abstract/2022/Number/leftShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift + +module.exports = function NumberLeftShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum << shiftCount; +}; diff --git a/node_modules/es-abstract/2022/Number/lessThan.js b/node_modules/es-abstract/2022/Number/lessThan.js new file mode 100644 index 000000000..5fcac24e9 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/lessThan.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan + +module.exports = function NumberLessThan(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + // If x is NaN, return undefined. + // If y is NaN, return undefined. + if (isNaN(x) || isNaN(y)) { + return void undefined; + } + + // shortcut for the actual spec mechanics + return x < y; +}; diff --git a/node_modules/es-abstract/2022/Number/multiply.js b/node_modules/es-abstract/2022/Number/multiply.js new file mode 100644 index 000000000..2a6c478a5 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/multiply.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply + +module.exports = function NumberMultiply(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + if (isNaN(x) || isNaN(y) || (x === 0 && !isFinite(y)) || (!isFinite(x) && y === 0)) { + return NaN; + } + if (!isFinite(x) && !isFinite(y)) { + return x === y ? Infinity : -Infinity; + } + if (!isFinite(x) && y !== 0) { + return x > 0 ? Infinity : -Infinity; + } + if (!isFinite(y) && x !== 0) { + return y > 0 ? Infinity : -Infinity; + } + + // shortcut for the actual spec mechanics + return x * y; +}; diff --git a/node_modules/es-abstract/2022/Number/remainder.js b/node_modules/es-abstract/2022/Number/remainder.js new file mode 100644 index 000000000..c9a7c2d7d --- /dev/null +++ b/node_modules/es-abstract/2022/Number/remainder.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-remainder + +module.exports = function NumberRemainder(n, d) { + if (Type(n) !== 'Number' || Type(d) !== 'Number') { + throw new $TypeError('Assertion failed: `n` and `d` arguments must be Numbers'); + } + + // If either operand is NaN, the result is NaN. + // If the dividend is an infinity, or the divisor is a zero, or both, the result is NaN. + if (isNaN(n) || isNaN(d) || !isFinite(n) || d === 0) { + return NaN; + } + + // If the dividend is finite and the divisor is an infinity, the result equals the dividend. + // If the dividend is a zero and the divisor is nonzero and finite, the result is the same as the dividend. + if (!isFinite(d) || n === 0) { + return n; + } + + // In the remaining cases, where neither an infinity, nor a zero, nor NaN is involved… + return n % d; +}; diff --git a/node_modules/es-abstract/2022/Number/sameValue.js b/node_modules/es-abstract/2022/Number/sameValue.js new file mode 100644 index 000000000..19efc379d --- /dev/null +++ b/node_modules/es-abstract/2022/Number/sameValue.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var isNegativeZero = require('is-negative-zero'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); +var NumberSameValueZero = require('./sameValueZero'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue + +module.exports = function NumberSameValue(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + if (x === 0 && y === 0) { + return !(isNegativeZero(x) ^ isNegativeZero(y)); + } + return NumberSameValueZero(x, y); +}; diff --git a/node_modules/es-abstract/2022/Number/sameValueZero.js b/node_modules/es-abstract/2022/Number/sameValueZero.js new file mode 100644 index 000000000..5688198fe --- /dev/null +++ b/node_modules/es-abstract/2022/Number/sameValueZero.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero + +module.exports = function NumberSameValueZero(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var xNaN = isNaN(x); + var yNaN = isNaN(y); + if (xNaN || yNaN) { + return xNaN === yNaN; + } + return x === y; +}; diff --git a/node_modules/es-abstract/2022/Number/signedRightShift.js b/node_modules/es-abstract/2022/Number/signedRightShift.js new file mode 100644 index 000000000..025f39a1c --- /dev/null +++ b/node_modules/es-abstract/2022/Number/signedRightShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift + +module.exports = function NumberSignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum >> shiftCount; +}; diff --git a/node_modules/es-abstract/2022/Number/subtract.js b/node_modules/es-abstract/2022/Number/subtract.js new file mode 100644 index 000000000..29a29e619 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/subtract.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +var NumberAdd = require('./add'); +var NumberUnaryMinus = require('./unaryMinus'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract + +module.exports = function NumberSubtract(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + return NumberAdd(x, NumberUnaryMinus(y)); +}; diff --git a/node_modules/es-abstract/2022/Number/toString.js b/node_modules/es-abstract/2022/Number/toString.js new file mode 100644 index 000000000..4f133160a --- /dev/null +++ b/node_modules/es-abstract/2022/Number/toString.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring + +module.exports = function NumberToString(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` must be a Number'); + } + + return $String(x); +}; diff --git a/node_modules/es-abstract/2022/Number/unaryMinus.js b/node_modules/es-abstract/2022/Number/unaryMinus.js new file mode 100644 index 000000000..794582ad8 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/unaryMinus.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var isNaN = require('../../helpers/isNaN'); + +var Type = require('../Type'); + +// https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus + +module.exports = function NumberUnaryMinus(x) { + if (Type(x) !== 'Number') { + throw new $TypeError('Assertion failed: `x` argument must be a Number'); + } + if (isNaN(x)) { + return NaN; + } + return -x; +}; diff --git a/node_modules/es-abstract/2022/Number/unsignedRightShift.js b/node_modules/es-abstract/2022/Number/unsignedRightShift.js new file mode 100644 index 000000000..2eb967ac2 --- /dev/null +++ b/node_modules/es-abstract/2022/Number/unsignedRightShift.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('../ToInt32'); +var ToUint32 = require('../ToUint32'); +var modulo = require('../modulo'); +var Type = require('../Type'); + +// https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift + +module.exports = function NumberUnsignedRightShift(x, y) { + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + + var lnum = ToInt32(x); + var rnum = ToUint32(y); + + var shiftCount = modulo(rnum, 32); + + return lnum >>> shiftCount; +}; diff --git a/node_modules/es-abstract/2022/NumberBitwiseOp.js b/node_modules/es-abstract/2022/NumberBitwiseOp.js new file mode 100644 index 000000000..11425ffde --- /dev/null +++ b/node_modules/es-abstract/2022/NumberBitwiseOp.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var ToInt32 = require('./ToInt32'); +var ToUint32 = require('./ToUint32'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-numberbitwiseop + +module.exports = function NumberBitwiseOp(op, x, y) { + if (op !== '&' && op !== '|' && op !== '^') { + throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`'); + } + if (Type(x) !== 'Number' || Type(y) !== 'Number') { + throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers'); + } + var lnum = ToInt32(x); + var rnum = ToUint32(y); + if (op === '&') { + return lnum & rnum; + } + if (op === '|') { + return lnum | rnum; + } + return lnum ^ rnum; +}; diff --git a/node_modules/es-abstract/2022/NumberToBigInt.js b/node_modules/es-abstract/2022/NumberToBigInt.js new file mode 100644 index 000000000..9ed8ed9a9 --- /dev/null +++ b/node_modules/es-abstract/2022/NumberToBigInt.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#sec-numbertobigint + +module.exports = function NumberToBigInt(number) { + if (Type(number) !== 'Number') { + throw new $TypeError('Assertion failed: `number` must be a String'); + } + if (!IsIntegralNumber(number)) { + throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + return $BigInt(number); +}; diff --git a/node_modules/es-abstract/2022/NumericToRawBytes.js b/node_modules/es-abstract/2022/NumericToRawBytes.js new file mode 100644 index 000000000..91549fb99 --- /dev/null +++ b/node_modules/es-abstract/2022/NumericToRawBytes.js @@ -0,0 +1,209 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $floor = GetIntrinsic('%Math.floor%'); +var $log = GetIntrinsic('%Math.log%'); +var $log2E = GetIntrinsic('%Math.LOG2E%'); +var $log2 = GetIntrinsic('%Math.log2%', true) || function log2(x) { + return $log(x) * $log2E; +}; +var $parseInt = GetIntrinsic('%parseInt%'); +var $pow = GetIntrinsic('%Math.pow%'); +var $Number = GetIntrinsic('%Number%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var callBound = require('call-bind/callBound'); + +var $reverse = callBound('Array.prototype.reverse'); +var $numberToString = callBound('Number.prototype.toString'); +var $strSlice = callBound('String.prototype.slice'); + +var abs = require('./abs'); +var hasOwnProperty = require('./HasOwnProperty'); +var ToBigInt64 = require('./ToBigInt64'); +var ToBigUint64 = require('./ToBigUint64'); +var ToInt16 = require('./ToInt16'); +var ToInt32 = require('./ToInt32'); +var ToInt8 = require('./ToInt8'); +var ToUint16 = require('./ToUint16'); +var ToUint32 = require('./ToUint32'); +var ToUint8 = require('./ToUint8'); +var ToUint8Clamp = require('./ToUint8Clamp'); +var Type = require('./Type'); + +var isNaN = require('../helpers/isNaN'); +var isFinite = require('../helpers/isFinite'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +var TypeToAO = { + __proto__: null, + Int8: ToInt8, + Uint8: ToUint8, + Uint8C: ToUint8Clamp, + Int16: ToInt16, + Uint16: ToUint16, + Int32: ToInt32, + Uint32: ToUint32, + BigInt64: ToBigInt64, + BigUint64: ToBigUint64 +}; + +// https://262.ecma-international.org/11.0/#sec-numerictorawbytes + +module.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (Type(value) !== 'Number' && Type(value) !== 'BigInt') { + throw new $TypeError('Assertion failed: `value` must be a Number or a BigInt'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var rawBytes = []; + var exponent; + + if (type === 'Float32') { // step 1 + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded + } + + var leastSig; + + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + + if (!isFinite(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + + var sign = value < 0 ? 1 : 0; + value = abs(value); // eslint-disable-line no-param-reassign + + exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; // eslint-disable-line no-param-reassign + } + + while (value < 1) { + exponent -= 1; + value *= 2; // eslint-disable-line no-param-reassign + } + + var mantissa = value - 1; + mantissa *= $pow(2, 23); + mantissa = $floor(mantissa); + + exponent += 127; + exponent = exponent << 23; + + var result = sign << 31; + result |= exponent; + result |= mantissa; + + var byte0 = result & 255; + result = result >> 8; + var byte1 = result & 255; + result = result >> 8; + var byte2 = result & 255; + result = result >> 8; + var byte3 = result & 255; + + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; + } else if (type === 'Float64') { // step 2 + if (value === 0) { + leastSig = Object.is(value, -0) ? 0x80 : 0; + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 0, leastSig] : [leastSig, 0, 0, 0, 0, 0, 0, 0]; + } + if (isNaN(value)) { + return isLittleEndian ? [0, 0, 0, 0, 0, 0, 248, 127] : [127, 248, 0, 0, 0, 0, 0, 0]; + } + if (!isFinite(value)) { + var infBytes = value < 0 ? [0, 0, 0, 0, 0, 0, 240, 255] : [0, 0, 0, 0, 0, 0, 240, 127]; + return isLittleEndian ? infBytes : $reverse(infBytes); + } + + var isNegative = value < 0; + if (isNegative) { value = -value; } // eslint-disable-line no-param-reassign + + exponent = $floor($log2(value)); + var significand = (value / $pow(2, exponent)) - 1; + + var bitString = ''; + for (var i = 0; i < 52; i++) { + significand *= 2; + if (significand >= 1) { + bitString += '1'; + significand -= 1; + } else { + bitString += '0'; + } + } + + exponent += 1023; + var exponentBits = $numberToString(exponent, 2); + while (exponentBits.length < 11) { exponentBits = '0' + exponentBits; } + + var fullBitString = (isNegative ? '1' : '0') + exponentBits + bitString; + while (fullBitString.length < 64) { fullBitString = '0' + fullBitString; } + + for (i = 0; i < 8; i++) { + rawBytes[i] = $parseInt($strSlice(fullBitString, i * 8, (i + 1) * 8), 2); + } + + return isLittleEndian ? $reverse(rawBytes) : rawBytes; + } // step 3 + + var n = TypeToSizes[type]; // step 3.a + + var convOp = TypeToAO[type]; // step 3.b + + var intValue = convOp(value); // step 3.c + + var isBigInt = type === 'BigInt64' || type === 'BigUint64'; + /* + if (intValue >= 0) { // step 3.d + // Let rawBytes be a List containing the n-byte binary encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } else { // step 3.e + // Let rawBytes be a List containing the n-byte binary 2's complement encoding of intValue. If isLittleEndian is false, the bytes are ordered in big endian order. Otherwise, the bytes are ordered in little endian order. + } + */ + if (intValue < 0) { + intValue = intValue >>> 0; + } + var OxFF = isBigInt ? $BigInt(0xFF) : 0xFF; + var eight = isBigInt ? $BigInt(8) : 8; + for (i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = $Number(intValue & OxFF); + intValue = intValue >> eight; + } + + return rawBytes; // step 4 +}; diff --git a/node_modules/es-abstract/2022/ObjectDefineProperties.js b/node_modules/es-abstract/2022/ObjectDefineProperties.js new file mode 100644 index 000000000..f096f1ede --- /dev/null +++ b/node_modules/es-abstract/2022/ObjectDefineProperties.js @@ -0,0 +1,40 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var Get = require('./Get'); +var ToObject = require('./ToObject'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); + +var forEach = require('../helpers/forEach'); +var getOwnPropertyDescriptor = require('gopd'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var $push = callBound('Array.prototype.push'); + +// https://262.ecma-international.org/6.0/#sec-objectdefineproperties +module.exports = function ObjectDefineProperties(O, Properties) { + var props = ToObject(Properties); // step 1 + var keys = OwnPropertyKeys(props); // step 2 + var descriptors = []; // step 3 + + forEach(keys, function (nextKey) { // step 4 + var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a + if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b + var descObj = Get(props, nextKey); // step 4.b.i + var desc = ToPropertyDescriptor(descObj); // step 4.b.ii + $push(descriptors, [nextKey, desc]); // step 4.b.iii + } + }); + + forEach(descriptors, function (pair) { // step 5 + var P = pair[0]; // step 5.a + var desc = pair[1]; // step 5.b + desc = FromPropertyDescriptor(desc); // TODO: remove this once DefinePropertyOrThrow is fixed + DefinePropertyOrThrow(O, P, desc); // step 5.c + }); + + return O; // step 6 +}; diff --git a/node_modules/es-abstract/2022/OrdinaryCreateFromConstructor.js b/node_modules/es-abstract/2022/OrdinaryCreateFromConstructor.js new file mode 100644 index 000000000..8f3bb829d --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryCreateFromConstructor.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor'); +var IsArray = require('./IsArray'); +var OrdinaryObjectCreate = require('./OrdinaryObjectCreate'); + +// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor + +module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) { + GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic + var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto); + var slots = arguments.length < 3 ? [] : arguments[2]; + if (!IsArray(slots)) { + throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List'); + } + return OrdinaryObjectCreate(proto, slots); +}; diff --git a/node_modules/es-abstract/2022/OrdinaryDefineOwnProperty.js b/node_modules/es-abstract/2022/OrdinaryDefineOwnProperty.js new file mode 100644 index 000000000..34f029f7e --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryDefineOwnProperty.js @@ -0,0 +1,61 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var IsPropertyKey = require('./IsPropertyKey'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); +var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); + +// https://ecma-international.org/ecma-262/6.0/#sec-ordinarydefineownproperty + +module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (!$gOPD) { + // ES3/IE 8 fallback + if (IsAccessorDescriptor(Desc)) { + throw new $SyntaxError('This environment does not support accessor property descriptors.'); + } + var creatingNormalDataProperty = !(P in O) + && Desc['[[Writable]]'] + && Desc['[[Enumerable]]'] + && Desc['[[Configurable]]'] + && '[[Value]]' in Desc; + var settingExistingDataProperty = (P in O) + && (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]']) + && (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]']) + && (!('[[Writable]]' in Desc) || Desc['[[Writable]]']) + && '[[Value]]' in Desc; + if (creatingNormalDataProperty || settingExistingDataProperty) { + O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign + return SameValue(O[P], Desc['[[Value]]']); + } + throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties'); + } + var desc = $gOPD(O, P); + var current = desc && ToPropertyDescriptor(desc); + var extensible = IsExtensible(O); + return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current); +}; diff --git a/node_modules/es-abstract/2022/OrdinaryGetOwnProperty.js b/node_modules/es-abstract/2022/OrdinaryGetOwnProperty.js new file mode 100644 index 000000000..fd8035acb --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryGetOwnProperty.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +var has = require('has'); + +var IsArray = require('./IsArray'); +var IsPropertyKey = require('./IsPropertyKey'); +var IsRegExp = require('./IsRegExp'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty + +module.exports = function OrdinaryGetOwnProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (!has(O, P)) { + return void 0; + } + if (!$gOPD) { + // ES3 / IE 8 fallback + var arrayLength = IsArray(O) && P === 'length'; + var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; + return { + '[[Configurable]]': !(arrayLength || regexLastIndex), + '[[Enumerable]]': $isEnumerable(O, P), + '[[Value]]': O[P], + '[[Writable]]': true + }; + } + return ToPropertyDescriptor($gOPD(O, P)); +}; diff --git a/node_modules/es-abstract/2022/OrdinaryGetPrototypeOf.js b/node_modules/es-abstract/2022/OrdinaryGetPrototypeOf.js new file mode 100644 index 000000000..ba17b9887 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryGetPrototypeOf.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $getProto = require('../helpers/getProto'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof + +module.exports = function OrdinaryGetPrototypeOf(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!$getProto) { + throw new $TypeError('This environment does not support fetching prototypes.'); + } + return $getProto(O); +}; diff --git a/node_modules/es-abstract/2022/OrdinaryHasInstance.js b/node_modules/es-abstract/2022/OrdinaryHasInstance.js new file mode 100644 index 000000000..85a240ca2 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryHasInstance.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-ordinaryhasinstance + +module.exports = function OrdinaryHasInstance(C, O) { + if (IsCallable(C) === false) { + return false; + } + if (Type(O) !== 'Object') { + return false; + } + var P = Get(C, 'prototype'); + if (Type(P) !== 'Object') { + throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return O instanceof C; +}; diff --git a/node_modules/es-abstract/2022/OrdinaryHasProperty.js b/node_modules/es-abstract/2022/OrdinaryHasProperty.js new file mode 100644 index 000000000..dd09ca3b1 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryHasProperty.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-ordinaryhasproperty + +module.exports = function OrdinaryHasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + return P in O; +}; diff --git a/node_modules/es-abstract/2022/OrdinaryObjectCreate.js b/node_modules/es-abstract/2022/OrdinaryObjectCreate.js new file mode 100644 index 000000000..140534083 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryObjectCreate.js @@ -0,0 +1,56 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $ObjectCreate = GetIntrinsic('%Object.create%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var IsArray = require('./IsArray'); +var Type = require('./Type'); + +var forEach = require('../helpers/forEach'); + +var SLOT = require('internal-slot'); + +var hasProto = require('has-proto')(); + +// https://262.ecma-international.org/11.0/#sec-objectcreate + +module.exports = function OrdinaryObjectCreate(proto) { + if (proto !== null && Type(proto) !== 'Object') { + throw new $TypeError('Assertion failed: `proto` must be null or an object'); + } + var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1]; + if (!IsArray(additionalInternalSlotsList)) { + throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array'); + } + + // var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1 + // internalSlotsList.push(...additionalInternalSlotsList); // step 2 + // var O = MakeBasicObject(internalSlotsList); // step 3 + // setProto(O, proto); // step 4 + // return O; // step 5 + + var O; + if ($ObjectCreate) { + O = $ObjectCreate(proto); + } else if (hasProto) { + O = { __proto__: proto }; + } else { + if (proto === null) { + throw new $SyntaxError('native Object.create support is required to create null objects'); + } + var T = function T() {}; + T.prototype = proto; + O = new T(); + } + + if (additionalInternalSlotsList.length > 0) { + forEach(additionalInternalSlotsList, function (slot) { + SLOT.set(O, slot, void undefined); + }); + } + + return O; +}; diff --git a/node_modules/es-abstract/2022/OrdinarySetPrototypeOf.js b/node_modules/es-abstract/2022/OrdinarySetPrototypeOf.js new file mode 100644 index 000000000..d2b72306c --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinarySetPrototypeOf.js @@ -0,0 +1,53 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $setProto = require('../helpers/setProto'); + +var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf'); +var Type = require('./Type'); + +// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof + +module.exports = function OrdinarySetPrototypeOf(O, V) { + if (Type(V) !== 'Object' && Type(V) !== 'Null') { + throw new $TypeError('Assertion failed: V must be Object or Null'); + } + /* + var extensible = IsExtensible(O); + var current = OrdinaryGetPrototypeOf(O); + if (SameValue(V, current)) { + return true; + } + if (!extensible) { + return false; + } + */ + try { + $setProto(O, V); + } catch (e) { + return false; + } + return OrdinaryGetPrototypeOf(O) === V; + /* + var p = V; + var done = false; + while (!done) { + if (p === null) { + done = true; + } else if (SameValue(p, O)) { + return false; + } else { + if (wat) { + done = true; + } else { + p = p.[[Prototype]]; + } + } + } + O.[[Prototype]] = V; + return true; + */ +}; diff --git a/node_modules/es-abstract/2022/OrdinaryToPrimitive.js b/node_modules/es-abstract/2022/OrdinaryToPrimitive.js new file mode 100644 index 000000000..e1dbe1427 --- /dev/null +++ b/node_modules/es-abstract/2022/OrdinaryToPrimitive.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +var inspect = require('object-inspect'); + +// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive + +module.exports = function OrdinaryToPrimitive(O, hint) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') { + throw new $TypeError('Assertion failed: `hint` must be "string" or "number"'); + } + + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + + for (var i = 0; i < methodNames.length; i += 1) { + var name = methodNames[i]; + var method = Get(O, name); + if (IsCallable(method)) { + var result = Call(method, O); + if (Type(result) !== 'Object') { + return result; + } + } + } + + throw new $TypeError('No primitive value for ' + inspect(O)); +}; diff --git a/node_modules/es-abstract/2022/PromiseResolve.js b/node_modules/es-abstract/2022/PromiseResolve.js new file mode 100644 index 000000000..6474b79c4 --- /dev/null +++ b/node_modules/es-abstract/2022/PromiseResolve.js @@ -0,0 +1,17 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBind = require('call-bind'); + +var $resolve = GetIntrinsic('%Promise.resolve%', true); +var $PromiseResolve = $resolve && callBind($resolve); + +// https://262.ecma-international.org/9.0/#sec-promise-resolve + +module.exports = function PromiseResolve(C, x) { + if (!$PromiseResolve) { + throw new SyntaxError('This environment does not support Promises.'); + } + return $PromiseResolve(C, x); +}; + diff --git a/node_modules/es-abstract/2022/QuoteJSONString.js b/node_modules/es-abstract/2022/QuoteJSONString.js new file mode 100644 index 000000000..0deebecf2 --- /dev/null +++ b/node_modules/es-abstract/2022/QuoteJSONString.js @@ -0,0 +1,54 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var forEach = require('../helpers/forEach'); +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); + +var StringToCodePoints = require('./StringToCodePoints'); +var Type = require('./Type'); +var UnicodeEscape = require('./UnicodeEscape'); +var UTF16EncodeCodePoint = require('./UTF16EncodeCodePoint'); + +var has = require('has'); + +// https://ecma-international.org/ecma-262/12.0/#sec-quotejsonstring + +var escapes = { + '\u0008': '\\b', + '\u0009': '\\t', + '\u000A': '\\n', + '\u000C': '\\f', + '\u000D': '\\r', + '\u0022': '\\"', + '\u005c': '\\\\' +}; + +module.exports = function QuoteJSONString(value) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `value` must be a String'); + } + var product = '"'; + if (value) { + forEach(StringToCodePoints(value), function (C) { + if (has(escapes, C)) { + product += escapes[C]; + } else { + var cCharCode = $charCodeAt(C, 0); + if (cCharCode < 0x20 || isLeadingSurrogate(C) || isTrailingSurrogate(C)) { + product += UnicodeEscape(C); + } else { + product += UTF16EncodeCodePoint(cCharCode); + } + } + }); + } + product += '"'; + return product; +}; diff --git a/node_modules/es-abstract/2022/RawBytesToNumeric.js b/node_modules/es-abstract/2022/RawBytesToNumeric.js new file mode 100644 index 000000000..c253b5d70 --- /dev/null +++ b/node_modules/es-abstract/2022/RawBytesToNumeric.js @@ -0,0 +1,156 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $pow = GetIntrinsic('%Math.pow%'); +var $RangeError = GetIntrinsic('%RangeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $BigInt = GetIntrinsic('%BigInt%', true); + +var hasOwnProperty = require('./HasOwnProperty'); +var IsArray = require('./IsArray'); +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnsignedElementType = require('./IsUnsignedElementType'); +var Type = require('./Type'); + +var every = require('../helpers/every'); +var isByteValue = require('../helpers/isByteValue'); + +var $reverse = callBound('Array.prototype.reverse'); +var $slice = callBound('Array.prototype.slice'); + +var keys = require('object-keys'); + +// https://262.ecma-international.org/11.0/#table-the-typedarray-constructors +var TypeToSizes = { + __proto__: null, + Int8: 1, + Uint8: 1, + Uint8C: 1, + Int16: 2, + Uint16: 2, + Int32: 4, + Uint32: 4, + BigInt64: 8, + BigUint64: 8, + Float32: 4, + Float64: 8 +}; + +// https://262.ecma-international.org/11.0/#sec-rawbytestonumeric + +module.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(TypeToSizes, type)) { + throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes)); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes'); + } + if (Type(isLittleEndian) !== 'Boolean') { + throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean'); + } + + var elementSize = TypeToSizes[type]; // step 1 + + if (rawBytes.length !== elementSize) { + // this assertion is not in the spec, but it'd be an editorial error if it were ever violated + throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type); + } + + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError('this environment does not support BigInts'); + } + + // eslint-disable-next-line no-param-reassign + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + // eslint-disable-next-line no-param-reassign + rawBytes = $reverse(rawBytes); // step 2 + } + + /* eslint no-redeclare: 1 */ + if (type === 'Float32') { // step 3 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary32 value. +If value is an IEEE 754-2008 binary32 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = (rawBytes[3] & 0x80) >> 7; // first bit + var exponent = ((rawBytes[3] & 0x7F) << 1) // 7 bits from index 3 + | ((rawBytes[2] & 0x80) >> 7); // 1 bit from index 2 + var mantissa = ((rawBytes[2] & 0x7F) << 16) // 7 bits from index 2 + | (rawBytes[1] << 8) // 8 bits from index 1 + | rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign === 0 ? 0 : -0; + } + if (exponent === 0xFF && mantissa === 0) { + return sign === 0 ? Infinity : -Infinity; + } + if (exponent === 0xFF && mantissa !== 0) { + return NaN; + } + + exponent -= 127; // subtract the bias + + // return $pow(-1, sign) * mantissa / $pow(2, 23) * $pow(2, exponent); + // return $pow(-1, sign) * (mantissa + 0x1000000) * $pow(2, exponent - 23); + return $pow(-1, sign) * (1 + (mantissa / $pow(2, 23))) * $pow(2, exponent); + } + + if (type === 'Float64') { // step 4 + /* + Let value be the byte elements of rawBytes concatenated and interpreted as a little-endian bit string encoding of an IEEE 754-2008 binary64 value. +If value is an IEEE 754-2008 binary64 NaN value, return the NaN Number value. +Return the Number value that corresponds to value. + */ + var sign = rawBytes[7] & 0x80 ? -1 : 1; // first bit + var exponent = ((rawBytes[7] & 0x7F) << 4) // 7 bits from index 7 + | ((rawBytes[6] & 0xF0) >> 4); // 4 bits from index 6 + var mantissa = ((rawBytes[6] & 0x0F) * 0x1000000000000) // 4 bits from index 6 + + (rawBytes[5] * 0x10000000000) // 8 bits from index 5 + + (rawBytes[4] * 0x100000000) // 8 bits from index 4 + + (rawBytes[3] * 0x1000000) // 8 bits from index 3 + + (rawBytes[2] * 0x10000) // 8 bits from index 2 + + (rawBytes[1] * 0x100) // 8 bits from index 1 + + rawBytes[0]; // 8 bits from index 0 + + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 0x7FF && mantissa !== 0) { + return NaN; + } + if (exponent === 0x7FF && mantissa === 0) { + return sign * Infinity; + } + + exponent -= 1023; // subtract the bias + + return sign * (mantissa + 0x10000000000000) * $pow(2, exponent - 52); + } + + // this is common to both branches + var intValue = isBigInt ? $BigInt(0) : 0; + for (var i = 0; i < rawBytes.length; i++) { + intValue |= isBigInt ? $BigInt(rawBytes[i]) << $BigInt(8 * i) : rawBytes[i] << (8 * i); + } + /* + Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of an unsigned little-endian binary number. + */ + + if (!IsUnsignedElementType(type)) { // steps 5-6 + // Let intValue be the byte elements of rawBytes concatenated and interpreted as a bit string encoding of a binary little-endian 2's complement number of bit length elementSize × 8. + var bitLength = elementSize * 8; + if (bitLength < 32) { + var x = isBigInt ? $BigInt(32 - bitLength) : 32 - bitLength; + intValue = (intValue << x) >> x; + } + } + + return intValue; // step 7 +}; diff --git a/node_modules/es-abstract/2022/RegExpCreate.js b/node_modules/es-abstract/2022/RegExpCreate.js new file mode 100644 index 000000000..68e31605e --- /dev/null +++ b/node_modules/es-abstract/2022/RegExpCreate.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RegExp = GetIntrinsic('%RegExp%'); + +// var RegExpAlloc = require('./RegExpAlloc'); +// var RegExpInitialize = require('./RegExpInitialize'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/6.0/#sec-regexpcreate + +module.exports = function RegExpCreate(P, F) { + // var obj = RegExpAlloc($RegExp); + // return RegExpInitialize(obj, P, F); + + // covers spec mechanics; bypass regex brand checking + var pattern = typeof P === 'undefined' ? '' : ToString(P); + var flags = typeof F === 'undefined' ? '' : ToString(F); + return new $RegExp(pattern, flags); +}; diff --git a/node_modules/es-abstract/2022/RegExpExec.js b/node_modules/es-abstract/2022/RegExpExec.js new file mode 100644 index 000000000..29fee1720 --- /dev/null +++ b/node_modules/es-abstract/2022/RegExpExec.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var regexExec = require('call-bind/callBound')('RegExp.prototype.exec'); + +var Call = require('./Call'); +var Get = require('./Get'); +var IsCallable = require('./IsCallable'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-regexpexec + +module.exports = function RegExpExec(R, S) { + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: `R` must be an Object'); + } + if (Type(S) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + var exec = Get(R, 'exec'); + if (IsCallable(exec)) { + var result = Call(exec, R, [S]); + if (result === null || Type(result) === 'Object') { + return result; + } + throw new $TypeError('"exec" method must return `null` or an Object'); + } + return regexExec(R, S); +}; diff --git a/node_modules/es-abstract/2022/RegExpHasFlag.js b/node_modules/es-abstract/2022/RegExpHasFlag.js new file mode 100644 index 000000000..a7c800d9e --- /dev/null +++ b/node_modules/es-abstract/2022/RegExpHasFlag.js @@ -0,0 +1,38 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $RegExpPrototype = GetIntrinsic('%RegExp.prototype%'); + +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +var $indexOf = callBound('String.prototype.indexOf'); + +var hasRegExpMatcher = require('is-regex'); +var getFlags = require('regexp.prototype.flags'); + +// https://262.ecma-international.org/13.0/#sec-regexphasflag + +module.exports = function RegExpHasFlag(R, codeUnit) { + if (Type(codeUnit) !== 'String' || codeUnit.length !== 1) { + throw new $TypeError('Assertion failed: `string` must be a code unit - a String of length 1'); + } + + if (Type(R) !== 'Object') { + throw new $TypeError('Assertion failed: Type(R) is not Object'); + } + + if (!hasRegExpMatcher(R)) { // step 2 + if (SameValue(R, $RegExpPrototype)) { + return void undefined; // step 2.a + } + throw new $TypeError('`R` must be a RegExp object'); // step 2.b + } + + var flags = getFlags(R); // step 3 + + return $indexOf(flags, codeUnit) > -1; // steps 4-5 +}; diff --git a/node_modules/es-abstract/2022/RequireObjectCoercible.js b/node_modules/es-abstract/2022/RequireObjectCoercible.js new file mode 100644 index 000000000..9008359db --- /dev/null +++ b/node_modules/es-abstract/2022/RequireObjectCoercible.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../5/CheckObjectCoercible'); diff --git a/node_modules/es-abstract/2022/SameValue.js b/node_modules/es-abstract/2022/SameValue.js new file mode 100644 index 000000000..b73939b20 --- /dev/null +++ b/node_modules/es-abstract/2022/SameValue.js @@ -0,0 +1,13 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// http://262.ecma-international.org/5.1/#sec-9.12 + +module.exports = function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); +}; diff --git a/node_modules/es-abstract/2022/SameValueNonNumeric.js b/node_modules/es-abstract/2022/SameValueNonNumeric.js new file mode 100644 index 000000000..04f6cbfbe --- /dev/null +++ b/node_modules/es-abstract/2022/SameValueNonNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric + +module.exports = function SameValueNonNumeric(x, y) { + var xType = Type(x); + if (xType === 'Number' || xType === 'BigInt') { + throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values'); + } + if (xType !== Type(y)) { + throw new $TypeError('SameValueNonNumeric requires two non-numeric values of the same type.'); + } + return SameValue(x, y); +}; diff --git a/node_modules/es-abstract/2022/SameValueZero.js b/node_modules/es-abstract/2022/SameValueZero.js new file mode 100644 index 000000000..bf1a1486a --- /dev/null +++ b/node_modules/es-abstract/2022/SameValueZero.js @@ -0,0 +1,9 @@ +'use strict'; + +var $isNaN = require('../helpers/isNaN'); + +// https://ecma-international.org/ecma-262/6.0/#sec-samevaluezero + +module.exports = function SameValueZero(x, y) { + return (x === y) || ($isNaN(x) && $isNaN(y)); +}; diff --git a/node_modules/es-abstract/2022/SecFromTime.js b/node_modules/es-abstract/2022/SecFromTime.js new file mode 100644 index 000000000..fc2e44560 --- /dev/null +++ b/node_modules/es-abstract/2022/SecFromTime.js @@ -0,0 +1,14 @@ +'use strict'; + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var timeConstants = require('../helpers/timeConstants'); +var msPerSecond = timeConstants.msPerSecond; +var SecondsPerMinute = timeConstants.SecondsPerMinute; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function SecFromTime(t) { + return modulo(floor(t / msPerSecond), SecondsPerMinute); +}; diff --git a/node_modules/es-abstract/2022/Set.js b/node_modules/es-abstract/2022/Set.js new file mode 100644 index 000000000..097149887 --- /dev/null +++ b/node_modules/es-abstract/2022/Set.js @@ -0,0 +1,47 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated +var noThrowOnStrictViolation = (function () { + try { + delete [].length; + return true; + } catch (e) { + return false; + } +}()); + +// https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw + +module.exports = function Set(O, P, V, Throw) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + if (Type(Throw) !== 'Boolean') { + throw new $TypeError('Assertion failed: `Throw` must be a Boolean'); + } + if (Throw) { + O[P] = V; // eslint-disable-line no-param-reassign + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError('Attempted to assign to readonly property.'); + } + return true; + } + try { + O[P] = V; // eslint-disable-line no-param-reassign + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + +}; diff --git a/node_modules/es-abstract/2022/SetFunctionLength.js b/node_modules/es-abstract/2022/SetFunctionLength.js new file mode 100644 index 000000000..8c06b2423 --- /dev/null +++ b/node_modules/es-abstract/2022/SetFunctionLength.js @@ -0,0 +1,31 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var HasOwnProperty = require('./HasOwnProperty'); +var IsExtensible = require('./IsExtensible'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/12.0/#sec-setfunctionlength + +module.exports = function SetFunctionLength(F, length) { + if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) { + throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property'); + } + if (Type(length) !== 'Number') { + throw new $TypeError('Assertion failed: `length` must be a Number'); + } + if (length !== Infinity && (!IsIntegralNumber(length) || length < 0)) { + throw new $TypeError('Assertion failed: `length` must be ∞, or an integer >= 0'); + } + return DefinePropertyOrThrow(F, 'length', { + '[[Configurable]]': true, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); +}; diff --git a/node_modules/es-abstract/2022/SetFunctionName.js b/node_modules/es-abstract/2022/SetFunctionName.js new file mode 100644 index 000000000..03ec2227c --- /dev/null +++ b/node_modules/es-abstract/2022/SetFunctionName.js @@ -0,0 +1,44 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var has = require('has'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var getSymbolDescription = require('get-symbol-description'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsExtensible = require('./IsExtensible'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-setfunctionname + +module.exports = function SetFunctionName(F, name) { + if (typeof F !== 'function') { + throw new $TypeError('Assertion failed: `F` must be a function'); + } + if (!IsExtensible(F) || has(F, 'name')) { + throw new $TypeError('Assertion failed: `F` must be extensible, and must not have a `name` own property'); + } + var nameType = Type(name); + if (nameType !== 'Symbol' && nameType !== 'String') { + throw new $TypeError('Assertion failed: `name` must be a Symbol or a String'); + } + if (nameType === 'Symbol') { + var description = getSymbolDescription(name); + // eslint-disable-next-line no-param-reassign + name = typeof description === 'undefined' ? '' : '[' + description + ']'; + } + if (arguments.length > 2) { + var prefix = arguments[2]; + // eslint-disable-next-line no-param-reassign + name = prefix + ' ' + name; + } + return DefinePropertyOrThrow(F, 'name', { + '[[Value]]': name, + '[[Writable]]': false, + '[[Enumerable]]': false, + '[[Configurable]]': true + }); +}; diff --git a/node_modules/es-abstract/2022/SetIntegrityLevel.js b/node_modules/es-abstract/2022/SetIntegrityLevel.js new file mode 100644 index 000000000..546f3e74f --- /dev/null +++ b/node_modules/es-abstract/2022/SetIntegrityLevel.js @@ -0,0 +1,57 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); +var $gOPD = require('gopd'); +var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true); + +var forEach = require('../helpers/forEach'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-setintegritylevel + +module.exports = function SetIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + if (!$preventExtensions) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.preventExtensions` support'); + } + var status = $preventExtensions(O); + if (!status) { + return false; + } + if (!$gOPN) { + throw new $SyntaxError('SetIntegrityLevel requires native `Object.getOwnPropertyNames` support'); + } + var theKeys = $gOPN(O); + if (level === 'sealed') { + forEach(theKeys, function (k) { + DefinePropertyOrThrow(O, k, { configurable: false }); + }); + } else if (level === 'frozen') { + forEach(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + var desc; + if (IsAccessorDescriptor(ToPropertyDescriptor(currentDesc))) { + desc = { configurable: false }; + } else { + desc = { configurable: false, writable: false }; + } + DefinePropertyOrThrow(O, k, desc); + } + }); + } + return true; +}; diff --git a/node_modules/es-abstract/2022/SortIndexedProperties.js b/node_modules/es-abstract/2022/SortIndexedProperties.js new file mode 100644 index 000000000..3a6b68d93 --- /dev/null +++ b/node_modules/es-abstract/2022/SortIndexedProperties.js @@ -0,0 +1,64 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DeletePropertyOrThrow = require('./DeletePropertyOrThrow'); +var Get = require('./Get'); +var HasProperty = require('./HasProperty'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var Set = require('./Set'); +var ToString = require('./ToString'); +var Type = require('./Type'); + +var isAbstractClosure = require('../helpers/isAbstractClosure'); + +var $push = callBound('Array.prototype.push'); +var $sort = callBound('Array.prototype.sort'); + +// https://ecma-international.org/ecma-262/13.0/#sec-sortindexedproperties + +module.exports = function SortIndexedProperties(obj, len, SortCompare) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: Type(obj) is not Object'); + } + if (!IsIntegralNumber(len) || len < 0) { + throw new $TypeError('Assertion failed: `len` must be an integer >= 0'); + } + if (!isAbstractClosure(SortCompare) || SortCompare.length !== 2) { + throw new $TypeError('Assertion failed: `SortCompare` must be an abstract closure taking 2 arguments'); + } + + var items = []; // step 1 + + var k = 0; // step 2 + + while (k < len) { // step 3 + var Pk = ToString(k); + var kPresent = HasProperty(obj, Pk); + if (kPresent) { + var kValue = Get(obj, Pk); + $push(items, kValue); + } + k += 1; + } + + var itemCount = items.length; // step 4 + + $sort(items, SortCompare); // step 5 + + var j = 0; // step 6 + + while (j < itemCount) { // step 7 + Set(obj, ToString(j), items[j], true); + j += 1; + } + + while (j < len) { // step 8 + DeletePropertyOrThrow(obj, ToString(j)); + j += 1; + } + return obj; // step 9 +}; diff --git a/node_modules/es-abstract/2022/SpeciesConstructor.js b/node_modules/es-abstract/2022/SpeciesConstructor.js new file mode 100644 index 000000000..491eb9b87 --- /dev/null +++ b/node_modules/es-abstract/2022/SpeciesConstructor.js @@ -0,0 +1,32 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $species = GetIntrinsic('%Symbol.species%', true); +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsConstructor = require('./IsConstructor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor + +module.exports = function SpeciesConstructor(O, defaultConstructor) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + var C = O.constructor; + if (typeof C === 'undefined') { + return defaultConstructor; + } + if (Type(C) !== 'Object') { + throw new $TypeError('O.constructor is not an Object'); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError('no constructor found'); +}; diff --git a/node_modules/es-abstract/2022/StringCreate.js b/node_modules/es-abstract/2022/StringCreate.js new file mode 100644 index 000000000..bd02820f7 --- /dev/null +++ b/node_modules/es-abstract/2022/StringCreate.js @@ -0,0 +1,40 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $StringPrototype = GetIntrinsic('%String.prototype%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefinePropertyOrThrow = require('./DefinePropertyOrThrow'); +var Type = require('./Type'); + +var setProto = require('../helpers/setProto'); + +// https://262.ecma-international.org/6.0/#sec-stringcreate + +module.exports = function StringCreate(value, prototype) { + if (Type(value) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a String'); + } + + var S = $Object(value); + if (prototype !== $StringPrototype) { + if (setProto) { + setProto(S, prototype); + } else { + throw new $SyntaxError('StringCreate: a `proto` argument that is not `String.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); + } + } + + var length = value.length; + DefinePropertyOrThrow(S, 'length', { + '[[Configurable]]': false, + '[[Enumerable]]': false, + '[[Value]]': length, + '[[Writable]]': false + }); + + return S; +}; diff --git a/node_modules/es-abstract/2022/StringGetOwnProperty.js b/node_modules/es-abstract/2022/StringGetOwnProperty.js new file mode 100644 index 000000000..ecffb0b77 --- /dev/null +++ b/node_modules/es-abstract/2022/StringGetOwnProperty.js @@ -0,0 +1,48 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $charAt = callBound('String.prototype.charAt'); +var $stringToString = callBound('String.prototype.toString'); + +var CanonicalNumericIndexString = require('./CanonicalNumericIndexString'); +var IsIntegralNumber = require('./IsIntegralNumber'); +var IsPropertyKey = require('./IsPropertyKey'); +var Type = require('./Type'); + +var isNegativeZero = require('is-negative-zero'); + +// https://ecma-international.org/ecma-262/12.0/#sec-stringgetownproperty + +module.exports = function StringGetOwnProperty(S, P) { + var str; + if (Type(S) === 'Object') { + try { + str = $stringToString(S); + } catch (e) { /**/ } + } + if (Type(str) !== 'String') { + throw new $TypeError('Assertion failed: `S` must be a boxed string object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); + } + if (Type(P) !== 'String') { + return void undefined; + } + var index = CanonicalNumericIndexString(P); + var len = str.length; + if (typeof index === 'undefined' || !IsIntegralNumber(index) || isNegativeZero(index) || index < 0 || len <= index) { + return void undefined; + } + var resultStr = $charAt(S, index); + return { + '[[Configurable]]': false, + '[[Enumerable]]': true, + '[[Value]]': resultStr, + '[[Writable]]': false + }; +}; diff --git a/node_modules/es-abstract/2022/StringIndexOf.js b/node_modules/es-abstract/2022/StringIndexOf.js new file mode 100644 index 000000000..371d5aa38 --- /dev/null +++ b/node_modules/es-abstract/2022/StringIndexOf.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +var $slice = callBound('String.prototype.slice'); + +// https://ecma-international.org/ecma-262/12.0/#sec-stringindexof + +module.exports = function StringIndexOf(string, searchValue, fromIndex) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + if (Type(searchValue) !== 'String') { + throw new $TypeError('Assertion failed: `searchValue` must be a String'); + } + if (!IsIntegralNumber(fromIndex) || fromIndex < 0) { + throw new $TypeError('Assertion failed: `fromIndex` must be a non-negative integer'); + } + + var len = string.length; + if (searchValue === '' && fromIndex <= len) { + return fromIndex; + } + + var searchLen = searchValue.length; + for (var i = fromIndex; i <= (len - searchLen); i += 1) { + var candidate = $slice(string, i, i + searchLen); + if (candidate === searchValue) { + return i; + } + } + return -1; +}; diff --git a/node_modules/es-abstract/2022/StringPad.js b/node_modules/es-abstract/2022/StringPad.js new file mode 100644 index 000000000..cdf69001b --- /dev/null +++ b/node_modules/es-abstract/2022/StringPad.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var ToLength = require('./ToLength'); +var ToString = require('./ToString'); + +var $strSlice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/11.0/#sec-stringpad + +module.exports = function StringPad(O, maxLength, fillString, placement) { + if (placement !== 'start' && placement !== 'end') { + throw new $TypeError('Assertion failed: `placement` must be "start" or "end"'); + } + var S = ToString(O); + var intMaxLength = ToLength(maxLength); + var stringLength = S.length; + if (intMaxLength <= stringLength) { + return S; + } + var filler = typeof fillString === 'undefined' ? ' ' : ToString(fillString); + if (filler === '') { + return S; + } + var fillLen = intMaxLength - stringLength; + + // the String value consisting of repeated concatenations of filler truncated to length fillLen. + var truncatedStringFiller = ''; + while (truncatedStringFiller.length < fillLen) { + truncatedStringFiller += filler; + } + truncatedStringFiller = $strSlice(truncatedStringFiller, 0, fillLen); + + if (placement === 'start') { + return truncatedStringFiller + S; + } + return S + truncatedStringFiller; +}; diff --git a/node_modules/es-abstract/2022/StringToBigInt.js b/node_modules/es-abstract/2022/StringToBigInt.js new file mode 100644 index 000000000..bb113b4c6 --- /dev/null +++ b/node_modules/es-abstract/2022/StringToBigInt.js @@ -0,0 +1,23 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +// https://262.ecma-international.org/14.0/#sec-stringtobigint + +module.exports = function StringToBigInt(argument) { + if (typeof argument !== 'string') { + throw new $TypeError('`argument` must be a string'); + } + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + try { + return $BigInt(argument); + } catch (e) { + return void undefined; + } +}; diff --git a/node_modules/es-abstract/2022/StringToCodePoints.js b/node_modules/es-abstract/2022/StringToCodePoints.js new file mode 100644 index 000000000..336bd06fb --- /dev/null +++ b/node_modules/es-abstract/2022/StringToCodePoints.js @@ -0,0 +1,29 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $push = callBound('Array.prototype.push'); + +var CodePointAt = require('./CodePointAt'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/12.0/#sec-stringtocodepoints + +module.exports = function StringToCodePoints(string) { + if (Type(string) !== 'String') { + throw new $TypeError('Assertion failed: `string` must be a String'); + } + var codePoints = []; + var size = string.length; + var position = 0; + while (position < size) { + var cp = CodePointAt(string, position); + $push(codePoints, cp['[[CodePoint]]']); + position += cp['[[CodeUnitCount]]']; + } + return codePoints; +}; diff --git a/node_modules/es-abstract/2022/StringToNumber.js b/node_modules/es-abstract/2022/StringToNumber.js new file mode 100644 index 000000000..50ab5e6d1 --- /dev/null +++ b/node_modules/es-abstract/2022/StringToNumber.js @@ -0,0 +1,56 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = require('call-bind/callBound'); +var regexTester = require('safe-regex-test'); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +// whitespace from: https://es5.github.io/#x15.5.4.20 +// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324 +var ws = [ + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003', + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028', + '\u2029\uFEFF' +].join(''); +var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g'); +var $replace = callBound('String.prototype.replace'); +var $trim = function (value) { + return $replace(value, trimRegex, ''); +}; + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/13.0/#sec-stringtonumber + +module.exports = function StringToNumber(argument) { + if (Type(argument) !== 'String') { + throw new $TypeError('Assertion failed: `argument` is not a String'); + } + if (isBinary(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 2)); + } + if (isOctal(argument)) { + return $Number($parseInteger($strSlice(argument, 2), 8)); + } + if (hasNonWS(argument) || isInvalidHexLiteral(argument)) { + return NaN; + } + var trimmed = $trim(argument); + if (trimmed !== argument) { + return StringToNumber(trimmed); + } + return $Number(argument); +}; diff --git a/node_modules/es-abstract/2022/SymbolDescriptiveString.js b/node_modules/es-abstract/2022/SymbolDescriptiveString.js new file mode 100644 index 000000000..1efd1316b --- /dev/null +++ b/node_modules/es-abstract/2022/SymbolDescriptiveString.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $SymbolToString = callBound('Symbol.prototype.toString', true); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-symboldescriptivestring + +module.exports = function SymbolDescriptiveString(sym) { + if (Type(sym) !== 'Symbol') { + throw new $TypeError('Assertion failed: `sym` must be a Symbol'); + } + return $SymbolToString(sym); +}; diff --git a/node_modules/es-abstract/2022/TestIntegrityLevel.js b/node_modules/es-abstract/2022/TestIntegrityLevel.js new file mode 100644 index 000000000..7f95a6e1d --- /dev/null +++ b/node_modules/es-abstract/2022/TestIntegrityLevel.js @@ -0,0 +1,42 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = require('gopd'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var every = require('../helpers/every'); +var OwnPropertyKeys = require('../helpers/OwnPropertyKeys'); + +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsExtensible = require('./IsExtensible'); +var ToPropertyDescriptor = require('./ToPropertyDescriptor'); +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-testintegritylevel + +module.exports = function TestIntegrityLevel(O, level) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + if (level !== 'sealed' && level !== 'frozen') { + throw new $TypeError('Assertion failed: `level` must be `"sealed"` or `"frozen"`'); + } + var status = IsExtensible(O); + if (status) { + return false; + } + var theKeys = OwnPropertyKeys(O); + return theKeys.length === 0 || every(theKeys, function (k) { + var currentDesc = $gOPD(O, k); + if (typeof currentDesc !== 'undefined') { + if (currentDesc.configurable) { + return false; + } + if (level === 'frozen' && IsDataDescriptor(ToPropertyDescriptor(currentDesc)) && currentDesc.writable) { + return false; + } + } + return true; + }); +}; diff --git a/node_modules/es-abstract/2022/ThrowCompletion.js b/node_modules/es-abstract/2022/ThrowCompletion.js new file mode 100644 index 000000000..b7d388a35 --- /dev/null +++ b/node_modules/es-abstract/2022/ThrowCompletion.js @@ -0,0 +1,9 @@ +'use strict'; + +var CompletionRecord = require('./CompletionRecord'); + +// https://262.ecma-international.org/9.0/#sec-throwcompletion + +module.exports = function ThrowCompletion(argument) { + return new CompletionRecord('throw', argument); +}; diff --git a/node_modules/es-abstract/2022/TimeClip.js b/node_modules/es-abstract/2022/TimeClip.js new file mode 100644 index 000000000..e416cab4b --- /dev/null +++ b/node_modules/es-abstract/2022/TimeClip.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); +var $Number = GetIntrinsic('%Number%'); + +var $isFinite = require('../helpers/isFinite'); + +var abs = require('./abs'); +var ToNumber = require('./ToNumber'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.14 + +module.exports = function TimeClip(time) { + if (!$isFinite(time) || abs(time) > 8.64e15) { + return NaN; + } + return $Number(new $Date(ToNumber(time))); +}; + diff --git a/node_modules/es-abstract/2022/TimeFromYear.js b/node_modules/es-abstract/2022/TimeFromYear.js new file mode 100644 index 000000000..f3518a41a --- /dev/null +++ b/node_modules/es-abstract/2022/TimeFromYear.js @@ -0,0 +1,11 @@ +'use strict'; + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +var DayFromYear = require('./DayFromYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function TimeFromYear(y) { + return msPerDay * DayFromYear(y); +}; diff --git a/node_modules/es-abstract/2022/TimeString.js b/node_modules/es-abstract/2022/TimeString.js new file mode 100644 index 000000000..051c4728e --- /dev/null +++ b/node_modules/es-abstract/2022/TimeString.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var $isNaN = require('../helpers/isNaN'); +var padTimeComponent = require('../helpers/padTimeComponent'); + +var HourFromTime = require('./HourFromTime'); +var MinFromTime = require('./MinFromTime'); +var SecFromTime = require('./SecFromTime'); +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-timestring + +module.exports = function TimeString(tv) { + if (Type(tv) !== 'Number' || $isNaN(tv)) { + throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); + } + var hour = HourFromTime(tv); + var minute = MinFromTime(tv); + var second = SecFromTime(tv); + return padTimeComponent(hour) + ':' + padTimeComponent(minute) + ':' + padTimeComponent(second) + '\x20GMT'; +}; diff --git a/node_modules/es-abstract/2022/TimeWithinDay.js b/node_modules/es-abstract/2022/TimeWithinDay.js new file mode 100644 index 000000000..2bba83386 --- /dev/null +++ b/node_modules/es-abstract/2022/TimeWithinDay.js @@ -0,0 +1,12 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerDay = require('../helpers/timeConstants').msPerDay; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.2 + +module.exports = function TimeWithinDay(t) { + return modulo(t, msPerDay); +}; + diff --git a/node_modules/es-abstract/2022/ToBigInt.js b/node_modules/es-abstract/2022/ToBigInt.js new file mode 100644 index 000000000..aa24d7b71 --- /dev/null +++ b/node_modules/es-abstract/2022/ToBigInt.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $asIntN = GetIntrinsic('%BigInt.asIntN%', true); +var $Number = GetIntrinsic('%Number%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var ToPrimitive = require('./ToPrimitive'); + +// https://262.ecma-international.org/11.0/#sec-tobigint + +module.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError('BigInts are not supported in this environment'); + } + + var prim = ToPrimitive(argument, $Number); + + if (typeof prim === 'number') { + return $asIntN(0, prim); + } + return $BigInt(prim); +}; diff --git a/node_modules/es-abstract/2022/ToBigInt64.js b/node_modules/es-abstract/2022/ToBigInt64.js new file mode 100644 index 000000000..65c1c55d9 --- /dev/null +++ b/node_modules/es-abstract/2022/ToBigInt64.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**63), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyThree = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 31))); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobigint64 + +module.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; +}; diff --git a/node_modules/es-abstract/2022/ToBigUint64.js b/node_modules/es-abstract/2022/ToBigUint64.js new file mode 100644 index 000000000..ff68236a8 --- /dev/null +++ b/node_modules/es-abstract/2022/ToBigUint64.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $BigInt = GetIntrinsic('%BigInt%', true); +var $pow = GetIntrinsic('%Math.pow%'); + +var ToBigInt = require('./ToBigInt'); +var BigIntRemainder = require('./BigInt/remainder'); + +var modBigInt = require('../helpers/modBigInt'); + +// BigInt(2**64), but node v10.4-v10.8 have a bug where you can't `BigInt(x)` anything larger than MAX_SAFE_INTEGER +var twoSixtyFour = $BigInt && (BigInt($pow(2, 32)) * BigInt($pow(2, 32))); + +// https://262.ecma-international.org/11.0/#sec-tobiguint64 + +module.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; +}; diff --git a/node_modules/es-abstract/2022/ToBoolean.js b/node_modules/es-abstract/2022/ToBoolean.js new file mode 100644 index 000000000..466404bf9 --- /dev/null +++ b/node_modules/es-abstract/2022/ToBoolean.js @@ -0,0 +1,5 @@ +'use strict'; + +// http://262.ecma-international.org/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; diff --git a/node_modules/es-abstract/2022/ToDateString.js b/node_modules/es-abstract/2022/ToDateString.js new file mode 100644 index 000000000..e636a9ba6 --- /dev/null +++ b/node_modules/es-abstract/2022/ToDateString.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Date = GetIntrinsic('%Date%'); + +var $isNaN = require('../helpers/isNaN'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-todatestring + +module.exports = function ToDateString(tv) { + if (Type(tv) !== 'Number') { + throw new $TypeError('Assertion failed: `tv` must be a Number'); + } + if ($isNaN(tv)) { + return 'Invalid Date'; + } + return $Date(tv); +}; diff --git a/node_modules/es-abstract/2022/ToIndex.js b/node_modules/es-abstract/2022/ToIndex.js new file mode 100644 index 000000000..cc747e225 --- /dev/null +++ b/node_modules/es-abstract/2022/ToIndex.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); +var ToLength = require('./ToLength'); +var SameValue = require('./SameValue'); + +// https://www.ecma-international.org/ecma-262/8.0/#sec-toindex + +module.exports = function ToIndex(value) { + if (typeof value === 'undefined') { + return 0; + } + var integerIndex = ToIntegerOrInfinity(value); + if (integerIndex < 0) { + throw new $RangeError('index must be >= 0'); + } + var index = ToLength(integerIndex); + if (!SameValue(integerIndex, index)) { + throw new $RangeError('index must be >= 0 and < 2 ** 53 - 1'); + } + return index; +}; diff --git a/node_modules/es-abstract/2022/ToInt16.js b/node_modules/es-abstract/2022/ToInt16.js new file mode 100644 index 000000000..cb8e7934b --- /dev/null +++ b/node_modules/es-abstract/2022/ToInt16.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint16 = require('./ToUint16'); + +// https://ecma-international.org/ecma-262/6.0/#sec-toint16 + +module.exports = function ToInt16(argument) { + var int16bit = ToUint16(argument); + return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; +}; diff --git a/node_modules/es-abstract/2022/ToInt32.js b/node_modules/es-abstract/2022/ToInt32.js new file mode 100644 index 000000000..b879ccc47 --- /dev/null +++ b/node_modules/es-abstract/2022/ToInt32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.5 + +module.exports = function ToInt32(x) { + return ToNumber(x) >> 0; +}; diff --git a/node_modules/es-abstract/2022/ToInt8.js b/node_modules/es-abstract/2022/ToInt8.js new file mode 100644 index 000000000..bc452d826 --- /dev/null +++ b/node_modules/es-abstract/2022/ToInt8.js @@ -0,0 +1,10 @@ +'use strict'; + +var ToUint8 = require('./ToUint8'); + +// https://ecma-international.org/ecma-262/6.0/#sec-toint8 + +module.exports = function ToInt8(argument) { + var int8bit = ToUint8(argument); + return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; +}; diff --git a/node_modules/es-abstract/2022/ToIntegerOrInfinity.js b/node_modules/es-abstract/2022/ToIntegerOrInfinity.js new file mode 100644 index 000000000..5f55e1ea0 --- /dev/null +++ b/node_modules/es-abstract/2022/ToIntegerOrInfinity.js @@ -0,0 +1,20 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// https://262.ecma-international.org/12.0/#sec-tointegerorinfinity + +module.exports = function ToIntegerOrInfinity(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0) { return 0; } + if (!$isFinite(number)) { return number; } + var integer = floor(abs(number)); + if (integer === 0) { return 0; } + return $sign(number) * integer; +}; diff --git a/node_modules/es-abstract/2022/ToLength.js b/node_modules/es-abstract/2022/ToLength.js new file mode 100644 index 000000000..0468c3e71 --- /dev/null +++ b/node_modules/es-abstract/2022/ToLength.js @@ -0,0 +1,12 @@ +'use strict'; + +var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger'); + +var ToIntegerOrInfinity = require('./ToIntegerOrInfinity'); + +module.exports = function ToLength(argument) { + var len = ToIntegerOrInfinity(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; diff --git a/node_modules/es-abstract/2022/ToNumber.js b/node_modules/es-abstract/2022/ToNumber.js new file mode 100644 index 000000000..ebee32622 --- /dev/null +++ b/node_modules/es-abstract/2022/ToNumber.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var isPrimitive = require('../helpers/isPrimitive'); + +var ToPrimitive = require('./ToPrimitive'); +var StringToNumber = require('./StringToNumber'); + +// https://ecma-international.org/ecma-262/13.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'bigint') { + throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); + } + if (typeof value === 'string') { + return StringToNumber(value); + } + return $Number(value); +}; diff --git a/node_modules/es-abstract/2022/ToNumeric.js b/node_modules/es-abstract/2022/ToNumeric.js new file mode 100644 index 000000000..c18776094 --- /dev/null +++ b/node_modules/es-abstract/2022/ToNumeric.js @@ -0,0 +1,21 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Number = GetIntrinsic('%Number%'); + +var isPrimitive = require('../helpers/isPrimitive'); + +var ToPrimitive = require('./ToPrimitive'); +var ToNumber = require('./ToNumber'); +var Type = require('./Type'); + +// https://262.ecma-international.org/6.0/#sec-tonumber + +module.exports = function ToNumeric(argument) { + var primValue = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (Type(primValue) === 'BigInt') { + return primValue; + } + return ToNumber(primValue); +}; diff --git a/node_modules/es-abstract/2022/ToObject.js b/node_modules/es-abstract/2022/ToObject.js new file mode 100644 index 000000000..cb26bac06 --- /dev/null +++ b/node_modules/es-abstract/2022/ToObject.js @@ -0,0 +1,14 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +// https://ecma-international.org/ecma-262/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-abstract/2022/ToPrimitive.js b/node_modules/es-abstract/2022/ToPrimitive.js new file mode 100644 index 000000000..0fbe9b807 --- /dev/null +++ b/node_modules/es-abstract/2022/ToPrimitive.js @@ -0,0 +1,12 @@ +'use strict'; + +var toPrimitive = require('es-to-primitive/es2015'); + +// https://ecma-international.org/ecma-262/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; diff --git a/node_modules/es-abstract/2022/ToPropertyDescriptor.js b/node_modules/es-abstract/2022/ToPropertyDescriptor.js new file mode 100644 index 000000000..53db87450 --- /dev/null +++ b/node_modules/es-abstract/2022/ToPropertyDescriptor.js @@ -0,0 +1,52 @@ +'use strict'; + +var has = require('has'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Type = require('./Type'); +var ToBoolean = require('./ToBoolean'); +var IsCallable = require('./IsCallable'); + +// https://262.ecma-international.org/5.1/#sec-8.10.5 + +module.exports = function ToPropertyDescriptor(Obj) { + if (Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (has(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); + } + if (has(Obj, 'configurable')) { + desc['[[Configurable]]'] = ToBoolean(Obj.configurable); + } + if (has(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (has(Obj, 'writable')) { + desc['[[Writable]]'] = ToBoolean(Obj.writable); + } + if (has(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !IsCallable(getter)) { + throw new $TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (has(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; +}; diff --git a/node_modules/es-abstract/2022/ToPropertyKey.js b/node_modules/es-abstract/2022/ToPropertyKey.js new file mode 100644 index 000000000..fc1bf7d86 --- /dev/null +++ b/node_modules/es-abstract/2022/ToPropertyKey.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); + +var ToPrimitive = require('./ToPrimitive'); +var ToString = require('./ToString'); + +// https://ecma-international.org/ecma-262/6.0/#sec-topropertykey + +module.exports = function ToPropertyKey(argument) { + var key = ToPrimitive(argument, $String); + return typeof key === 'symbol' ? key : ToString(key); +}; diff --git a/node_modules/es-abstract/2022/ToString.js b/node_modules/es-abstract/2022/ToString.js new file mode 100644 index 000000000..4d494e1e2 --- /dev/null +++ b/node_modules/es-abstract/2022/ToString.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://ecma-international.org/ecma-262/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; diff --git a/node_modules/es-abstract/2022/ToUint16.js b/node_modules/es-abstract/2022/ToUint16.js new file mode 100644 index 000000000..633ca8464 --- /dev/null +++ b/node_modules/es-abstract/2022/ToUint16.js @@ -0,0 +1,19 @@ +'use strict'; + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +// http://262.ecma-international.org/5.1/#sec-9.7 + +module.exports = function ToUint16(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x10000); +}; diff --git a/node_modules/es-abstract/2022/ToUint32.js b/node_modules/es-abstract/2022/ToUint32.js new file mode 100644 index 000000000..2a8e9dd6a --- /dev/null +++ b/node_modules/es-abstract/2022/ToUint32.js @@ -0,0 +1,9 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +// http://262.ecma-international.org/5.1/#sec-9.6 + +module.exports = function ToUint32(x) { + return ToNumber(x) >>> 0; +}; diff --git a/node_modules/es-abstract/2022/ToUint8.js b/node_modules/es-abstract/2022/ToUint8.js new file mode 100644 index 000000000..2dfd97cb3 --- /dev/null +++ b/node_modules/es-abstract/2022/ToUint8.js @@ -0,0 +1,20 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); + +var $isNaN = require('../helpers/isNaN'); +var $isFinite = require('../helpers/isFinite'); +var $sign = require('../helpers/sign'); + +var abs = require('./abs'); +var floor = require('./floor'); +var modulo = require('./modulo'); + +// https://ecma-international.org/ecma-262/6.0/#sec-touint8 + +module.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = $sign(number) * floor(abs(number)); + return modulo(posInt, 0x100); +}; diff --git a/node_modules/es-abstract/2022/ToUint8Clamp.js b/node_modules/es-abstract/2022/ToUint8Clamp.js new file mode 100644 index 000000000..b0b8ce8ed --- /dev/null +++ b/node_modules/es-abstract/2022/ToUint8Clamp.js @@ -0,0 +1,19 @@ +'use strict'; + +var ToNumber = require('./ToNumber'); +var floor = require('./floor'); + +var $isNaN = require('../helpers/isNaN'); + +// https://ecma-international.org/ecma-262/6.0/#sec-touint8clamp + +module.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number) || number <= 0) { return 0; } + if (number >= 0xFF) { return 0xFF; } + var f = floor(argument); + if (f + 0.5 < number) { return f + 1; } + if (number < f + 0.5) { return f; } + if (f % 2 !== 0) { return f + 1; } + return f; +}; diff --git a/node_modules/es-abstract/2022/ToZeroPaddedDecimalString.js b/node_modules/es-abstract/2022/ToZeroPaddedDecimalString.js new file mode 100644 index 000000000..cc141fd94 --- /dev/null +++ b/node_modules/es-abstract/2022/ToZeroPaddedDecimalString.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $String = GetIntrinsic('%String%'); +var $RangeError = GetIntrinsic('%RangeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var StringPad = require('./StringPad'); + +// https://ecma-international.org/ecma-262/13.0/#sec-tozeropaddeddecimalstring + +module.exports = function ToZeroPaddedDecimalString(n, minLength) { + if (!IsIntegralNumber(n) || n < 0) { + throw new $RangeError('Assertion failed: `q` must be a non-negative integer'); + } + var S = $String(n); + return StringPad(S, minLength, '0', 'start'); +}; diff --git a/node_modules/es-abstract/2022/TrimString.js b/node_modules/es-abstract/2022/TrimString.js new file mode 100644 index 000000000..113dcf82b --- /dev/null +++ b/node_modules/es-abstract/2022/TrimString.js @@ -0,0 +1,29 @@ +'use strict'; + +var trimStart = require('string.prototype.trimstart'); +var trimEnd = require('string.prototype.trimend'); + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var RequireObjectCoercible = require('./RequireObjectCoercible'); +var ToString = require('./ToString'); + +// https://262.ecma-international.org/10.0/#sec-trimstring + +module.exports = function TrimString(string, where) { + var str = RequireObjectCoercible(string); + var S = ToString(str); + var T; + if (where === 'start') { + T = trimStart(S); + } else if (where === 'end') { + T = trimEnd(S); + } else if (where === 'start+end') { + T = trimStart(trimEnd(S)); + } else { + throw new $TypeError('Assertion failed: invalid `where` value; must be "start", "end", or "start+end"'); + } + return T; +}; diff --git a/node_modules/es-abstract/2022/Type.js b/node_modules/es-abstract/2022/Type.js new file mode 100644 index 000000000..555ca74ea --- /dev/null +++ b/node_modules/es-abstract/2022/Type.js @@ -0,0 +1,15 @@ +'use strict'; + +var ES5Type = require('../5/Type'); + +// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; + } + return ES5Type(x); +}; diff --git a/node_modules/es-abstract/2022/TypedArrayElementSize.js b/node_modules/es-abstract/2022/TypedArrayElementSize.js new file mode 100644 index 000000000..fe9536553 --- /dev/null +++ b/node_modules/es-abstract/2022/TypedArrayElementSize.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/13.0/#sec-typedarrayelementsize + +var table71 = { + __proto__: null, + $Int8Array: 1, + $Uint8Array: 1, + $Uint8ClampedArray: 1, + $Int16Array: 2, + $Uint16Array: 2, + $Int32Array: 4, + $Uint32Array: 4, + $BigInt64Array: 8, + $BigUint64Array: 8, + $Float32Array: 4, + $Float64Array: 8 +}; + +module.exports = function TypedArrayElementSize(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var size = table71['$' + type]; + if (!IsIntegralNumber(size) || size < 0) { + throw new $TypeError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return size; +}; diff --git a/node_modules/es-abstract/2022/TypedArrayElementType.js b/node_modules/es-abstract/2022/TypedArrayElementType.js new file mode 100644 index 000000000..919963e6b --- /dev/null +++ b/node_modules/es-abstract/2022/TypedArrayElementType.js @@ -0,0 +1,37 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/13.0/#sec-typedarrayelementtype + +var table71 = { + __proto__: null, + $Int8Array: 'Int8', + $Uint8Array: 'Uint8', + $Uint8ClampedArray: 'Uint8C', + $Int16Array: 'Int16', + $Uint16Array: 'Uint16', + $Int32Array: 'Int32', + $Uint32Array: 'Uint32', + $BigInt64Array: 'BigInt64', + $BigUint64Array: 'BigUint64', + $Float32Array: 'Float32', + $Float64Array: 'Float64' +}; + +module.exports = function TypedArrayElementType(O) { + var type = whichTypedArray(O); + if (type === false) { + throw new $TypeError('Assertion failed: `O` must be a TypedArray'); + } + var result = table71['$' + type]; + if (typeof result !== 'string') { + throw new $TypeError('Assertion failed: Unknown TypedArray type `' + type + '`'); + } + + return result; +}; diff --git a/node_modules/es-abstract/2022/UTF16EncodeCodePoint.js b/node_modules/es-abstract/2022/UTF16EncodeCodePoint.js new file mode 100644 index 000000000..0c7fb11e0 --- /dev/null +++ b/node_modules/es-abstract/2022/UTF16EncodeCodePoint.js @@ -0,0 +1,25 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var floor = require('./floor'); +var modulo = require('./modulo'); + +var isCodePoint = require('../helpers/isCodePoint'); + +// https://ecma-international.org/ecma-262/12.0/#sec-utf16encoding + +module.exports = function UTF16EncodeCodePoint(cp) { + if (!isCodePoint(cp)) { + throw new $TypeError('Assertion failed: `cp` must be >= 0 and <= 0x10FFFF'); + } + if (cp <= 65535) { + return $fromCharCode(cp); + } + var cu1 = $fromCharCode(floor((cp - 65536) / 1024) + 0xD800); + var cu2 = $fromCharCode(modulo(cp - 65536, 1024) + 0xDC00); + return cu1 + cu2; +}; diff --git a/node_modules/es-abstract/2022/UTF16SurrogatePairToCodePoint.js b/node_modules/es-abstract/2022/UTF16SurrogatePairToCodePoint.js new file mode 100644 index 000000000..6a247a239 --- /dev/null +++ b/node_modules/es-abstract/2022/UTF16SurrogatePairToCodePoint.js @@ -0,0 +1,19 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $fromCharCode = GetIntrinsic('%String.fromCharCode%'); + +var isLeadingSurrogate = require('../helpers/isLeadingSurrogate'); +var isTrailingSurrogate = require('../helpers/isTrailingSurrogate'); + +// https://tc39.es/ecma262/2020/#sec-utf16decodesurrogatepair + +module.exports = function UTF16SurrogatePairToCodePoint(lead, trail) { + if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) { + throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code'); + } + // var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return $fromCharCode(lead) + $fromCharCode(trail); +}; diff --git a/node_modules/es-abstract/2022/UnicodeEscape.js b/node_modules/es-abstract/2022/UnicodeEscape.js new file mode 100644 index 000000000..b708c90df --- /dev/null +++ b/node_modules/es-abstract/2022/UnicodeEscape.js @@ -0,0 +1,27 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +var $charCodeAt = callBound('String.prototype.charCodeAt'); +var $numberToString = callBound('Number.prototype.toString'); +var $toLowerCase = callBound('String.prototype.toLowerCase'); + +var StringPad = require('./StringPad'); + +// https://262.ecma-international.org/11.0/#sec-unicodeescape + +module.exports = function UnicodeEscape(C) { + if (typeof C !== 'string' || C.length !== 1) { + throw new $TypeError('Assertion failed: `C` must be a single code unit'); + } + var n = $charCodeAt(C, 0); + if (n > 0xFFFF) { + throw new $TypeError('`Assertion failed: numeric value of `C` must be <= 0xFFFF'); + } + + return '\\u' + StringPad($toLowerCase($numberToString(n, 16)), 4, '0', 'start'); +}; diff --git a/node_modules/es-abstract/2022/ValidateAndApplyPropertyDescriptor.js b/node_modules/es-abstract/2022/ValidateAndApplyPropertyDescriptor.js new file mode 100644 index 000000000..669d6b592 --- /dev/null +++ b/node_modules/es-abstract/2022/ValidateAndApplyPropertyDescriptor.js @@ -0,0 +1,177 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var DefineOwnProperty = require('../helpers/DefineOwnProperty'); +var isFullyPopulatedPropertyDescriptor = require('../helpers/isFullyPopulatedPropertyDescriptor'); +var isPropertyDescriptor = require('../helpers/isPropertyDescriptor'); + +var FromPropertyDescriptor = require('./FromPropertyDescriptor'); +var IsAccessorDescriptor = require('./IsAccessorDescriptor'); +var IsDataDescriptor = require('./IsDataDescriptor'); +var IsGenericDescriptor = require('./IsGenericDescriptor'); +var IsPropertyKey = require('./IsPropertyKey'); +var SameValue = require('./SameValue'); +var Type = require('./Type'); + +// https://262.ecma-international.org/13.0/#sec-validateandapplypropertydescriptor + +// see https://github.com/tc39/ecma262/pull/2468 for ES2022 changes + +// eslint-disable-next-line max-lines-per-function, max-statements, max-params +module.exports = function ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current) { + var oType = Type(O); + if (oType !== 'Undefined' && oType !== 'Object') { + throw new $TypeError('Assertion failed: O must be undefined or an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: P must be a Property Key'); + } + if (Type(extensible) !== 'Boolean') { + throw new $TypeError('Assertion failed: extensible must be a Boolean'); + } + if (!isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, Desc)) { + throw new $TypeError('Assertion failed: Desc must be a Property Descriptor'); + } + if (Type(current) !== 'Undefined' && !isPropertyDescriptor({ + Type: Type, + IsDataDescriptor: IsDataDescriptor, + IsAccessorDescriptor: IsAccessorDescriptor + }, current)) { + throw new $TypeError('Assertion failed: current must be a Property Descriptor, or undefined'); + } + + if (Type(current) === 'Undefined') { // step 2 + if (!extensible) { + return false; // step 2.a + } + if (oType === 'Undefined') { + return true; // step 2.b + } + if (IsAccessorDescriptor(Desc)) { // step 2.c + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + // step 2.d + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': !!Desc['[[Configurable]]'], + '[[Enumerable]]': !!Desc['[[Enumerable]]'], + '[[Value]]': Desc['[[Value]]'], + '[[Writable]]': !!Desc['[[Writable]]'] + } + ); + } + + // 3. Assert: current is a fully populated Property Descriptor. + if (!isFullyPopulatedPropertyDescriptor({ + IsAccessorDescriptor: IsAccessorDescriptor, + IsDataDescriptor: IsDataDescriptor + }, current)) { + throw new $TypeError('`current`, when present, must be a fully populated and valid Property Descriptor'); + } + + // 4. If every field in Desc is absent, return true. + // this can't really match the assertion that it's a Property Descriptor in our JS implementation + + // 5. If current.[[Configurable]] is false, then + if (!current['[[Configurable]]']) { + if ('[[Configurable]]' in Desc && Desc['[[Configurable]]']) { + // step 5.a + return false; + } + if ('[[Enumerable]]' in Desc && !SameValue(Desc['[[Enumerable]]'], current['[[Enumerable]]'])) { + // step 5.b + return false; + } + if (!IsGenericDescriptor(Desc) && !SameValue(IsAccessorDescriptor(Desc), IsAccessorDescriptor(current))) { + // step 5.c + return false; + } + if (IsAccessorDescriptor(current)) { // step 5.d + if ('[[Get]]' in Desc && !SameValue(Desc['[[Get]]'], current['[[Get]]'])) { + return false; + } + if ('[[Set]]' in Desc && !SameValue(Desc['[[Set]]'], current['[[Set]]'])) { + return false; + } + } else if (!current['[[Writable]]']) { // step 5.e + if ('[[Writable]]' in Desc && Desc['[[Writable]]']) { + return false; + } + if ('[[Value]]' in Desc && !SameValue(Desc['[[Value]]'], current['[[Value]]'])) { + return false; + } + } + } + + // 6. If O is not undefined, then + if (oType !== 'Undefined') { + var configurable; + var enumerable; + if (IsDataDescriptor(current) && IsAccessorDescriptor(Desc)) { // step 6.a + configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]']; + enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]']; + // Replace the property named P of object O with an accessor property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value. + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': !!configurable, + '[[Enumerable]]': !!enumerable, + '[[Get]]': ('[[Get]]' in Desc ? Desc : current)['[[Get]]'], + '[[Set]]': ('[[Set]]' in Desc ? Desc : current)['[[Set]]'] + } + ); + } else if (IsAccessorDescriptor(current) && IsDataDescriptor(Desc)) { + configurable = ('[[Configurable]]' in Desc ? Desc : current)['[[Configurable]]']; + enumerable = ('[[Enumerable]]' in Desc ? Desc : current)['[[Enumerable]]']; + // i. Replace the property named P of object O with a data property having [[Configurable]] and [[Enumerable]] attributes as described by current and each other attribute set to its default value. + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + { + '[[Configurable]]': !!configurable, + '[[Enumerable]]': !!enumerable, + '[[Value]]': ('[[Value]]' in Desc ? Desc : current)['[[Value]]'], + '[[Writable]]': !!('[[Writable]]' in Desc ? Desc : current)['[[Writable]]'] + } + ); + } + + // For each field of Desc that is present, set the corresponding attribute of the property named P of object O to the value of the field. + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + } + + return true; // step 7 +}; diff --git a/node_modules/es-abstract/2022/ValidateAtomicAccess.js b/node_modules/es-abstract/2022/ValidateAtomicAccess.js new file mode 100644 index 000000000..76a9d151d --- /dev/null +++ b/node_modules/es-abstract/2022/ValidateAtomicAccess.js @@ -0,0 +1,46 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $RangeError = GetIntrinsic('%RangeError%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); + +// node 0.10 doesn't have a prototype method +var $byteOffset = callBound('%TypedArray.prototype.byteOffset%', true) || function (x) { return x.byteOffset; }; + +var ToIndex = require('./ToIndex'); +var TypedArrayElementSize = require('./TypedArrayElementSize'); + +var isTypedArray = require('is-typed-array'); +var typedArrayLength = require('typed-array-length'); + +// https://262.ecma-international.org/13.0/#sec-validateatomicaccess + +module.exports = function ValidateAtomicAccess(typedArray, requestIndex) { + if (!isTypedArray(typedArray)) { + throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); + } + + var length = typedArrayLength(typedArray); // step 1 + + var accessIndex = ToIndex(requestIndex); // step 2 + + /* + // this assertion can never be reached + if (!(accessIndex >= 0)) { + throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4 + } + */ + + if (accessIndex >= length) { + throw new $RangeError('index out of range'); // step 4 + } + + var elementSize = TypedArrayElementSize(typedArray); // step 5 + + var offset = $byteOffset(typedArray); // step 6 + + return (accessIndex * elementSize) + offset; // step 7 +}; diff --git a/node_modules/es-abstract/2022/ValidateIntegerTypedArray.js b/node_modules/es-abstract/2022/ValidateIntegerTypedArray.js new file mode 100644 index 000000000..c9c8249c6 --- /dev/null +++ b/node_modules/es-abstract/2022/ValidateIntegerTypedArray.js @@ -0,0 +1,39 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsBigIntElementType = require('./IsBigIntElementType'); +var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType'); +var Type = require('./Type'); +var TypedArrayElementType = require('./TypedArrayElementType'); +var ValidateTypedArray = require('./ValidateTypedArray'); + +var whichTypedArray = require('which-typed-array'); + +// https://262.ecma-international.org/13.0/#sec-validateintegertypedarray + +module.exports = function ValidateIntegerTypedArray(typedArray) { + var waitable = arguments.length > 1 ? arguments[1] : false; // step 1 + + if (Type(waitable) !== 'Boolean') { + throw new $TypeError('Assertion failed: `waitable` must be a Boolean'); + } + + var buffer = ValidateTypedArray(typedArray); // step 2 + + if (waitable) { // step 5 + var typeName = whichTypedArray(typedArray); + if (typeName !== 'Int32Array' && typeName !== 'BigInt64Array') { + throw new $TypeError('Assertion failed: `typedArray` must be an Int32Array or BigInt64Array when `waitable` is true'); // step 5.a + } + } else { + var type = TypedArrayElementType(typedArray); // step 5.a + if (!IsUnclampedIntegerElementType(type) && !IsBigIntElementType(type)) { + throw new $TypeError('Assertion failed: `typedArray` must be an integer TypedArray'); // step 5.b + } + } + + return buffer; // step 6 +}; diff --git a/node_modules/es-abstract/2022/ValidateTypedArray.js b/node_modules/es-abstract/2022/ValidateTypedArray.js new file mode 100644 index 000000000..83df3a81c --- /dev/null +++ b/node_modules/es-abstract/2022/ValidateTypedArray.js @@ -0,0 +1,30 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var callBound = require('call-bind/callBound'); +var $taSome = callBound('%TypedArray.prototype.some%', true); + +var Type = require('./Type'); + +var isTypedArray = require('is-typed-array'); + +// https://262.ecma-international.org/6.0/#sec-validatetypedarray + +module.exports = function ValidateTypedArray(O) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: O must be an Object'); + } + if (!isTypedArray(O)) { + throw new $TypeError('Assertion failed: O must be a TypedArray'); + } + + // without `.some` (like in node 0.10), there's no way to check buffer detachment, but also no way to be detached + if ($taSome) { + $taSome(O, function () { return true; }); + } + + return O.buffer; +}; diff --git a/node_modules/es-abstract/2022/WeakRefDeref.js b/node_modules/es-abstract/2022/WeakRefDeref.js new file mode 100644 index 000000000..66d2d1723 --- /dev/null +++ b/node_modules/es-abstract/2022/WeakRefDeref.js @@ -0,0 +1,24 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $deref = callBound('WeakRef.prototype.deref', true); + +var isWeakRef = require('is-weakref'); + +var AddToKeptObjects = require('./AddToKeptObjects'); + +// https://ecma-international.org/ecma-262/12.0/#sec-weakrefderef + +module.exports = function WeakRefDeref(weakRef) { + if (!isWeakRef(weakRef)) { + throw new $TypeError('Assertion failed: `weakRef` must be a WeakRef'); + } + var target = $deref(weakRef); + if (target) { + AddToKeptObjects(target); + } + return target; +}; diff --git a/node_modules/es-abstract/2022/WeekDay.js b/node_modules/es-abstract/2022/WeekDay.js new file mode 100644 index 000000000..17cf94ca3 --- /dev/null +++ b/node_modules/es-abstract/2022/WeekDay.js @@ -0,0 +1,10 @@ +'use strict'; + +var Day = require('./Day'); +var modulo = require('./modulo'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.6 + +module.exports = function WeekDay(t) { + return modulo(Day(t) + 4, 7); +}; diff --git a/node_modules/es-abstract/2022/YearFromTime.js b/node_modules/es-abstract/2022/YearFromTime.js new file mode 100644 index 000000000..be06ecbc3 --- /dev/null +++ b/node_modules/es-abstract/2022/YearFromTime.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Date = GetIntrinsic('%Date%'); + +var callBound = require('call-bind/callBound'); + +var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); + +// https://262.ecma-international.org/5.1/#sec-15.9.1.3 + +module.exports = function YearFromTime(t) { + // largest y such that this.TimeFromYear(y) <= t + return $getUTCFullYear(new $Date(t)); +}; diff --git a/node_modules/es-abstract/2022/abs.js b/node_modules/es-abstract/2022/abs.js new file mode 100644 index 000000000..8bc45434d --- /dev/null +++ b/node_modules/es-abstract/2022/abs.js @@ -0,0 +1,11 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; diff --git a/node_modules/es-abstract/2022/clamp.js b/node_modules/es-abstract/2022/clamp.js new file mode 100644 index 000000000..8da139484 --- /dev/null +++ b/node_modules/es-abstract/2022/clamp.js @@ -0,0 +1,18 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var max = GetIntrinsic('%Math.max%'); +var min = GetIntrinsic('%Math.min%'); + +var Type = require('./Type'); + +// https://262.ecma-international.org/12.0/#clamping + +module.exports = function clamp(x, lower, upper) { + if (Type(x) !== 'Number' || Type(lower) !== 'Number' || Type(upper) !== 'Number' || !(lower <= upper)) { + throw new $TypeError('Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`'); + } + return min(max(lower, x), upper); +}; diff --git a/node_modules/es-abstract/2022/floor.js b/node_modules/es-abstract/2022/floor.js new file mode 100644 index 000000000..625548e93 --- /dev/null +++ b/node_modules/es-abstract/2022/floor.js @@ -0,0 +1,16 @@ +'use strict'; + +var Type = require('./Type'); + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/11.0/#eqn-floor + +module.exports = function floor(x) { + // return x - modulo(x, 1); + if (Type(x) === 'BigInt') { + return x; + } + return $floor(x); +}; diff --git a/node_modules/es-abstract/2022/max.js b/node_modules/es-abstract/2022/max.js new file mode 100644 index 000000000..b919d4e83 --- /dev/null +++ b/node_modules/es-abstract/2022/max.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.max%'); diff --git a/node_modules/es-abstract/2022/min.js b/node_modules/es-abstract/2022/min.js new file mode 100644 index 000000000..909de4b0e --- /dev/null +++ b/node_modules/es-abstract/2022/min.js @@ -0,0 +1,7 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +// https://262.ecma-international.org/6.0/#sec-algorithm-conventions + +module.exports = GetIntrinsic('%Math.min%'); diff --git a/node_modules/es-abstract/2022/modulo.js b/node_modules/es-abstract/2022/modulo.js new file mode 100644 index 000000000..b94bb52bb --- /dev/null +++ b/node_modules/es-abstract/2022/modulo.js @@ -0,0 +1,9 @@ +'use strict'; + +var mod = require('../helpers/mod'); + +// https://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function modulo(x, y) { + return mod(x, y); +}; diff --git a/node_modules/es-abstract/2022/msFromTime.js b/node_modules/es-abstract/2022/msFromTime.js new file mode 100644 index 000000000..a6bae767a --- /dev/null +++ b/node_modules/es-abstract/2022/msFromTime.js @@ -0,0 +1,11 @@ +'use strict'; + +var modulo = require('./modulo'); + +var msPerSecond = require('../helpers/timeConstants').msPerSecond; + +// https://262.ecma-international.org/5.1/#sec-15.9.1.10 + +module.exports = function msFromTime(t) { + return modulo(t, msPerSecond); +}; diff --git a/node_modules/es-abstract/2022/substring.js b/node_modules/es-abstract/2022/substring.js new file mode 100644 index 000000000..a2c724ad8 --- /dev/null +++ b/node_modules/es-abstract/2022/substring.js @@ -0,0 +1,20 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsIntegralNumber = require('./IsIntegralNumber'); +var Type = require('./Type'); + +var callBound = require('call-bind/callBound'); + +var $slice = callBound('String.prototype.slice'); + +// https://262.ecma-international.org/12.0/#substring +module.exports = function substring(S, inclusiveStart, exclusiveEnd) { + if (Type(S) !== 'String' || !IsIntegralNumber(inclusiveStart) || (arguments.length > 2 && !IsIntegralNumber(exclusiveEnd))) { + throw new $TypeError('`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers'); + } + return $slice(S, inclusiveStart, arguments.length > 2 ? exclusiveEnd : S.length); +}; diff --git a/node_modules/es-abstract/2022/thisBigIntValue.js b/node_modules/es-abstract/2022/thisBigIntValue.js new file mode 100644 index 000000000..1fd12980e --- /dev/null +++ b/node_modules/es-abstract/2022/thisBigIntValue.js @@ -0,0 +1,22 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $bigIntValueOf = callBound('BigInt.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/11.0/#sec-thisbigintvalue + +module.exports = function thisBigIntValue(value) { + var type = Type(value); + if (type === 'BigInt') { + return value; + } + if (!$bigIntValueOf) { + throw new $TypeError('BigInt is not supported'); + } + return $bigIntValueOf(value); +}; diff --git a/node_modules/es-abstract/2022/thisBooleanValue.js b/node_modules/es-abstract/2022/thisBooleanValue.js new file mode 100644 index 000000000..27075b9c4 --- /dev/null +++ b/node_modules/es-abstract/2022/thisBooleanValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $BooleanValueOf = require('call-bind/callBound')('Boolean.prototype.valueOf'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-boolean-prototype-object + +module.exports = function thisBooleanValue(value) { + if (Type(value) === 'Boolean') { + return value; + } + + return $BooleanValueOf(value); +}; diff --git a/node_modules/es-abstract/2022/thisNumberValue.js b/node_modules/es-abstract/2022/thisNumberValue.js new file mode 100644 index 000000000..92968dcdf --- /dev/null +++ b/node_modules/es-abstract/2022/thisNumberValue.js @@ -0,0 +1,18 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var Type = require('./Type'); + +var $NumberValueOf = callBound('Number.prototype.valueOf'); + +// https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-number-prototype-object + +module.exports = function thisNumberValue(value) { + if (Type(value) === 'Number') { + return value; + } + + return $NumberValueOf(value); +}; + diff --git a/node_modules/es-abstract/2022/thisStringValue.js b/node_modules/es-abstract/2022/thisStringValue.js new file mode 100644 index 000000000..8e4274d81 --- /dev/null +++ b/node_modules/es-abstract/2022/thisStringValue.js @@ -0,0 +1,15 @@ +'use strict'; + +var $StringValueOf = require('call-bind/callBound')('String.prototype.valueOf'); + +var Type = require('./Type'); + +// https://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-string-prototype-object + +module.exports = function thisStringValue(value) { + if (Type(value) === 'String') { + return value; + } + + return $StringValueOf(value); +}; diff --git a/node_modules/es-abstract/2022/thisSymbolValue.js b/node_modules/es-abstract/2022/thisSymbolValue.js new file mode 100644 index 000000000..91a552542 --- /dev/null +++ b/node_modules/es-abstract/2022/thisSymbolValue.js @@ -0,0 +1,19 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true); + +var Type = require('./Type'); + +// https://262.ecma-international.org/9.0/#sec-thissymbolvalue + +module.exports = function thisSymbolValue(value) { + if (!$SymbolValueOf) { + throw new SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object'); + } + if (Type(value) === 'Symbol') { + return value; + } + return $SymbolValueOf(value); +}; diff --git a/node_modules/es-abstract/2022/thisTimeValue.js b/node_modules/es-abstract/2022/thisTimeValue.js new file mode 100644 index 000000000..a9a47ace2 --- /dev/null +++ b/node_modules/es-abstract/2022/thisTimeValue.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('../2018/thisTimeValue'); diff --git a/node_modules/es-abstract/5/FromPropertyDescriptor.js b/node_modules/es-abstract/5/FromPropertyDescriptor.js index 506f65c33..ebf5c8915 100644 --- a/node_modules/es-abstract/5/FromPropertyDescriptor.js +++ b/node_modules/es-abstract/5/FromPropertyDescriptor.js @@ -33,7 +33,7 @@ module.exports = function FromPropertyDescriptor(Desc) { enumerable: !!Desc['[[Enumerable]]'], configurable: !!Desc['[[Configurable]]'] }; - } else { - throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor'); } + throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor'); + }; diff --git a/node_modules/es-abstract/CHANGELOG.md b/node_modules/es-abstract/CHANGELOG.md index c409f8416..cec3cdd4d 100644 --- a/node_modules/es-abstract/CHANGELOG.md +++ b/node_modules/es-abstract/CHANGELOG.md @@ -1,3 +1,186 @@ +1.21.1 / 2023-01-10 +================= + * [Fix] move `available-typed-arrays` to runtime deps + * [Fix] `ES2021`+: `NumberToBigInt`: throw the proper error on an env without BigInts + * [Fix] `ES2018`+: `CreateAsyncFromSyncIterator`: properly check `next` method args length + * [Fix] `ES2020`-`ES2021`: Abstract Relational Comparison: handle BigInts properly + * [Fix] `ES2022`+: `StringToBigInt`: invalid BigInts should be `undefined`, not `NaN` as in previous years + * [Fix] `helpers/isFinite`: properly handle BigInt values + * [Fix] `ES2020`+: `CreateListFromArrayLike`: accept BigInts + * [Fix] `ES2019`+: `AsyncFromSyncIteratorContinuation`: throw a SyntaxError when > 1 arg is passed + * [patch] `ES2020`+: `GetIterator`: use SyntaxError for intentionally unsupported + * [patch] `ES2015`+: `GetPrototypeFromContructor`: use SyntaxError for intentionally unsupported + * [patch] `ES2022`+: `StringToNumber`: fix non-string assertion failure message + * [Deps] update `es-set-tostringtag`, `is-array-buffer` + * [Tests] increase coverage + * [Tests] exclude coverage from files that have been replaced by an extracted package + +1.21.0 / 2023-01-04 +================= + * [New] `ES2015`+: add `IsDetachedBuffer` + * [New] `ES2015+`: add `DetachArrayBuffer` + * [New] `ES2020`+: add `NumericToRawBytes` + * [New] `ES2017` - `ES2019`: add `NumberToRawBytes` + * [New] `ES2020+`: add `RawBytesToNumeric` + * [New] `ES2017-ES2019`: add `RawBytesToNumber` + * [New] `ES2017`+: add `ValidateAtomicAccess` + * [New] `ES2021`+: add `ValidateIntegerTypedArray` + * [New] `ES2015`+: add `ValidateTypedArray` + * [New] `ES2015`+: add `GetGlobalObject` + * [New] `ES2022`+: add `TypedArrayElementSize`, `TypedArrayElementType` + * [New] `ES2015`+: add `max`, `min` + * [New] `helpers/assertRecord`: add predicates for PromiseCapability and AsyncGeneratorRequest Records + * [New] `ES2018`+: add `AsyncIteratorClose` + * [New] `ES2015`+: `IteratorClose`: also accept a Completion Record instance instead of a completion thunk + * [New] `ES2015`+ (CompletionRecord, NormalCompletion), `ES2018`+ (ThrowCompletion): add new AOs + * [New] `ES2015`+ (`ObjectCreate`) and `ES2020`+ (`OrdinaryObjectCreate`): use `internal-slot` to support additional slots + * [New] `ES2018`+: add `CreateAsyncFromSyncIterator` + * [patch] `ES2015`+: `GetMethod`: better failure message + * [Refactor] use `es-set-tostringtag` package + * [Refactor] use `has-proto` package + * [Deps] update `has-proto`, `es-set-tostringtag`, `internal-slot` + * [meta] fix spackle script to `git add` after all writing is done + * [meta] autogenerate esX entry points + * [meta] use a leading slash in gitattributes for proper spackle matching + * [Tests] fix comments on missing AOs + * [Tests] filter out host-defined AOs + * [Dev Deps] update `@ljharb/eslint-config`, `aud` + +1.20.5 / 2022-12-07 +================= + * [Fix] `ES2020+`: `floor`: make it work with BigInts as well + * [Refactor] use `gopd` + * [Tests] add `mod` helper tests (#147) + * [Deps] update `string.prototype.trimend`, `string.prototype.trimstart` + * [Dev Deps] update `array.prototype.filter`, `array.prototype.flatmap`, `array.prototype.indexof`, `object.fromentries` + +1.20.4 / 2022-10-06 +================= + * [Fix] `ES2021+`: values that truncate to -0 in `ToIntegerOrInfinity` (#146) + * [Deps] update `is-callable` + +1.20.3 / 2022-09-22 +================= + * [Refactor] extract regex tester to `safe-regex-test` package + * [Deps] update `get-intrinsic`, `is-callable` + * [Dev Deps] update `aud`, `tape` + +1.20.2 / 2022-09-01 +================= + * [Fix] `ES2020+`: `SameValueNonNumeric`: properly throw on BigInt values + * [Deps] update `object.assign`, `get-intrinsic`, `object-inspect` + * [Dev Deps] update `array.prototype.indexof`, `diff`, `es-value-fixtures`, `tape` + * [meta] `spackle`: always mkdirp new files to be written + * [Tests] fix vscode auto-const from 8fc256d + +1.20.1 / 2022-05-16 +================= + * [Fix] `thisTimeValue`: use `getTime`, not `valueOf`, to get the time value + * [Refactor] create `IsArray` helper + * [Deps] update `regexp.prototype.flags` + * [Dev Deps] use `for-each` instead of `foreach` + +1.20.0 / 2022-05-05 +================= + * [New] add ES2022 + * [New] `ES2015+`: add `ObjectDefineProperties` + * [Refactor] create `fromPropertyDescriptor` helper + * [Refactor] use `has-property-descriptors` + * [Deps] update `string.prototype.trimend`, `string.prototype.trimstart`, `unbox-primitive` + * [meta] use `npmignore` to autogenerate an npmignore file + * [Dev Deps] update `es-value-fixtures`, `has-bigints`, `functions-have-names` + * [Tests] copy GetIntrinsic tests over from `get-intrinsic` + +1.19.5 / 2022-04-13 +================= + * [Fix] `DefineOwnProperty`: FF 4-22 throws an exception when defining length of an array + * [Dev Deps] update `@ljharb/eslint-config` + +1.19.4 / 2022-04-12 +================= + * [Fix] `ES2015+`: `CreateDataProperty`: a nonwritable but configurable property is still converted to a data property + +1.19.3 / 2022-04-11 +================= + * [Fix] `ES2015+`: `GetIterator`, `IterableToArrayLike`: in Symbol-less envs, handle boxed string objects + * [Robustness] use `exec` instead of `test`, since the latter observably looks up `exec` + * [Deps] update `is-shared-array-buffer` + * [actions] restrict permissions + * [Dev Deps] update `tape` + * [Tests] add test coverage + * [Tests] avoid a bug in node v4.0 with bound function names + +1.19.2 / 2022-03-28 +================= + * [Fix] `ES2018+`: `EnumerableOwnPropertyNames`, `ToIntegerOrInfinity`, `UTF16SurrogatePairToCodePoint`: proper function names + * [Fix] `ES2015+`: `GetOwnPropertyKeys`/`IsExtensible`/`{Set,Test}IntegrityLevel`: avoid a crash in IE 8 on missing ES5 intrinsics + * [Fix] `helpers/DefineOwnProperty`: avoid a crash in IE 8 + * [Fix] `ES2015+`: `StringCreate`: properly check for `prototype` being `String.prototype` + * [Docs] `ES2015+`: `GetV`: Fix spec URL + * [meta] operations: use a URL object instead of a URL string + * [meta] remove defunct greenkeeper config + * [meta] better `eccheck` command; fix indentation + * [Tests] node v0.6 lacks `RegExp.prototype.source` + * [Tests] remove a stray `console.log` + * [Tests] properly set the lastIndex in IE 8 + * [Tests] skip test due to IE 6-8 sparse/undefined bug + * [Tests] in IE 8, an empty regex is `` and not `(?:)` + * [Tests] ES3 engines don’t have `.bind` + * [Tests] avoid needless failures in ES3 engines that don't support descriptors + * [Tests] add test to cover https://github.com/tc39/ecma262/issues/2611 + * [Deps] update `has-symbols`, `is-negative-zero`, `is-weakref`, `object-inspect` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object.fromentries`, `safe-publish-latest`, `tape` + * [actions] reuse common workflows + * [actions] update codecov uploader + +1.19.1 / 2021-10-02 +================= + * [Fix] `ES2020+`: `CreateRegExpStringIterator`: should not have enumerable methods + * [Dev Deps] update `array.prototype.filter`, `array.prototype.indexof` + +1.19.0 / 2021-09-30 +================= + * [New] `ES2021+`: `IterableToList`: make `method` parameter optional (#61) + * [New] add ES2021 + * [New] `ES2020+`: add `StringToBigInt`, `ToBigInt`, `ToBigInt64`, `ToBigUint64` + * [New] `ES2017`+: add `IsSharedArrayBuffer`, `OrdinaryToPrimitive` + * [New] `ES2015+`: add `CharacterRange`, `IsCompatiblePropertyDescriptor` + * [New] `ES2020+`: add `CreateRegExpStringIterator` + * [Fix] `ES2020+`: `ToBigInt64`/`ToBigUint64`: avoid node v10.4-v10.8 bug with limited BigInt range + * [Fix] `ES2020+`: `AbstractRelationalComparison`, `AbstractEqualityComparison`: support BigInt + * [Fix] `ES2020+`: `ToBigInt64`/`ToBigUint64`: Improve the definitions of twoSixtyThree and twoSixtyFour (#140) + * [meta] do not publish .gitattributes + * [Tests] Correct the behavior of `safeBigInt` + * [Tests] Exclude dotfiles from the testing sweep (#141) + +1.18.7 / 2021-09-28 +================= + * [Fix] `getOwnPropertyDescriptor` helper: avoid crashing in IE < 9 + * [Fix] `ArraySetLength`: `node` `v0.6` has a bug where array lengths can be Set but not Defined + * [eslint] remove unused directive + * [Tests] fix spelling + +1.18.6 / 2021-09-07 +================= + * [Fix] `ES2020+`: `NumberToBigInt`: throw a SyntaxError when BigInts are not supported + * [Refactor] extract getSymbolDescription logic to `get-symbol-description` + * [Refactor] `ES2018+`: `AbstractRelationalComparison`: use `IsStringPrefix` + * [Deps] update `is-callable`, `is-regex`, `is-string` + * [Dev Deps] update `@ljharb/eslint-config`, `tape` + * [Tests] `GetSubstitution`: add cases + +1.18.5 / 2021-08-01 +================= + * [meta] remove "exports" (#133) + * [Dev Deps] update `eslint` + +1.18.4 / 2021-07-29 +================= + * [meta] partial revert of b54cfe8525faff482450e843a49d43be3a086225 + * [Deps] update `internal-slot`, `object-inspect` + * [Dev Deps] update `eslint`, `tape` + * [Tests] `ArraySetLength`: increase coverage + 1.18.3 / 2021-05-27 ================= * [Fix] `ES2020+`: `ToNumber`: ensure it throws on a BigInt (#130) diff --git a/node_modules/es-abstract/LICENSE b/node_modules/es-abstract/LICENSE index 8c271c14b..3f137ce0c 100644 --- a/node_modules/es-abstract/LICENSE +++ b/node_modules/es-abstract/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. diff --git a/node_modules/es-abstract/README.md b/node_modules/es-abstract/README.md index 2d76a5d44..08f7b1c2a 100644 --- a/node_modules/es-abstract/README.md +++ b/node_modules/es-abstract/README.md @@ -11,7 +11,7 @@ ECMAScript spec abstract operations. Every operation is available by edition/year and by name - for example, `es-abstract/2020/Call` gives you the `Call` operation from ES2020, `es-abstract/5/Type` gives you the `Type` operation from ES5. -All abstract operations are also available under an `es5`/`es2015`/`es2016`/`es2017`/`es2018`/`es2019`/`es2020` entry point, and as a property on the `main` export, but using deep imports is highly encouraged for bundle size and performance reasons. Non-deep entry points will be removed in the next semver-major release. +All abstract operations are also available under an `es5`/`es2015`/`es2016`/`es2017`/`es2018`/`es2019`/`es2020`/`es2021` entry point, and as a property on the `main` export, but using deep imports is highly encouraged for bundle size and performance reasons. Non-deep entry points will be removed in the next semver-major release. ## Example diff --git a/node_modules/es-abstract/es2015.js b/node_modules/es-abstract/es2015.js index 79be96740..479fe155b 100644 --- a/node_modules/es-abstract/es2015.js +++ b/node_modules/es-abstract/es2015.js @@ -1,8 +1,8 @@ 'use strict'; /* eslint global-require: 0 */ -// https://ecma-international.org/ecma-262/6.0/#sec-abstract-operations -var ES6 = { +// https://262.ecma-international.org/6.0/#sec-abstract-operations +var ES2015 = { 'Abstract Equality Comparison': require('./2015/AbstractEqualityComparison'), 'Abstract Relational Comparison': require('./2015/AbstractRelationalComparison'), 'Strict Equality Comparison': require('./2015/StrictEqualityComparison'), @@ -13,7 +13,9 @@ var ES6 = { ArraySpeciesCreate: require('./2015/ArraySpeciesCreate'), Call: require('./2015/Call'), CanonicalNumericIndexString: require('./2015/CanonicalNumericIndexString'), + CharacterRange: require('./2015/CharacterRange'), CompletePropertyDescriptor: require('./2015/CompletePropertyDescriptor'), + CompletionRecord: require('./2015/CompletionRecord'), CreateDataProperty: require('./2015/CreateDataProperty'), CreateDataPropertyOrThrow: require('./2015/CreateDataPropertyOrThrow'), CreateHTML: require('./2015/CreateHTML'), @@ -27,10 +29,12 @@ var ES6 = { DayWithinYear: require('./2015/DayWithinYear'), DefinePropertyOrThrow: require('./2015/DefinePropertyOrThrow'), DeletePropertyOrThrow: require('./2015/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2015/DetachArrayBuffer'), EnumerableOwnNames: require('./2015/EnumerableOwnNames'), floor: require('./2015/floor'), FromPropertyDescriptor: require('./2015/FromPropertyDescriptor'), Get: require('./2015/Get'), + GetGlobalObject: require('./2015/GetGlobalObject'), GetIterator: require('./2015/GetIterator'), GetMethod: require('./2015/GetMethod'), GetOwnPropertyKeys: require('./2015/GetOwnPropertyKeys'), @@ -46,9 +50,11 @@ var ES6 = { IsAccessorDescriptor: require('./2015/IsAccessorDescriptor'), IsArray: require('./2015/IsArray'), IsCallable: require('./2015/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2015/IsCompatiblePropertyDescriptor'), IsConcatSpreadable: require('./2015/IsConcatSpreadable'), IsConstructor: require('./2015/IsConstructor'), IsDataDescriptor: require('./2015/IsDataDescriptor'), + IsDetachedBuffer: require('./2015/IsDetachedBuffer'), IsExtensible: require('./2015/IsExtensible'), IsGenericDescriptor: require('./2015/IsGenericDescriptor'), IsInteger: require('./2015/IsInteger'), @@ -64,11 +70,15 @@ var ES6 = { MakeDate: require('./2015/MakeDate'), MakeDay: require('./2015/MakeDay'), MakeTime: require('./2015/MakeTime'), + max: require('./2015/max'), + min: require('./2015/min'), MinFromTime: require('./2015/MinFromTime'), modulo: require('./2015/modulo'), MonthFromTime: require('./2015/MonthFromTime'), msFromTime: require('./2015/msFromTime'), + NormalCompletion: require('./2015/NormalCompletion'), ObjectCreate: require('./2015/ObjectCreate'), + ObjectDefineProperties: require('./2015/ObjectDefineProperties'), OrdinaryCreateFromConstructor: require('./2015/OrdinaryCreateFromConstructor'), OrdinaryDefineOwnProperty: require('./2015/OrdinaryDefineOwnProperty'), OrdinaryGetOwnProperty: require('./2015/OrdinaryGetOwnProperty'), @@ -116,8 +126,9 @@ var ES6 = { ToUint8Clamp: require('./2015/ToUint8Clamp'), Type: require('./2015/Type'), ValidateAndApplyPropertyDescriptor: require('./2015/ValidateAndApplyPropertyDescriptor'), + ValidateTypedArray: require('./2015/ValidateTypedArray'), WeekDay: require('./2015/WeekDay'), YearFromTime: require('./2015/YearFromTime') }; -module.exports = ES6; +module.exports = ES2015; diff --git a/node_modules/es-abstract/es2016.js b/node_modules/es-abstract/es2016.js index 6fbdb0cf1..b2ffb99c7 100644 --- a/node_modules/es-abstract/es2016.js +++ b/node_modules/es-abstract/es2016.js @@ -13,7 +13,9 @@ var ES2016 = { ArraySpeciesCreate: require('./2016/ArraySpeciesCreate'), Call: require('./2016/Call'), CanonicalNumericIndexString: require('./2016/CanonicalNumericIndexString'), + CharacterRange: require('./2016/CharacterRange'), CompletePropertyDescriptor: require('./2016/CompletePropertyDescriptor'), + CompletionRecord: require('./2016/CompletionRecord'), CreateDataProperty: require('./2016/CreateDataProperty'), CreateDataPropertyOrThrow: require('./2016/CreateDataPropertyOrThrow'), CreateHTML: require('./2016/CreateHTML'), @@ -27,10 +29,12 @@ var ES2016 = { DayWithinYear: require('./2016/DayWithinYear'), DefinePropertyOrThrow: require('./2016/DefinePropertyOrThrow'), DeletePropertyOrThrow: require('./2016/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2016/DetachArrayBuffer'), EnumerableOwnNames: require('./2016/EnumerableOwnNames'), floor: require('./2016/floor'), FromPropertyDescriptor: require('./2016/FromPropertyDescriptor'), Get: require('./2016/Get'), + GetGlobalObject: require('./2016/GetGlobalObject'), GetIterator: require('./2016/GetIterator'), GetMethod: require('./2016/GetMethod'), GetOwnPropertyKeys: require('./2016/GetOwnPropertyKeys'), @@ -46,9 +50,11 @@ var ES2016 = { IsAccessorDescriptor: require('./2016/IsAccessorDescriptor'), IsArray: require('./2016/IsArray'), IsCallable: require('./2016/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2016/IsCompatiblePropertyDescriptor'), IsConcatSpreadable: require('./2016/IsConcatSpreadable'), IsConstructor: require('./2016/IsConstructor'), IsDataDescriptor: require('./2016/IsDataDescriptor'), + IsDetachedBuffer: require('./2016/IsDetachedBuffer'), IsExtensible: require('./2016/IsExtensible'), IsGenericDescriptor: require('./2016/IsGenericDescriptor'), IsInteger: require('./2016/IsInteger'), @@ -65,11 +71,15 @@ var ES2016 = { MakeDate: require('./2016/MakeDate'), MakeDay: require('./2016/MakeDay'), MakeTime: require('./2016/MakeTime'), + max: require('./2016/max'), + min: require('./2016/min'), MinFromTime: require('./2016/MinFromTime'), modulo: require('./2016/modulo'), MonthFromTime: require('./2016/MonthFromTime'), msFromTime: require('./2016/msFromTime'), + NormalCompletion: require('./2016/NormalCompletion'), ObjectCreate: require('./2016/ObjectCreate'), + ObjectDefineProperties: require('./2016/ObjectDefineProperties'), OrdinaryCreateFromConstructor: require('./2016/OrdinaryCreateFromConstructor'), OrdinaryDefineOwnProperty: require('./2016/OrdinaryDefineOwnProperty'), OrdinaryGetOwnProperty: require('./2016/OrdinaryGetOwnProperty'), @@ -121,6 +131,7 @@ var ES2016 = { UTF16Decode: require('./2016/UTF16Decode'), UTF16Encoding: require('./2016/UTF16Encoding'), ValidateAndApplyPropertyDescriptor: require('./2016/ValidateAndApplyPropertyDescriptor'), + ValidateTypedArray: require('./2016/ValidateTypedArray'), WeekDay: require('./2016/WeekDay'), YearFromTime: require('./2016/YearFromTime') }; diff --git a/node_modules/es-abstract/es2017.js b/node_modules/es-abstract/es2017.js index 3cf0c007a..8a344dabf 100644 --- a/node_modules/es-abstract/es2017.js +++ b/node_modules/es-abstract/es2017.js @@ -13,7 +13,9 @@ var ES2017 = { ArraySpeciesCreate: require('./2017/ArraySpeciesCreate'), Call: require('./2017/Call'), CanonicalNumericIndexString: require('./2017/CanonicalNumericIndexString'), + CharacterRange: require('./2017/CharacterRange'), CompletePropertyDescriptor: require('./2017/CompletePropertyDescriptor'), + CompletionRecord: require('./2017/CompletionRecord'), CreateDataProperty: require('./2017/CreateDataProperty'), CreateDataPropertyOrThrow: require('./2017/CreateDataPropertyOrThrow'), CreateHTML: require('./2017/CreateHTML'), @@ -27,10 +29,12 @@ var ES2017 = { DayWithinYear: require('./2017/DayWithinYear'), DefinePropertyOrThrow: require('./2017/DefinePropertyOrThrow'), DeletePropertyOrThrow: require('./2017/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2017/DetachArrayBuffer'), EnumerableOwnProperties: require('./2017/EnumerableOwnProperties'), floor: require('./2017/floor'), FromPropertyDescriptor: require('./2017/FromPropertyDescriptor'), Get: require('./2017/Get'), + GetGlobalObject: require('./2017/GetGlobalObject'), GetIterator: require('./2017/GetIterator'), GetMethod: require('./2017/GetMethod'), GetOwnPropertyKeys: require('./2017/GetOwnPropertyKeys'), @@ -46,9 +50,11 @@ var ES2017 = { IsAccessorDescriptor: require('./2017/IsAccessorDescriptor'), IsArray: require('./2017/IsArray'), IsCallable: require('./2017/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2017/IsCompatiblePropertyDescriptor'), IsConcatSpreadable: require('./2017/IsConcatSpreadable'), IsConstructor: require('./2017/IsConstructor'), IsDataDescriptor: require('./2017/IsDataDescriptor'), + IsDetachedBuffer: require('./2017/IsDetachedBuffer'), IsExtensible: require('./2017/IsExtensible'), IsGenericDescriptor: require('./2017/IsGenericDescriptor'), IsInteger: require('./2017/IsInteger'), @@ -56,6 +62,7 @@ var ES2017 = { IsPropertyDescriptor: require('./2017/IsPropertyDescriptor'), IsPropertyKey: require('./2017/IsPropertyKey'), IsRegExp: require('./2017/IsRegExp'), + IsSharedArrayBuffer: require('./2017/IsSharedArrayBuffer'), IterableToList: require('./2017/IterableToList'), IteratorClose: require('./2017/IteratorClose'), IteratorComplete: require('./2017/IteratorComplete'), @@ -65,11 +72,16 @@ var ES2017 = { MakeDate: require('./2017/MakeDate'), MakeDay: require('./2017/MakeDay'), MakeTime: require('./2017/MakeTime'), + max: require('./2017/max'), + min: require('./2017/min'), MinFromTime: require('./2017/MinFromTime'), modulo: require('./2017/modulo'), MonthFromTime: require('./2017/MonthFromTime'), msFromTime: require('./2017/msFromTime'), + NormalCompletion: require('./2017/NormalCompletion'), + NumberToRawBytes: require('./2017/NumberToRawBytes'), ObjectCreate: require('./2017/ObjectCreate'), + ObjectDefineProperties: require('./2017/ObjectDefineProperties'), OrdinaryCreateFromConstructor: require('./2017/OrdinaryCreateFromConstructor'), OrdinaryDefineOwnProperty: require('./2017/OrdinaryDefineOwnProperty'), OrdinaryGetOwnProperty: require('./2017/OrdinaryGetOwnProperty'), @@ -77,7 +89,9 @@ var ES2017 = { OrdinaryHasInstance: require('./2017/OrdinaryHasInstance'), OrdinaryHasProperty: require('./2017/OrdinaryHasProperty'), OrdinarySetPrototypeOf: require('./2017/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2017/OrdinaryToPrimitive'), QuoteJSONString: require('./2017/QuoteJSONString'), + RawBytesToNumber: require('./2017/RawBytesToNumber'), RegExpCreate: require('./2017/RegExpCreate'), RegExpExec: require('./2017/RegExpExec'), RequireObjectCoercible: require('./2017/RequireObjectCoercible'), @@ -123,6 +137,8 @@ var ES2017 = { UTF16Decode: require('./2017/UTF16Decode'), UTF16Encoding: require('./2017/UTF16Encoding'), ValidateAndApplyPropertyDescriptor: require('./2017/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2017/ValidateAtomicAccess'), + ValidateTypedArray: require('./2017/ValidateTypedArray'), WeekDay: require('./2017/WeekDay'), YearFromTime: require('./2017/YearFromTime') }; diff --git a/node_modules/es-abstract/es2018.js b/node_modules/es-abstract/es2018.js index 2beb98903..dcea42a0b 100644 --- a/node_modules/es-abstract/es2018.js +++ b/node_modules/es-abstract/es2018.js @@ -11,10 +11,14 @@ var ES2018 = { ArrayCreate: require('./2018/ArrayCreate'), ArraySetLength: require('./2018/ArraySetLength'), ArraySpeciesCreate: require('./2018/ArraySpeciesCreate'), + AsyncIteratorClose: require('./2018/AsyncIteratorClose'), Call: require('./2018/Call'), CanonicalNumericIndexString: require('./2018/CanonicalNumericIndexString'), + CharacterRange: require('./2018/CharacterRange'), CompletePropertyDescriptor: require('./2018/CompletePropertyDescriptor'), + CompletionRecord: require('./2018/CompletionRecord'), CopyDataProperties: require('./2018/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2018/CreateAsyncFromSyncIterator'), CreateDataProperty: require('./2018/CreateDataProperty'), CreateDataPropertyOrThrow: require('./2018/CreateDataPropertyOrThrow'), CreateHTML: require('./2018/CreateHTML'), @@ -29,10 +33,12 @@ var ES2018 = { DayWithinYear: require('./2018/DayWithinYear'), DefinePropertyOrThrow: require('./2018/DefinePropertyOrThrow'), DeletePropertyOrThrow: require('./2018/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2018/DetachArrayBuffer'), EnumerableOwnPropertyNames: require('./2018/EnumerableOwnPropertyNames'), floor: require('./2018/floor'), FromPropertyDescriptor: require('./2018/FromPropertyDescriptor'), Get: require('./2018/Get'), + GetGlobalObject: require('./2018/GetGlobalObject'), GetIterator: require('./2018/GetIterator'), GetMethod: require('./2018/GetMethod'), GetOwnPropertyKeys: require('./2018/GetOwnPropertyKeys'), @@ -48,15 +54,18 @@ var ES2018 = { IsAccessorDescriptor: require('./2018/IsAccessorDescriptor'), IsArray: require('./2018/IsArray'), IsCallable: require('./2018/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2018/IsCompatiblePropertyDescriptor'), IsConcatSpreadable: require('./2018/IsConcatSpreadable'), IsConstructor: require('./2018/IsConstructor'), IsDataDescriptor: require('./2018/IsDataDescriptor'), + IsDetachedBuffer: require('./2018/IsDetachedBuffer'), IsExtensible: require('./2018/IsExtensible'), IsGenericDescriptor: require('./2018/IsGenericDescriptor'), IsInteger: require('./2018/IsInteger'), IsPromise: require('./2018/IsPromise'), IsPropertyKey: require('./2018/IsPropertyKey'), IsRegExp: require('./2018/IsRegExp'), + IsSharedArrayBuffer: require('./2018/IsSharedArrayBuffer'), IsStringPrefix: require('./2018/IsStringPrefix'), IterableToList: require('./2018/IterableToList'), IteratorClose: require('./2018/IteratorClose'), @@ -67,12 +76,17 @@ var ES2018 = { MakeDate: require('./2018/MakeDate'), MakeDay: require('./2018/MakeDay'), MakeTime: require('./2018/MakeTime'), + max: require('./2018/max'), + min: require('./2018/min'), MinFromTime: require('./2018/MinFromTime'), modulo: require('./2018/modulo'), MonthFromTime: require('./2018/MonthFromTime'), msFromTime: require('./2018/msFromTime'), + NormalCompletion: require('./2018/NormalCompletion'), + NumberToRawBytes: require('./2018/NumberToRawBytes'), NumberToString: require('./2018/NumberToString'), ObjectCreate: require('./2018/ObjectCreate'), + ObjectDefineProperties: require('./2018/ObjectDefineProperties'), OrdinaryCreateFromConstructor: require('./2018/OrdinaryCreateFromConstructor'), OrdinaryDefineOwnProperty: require('./2018/OrdinaryDefineOwnProperty'), OrdinaryGetOwnProperty: require('./2018/OrdinaryGetOwnProperty'), @@ -80,8 +94,10 @@ var ES2018 = { OrdinaryHasInstance: require('./2018/OrdinaryHasInstance'), OrdinaryHasProperty: require('./2018/OrdinaryHasProperty'), OrdinarySetPrototypeOf: require('./2018/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2018/OrdinaryToPrimitive'), PromiseResolve: require('./2018/PromiseResolve'), QuoteJSONString: require('./2018/QuoteJSONString'), + RawBytesToNumber: require('./2018/RawBytesToNumber'), RegExpCreate: require('./2018/RegExpCreate'), RegExpExec: require('./2018/RegExpExec'), RequireObjectCoercible: require('./2018/RequireObjectCoercible'), @@ -104,6 +120,7 @@ var ES2018 = { thisStringValue: require('./2018/thisStringValue'), thisSymbolValue: require('./2018/thisSymbolValue'), thisTimeValue: require('./2018/thisTimeValue'), + ThrowCompletion: require('./2018/ThrowCompletion'), TimeClip: require('./2018/TimeClip'), TimeFromYear: require('./2018/TimeFromYear'), TimeString: require('./2018/TimeString'), @@ -131,6 +148,8 @@ var ES2018 = { UTF16Decode: require('./2018/UTF16Decode'), UTF16Encoding: require('./2018/UTF16Encoding'), ValidateAndApplyPropertyDescriptor: require('./2018/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2018/ValidateAtomicAccess'), + ValidateTypedArray: require('./2018/ValidateTypedArray'), WeekDay: require('./2018/WeekDay'), YearFromTime: require('./2018/YearFromTime') }; diff --git a/node_modules/es-abstract/es2019.js b/node_modules/es-abstract/es2019.js index a49e11522..de1c6ee47 100644 --- a/node_modules/es-abstract/es2019.js +++ b/node_modules/es-abstract/es2019.js @@ -12,10 +12,15 @@ var ES2019 = { ArrayCreate: require('./2019/ArrayCreate'), ArraySetLength: require('./2019/ArraySetLength'), ArraySpeciesCreate: require('./2019/ArraySpeciesCreate'), + AsyncFromSyncIteratorContinuation: require('./2019/AsyncFromSyncIteratorContinuation'), + AsyncIteratorClose: require('./2019/AsyncIteratorClose'), Call: require('./2019/Call'), CanonicalNumericIndexString: require('./2019/CanonicalNumericIndexString'), + CharacterRange: require('./2019/CharacterRange'), CompletePropertyDescriptor: require('./2019/CompletePropertyDescriptor'), + CompletionRecord: require('./2019/CompletionRecord'), CopyDataProperties: require('./2019/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2019/CreateAsyncFromSyncIterator'), CreateDataProperty: require('./2019/CreateDataProperty'), CreateDataPropertyOrThrow: require('./2019/CreateDataPropertyOrThrow'), CreateHTML: require('./2019/CreateHTML'), @@ -30,11 +35,13 @@ var ES2019 = { DayWithinYear: require('./2019/DayWithinYear'), DefinePropertyOrThrow: require('./2019/DefinePropertyOrThrow'), DeletePropertyOrThrow: require('./2019/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2019/DetachArrayBuffer'), EnumerableOwnPropertyNames: require('./2019/EnumerableOwnPropertyNames'), FlattenIntoArray: require('./2019/FlattenIntoArray'), floor: require('./2019/floor'), FromPropertyDescriptor: require('./2019/FromPropertyDescriptor'), Get: require('./2019/Get'), + GetGlobalObject: require('./2019/GetGlobalObject'), GetIterator: require('./2019/GetIterator'), GetMethod: require('./2019/GetMethod'), GetOwnPropertyKeys: require('./2019/GetOwnPropertyKeys'), @@ -50,15 +57,18 @@ var ES2019 = { IsAccessorDescriptor: require('./2019/IsAccessorDescriptor'), IsArray: require('./2019/IsArray'), IsCallable: require('./2019/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2019/IsCompatiblePropertyDescriptor'), IsConcatSpreadable: require('./2019/IsConcatSpreadable'), IsConstructor: require('./2019/IsConstructor'), IsDataDescriptor: require('./2019/IsDataDescriptor'), + IsDetachedBuffer: require('./2019/IsDetachedBuffer'), IsExtensible: require('./2019/IsExtensible'), IsGenericDescriptor: require('./2019/IsGenericDescriptor'), IsInteger: require('./2019/IsInteger'), IsPromise: require('./2019/IsPromise'), IsPropertyKey: require('./2019/IsPropertyKey'), IsRegExp: require('./2019/IsRegExp'), + IsSharedArrayBuffer: require('./2019/IsSharedArrayBuffer'), IsStringPrefix: require('./2019/IsStringPrefix'), IterableToList: require('./2019/IterableToList'), IteratorClose: require('./2019/IteratorClose'), @@ -69,12 +79,17 @@ var ES2019 = { MakeDate: require('./2019/MakeDate'), MakeDay: require('./2019/MakeDay'), MakeTime: require('./2019/MakeTime'), + max: require('./2019/max'), + min: require('./2019/min'), MinFromTime: require('./2019/MinFromTime'), modulo: require('./2019/modulo'), MonthFromTime: require('./2019/MonthFromTime'), msFromTime: require('./2019/msFromTime'), + NormalCompletion: require('./2019/NormalCompletion'), + NumberToRawBytes: require('./2019/NumberToRawBytes'), NumberToString: require('./2019/NumberToString'), ObjectCreate: require('./2019/ObjectCreate'), + ObjectDefineProperties: require('./2019/ObjectDefineProperties'), OrdinaryCreateFromConstructor: require('./2019/OrdinaryCreateFromConstructor'), OrdinaryDefineOwnProperty: require('./2019/OrdinaryDefineOwnProperty'), OrdinaryGetOwnProperty: require('./2019/OrdinaryGetOwnProperty'), @@ -82,8 +97,10 @@ var ES2019 = { OrdinaryHasInstance: require('./2019/OrdinaryHasInstance'), OrdinaryHasProperty: require('./2019/OrdinaryHasProperty'), OrdinarySetPrototypeOf: require('./2019/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2019/OrdinaryToPrimitive'), PromiseResolve: require('./2019/PromiseResolve'), QuoteJSONString: require('./2019/QuoteJSONString'), + RawBytesToNumber: require('./2019/RawBytesToNumber'), RegExpCreate: require('./2019/RegExpCreate'), RegExpExec: require('./2019/RegExpExec'), RequireObjectCoercible: require('./2019/RequireObjectCoercible'), @@ -106,6 +123,7 @@ var ES2019 = { thisStringValue: require('./2019/thisStringValue'), thisSymbolValue: require('./2019/thisSymbolValue'), thisTimeValue: require('./2019/thisTimeValue'), + ThrowCompletion: require('./2019/ThrowCompletion'), TimeClip: require('./2019/TimeClip'), TimeFromYear: require('./2019/TimeFromYear'), TimeString: require('./2019/TimeString'), @@ -134,6 +152,8 @@ var ES2019 = { UTF16Decode: require('./2019/UTF16Decode'), UTF16Encoding: require('./2019/UTF16Encoding'), ValidateAndApplyPropertyDescriptor: require('./2019/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2019/ValidateAtomicAccess'), + ValidateTypedArray: require('./2019/ValidateTypedArray'), WeekDay: require('./2019/WeekDay'), YearFromTime: require('./2019/YearFromTime') }; diff --git a/node_modules/es-abstract/es2020.js b/node_modules/es-abstract/es2020.js index e6d1c7941..dc96fd375 100644 --- a/node_modules/es-abstract/es2020.js +++ b/node_modules/es-abstract/es2020.js @@ -1,7 +1,7 @@ 'use strict'; /* eslint global-require: 0 */ -// https://ecma-international.org/ecma-262/11.0/#sec-abstract-operations +// https://262.ecma-international.org/11.0/#sec-abstract-operations var ES2020 = { 'Abstract Equality Comparison': require('./2020/AbstractEqualityComparison'), 'Abstract Relational Comparison': require('./2020/AbstractRelationalComparison'), @@ -12,6 +12,8 @@ var ES2020 = { ArrayCreate: require('./2020/ArrayCreate'), ArraySetLength: require('./2020/ArraySetLength'), ArraySpeciesCreate: require('./2020/ArraySpeciesCreate'), + AsyncFromSyncIteratorContinuation: require('./2020/AsyncFromSyncIteratorContinuation'), + AsyncIteratorClose: require('./2020/AsyncIteratorClose'), BigInt: require('./2020/BigInt'), BigIntBitwiseOp: require('./2020/BigIntBitwiseOp'), BinaryAnd: require('./2020/BinaryAnd'), @@ -19,15 +21,19 @@ var ES2020 = { BinaryXor: require('./2020/BinaryXor'), Call: require('./2020/Call'), CanonicalNumericIndexString: require('./2020/CanonicalNumericIndexString'), + CharacterRange: require('./2020/CharacterRange'), CodePointAt: require('./2020/CodePointAt'), CompletePropertyDescriptor: require('./2020/CompletePropertyDescriptor'), + CompletionRecord: require('./2020/CompletionRecord'), CopyDataProperties: require('./2020/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2020/CreateAsyncFromSyncIterator'), CreateDataProperty: require('./2020/CreateDataProperty'), CreateDataPropertyOrThrow: require('./2020/CreateDataPropertyOrThrow'), CreateHTML: require('./2020/CreateHTML'), CreateIterResultObject: require('./2020/CreateIterResultObject'), CreateListFromArrayLike: require('./2020/CreateListFromArrayLike'), CreateMethodProperty: require('./2020/CreateMethodProperty'), + CreateRegExpStringIterator: require('./2020/CreateRegExpStringIterator'), DateFromTime: require('./2020/DateFromTime'), DateString: require('./2020/DateString'), Day: require('./2020/Day'), @@ -36,11 +42,13 @@ var ES2020 = { DayWithinYear: require('./2020/DayWithinYear'), DefinePropertyOrThrow: require('./2020/DefinePropertyOrThrow'), DeletePropertyOrThrow: require('./2020/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2020/DetachArrayBuffer'), EnumerableOwnPropertyNames: require('./2020/EnumerableOwnPropertyNames'), FlattenIntoArray: require('./2020/FlattenIntoArray'), floor: require('./2020/floor'), FromPropertyDescriptor: require('./2020/FromPropertyDescriptor'), Get: require('./2020/Get'), + GetGlobalObject: require('./2020/GetGlobalObject'), GetIterator: require('./2020/GetIterator'), GetMethod: require('./2020/GetMethod'), GetOwnPropertyKeys: require('./2020/GetOwnPropertyKeys'), @@ -57,9 +65,11 @@ var ES2020 = { IsArray: require('./2020/IsArray'), IsBigIntElementType: require('./2020/IsBigIntElementType'), IsCallable: require('./2020/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2020/IsCompatiblePropertyDescriptor'), IsConcatSpreadable: require('./2020/IsConcatSpreadable'), IsConstructor: require('./2020/IsConstructor'), IsDataDescriptor: require('./2020/IsDataDescriptor'), + IsDetachedBuffer: require('./2020/IsDetachedBuffer'), IsExtensible: require('./2020/IsExtensible'), IsGenericDescriptor: require('./2020/IsGenericDescriptor'), IsInteger: require('./2020/IsInteger'), @@ -68,6 +78,7 @@ var ES2020 = { IsPromise: require('./2020/IsPromise'), IsPropertyKey: require('./2020/IsPropertyKey'), IsRegExp: require('./2020/IsRegExp'), + IsSharedArrayBuffer: require('./2020/IsSharedArrayBuffer'), IsStringPrefix: require('./2020/IsStringPrefix'), IsUnclampedIntegerElementType: require('./2020/IsUnclampedIntegerElementType'), IsUnsignedElementType: require('./2020/IsUnsignedElementType'), @@ -81,13 +92,18 @@ var ES2020 = { MakeDate: require('./2020/MakeDate'), MakeDay: require('./2020/MakeDay'), MakeTime: require('./2020/MakeTime'), + max: require('./2020/max'), + min: require('./2020/min'), MinFromTime: require('./2020/MinFromTime'), modulo: require('./2020/modulo'), MonthFromTime: require('./2020/MonthFromTime'), msFromTime: require('./2020/msFromTime'), + NormalCompletion: require('./2020/NormalCompletion'), Number: require('./2020/Number'), NumberBitwiseOp: require('./2020/NumberBitwiseOp'), NumberToBigInt: require('./2020/NumberToBigInt'), + NumericToRawBytes: require('./2020/NumericToRawBytes'), + ObjectDefineProperties: require('./2020/ObjectDefineProperties'), OrdinaryCreateFromConstructor: require('./2020/OrdinaryCreateFromConstructor'), OrdinaryDefineOwnProperty: require('./2020/OrdinaryDefineOwnProperty'), OrdinaryGetOwnProperty: require('./2020/OrdinaryGetOwnProperty'), @@ -96,8 +112,10 @@ var ES2020 = { OrdinaryHasProperty: require('./2020/OrdinaryHasProperty'), OrdinaryObjectCreate: require('./2020/OrdinaryObjectCreate'), OrdinarySetPrototypeOf: require('./2020/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2020/OrdinaryToPrimitive'), PromiseResolve: require('./2020/PromiseResolve'), QuoteJSONString: require('./2020/QuoteJSONString'), + RawBytesToNumeric: require('./2020/RawBytesToNumeric'), RegExpCreate: require('./2020/RegExpCreate'), RegExpExec: require('./2020/RegExpExec'), RequireObjectCoercible: require('./2020/RequireObjectCoercible'), @@ -114,6 +132,7 @@ var ES2020 = { StringCreate: require('./2020/StringCreate'), StringGetOwnProperty: require('./2020/StringGetOwnProperty'), StringPad: require('./2020/StringPad'), + StringToBigInt: require('./2020/StringToBigInt'), SymbolDescriptiveString: require('./2020/SymbolDescriptiveString'), TestIntegrityLevel: require('./2020/TestIntegrityLevel'), thisBigIntValue: require('./2020/thisBigIntValue'), @@ -122,10 +141,14 @@ var ES2020 = { thisStringValue: require('./2020/thisStringValue'), thisSymbolValue: require('./2020/thisSymbolValue'), thisTimeValue: require('./2020/thisTimeValue'), + ThrowCompletion: require('./2020/ThrowCompletion'), TimeClip: require('./2020/TimeClip'), TimeFromYear: require('./2020/TimeFromYear'), TimeString: require('./2020/TimeString'), TimeWithinDay: require('./2020/TimeWithinDay'), + ToBigInt: require('./2020/ToBigInt'), + ToBigInt64: require('./2020/ToBigInt64'), + ToBigUint64: require('./2020/ToBigUint64'), ToBoolean: require('./2020/ToBoolean'), ToDateString: require('./2020/ToDateString'), ToIndex: require('./2020/ToIndex'), @@ -152,6 +175,8 @@ var ES2020 = { UTF16DecodeSurrogatePair: require('./2020/UTF16DecodeSurrogatePair'), UTF16Encoding: require('./2020/UTF16Encoding'), ValidateAndApplyPropertyDescriptor: require('./2020/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2020/ValidateAtomicAccess'), + ValidateTypedArray: require('./2020/ValidateTypedArray'), WeekDay: require('./2020/WeekDay'), YearFromTime: require('./2020/YearFromTime') }; diff --git a/node_modules/es-abstract/es2021.js b/node_modules/es-abstract/es2021.js new file mode 100644 index 000000000..d49b0a99f --- /dev/null +++ b/node_modules/es-abstract/es2021.js @@ -0,0 +1,195 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/12.0/#sec-abstract-operations +var ES2021 = { + 'Abstract Equality Comparison': require('./2021/AbstractEqualityComparison'), + 'Abstract Relational Comparison': require('./2021/AbstractRelationalComparison'), + 'Strict Equality Comparison': require('./2021/StrictEqualityComparison'), + abs: require('./2021/abs'), + AddEntriesFromIterable: require('./2021/AddEntriesFromIterable'), + AddToKeptObjects: require('./2021/AddToKeptObjects'), + AdvanceStringIndex: require('./2021/AdvanceStringIndex'), + ApplyStringOrNumericBinaryOperator: require('./2021/ApplyStringOrNumericBinaryOperator'), + ArrayCreate: require('./2021/ArrayCreate'), + ArraySetLength: require('./2021/ArraySetLength'), + ArraySpeciesCreate: require('./2021/ArraySpeciesCreate'), + AsyncFromSyncIteratorContinuation: require('./2021/AsyncFromSyncIteratorContinuation'), + AsyncIteratorClose: require('./2021/AsyncIteratorClose'), + BigInt: require('./2021/BigInt'), + BigIntBitwiseOp: require('./2021/BigIntBitwiseOp'), + BinaryAnd: require('./2021/BinaryAnd'), + BinaryOr: require('./2021/BinaryOr'), + BinaryXor: require('./2021/BinaryXor'), + ByteListBitwiseOp: require('./2021/ByteListBitwiseOp'), + ByteListEqual: require('./2021/ByteListEqual'), + Call: require('./2021/Call'), + CanonicalNumericIndexString: require('./2021/CanonicalNumericIndexString'), + CharacterRange: require('./2021/CharacterRange'), + clamp: require('./2021/clamp'), + ClearKeptObjects: require('./2021/ClearKeptObjects'), + CodePointAt: require('./2021/CodePointAt'), + CodePointsToString: require('./2021/CodePointsToString'), + CompletePropertyDescriptor: require('./2021/CompletePropertyDescriptor'), + CompletionRecord: require('./2021/CompletionRecord'), + CopyDataProperties: require('./2021/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2021/CreateAsyncFromSyncIterator'), + CreateDataProperty: require('./2021/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2021/CreateDataPropertyOrThrow'), + CreateHTML: require('./2021/CreateHTML'), + CreateIterResultObject: require('./2021/CreateIterResultObject'), + CreateListFromArrayLike: require('./2021/CreateListFromArrayLike'), + CreateMethodProperty: require('./2021/CreateMethodProperty'), + CreateRegExpStringIterator: require('./2021/CreateRegExpStringIterator'), + DateFromTime: require('./2021/DateFromTime'), + DateString: require('./2021/DateString'), + Day: require('./2021/Day'), + DayFromYear: require('./2021/DayFromYear'), + DaysInYear: require('./2021/DaysInYear'), + DayWithinYear: require('./2021/DayWithinYear'), + DefinePropertyOrThrow: require('./2021/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2021/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2021/DetachArrayBuffer'), + EnumerableOwnPropertyNames: require('./2021/EnumerableOwnPropertyNames'), + FlattenIntoArray: require('./2021/FlattenIntoArray'), + floor: require('./2021/floor'), + FromPropertyDescriptor: require('./2021/FromPropertyDescriptor'), + Get: require('./2021/Get'), + GetGlobalObject: require('./2021/GetGlobalObject'), + GetIterator: require('./2021/GetIterator'), + GetMethod: require('./2021/GetMethod'), + GetOwnPropertyKeys: require('./2021/GetOwnPropertyKeys'), + GetPromiseResolve: require('./2021/GetPromiseResolve'), + GetPrototypeFromConstructor: require('./2021/GetPrototypeFromConstructor'), + GetSubstitution: require('./2021/GetSubstitution'), + GetV: require('./2021/GetV'), + HasOwnProperty: require('./2021/HasOwnProperty'), + HasProperty: require('./2021/HasProperty'), + HourFromTime: require('./2021/HourFromTime'), + InLeapYear: require('./2021/InLeapYear'), + InstanceofOperator: require('./2021/InstanceofOperator'), + Invoke: require('./2021/Invoke'), + IsAccessorDescriptor: require('./2021/IsAccessorDescriptor'), + IsArray: require('./2021/IsArray'), + IsBigIntElementType: require('./2021/IsBigIntElementType'), + IsCallable: require('./2021/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2021/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2021/IsConcatSpreadable'), + IsConstructor: require('./2021/IsConstructor'), + IsDataDescriptor: require('./2021/IsDataDescriptor'), + IsDetachedBuffer: require('./2021/IsDetachedBuffer'), + IsExtensible: require('./2021/IsExtensible'), + IsGenericDescriptor: require('./2021/IsGenericDescriptor'), + IsIntegralNumber: require('./2021/IsIntegralNumber'), + IsNoTearConfiguration: require('./2021/IsNoTearConfiguration'), + IsPromise: require('./2021/IsPromise'), + IsPropertyKey: require('./2021/IsPropertyKey'), + IsRegExp: require('./2021/IsRegExp'), + IsSharedArrayBuffer: require('./2021/IsSharedArrayBuffer'), + IsStringPrefix: require('./2021/IsStringPrefix'), + IsUnclampedIntegerElementType: require('./2021/IsUnclampedIntegerElementType'), + IsUnsignedElementType: require('./2021/IsUnsignedElementType'), + IterableToList: require('./2021/IterableToList'), + IteratorClose: require('./2021/IteratorClose'), + IteratorComplete: require('./2021/IteratorComplete'), + IteratorNext: require('./2021/IteratorNext'), + IteratorStep: require('./2021/IteratorStep'), + IteratorValue: require('./2021/IteratorValue'), + LengthOfArrayLike: require('./2021/LengthOfArrayLike'), + MakeDate: require('./2021/MakeDate'), + MakeDay: require('./2021/MakeDay'), + MakeTime: require('./2021/MakeTime'), + max: require('./2021/max'), + min: require('./2021/min'), + MinFromTime: require('./2021/MinFromTime'), + modulo: require('./2021/modulo'), + MonthFromTime: require('./2021/MonthFromTime'), + msFromTime: require('./2021/msFromTime'), + NormalCompletion: require('./2021/NormalCompletion'), + Number: require('./2021/Number'), + NumberBitwiseOp: require('./2021/NumberBitwiseOp'), + NumberToBigInt: require('./2021/NumberToBigInt'), + NumericToRawBytes: require('./2021/NumericToRawBytes'), + ObjectDefineProperties: require('./2021/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2021/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2021/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2021/OrdinaryGetOwnProperty'), + OrdinaryGetPrototypeOf: require('./2021/OrdinaryGetPrototypeOf'), + OrdinaryHasInstance: require('./2021/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2021/OrdinaryHasProperty'), + OrdinaryObjectCreate: require('./2021/OrdinaryObjectCreate'), + OrdinarySetPrototypeOf: require('./2021/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2021/OrdinaryToPrimitive'), + PromiseResolve: require('./2021/PromiseResolve'), + QuoteJSONString: require('./2021/QuoteJSONString'), + RawBytesToNumeric: require('./2021/RawBytesToNumeric'), + RegExpCreate: require('./2021/RegExpCreate'), + RegExpExec: require('./2021/RegExpExec'), + RequireObjectCoercible: require('./2021/RequireObjectCoercible'), + SameValue: require('./2021/SameValue'), + SameValueNonNumeric: require('./2021/SameValueNonNumeric'), + SameValueZero: require('./2021/SameValueZero'), + SecFromTime: require('./2021/SecFromTime'), + Set: require('./2021/Set'), + SetFunctionLength: require('./2021/SetFunctionLength'), + SetFunctionName: require('./2021/SetFunctionName'), + SetIntegrityLevel: require('./2021/SetIntegrityLevel'), + SpeciesConstructor: require('./2021/SpeciesConstructor'), + SplitMatch: require('./2021/SplitMatch'), + StringCreate: require('./2021/StringCreate'), + StringGetOwnProperty: require('./2021/StringGetOwnProperty'), + StringIndexOf: require('./2021/StringIndexOf'), + StringPad: require('./2021/StringPad'), + StringToBigInt: require('./2021/StringToBigInt'), + StringToCodePoints: require('./2021/StringToCodePoints'), + substring: require('./2021/substring'), + SymbolDescriptiveString: require('./2021/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2021/TestIntegrityLevel'), + thisBigIntValue: require('./2021/thisBigIntValue'), + thisBooleanValue: require('./2021/thisBooleanValue'), + thisNumberValue: require('./2021/thisNumberValue'), + thisStringValue: require('./2021/thisStringValue'), + thisSymbolValue: require('./2021/thisSymbolValue'), + thisTimeValue: require('./2021/thisTimeValue'), + ThrowCompletion: require('./2021/ThrowCompletion'), + TimeClip: require('./2021/TimeClip'), + TimeFromYear: require('./2021/TimeFromYear'), + TimeString: require('./2021/TimeString'), + TimeWithinDay: require('./2021/TimeWithinDay'), + ToBigInt: require('./2021/ToBigInt'), + ToBigInt64: require('./2021/ToBigInt64'), + ToBigUint64: require('./2021/ToBigUint64'), + ToBoolean: require('./2021/ToBoolean'), + ToDateString: require('./2021/ToDateString'), + ToIndex: require('./2021/ToIndex'), + ToInt16: require('./2021/ToInt16'), + ToInt32: require('./2021/ToInt32'), + ToInt8: require('./2021/ToInt8'), + ToIntegerOrInfinity: require('./2021/ToIntegerOrInfinity'), + ToLength: require('./2021/ToLength'), + ToNumber: require('./2021/ToNumber'), + ToNumeric: require('./2021/ToNumeric'), + ToObject: require('./2021/ToObject'), + ToPrimitive: require('./2021/ToPrimitive'), + ToPropertyDescriptor: require('./2021/ToPropertyDescriptor'), + ToPropertyKey: require('./2021/ToPropertyKey'), + ToString: require('./2021/ToString'), + ToUint16: require('./2021/ToUint16'), + ToUint32: require('./2021/ToUint32'), + ToUint8: require('./2021/ToUint8'), + ToUint8Clamp: require('./2021/ToUint8Clamp'), + TrimString: require('./2021/TrimString'), + Type: require('./2021/Type'), + UnicodeEscape: require('./2021/UnicodeEscape'), + UTF16EncodeCodePoint: require('./2021/UTF16EncodeCodePoint'), + UTF16SurrogatePairToCodePoint: require('./2021/UTF16SurrogatePairToCodePoint'), + ValidateAndApplyPropertyDescriptor: require('./2021/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2021/ValidateAtomicAccess'), + ValidateIntegerTypedArray: require('./2021/ValidateIntegerTypedArray'), + ValidateTypedArray: require('./2021/ValidateTypedArray'), + WeakRefDeref: require('./2021/WeakRefDeref'), + WeekDay: require('./2021/WeekDay'), + YearFromTime: require('./2021/YearFromTime') +}; + +module.exports = ES2021; diff --git a/node_modules/es-abstract/es2022.js b/node_modules/es-abstract/es2022.js new file mode 100644 index 000000000..0856d70e7 --- /dev/null +++ b/node_modules/es-abstract/es2022.js @@ -0,0 +1,207 @@ +'use strict'; + +/* eslint global-require: 0 */ +// https://262.ecma-international.org/13.0/#sec-abstract-operations +var ES2022 = { + abs: require('./2022/abs'), + AddEntriesFromIterable: require('./2022/AddEntriesFromIterable'), + AddToKeptObjects: require('./2022/AddToKeptObjects'), + AdvanceStringIndex: require('./2022/AdvanceStringIndex'), + ApplyStringOrNumericBinaryOperator: require('./2022/ApplyStringOrNumericBinaryOperator'), + ArrayCreate: require('./2022/ArrayCreate'), + ArraySetLength: require('./2022/ArraySetLength'), + ArraySpeciesCreate: require('./2022/ArraySpeciesCreate'), + AsyncFromSyncIteratorContinuation: require('./2022/AsyncFromSyncIteratorContinuation'), + AsyncIteratorClose: require('./2022/AsyncIteratorClose'), + BigInt: require('./2022/BigInt'), + BigIntBitwiseOp: require('./2022/BigIntBitwiseOp'), + BinaryAnd: require('./2022/BinaryAnd'), + BinaryOr: require('./2022/BinaryOr'), + BinaryXor: require('./2022/BinaryXor'), + ByteListBitwiseOp: require('./2022/ByteListBitwiseOp'), + ByteListEqual: require('./2022/ByteListEqual'), + Call: require('./2022/Call'), + CanonicalNumericIndexString: require('./2022/CanonicalNumericIndexString'), + CharacterRange: require('./2022/CharacterRange'), + clamp: require('./2022/clamp'), + ClearKeptObjects: require('./2022/ClearKeptObjects'), + CodePointAt: require('./2022/CodePointAt'), + CodePointsToString: require('./2022/CodePointsToString'), + CompletePropertyDescriptor: require('./2022/CompletePropertyDescriptor'), + CompletionRecord: require('./2022/CompletionRecord'), + CopyDataProperties: require('./2022/CopyDataProperties'), + CreateAsyncFromSyncIterator: require('./2022/CreateAsyncFromSyncIterator'), + CreateDataProperty: require('./2022/CreateDataProperty'), + CreateDataPropertyOrThrow: require('./2022/CreateDataPropertyOrThrow'), + CreateHTML: require('./2022/CreateHTML'), + CreateIterResultObject: require('./2022/CreateIterResultObject'), + CreateListFromArrayLike: require('./2022/CreateListFromArrayLike'), + CreateMethodProperty: require('./2022/CreateMethodProperty'), + CreateNonEnumerableDataPropertyOrThrow: require('./2022/CreateNonEnumerableDataPropertyOrThrow'), + CreateRegExpStringIterator: require('./2022/CreateRegExpStringIterator'), + DateFromTime: require('./2022/DateFromTime'), + DateString: require('./2022/DateString'), + Day: require('./2022/Day'), + DayFromYear: require('./2022/DayFromYear'), + DaysInYear: require('./2022/DaysInYear'), + DayWithinYear: require('./2022/DayWithinYear'), + DefinePropertyOrThrow: require('./2022/DefinePropertyOrThrow'), + DeletePropertyOrThrow: require('./2022/DeletePropertyOrThrow'), + DetachArrayBuffer: require('./2022/DetachArrayBuffer'), + EnumerableOwnPropertyNames: require('./2022/EnumerableOwnPropertyNames'), + FlattenIntoArray: require('./2022/FlattenIntoArray'), + floor: require('./2022/floor'), + FromPropertyDescriptor: require('./2022/FromPropertyDescriptor'), + Get: require('./2022/Get'), + GetGlobalObject: require('./2022/GetGlobalObject'), + GetIterator: require('./2022/GetIterator'), + GetMatchIndexPair: require('./2022/GetMatchIndexPair'), + GetMatchString: require('./2022/GetMatchString'), + GetMethod: require('./2022/GetMethod'), + GetOwnPropertyKeys: require('./2022/GetOwnPropertyKeys'), + GetPromiseResolve: require('./2022/GetPromiseResolve'), + GetPrototypeFromConstructor: require('./2022/GetPrototypeFromConstructor'), + GetStringIndex: require('./2022/GetStringIndex'), + GetSubstitution: require('./2022/GetSubstitution'), + GetV: require('./2022/GetV'), + HasOwnProperty: require('./2022/HasOwnProperty'), + HasProperty: require('./2022/HasProperty'), + HourFromTime: require('./2022/HourFromTime'), + InLeapYear: require('./2022/InLeapYear'), + InstallErrorCause: require('./2022/InstallErrorCause'), + InstanceofOperator: require('./2022/InstanceofOperator'), + Invoke: require('./2022/Invoke'), + IsAccessorDescriptor: require('./2022/IsAccessorDescriptor'), + IsArray: require('./2022/IsArray'), + IsBigIntElementType: require('./2022/IsBigIntElementType'), + IsCallable: require('./2022/IsCallable'), + IsCompatiblePropertyDescriptor: require('./2022/IsCompatiblePropertyDescriptor'), + IsConcatSpreadable: require('./2022/IsConcatSpreadable'), + IsConstructor: require('./2022/IsConstructor'), + IsDataDescriptor: require('./2022/IsDataDescriptor'), + IsDetachedBuffer: require('./2022/IsDetachedBuffer'), + IsExtensible: require('./2022/IsExtensible'), + IsGenericDescriptor: require('./2022/IsGenericDescriptor'), + IsIntegralNumber: require('./2022/IsIntegralNumber'), + IsLessThan: require('./2022/IsLessThan'), + IsLooselyEqual: require('./2022/IsLooselyEqual'), + IsNoTearConfiguration: require('./2022/IsNoTearConfiguration'), + IsPromise: require('./2022/IsPromise'), + IsPropertyKey: require('./2022/IsPropertyKey'), + IsRegExp: require('./2022/IsRegExp'), + IsSharedArrayBuffer: require('./2022/IsSharedArrayBuffer'), + IsStrictlyEqual: require('./2022/IsStrictlyEqual'), + IsStringPrefix: require('./2022/IsStringPrefix'), + IsStringWellFormedUnicode: require('./2022/IsStringWellFormedUnicode'), + IsUnclampedIntegerElementType: require('./2022/IsUnclampedIntegerElementType'), + IsUnsignedElementType: require('./2022/IsUnsignedElementType'), + IterableToList: require('./2022/IterableToList'), + IteratorClose: require('./2022/IteratorClose'), + IteratorComplete: require('./2022/IteratorComplete'), + IteratorNext: require('./2022/IteratorNext'), + IteratorStep: require('./2022/IteratorStep'), + IteratorValue: require('./2022/IteratorValue'), + LengthOfArrayLike: require('./2022/LengthOfArrayLike'), + MakeDate: require('./2022/MakeDate'), + MakeDay: require('./2022/MakeDay'), + MakeMatchIndicesIndexPairArray: require('./2022/MakeMatchIndicesIndexPairArray'), + MakeTime: require('./2022/MakeTime'), + max: require('./2022/max'), + min: require('./2022/min'), + MinFromTime: require('./2022/MinFromTime'), + modulo: require('./2022/modulo'), + MonthFromTime: require('./2022/MonthFromTime'), + msFromTime: require('./2022/msFromTime'), + NormalCompletion: require('./2022/NormalCompletion'), + Number: require('./2022/Number'), + NumberBitwiseOp: require('./2022/NumberBitwiseOp'), + NumberToBigInt: require('./2022/NumberToBigInt'), + NumericToRawBytes: require('./2022/NumericToRawBytes'), + ObjectDefineProperties: require('./2022/ObjectDefineProperties'), + OrdinaryCreateFromConstructor: require('./2022/OrdinaryCreateFromConstructor'), + OrdinaryDefineOwnProperty: require('./2022/OrdinaryDefineOwnProperty'), + OrdinaryGetOwnProperty: require('./2022/OrdinaryGetOwnProperty'), + OrdinaryGetPrototypeOf: require('./2022/OrdinaryGetPrototypeOf'), + OrdinaryHasInstance: require('./2022/OrdinaryHasInstance'), + OrdinaryHasProperty: require('./2022/OrdinaryHasProperty'), + OrdinaryObjectCreate: require('./2022/OrdinaryObjectCreate'), + OrdinarySetPrototypeOf: require('./2022/OrdinarySetPrototypeOf'), + OrdinaryToPrimitive: require('./2022/OrdinaryToPrimitive'), + PromiseResolve: require('./2022/PromiseResolve'), + QuoteJSONString: require('./2022/QuoteJSONString'), + RawBytesToNumeric: require('./2022/RawBytesToNumeric'), + RegExpCreate: require('./2022/RegExpCreate'), + RegExpExec: require('./2022/RegExpExec'), + RegExpHasFlag: require('./2022/RegExpHasFlag'), + RequireObjectCoercible: require('./2022/RequireObjectCoercible'), + SameValue: require('./2022/SameValue'), + SameValueNonNumeric: require('./2022/SameValueNonNumeric'), + SameValueZero: require('./2022/SameValueZero'), + SecFromTime: require('./2022/SecFromTime'), + Set: require('./2022/Set'), + SetFunctionLength: require('./2022/SetFunctionLength'), + SetFunctionName: require('./2022/SetFunctionName'), + SetIntegrityLevel: require('./2022/SetIntegrityLevel'), + SortIndexedProperties: require('./2022/SortIndexedProperties'), + SpeciesConstructor: require('./2022/SpeciesConstructor'), + StringCreate: require('./2022/StringCreate'), + StringGetOwnProperty: require('./2022/StringGetOwnProperty'), + StringIndexOf: require('./2022/StringIndexOf'), + StringPad: require('./2022/StringPad'), + StringToBigInt: require('./2022/StringToBigInt'), + StringToCodePoints: require('./2022/StringToCodePoints'), + StringToNumber: require('./2022/StringToNumber'), + substring: require('./2022/substring'), + SymbolDescriptiveString: require('./2022/SymbolDescriptiveString'), + TestIntegrityLevel: require('./2022/TestIntegrityLevel'), + thisBigIntValue: require('./2022/thisBigIntValue'), + thisBooleanValue: require('./2022/thisBooleanValue'), + thisNumberValue: require('./2022/thisNumberValue'), + thisStringValue: require('./2022/thisStringValue'), + thisSymbolValue: require('./2022/thisSymbolValue'), + thisTimeValue: require('./2022/thisTimeValue'), + ThrowCompletion: require('./2022/ThrowCompletion'), + TimeClip: require('./2022/TimeClip'), + TimeFromYear: require('./2022/TimeFromYear'), + TimeString: require('./2022/TimeString'), + TimeWithinDay: require('./2022/TimeWithinDay'), + ToBigInt: require('./2022/ToBigInt'), + ToBigInt64: require('./2022/ToBigInt64'), + ToBigUint64: require('./2022/ToBigUint64'), + ToBoolean: require('./2022/ToBoolean'), + ToDateString: require('./2022/ToDateString'), + ToIndex: require('./2022/ToIndex'), + ToInt16: require('./2022/ToInt16'), + ToInt32: require('./2022/ToInt32'), + ToInt8: require('./2022/ToInt8'), + ToIntegerOrInfinity: require('./2022/ToIntegerOrInfinity'), + ToLength: require('./2022/ToLength'), + ToNumber: require('./2022/ToNumber'), + ToNumeric: require('./2022/ToNumeric'), + ToObject: require('./2022/ToObject'), + ToPrimitive: require('./2022/ToPrimitive'), + ToPropertyDescriptor: require('./2022/ToPropertyDescriptor'), + ToPropertyKey: require('./2022/ToPropertyKey'), + ToString: require('./2022/ToString'), + ToUint16: require('./2022/ToUint16'), + ToUint32: require('./2022/ToUint32'), + ToUint8: require('./2022/ToUint8'), + ToUint8Clamp: require('./2022/ToUint8Clamp'), + ToZeroPaddedDecimalString: require('./2022/ToZeroPaddedDecimalString'), + TrimString: require('./2022/TrimString'), + Type: require('./2022/Type'), + TypedArrayElementSize: require('./2022/TypedArrayElementSize'), + TypedArrayElementType: require('./2022/TypedArrayElementType'), + UnicodeEscape: require('./2022/UnicodeEscape'), + UTF16EncodeCodePoint: require('./2022/UTF16EncodeCodePoint'), + UTF16SurrogatePairToCodePoint: require('./2022/UTF16SurrogatePairToCodePoint'), + ValidateAndApplyPropertyDescriptor: require('./2022/ValidateAndApplyPropertyDescriptor'), + ValidateAtomicAccess: require('./2022/ValidateAtomicAccess'), + ValidateIntegerTypedArray: require('./2022/ValidateIntegerTypedArray'), + ValidateTypedArray: require('./2022/ValidateTypedArray'), + WeakRefDeref: require('./2022/WeakRefDeref'), + WeekDay: require('./2022/WeekDay'), + YearFromTime: require('./2022/YearFromTime') +}; + +module.exports = ES2022; diff --git a/node_modules/es-abstract/helpers/DefineOwnProperty.js b/node_modules/es-abstract/helpers/DefineOwnProperty.js index 1a378a41b..61e83716e 100644 --- a/node_modules/es-abstract/helpers/DefineOwnProperty.js +++ b/node_modules/es-abstract/helpers/DefineOwnProperty.js @@ -1,17 +1,15 @@ 'use strict'; +var hasPropertyDescriptors = require('has-property-descriptors'); + var GetIntrinsic = require('get-intrinsic'); -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true); -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = null; - } -} +var hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug(); + +// eslint-disable-next-line global-require +var isArray = hasArrayLengthDefineBug && require('../helpers/IsArray'); var callBound = require('call-bind/callBound'); @@ -40,6 +38,18 @@ module.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPro O[P] = V; // will use [[Define]] return SameValue(O[P], V); } + if ( + hasArrayLengthDefineBug + && P === 'length' + && '[[Value]]' in desc + && isArray(O) + && O.length !== desc['[[Value]]'] + ) { + // eslint-disable-next-line no-param-reassign + O.length = desc['[[Value]]']; + return O.length === desc['[[Value]]']; + } + $defineProperty(O, P, FromPropertyDescriptor(desc)); return true; }; diff --git a/node_modules/es-abstract/helpers/IsArray.js b/node_modules/es-abstract/helpers/IsArray.js new file mode 100644 index 000000000..26b52fb4b --- /dev/null +++ b/node_modules/es-abstract/helpers/IsArray.js @@ -0,0 +1,12 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $Array = GetIntrinsic('%Array%'); + +// eslint-disable-next-line global-require +var toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString'); + +module.exports = $Array.isArray || function IsArray(argument) { + return toStr(argument) === '[object Array]'; +}; diff --git a/node_modules/es-abstract/helpers/assertRecord.js b/node_modules/es-abstract/helpers/assertRecord.js index 623bc56d1..3d93ec55a 100644 --- a/node_modules/es-abstract/helpers/assertRecord.js +++ b/node_modules/es-abstract/helpers/assertRecord.js @@ -7,12 +7,11 @@ var $SyntaxError = GetIntrinsic('%SyntaxError%'); var has = require('has'); +var isMatchRecord = require('./isMatchRecord'); + var predicates = { // https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type - 'Property Descriptor': function isPropertyDescriptor(Type, Desc) { - if (Type(Desc) !== 'Object') { - return false; - } + 'Property Descriptor': function isPropertyDescriptor(Desc) { var allowed = { '[[Configurable]]': true, '[[Enumerable]]': true, @@ -34,6 +33,27 @@ var predicates = { throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); } return true; + }, + // https://262.ecma-international.org/13.0/#sec-match-records + 'Match Record': isMatchRecord, + 'Iterator Record': function isIteratorRecord(value) { + return has(value, '[[Iterator]]') && has(value, '[[NextMethod]]') && has(value, '[[Done]]'); + }, + 'PromiseCapability Record': function isPromiseCapabilityRecord(value) { + return value + && has(value, '[[Resolve]]') + && typeof value['[[Resolve]]'] === 'function' + && has(value, '[[Reject]]') + && typeof value['[[Reject]]'] === 'function' + && has(value, '[[Promise]]') + && value['[[Promise]]'] + && typeof value['[[Promise]]'].then === 'function'; + }, + 'AsyncGeneratorRequest Record': function isAsyncGeneratorRequestRecord(value) { + return value + && has(value, '[[Completion]]') // TODO: confirm is a completion record + && has(value, '[[Capability]]') + && predicates['PromiseCapability Record'](value['[[Capability]]']); } }; @@ -42,7 +62,7 @@ module.exports = function assertRecord(Type, recordType, argumentName, value) { if (typeof predicate !== 'function') { throw new $SyntaxError('unknown record type: ' + recordType); } - if (!predicate(Type, value)) { + if (Type(value) !== 'Object' || !predicate(value)) { throw new $TypeError(argumentName + ' must be a ' + recordType); } }; diff --git a/node_modules/es-abstract/helpers/assign.js b/node_modules/es-abstract/helpers/assign.js index 56eeb1c1f..c89c68039 100644 --- a/node_modules/es-abstract/helpers/assign.js +++ b/node_modules/es-abstract/helpers/assign.js @@ -4,7 +4,7 @@ var GetIntrinsic = require('get-intrinsic'); var has = require('has'); -var $assign = GetIntrinsic('%Object%').assign; +var $assign = GetIntrinsic('%Object.assign%', true); module.exports = function assign(target, source) { if ($assign) { diff --git a/node_modules/es-abstract/helpers/fromPropertyDescriptor.js b/node_modules/es-abstract/helpers/fromPropertyDescriptor.js new file mode 100644 index 000000000..878861271 --- /dev/null +++ b/node_modules/es-abstract/helpers/fromPropertyDescriptor.js @@ -0,0 +1,27 @@ +'use strict'; + +module.exports = function fromPropertyDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return Desc; + } + var obj = {}; + if ('[[Value]]' in Desc) { + obj.value = Desc['[[Value]]']; + } + if ('[[Writable]]' in Desc) { + obj.writable = !!Desc['[[Writable]]']; + } + if ('[[Get]]' in Desc) { + obj.get = Desc['[[Get]]']; + } + if ('[[Set]]' in Desc) { + obj.set = Desc['[[Set]]']; + } + if ('[[Enumerable]]' in Desc) { + obj.enumerable = !!Desc['[[Enumerable]]']; + } + if ('[[Configurable]]' in Desc) { + obj.configurable = !!Desc['[[Configurable]]']; + } + return obj; +}; diff --git a/node_modules/es-abstract/helpers/getInferredName.js b/node_modules/es-abstract/helpers/getInferredName.js index 2dab6e77b..5fd24ffa8 100644 --- a/node_modules/es-abstract/helpers/getInferredName.js +++ b/node_modules/es-abstract/helpers/getInferredName.js @@ -1,10 +1,4 @@ 'use strict'; -var getInferredName; -try { - // eslint-disable-next-line no-new-func - getInferredName = Function('s', 'return { [s]() {} }[s].name;'); -} catch (e) {} - -var inferred = function () {}; -module.exports = getInferredName && inferred.name === 'inferred' ? getInferredName : null; +// TODO: remove, semver-major +module.exports = require('get-symbol-description/getInferredName'); diff --git a/node_modules/es-abstract/helpers/getIteratorMethod.js b/node_modules/es-abstract/helpers/getIteratorMethod.js index fe581f414..9acb8009d 100644 --- a/node_modules/es-abstract/helpers/getIteratorMethod.js +++ b/node_modules/es-abstract/helpers/getIteratorMethod.js @@ -3,9 +3,11 @@ var hasSymbols = require('has-symbols')(); var GetIntrinsic = require('get-intrinsic'); var callBound = require('call-bind/callBound'); +var isString = require('is-string'); var $iterator = GetIntrinsic('%Symbol.iterator%', true); var $stringSlice = callBound('String.prototype.slice'); +var $String = GetIntrinsic('%String%', true); module.exports = function getIteratorMethod(ES, iterable) { var usingIterator; @@ -25,12 +27,12 @@ module.exports = function getIteratorMethod(ES, iterable) { } }; }; - } else if (ES.Type(iterable) === 'String') { + } else if (isString(iterable)) { usingIterator = function () { var i = 0; return { next: function () { - var nextIndex = ES.AdvanceStringIndex(iterable, i, true); + var nextIndex = ES.AdvanceStringIndex($String(iterable), i, true); var value = $stringSlice(iterable, i, nextIndex); i = nextIndex; return { diff --git a/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js b/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js index 79cf0488e..e0f823d10 100644 --- a/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js +++ b/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js @@ -1,15 +1,5 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); +// TODO: remove, semver-major -var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%'); -if ($gOPD) { - try { - $gOPD([], 'length'); - } catch (e) { - // IE 8 has a broken gOPD - $gOPD = null; - } -} - -module.exports = $gOPD; +module.exports = require('gopd'); diff --git a/node_modules/es-abstract/helpers/getProto.js b/node_modules/es-abstract/helpers/getProto.js index c190c7bd0..d63903ad4 100644 --- a/node_modules/es-abstract/helpers/getProto.js +++ b/node_modules/es-abstract/helpers/getProto.js @@ -3,11 +3,11 @@ var GetIntrinsic = require('get-intrinsic'); var originalGetProto = GetIntrinsic('%Object.getPrototypeOf%', true); -var $ArrayProto = GetIntrinsic('%Array.prototype%'); + +var hasProto = require('has-proto')(); module.exports = originalGetProto || ( - // eslint-disable-next-line no-proto - [].__proto__ === $ArrayProto + hasProto ? function (O) { return O.__proto__; // eslint-disable-line no-proto } diff --git a/node_modules/es-abstract/helpers/getSymbolDescription.js b/node_modules/es-abstract/helpers/getSymbolDescription.js index e31cad274..699705f4f 100644 --- a/node_modules/es-abstract/helpers/getSymbolDescription.js +++ b/node_modules/es-abstract/helpers/getSymbolDescription.js @@ -1,41 +1,4 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); - -var callBound = require('call-bind/callBound'); - -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var getGlobalSymbolDescription = GetIntrinsic('%Symbol.keyFor%', true); -var thisSymbolValue = callBound('%Symbol.prototype.valueOf%', true); -var symToStr = callBound('Symbol.prototype.toString', true); - -var getInferredName = require('./getInferredName'); - -/* eslint-disable consistent-return */ -module.exports = callBound('%Symbol.prototype.description%', true) || function getSymbolDescription(symbol) { - if (!thisSymbolValue) { - throw new $SyntaxError('Symbols are not supported in this environment'); - } - - // will throw if not a symbol primitive or wrapper object - var sym = thisSymbolValue(symbol); - - if (getInferredName) { - var name = getInferredName(sym); - if (name === '') { return; } - return name.slice(1, -1); // name.slice('['.length, -']'.length); - } - - var desc; - if (getGlobalSymbolDescription) { - desc = getGlobalSymbolDescription(sym); - if (typeof desc === 'string') { - return desc; - } - } - - desc = symToStr(sym).slice(7, -1); // str.slice('Symbol('.length, -')'.length); - if (desc) { - return desc; - } -}; +// TODO: remove, semver-major +module.exports = require('get-symbol-description'); diff --git a/node_modules/es-abstract/helpers/isAbstractClosure.js b/node_modules/es-abstract/helpers/isAbstractClosure.js new file mode 100644 index 000000000..503200dc5 --- /dev/null +++ b/node_modules/es-abstract/helpers/isAbstractClosure.js @@ -0,0 +1,9 @@ +'use strict'; + +var functionName = require('function.prototype.name'); + +var anon = functionName(function () {}); + +module.exports = function isAbstractClosure(x) { + return typeof x === 'function' && (!x.prototype || functionName(x) === anon); +}; diff --git a/node_modules/es-abstract/helpers/isFinite.js b/node_modules/es-abstract/helpers/isFinite.js index 9e7cd4f82..3bcd663b2 100644 --- a/node_modules/es-abstract/helpers/isFinite.js +++ b/node_modules/es-abstract/helpers/isFinite.js @@ -1,5 +1,5 @@ 'use strict'; -var $isNaN = Number.isNaN || function (a) { return a !== a; }; +var $isNaN = require('./isNaN'); -module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; +module.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; diff --git a/node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js b/node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js new file mode 100644 index 000000000..e33d0d7e1 --- /dev/null +++ b/node_modules/es-abstract/helpers/isFullyPopulatedPropertyDescriptor.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function isFullyPopulatedPropertyDescriptor(ES, Desc) { + return '[[Enumerable]]' in Desc + && '[[Configurable]]' in Desc + && (ES.IsAccessorDescriptor(Desc) || ES.IsDataDescriptor(Desc)); +}; diff --git a/node_modules/es-abstract/helpers/isMatchRecord.js b/node_modules/es-abstract/helpers/isMatchRecord.js new file mode 100644 index 000000000..50c18f91f --- /dev/null +++ b/node_modules/es-abstract/helpers/isMatchRecord.js @@ -0,0 +1,16 @@ +'use strict'; + +var has = require('has'); + +// https://262.ecma-international.org/13.0/#sec-match-records + +module.exports = function isMatchRecord(record) { + return ( + has(record, '[[StartIndex]]') + && has(record, '[[EndIndex]]') + && record['[[StartIndex]]'] >= 0 + && record['[[EndIndex]]'] >= record['[[StartIndex]]'] + && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]']) + && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]']) + ); +}; diff --git a/node_modules/es-abstract/helpers/modBigInt.js b/node_modules/es-abstract/helpers/modBigInt.js new file mode 100644 index 000000000..22be2a1a7 --- /dev/null +++ b/node_modules/es-abstract/helpers/modBigInt.js @@ -0,0 +1,6 @@ +'use strict'; + +module.exports = function bigIntMod(BigIntRemainder, bigint, modulo) { + var remain = BigIntRemainder(bigint, modulo); + return remain >= 0 ? remain : remain + modulo; +}; diff --git a/node_modules/es-abstract/helpers/reduce.js b/node_modules/es-abstract/helpers/reduce.js new file mode 100644 index 000000000..fb9a56f6d --- /dev/null +++ b/node_modules/es-abstract/helpers/reduce.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = function reduce(arr, fn, init) { + var acc = init; + for (var i = 0; i < arr.length; i += 1) { + acc = fn(acc, arr[i], i); + } + return acc; +}; diff --git a/node_modules/es-abstract/helpers/regexTester.js b/node_modules/es-abstract/helpers/regexTester.js index b1699fb45..41e48bec3 100644 --- a/node_modules/es-abstract/helpers/regexTester.js +++ b/node_modules/es-abstract/helpers/regexTester.js @@ -1,11 +1,5 @@ 'use strict'; -var GetIntrinsic = require('get-intrinsic'); +// TODO: remove, semver-major -var $test = GetIntrinsic('RegExp.prototype.test'); - -var callBind = require('call-bind'); - -module.exports = function regexTester(regex) { - return callBind($test, regex); -}; +module.exports = require('safe-regex-test'); diff --git a/node_modules/es-abstract/helpers/setProto.js b/node_modules/es-abstract/helpers/setProto.js index 0ee884fbe..57092680b 100644 --- a/node_modules/es-abstract/helpers/setProto.js +++ b/node_modules/es-abstract/helpers/setProto.js @@ -3,14 +3,15 @@ var GetIntrinsic = require('get-intrinsic'); var originalSetProto = GetIntrinsic('%Object.setPrototypeOf%', true); -var $ArrayProto = GetIntrinsic('%Array.prototype%'); + +var hasProto = require('has-proto')(); module.exports = originalSetProto || ( - // eslint-disable-next-line no-proto, no-negated-condition - [].__proto__ !== $ArrayProto - ? null - : function (O, proto) { + + hasProto + ? function (O, proto) { O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign return O; } + : null ); diff --git a/node_modules/es-abstract/index.js b/node_modules/es-abstract/index.js index 5cd529294..d9efc66f0 100644 --- a/node_modules/es-abstract/index.js +++ b/node_modules/es-abstract/index.js @@ -9,6 +9,8 @@ var ES2017 = require('./es2017'); var ES2018 = require('./es2018'); var ES2019 = require('./es2019'); var ES2020 = require('./es2020'); +var ES2021 = require('./es2021'); +var ES2022 = require('./es2022'); var ES = { ES5: ES5, @@ -19,7 +21,9 @@ var ES = { ES2017: ES2017, ES2018: ES2018, ES2019: ES2019, - ES2020: ES2020 + ES2020: ES2020, + ES2021: ES2021, + ES2022: ES2022 }; assign(ES, ES5); delete ES.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible diff --git a/node_modules/es-abstract/operations/2015.js b/node_modules/es-abstract/operations/2015.js index 7607ef41d..9edb26779 100644 --- a/node_modules/es-abstract/operations/2015.js +++ b/node_modules/es-abstract/operations/2015.js @@ -3,249 +3,742 @@ module.exports = { IsPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op - abs: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions', - 'Abstract Equality Comparison': 'https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://262.ecma-international.org/6.0/#sec-abstract-relational-comparison', - AddRestrictedFunctionProperties: 'https://262.ecma-international.org/6.0/#sec-addrestrictedfunctionproperties', - AdvanceStringIndex: 'https://262.ecma-international.org/6.0/#sec-advancestringindex', - AllocateArrayBuffer: 'https://262.ecma-international.org/6.0/#sec-allocatearraybuffer', - AllocateTypedArray: 'https://262.ecma-international.org/6.0/#sec-allocatetypedarray', - ArrayCreate: 'https://262.ecma-international.org/6.0/#sec-arraycreate', - ArraySetLength: 'https://262.ecma-international.org/6.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://262.ecma-international.org/6.0/#sec-arrayspeciescreate', - BoundFunctionCreate: 'https://262.ecma-international.org/6.0/#sec-boundfunctioncreate', - Call: 'https://262.ecma-international.org/6.0/#sec-call', - Canonicalize: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring', - CharacterRange: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterSetMatcher: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://262.ecma-international.org/6.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-completepropertydescriptor', - Completion: 'https://262.ecma-international.org/6.0/#sec-implicit-completion-values', - Construct: 'https://262.ecma-international.org/6.0/#sec-construct', - CopyDataBlockBytes: 'https://262.ecma-international.org/6.0/#sec-copydatablockbytes', - CreateArrayFromList: 'https://262.ecma-international.org/6.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://262.ecma-international.org/6.0/#sec-createarrayiterator', - CreateBuiltinFunction: 'https://262.ecma-international.org/6.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://262.ecma-international.org/6.0/#sec-createbytedatablock', - CreateDataProperty: 'https://262.ecma-international.org/6.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://262.ecma-international.org/6.0/#sec-createdynamicfunction', - CreateHTML: 'https://262.ecma-international.org/6.0/#sec-createhtml', - CreateIntrinsics: 'https://262.ecma-international.org/6.0/#sec-createintrinsics', - CreateIterResultObject: 'https://262.ecma-international.org/6.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://262.ecma-international.org/6.0/#sec-createlistfromarraylike', - CreateListIterator: 'https://262.ecma-international.org/6.0/#sec-createlistiterator', - CreateMapIterator: 'https://262.ecma-international.org/6.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://262.ecma-international.org/6.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://262.ecma-international.org/6.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://262.ecma-international.org/6.0/#sec-createperiterationenvironment', - CreateRealm: 'https://262.ecma-international.org/6.0/#sec-createrealm', - CreateSetIterator: 'https://262.ecma-international.org/6.0/#sec-createsetiterator', - CreateUnmappedArgumentsObject: 'https://262.ecma-international.org/6.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://262.ecma-international.org/6.0/#sec-date-number', - Day: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day', - DayFromYear: 'https://262.ecma-international.org/6.0/#sec-year-number', - DaylightSavingTA: 'https://262.ecma-international.org/6.0/#sec-daylight-saving-time-adjustment', - DaysInYear: 'https://262.ecma-international.org/6.0/#sec-year-number', - DayWithinYear: 'https://262.ecma-international.org/6.0/#sec-month-number', - Decode: 'https://262.ecma-international.org/6.0/#sec-decode', - DefinePropertyOrThrow: 'https://262.ecma-international.org/6.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://262.ecma-international.org/6.0/#sec-detacharraybuffer', - Encode: 'https://262.ecma-international.org/6.0/#sec-encode', - EnqueueJob: 'https://262.ecma-international.org/6.0/#sec-enqueuejob', - EnumerableOwnNames: 'https://262.ecma-international.org/6.0/#sec-enumerableownnames', - EscapeRegExpPattern: 'https://262.ecma-international.org/6.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://262.ecma-international.org/6.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://262.ecma-international.org/6.0/#sec-evaluatecall', - EvaluateDirectCall: 'https://262.ecma-international.org/6.0/#sec-evaluatedirectcall', - EvaluateNew: 'https://262.ecma-international.org/6.0/#sec-evaluatenew', - floor: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions', - ForBodyEvaluation: 'https://262.ecma-international.org/6.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://262.ecma-international.org/6.0/#sec-fulfillpromise', - FunctionAllocate: 'https://262.ecma-international.org/6.0/#sec-functionallocate', - FunctionCreate: 'https://262.ecma-international.org/6.0/#sec-functioncreate', - FunctionInitialize: 'https://262.ecma-international.org/6.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://262.ecma-international.org/6.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://262.ecma-international.org/6.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://262.ecma-international.org/6.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://262.ecma-international.org/6.0/#sec-generatorstart', - GeneratorValidate: 'https://262.ecma-international.org/6.0/#sec-generatorvalidate', - GeneratorYield: 'https://262.ecma-international.org/6.0/#sec-generatoryield', - Get: 'https://262.ecma-international.org/6.0/#sec-get-o-p', - GetBase: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues', - GetFunctionRealm: 'https://262.ecma-international.org/6.0/#sec-getfunctionrealm', - GetGlobalObject: 'https://262.ecma-international.org/6.0/#sec-getglobalobject', - GetIdentifierReference: 'https://262.ecma-international.org/6.0/#sec-getidentifierreference', - GetIterator: 'https://262.ecma-international.org/6.0/#sec-getiterator', - GetMethod: 'https://262.ecma-international.org/6.0/#sec-getmethod', - GetModuleNamespace: 'https://262.ecma-international.org/6.0/#sec-getmodulenamespace', - GetNewTarget: 'https://262.ecma-international.org/6.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://262.ecma-international.org/6.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor', - GetReferencedName: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues', - GetSubstitution: 'https://262.ecma-international.org/6.0/#sec-getsubstitution', - GetSuperConstructor: 'https://262.ecma-international.org/6.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://262.ecma-international.org/6.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://262.ecma-international.org/6.0/#sec-getthisenvironment', - GetThisValue: 'https://262.ecma-international.org/6.0/#sec-getthisvalue', - GetV: 'https://262.ecma-international.org/6.0/#sec-getv', - GetValue: 'https://262.ecma-international.org/6.0/#sec-getvalue', - GetValueFromBuffer: 'https://262.ecma-international.org/6.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://262.ecma-international.org/6.0/#sec-getviewvalue', - HasOwnProperty: 'https://262.ecma-international.org/6.0/#sec-hasownproperty', - HasPrimitiveBase: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues', - HasProperty: 'https://262.ecma-international.org/6.0/#sec-hasproperty', - HostResolveImportedModule: 'sec-hostresolveimportedmodule', - HourFromTime: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds', - ImportedLocalNames: 'https://262.ecma-international.org/6.0/#sec-importedlocalnames', - InitializeHostDefinedRealm: 'https://262.ecma-international.org/6.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://262.ecma-international.org/6.0/#sec-initializereferencedbinding', - InLeapYear: 'https://262.ecma-international.org/6.0/#sec-year-number', - InstanceofOperator: 'https://262.ecma-international.org/6.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://262.ecma-international.org/6.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://262.ecma-international.org/6.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://262.ecma-international.org/6.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://262.ecma-international.org/6.0/#sec-internalizejsonproperty', - Invoke: 'https://262.ecma-international.org/6.0/#sec-invoke', - IsAccessorDescriptor: 'https://262.ecma-international.org/6.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://262.ecma-international.org/6.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://262.ecma-international.org/6.0/#sec-isarray', - IsCallable: 'https://262.ecma-international.org/6.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://262.ecma-international.org/6.0/#sec-isconcatspreadable', - IsConstructor: 'https://262.ecma-international.org/6.0/#sec-isconstructor', - IsDataDescriptor: 'https://262.ecma-international.org/6.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://262.ecma-international.org/6.0/#sec-isdetachedbuffer', - IsExtensible: 'https://262.ecma-international.org/6.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://262.ecma-international.org/6.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://262.ecma-international.org/6.0/#sec-isintailposition', - IsInteger: 'https://262.ecma-international.org/6.0/#sec-isinteger', - IsLabelledFunction: 'https://262.ecma-international.org/6.0/#sec-islabelledfunction', - IsPromise: 'https://262.ecma-international.org/6.0/#sec-ispromise', - IsPropertyKey: 'https://262.ecma-international.org/6.0/#sec-ispropertykey', - IsPropertyReference: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues', - IsRegExp: 'https://262.ecma-international.org/6.0/#sec-isregexp', - IsStrictReference: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues', - IsSuperReference: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues', - IsUnresolvableReference: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues', - IsWordChar: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IteratorClose: 'https://262.ecma-international.org/6.0/#sec-iteratorclose', - IteratorComplete: 'https://262.ecma-international.org/6.0/#sec-iteratorcomplete', - IteratorNext: 'https://262.ecma-international.org/6.0/#sec-iteratornext', - IteratorStep: 'https://262.ecma-international.org/6.0/#sec-iteratorstep', - IteratorValue: 'https://262.ecma-international.org/6.0/#sec-iteratorvalue', - LocalTime: 'https://262.ecma-international.org/6.0/#sec-localtime', - LoopContinues: 'https://262.ecma-international.org/6.0/#sec-loopcontinues', - MakeArgGetter: 'https://262.ecma-international.org/6.0/#sec-makearggetter', - MakeArgSetter: 'https://262.ecma-international.org/6.0/#sec-makeargsetter', - MakeClassConstructor: 'https://262.ecma-international.org/6.0/#sec-makeclassconstructor', - MakeConstructor: 'https://262.ecma-international.org/6.0/#sec-makeconstructor', - MakeDate: 'https://262.ecma-international.org/6.0/#sec-makedate', - MakeDay: 'https://262.ecma-international.org/6.0/#sec-makeday', - MakeMethod: 'https://262.ecma-international.org/6.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://262.ecma-international.org/6.0/#sec-makesuperpropertyreference', - MakeTime: 'https://262.ecma-international.org/6.0/#sec-maketime', - max: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions', - min: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions', - MinFromTime: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds', - ModuleNamespaceCreate: 'https://262.ecma-international.org/6.0/#sec-modulenamespacecreate', - modulo: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions', - MonthFromTime: 'https://262.ecma-international.org/6.0/#sec-month-number', - msFromTime: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds', - msPerDay: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day', - NewDeclarativeEnvironment: 'https://262.ecma-international.org/6.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://262.ecma-international.org/6.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://262.ecma-international.org/6.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://262.ecma-international.org/6.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://262.ecma-international.org/6.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://262.ecma-international.org/6.0/#sec-newpromisecapability', - NormalCompletion: 'https://262.ecma-international.org/6.0/#sec-normalcompletion', - ObjectCreate: 'https://262.ecma-international.org/6.0/#sec-objectcreate', - ObjectDefineProperties: 'https://262.ecma-international.org/6.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://262.ecma-international.org/6.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://262.ecma-international.org/6.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty', - OrdinaryGetOwnProperty: 'https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty', - OrdinaryHasInstance: 'https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty', - ParseModule: 'https://262.ecma-international.org/6.0/#sec-parsemodule', - PerformEval: 'https://262.ecma-international.org/6.0/#sec-performeval', - PerformPromiseAll: 'https://262.ecma-international.org/6.0/#sec-performpromiseall', - PerformPromiseRace: 'https://262.ecma-international.org/6.0/#sec-performpromiserace', - PerformPromiseThen: 'https://262.ecma-international.org/6.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://262.ecma-international.org/6.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://262.ecma-international.org/6.0/#sec-preparefortailcall', - ProxyCreate: 'https://262.ecma-international.org/6.0/#sec-proxycreate', - PutValue: 'https://262.ecma-international.org/6.0/#sec-putvalue', - QuoteJSONString: 'https://262.ecma-international.org/6.0/#sec-quotejsonstring', - RegExpAlloc: 'https://262.ecma-international.org/6.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://262.ecma-international.org/6.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://262.ecma-international.org/6.0/#sec-regexpcreate', - RegExpExec: 'https://262.ecma-international.org/6.0/#sec-regexpexec', - RegExpInitialize: 'https://262.ecma-international.org/6.0/#sec-regexpinitialize', - RejectPromise: 'https://262.ecma-international.org/6.0/#sec-rejectpromise', - RepeatMatcher: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://262.ecma-international.org/6.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://262.ecma-international.org/6.0/#sec-resolvebinding', - ResolveThisBinding: 'https://262.ecma-international.org/6.0/#sec-resolvethisbinding', - SameValue: 'https://262.ecma-international.org/6.0/#sec-samevalue', - SameValueZero: 'https://262.ecma-international.org/6.0/#sec-samevaluezero', - SecFromTime: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds', - SerializeJSONArray: 'https://262.ecma-international.org/6.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://262.ecma-international.org/6.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://262.ecma-international.org/6.0/#sec-serializejsonproperty', - Set: 'https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://262.ecma-international.org/6.0/#sec-setdefaultglobalbindings', - SetFunctionName: 'https://262.ecma-international.org/6.0/#sec-setfunctionname', - SetIntegrityLevel: 'https://262.ecma-international.org/6.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://262.ecma-international.org/6.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://262.ecma-international.org/6.0/#sec-setvalueinbuffer', - SetViewValue: 'https://262.ecma-international.org/6.0/#sec-setviewvalue', - sign: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions', - SortCompare: 'https://262.ecma-international.org/6.0/#sec-sortcompare', - SpeciesConstructor: 'https://262.ecma-international.org/6.0/#sec-speciesconstructor', - SplitMatch: 'https://262.ecma-international.org/6.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://262.ecma-international.org/6.0/#sec-strict-equality-comparison', - StringCreate: 'https://262.ecma-international.org/6.0/#sec-stringcreate', - StringGetIndexProperty: 'https://262.ecma-international.org/6.0/#sec-stringgetindexproperty', - SymbolDescriptiveString: 'https://262.ecma-international.org/6.0/#sec-symboldescriptivestring', - TestIntegrityLevel: 'https://262.ecma-international.org/6.0/#sec-testintegritylevel', - thisBooleanValue: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object', - thisNumberValue: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object', - thisStringValue: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object', - thisTimeValue: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object', - TimeClip: 'https://262.ecma-international.org/6.0/#sec-timeclip', - TimeFromYear: 'https://262.ecma-international.org/6.0/#sec-year-number', - TimeWithinDay: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day', - ToBoolean: 'https://262.ecma-international.org/6.0/#sec-toboolean', - ToDateString: 'https://262.ecma-international.org/6.0/#sec-todatestring', - ToInt16: 'https://262.ecma-international.org/6.0/#sec-toint16', - ToInt32: 'https://262.ecma-international.org/6.0/#sec-toint32', - ToInt8: 'https://262.ecma-international.org/6.0/#sec-toint8', - ToInteger: 'https://262.ecma-international.org/6.0/#sec-tointeger', - ToLength: 'https://262.ecma-international.org/6.0/#sec-tolength', - ToNumber: 'https://262.ecma-international.org/6.0/#sec-tonumber', - ToObject: 'https://262.ecma-international.org/6.0/#sec-toobject', - ToPrimitive: 'https://262.ecma-international.org/6.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://262.ecma-international.org/6.0/#sec-topropertykey', - ToString: 'https://262.ecma-international.org/6.0/#sec-tostring', - ToUint16: 'https://262.ecma-international.org/6.0/#sec-touint16', - ToUint32: 'https://262.ecma-international.org/6.0/#sec-touint32', - ToUint8: 'https://262.ecma-international.org/6.0/#sec-touint8', - ToUint8Clamp: 'https://262.ecma-international.org/6.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://262.ecma-international.org/6.0/#sec-triggerpromisereactions', - Type: 'https://262.ecma-international.org/6.0/#sec-ecmascript-data-types-and-values', - TypedArrayFrom: 'https://262.ecma-international.org/6.0/#sec-typedarrayfrom', - UpdateEmpty: 'https://262.ecma-international.org/6.0/#sec-updateempty', - UTC: 'https://262.ecma-international.org/6.0/#sec-utc-t', - ValidateAndApplyPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor', - WeekDay: 'https://262.ecma-international.org/6.0/#sec-week-day', - YearFromTime: 'https://262.ecma-international.org/6.0/#sec-year-number' + abs: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/6.0/#sec-abstract-relational-comparison' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/6.0/#sec-addrestrictedfunctionproperties' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/6.0/#sec-advancestringindex' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-allocatearraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/6.0/#sec-allocatetypedarray' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/6.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-arrayspeciescreate' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/6.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-clonearraybuffer' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/6.0/#sec-implicit-completion-values' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/6.0/#sec-completion-record-specification-type' + }, + Construct: { + url: 'https://262.ecma-international.org/6.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/6.0/#sec-copydatablockbytes' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/6.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/6.0/#sec-createarrayiterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/6.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/6.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/6.0/#sec-createdynamicfunction' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/6.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/6.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/6.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/6.0/#sec-createlistfromarraylike' + }, + CreateListIterator: { + url: 'https://262.ecma-international.org/6.0/#sec-createlistiterator' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/6.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/6.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/6.0/#sec-createrealm' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/6.0/#sec-createsetiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/6.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-date-number' + }, + Day: { + url: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/6.0/#sec-year-number' + }, + DaylightSavingTA: { + url: 'https://262.ecma-international.org/6.0/#sec-daylight-saving-time-adjustment' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/6.0/#sec-year-number' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/6.0/#sec-month-number' + }, + Decode: { + url: 'https://262.ecma-international.org/6.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/6.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/6.0/#sec-encode' + }, + EnqueueJob: { + url: 'https://262.ecma-international.org/6.0/#sec-enqueuejob' + }, + EnumerableOwnNames: { + url: 'https://262.ecma-international.org/6.0/#sec-enumerableownnames' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/6.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/6.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/6.0/#sec-evaluatecall' + }, + EvaluateDirectCall: { + url: 'https://262.ecma-international.org/6.0/#sec-evaluatedirectcall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/6.0/#sec-evaluatenew' + }, + floor: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/6.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/6.0/#sec-fulfillpromise' + }, + FunctionAllocate: { + url: 'https://262.ecma-international.org/6.0/#sec-functionallocate' + }, + FunctionCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-functioncreate' + }, + FunctionInitialize: { + url: 'https://262.ecma-international.org/6.0/#sec-functioninitialize' + }, + GeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-generatorfunctioncreate' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/6.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/6.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/6.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/6.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/6.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/6.0/#sec-get-o-p' + }, + GetBase: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/6.0/#sec-getfunctionrealm' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/6.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/6.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/6.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/6.0/#sec-getmethod' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/6.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/6.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/6.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor' + }, + GetReferencedName: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/6.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/6.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/6.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/6.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/6.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/6.0/#sec-getviewvalue' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-hasownproperty' + }, + HasPrimitiveBase: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + HasProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-hasproperty' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/6.0/#sec-importedlocalnames' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/6.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/6.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/6.0/#sec-year-number' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/6.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/6.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/6.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/6.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/6.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/6.0/#sec-isarray' + }, + IsCallable: { + url: 'https://262.ecma-international.org/6.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/6.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/6.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/6.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/6.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/6.0/#sec-islabelledfunction' + }, + IsPromise: { + url: 'https://262.ecma-international.org/6.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/6.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/6.0/#sec-isregexp' + }, + IsStrictReference: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/6.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/6.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/6.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/6.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/6.0/#sec-iteratorvalue' + }, + LocalTime: { + url: 'https://262.ecma-international.org/6.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/6.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/6.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/6.0/#sec-makeargsetter' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/6.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/6.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/6.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/6.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/6.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + min: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-month-number' + }, + msFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds' + }, + msPerDay: { + url: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/6.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/6.0/#sec-newpromisecapability' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/6.0/#sec-normalcompletion' + }, + ObjectCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-objectcreate' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/6.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty' + }, + ParseModule: { + url: 'https://262.ecma-international.org/6.0/#sec-parsemodule' + }, + PerformEval: { + url: 'https://262.ecma-international.org/6.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/6.0/#sec-performpromiseall' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/6.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/6.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/6.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/6.0/#sec-preparefortailcall' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/6.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/6.0/#sec-quotejsonstring' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/6.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/6.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/6.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/6.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/6.0/#sec-rejectpromise' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/6.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/6.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/6.0/#sec-resolvethisbinding' + }, + SameValue: { + url: 'https://262.ecma-international.org/6.0/#sec-samevalue' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/6.0/#sec-samevaluezero' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/6.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/6.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/6.0/#sec-setdefaultglobalbindings' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/6.0/#sec-setfunctionname' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/6.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/6.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/6.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/6.0/#sec-setviewvalue' + }, + sign: { + url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions' + }, + SortCompare: { + url: 'https://262.ecma-international.org/6.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/6.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/6.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/6.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/6.0/#sec-stringcreate' + }, + StringGetIndexProperty: { + url: 'https://262.ecma-international.org/6.0/#sec-stringgetindexproperty' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/6.0/#sec-symboldescriptivestring' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/6.0/#sec-testintegritylevel' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object' + }, + TimeClip: { + url: 'https://262.ecma-international.org/6.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/6.0/#sec-year-number' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/6.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/6.0/#sec-todatestring' + }, + ToInt16: { + url: 'https://262.ecma-international.org/6.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/6.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/6.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/6.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/6.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/6.0/#sec-tonumber' + }, + ToObject: { + url: 'https://262.ecma-international.org/6.0/#sec-toobject' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/6.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/6.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/6.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/6.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/6.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/6.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/6.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/6.0/#sec-triggerpromisereactions' + }, + Type: { + url: 'https://262.ecma-international.org/6.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayFrom: { + url: 'https://262.ecma-international.org/6.0/#sec-typedarrayfrom' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/6.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/6.0/#sec-utc-t' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/6.0/#sec-validatetypedarray' + }, + WeekDay: { + url: 'https://262.ecma-international.org/6.0/#sec-week-day' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/6.0/#sec-year-number' + } }; diff --git a/node_modules/es-abstract/operations/2016.js b/node_modules/es-abstract/operations/2016.js index 3cfd8e7ac..66e6d4afc 100644 --- a/node_modules/es-abstract/operations/2016.js +++ b/node_modules/es-abstract/operations/2016.js @@ -3,275 +3,811 @@ module.exports = { IsPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op - abs: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions', - 'Abstract Equality Comparison': 'https://262.ecma-international.org/7.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://262.ecma-international.org/7.0/#sec-abstract-relational-comparison', - AddRestrictedFunctionProperties: 'https://262.ecma-international.org/7.0/#sec-addrestrictedfunctionproperties', - AdvanceStringIndex: 'https://262.ecma-international.org/7.0/#sec-advancestringindex', - AllocateArrayBuffer: 'https://262.ecma-international.org/7.0/#sec-allocatearraybuffer', - AllocateTypedArray: 'https://262.ecma-international.org/7.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://262.ecma-international.org/7.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://262.ecma-international.org/7.0/#sec-arraycreate', - ArraySetLength: 'https://262.ecma-international.org/7.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://262.ecma-international.org/7.0/#sec-arrayspeciescreate', - BlockDeclarationInstantiation: 'https://262.ecma-international.org/7.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://262.ecma-international.org/7.0/#sec-boundfunctioncreate', - Call: 'https://262.ecma-international.org/7.0/#sec-call', - Canonicalize: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://262.ecma-international.org/7.0/#sec-canonicalnumericindexstring', - CharacterRange: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://262.ecma-international.org/7.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://262.ecma-international.org/7.0/#sec-completepropertydescriptor', - Completion: 'https://262.ecma-international.org/7.0/#sec-completion-record-specification-type', - Construct: 'https://262.ecma-international.org/7.0/#sec-construct', - CopyDataBlockBytes: 'https://262.ecma-international.org/7.0/#sec-copydatablockbytes', - CreateArrayFromList: 'https://262.ecma-international.org/7.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://262.ecma-international.org/7.0/#sec-createarrayiterator', - CreateBuiltinFunction: 'https://262.ecma-international.org/7.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://262.ecma-international.org/7.0/#sec-createbytedatablock', - CreateDataProperty: 'https://262.ecma-international.org/7.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://262.ecma-international.org/7.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://262.ecma-international.org/7.0/#sec-createdynamicfunction', - CreateHTML: 'https://262.ecma-international.org/7.0/#sec-createhtml', - CreateIntrinsics: 'https://262.ecma-international.org/7.0/#sec-createintrinsics', - CreateIterResultObject: 'https://262.ecma-international.org/7.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://262.ecma-international.org/7.0/#sec-createlistfromarraylike', - CreateListIterator: 'https://262.ecma-international.org/7.0/#sec-createlistiterator', - CreateMapIterator: 'https://262.ecma-international.org/7.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://262.ecma-international.org/7.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://262.ecma-international.org/7.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://262.ecma-international.org/7.0/#sec-createperiterationenvironment', - CreateRealm: 'https://262.ecma-international.org/7.0/#sec-createrealm', - CreateResolvingFunctions: 'https://262.ecma-international.org/7.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://262.ecma-international.org/7.0/#sec-createsetiterator', - CreateStringIterator: 'https://262.ecma-international.org/7.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://262.ecma-international.org/7.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://262.ecma-international.org/7.0/#sec-date-number', - Day: 'https://262.ecma-international.org/7.0/#sec-day-number-and-time-within-day', - DayFromYear: 'https://262.ecma-international.org/7.0/#sec-year-number', - DaylightSavingTA: 'https://262.ecma-international.org/7.0/#sec-daylight-saving-time-adjustment', - DaysInYear: 'https://262.ecma-international.org/7.0/#sec-year-number', - DayWithinYear: 'https://262.ecma-international.org/7.0/#sec-month-number', - Decode: 'https://262.ecma-international.org/7.0/#sec-decode', - DefinePropertyOrThrow: 'https://262.ecma-international.org/7.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://262.ecma-international.org/7.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://262.ecma-international.org/7.0/#sec-detacharraybuffer', - Encode: 'https://262.ecma-international.org/7.0/#sec-encode', - EnqueueJob: 'https://262.ecma-international.org/7.0/#sec-enqueuejob', - EnumerableOwnNames: 'https://262.ecma-international.org/7.0/#sec-enumerableownnames', - EnumerateObjectProperties: 'https://262.ecma-international.org/7.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://262.ecma-international.org/7.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://262.ecma-international.org/7.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://262.ecma-international.org/7.0/#sec-evaluatecall', - EvaluateDirectCall: 'https://262.ecma-international.org/7.0/#sec-evaluatedirectcall', - EvaluateNew: 'https://262.ecma-international.org/7.0/#sec-evaluatenew', - floor: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions', - ForBodyEvaluation: 'https://262.ecma-international.org/7.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://262.ecma-international.org/7.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://262.ecma-international.org/7.0/#sec-fulfillpromise', - FunctionAllocate: 'https://262.ecma-international.org/7.0/#sec-functionallocate', - FunctionCreate: 'https://262.ecma-international.org/7.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://262.ecma-international.org/7.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://262.ecma-international.org/7.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://262.ecma-international.org/7.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://262.ecma-international.org/7.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://262.ecma-international.org/7.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://262.ecma-international.org/7.0/#sec-generatorstart', - GeneratorValidate: 'https://262.ecma-international.org/7.0/#sec-generatorvalidate', - GeneratorYield: 'https://262.ecma-international.org/7.0/#sec-generatoryield', - Get: 'https://262.ecma-international.org/7.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://262.ecma-international.org/7.0/#sec-getactivescriptormodule', - GetFunctionRealm: 'https://262.ecma-international.org/7.0/#sec-getfunctionrealm', - GetGlobalObject: 'https://262.ecma-international.org/7.0/#sec-getglobalobject', - GetIdentifierReference: 'https://262.ecma-international.org/7.0/#sec-getidentifierreference', - GetIterator: 'https://262.ecma-international.org/7.0/#sec-getiterator', - GetMethod: 'https://262.ecma-international.org/7.0/#sec-getmethod', - GetModuleNamespace: 'https://262.ecma-international.org/7.0/#sec-getmodulenamespace', - GetNewTarget: 'https://262.ecma-international.org/7.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://262.ecma-international.org/7.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://262.ecma-international.org/7.0/#sec-getprototypefromconstructor', - GetSubstitution: 'https://262.ecma-international.org/7.0/#sec-getsubstitution', - GetSuperConstructor: 'https://262.ecma-international.org/7.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://262.ecma-international.org/7.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://262.ecma-international.org/7.0/#sec-getthisenvironment', - GetThisValue: 'https://262.ecma-international.org/7.0/#sec-getthisvalue', - GetV: 'https://262.ecma-international.org/7.0/#sec-getv', - GetValue: 'https://262.ecma-international.org/7.0/#sec-getvalue', - GetValueFromBuffer: 'https://262.ecma-international.org/7.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://262.ecma-international.org/7.0/#sec-getviewvalue', - GlobalDeclarationInstantiation: 'https://262.ecma-international.org/7.0/#sec-globaldeclarationinstantiation', - HasOwnProperty: 'https://262.ecma-international.org/7.0/#sec-hasownproperty', - HasProperty: 'https://262.ecma-international.org/7.0/#sec-hasproperty', - HostPromiseRejectionTracker: 'https://262.ecma-international.org/7.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://262.ecma-international.org/7.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://262.ecma-international.org/7.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds', - IfAbruptRejectPromise: 'https://262.ecma-international.org/7.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://262.ecma-international.org/7.0/#sec-importedlocalnames', - InitializeBoundName: 'https://262.ecma-international.org/7.0/#sec-initializeboundname', - InitializeHostDefinedRealm: 'https://262.ecma-international.org/7.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://262.ecma-international.org/7.0/#sec-initializereferencedbinding', - InLeapYear: 'https://262.ecma-international.org/7.0/#sec-year-number', - InstanceofOperator: 'https://262.ecma-international.org/7.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://262.ecma-international.org/7.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://262.ecma-international.org/7.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://262.ecma-international.org/7.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://262.ecma-international.org/7.0/#sec-internalizejsonproperty', - Invoke: 'https://262.ecma-international.org/7.0/#sec-invoke', - IsAccessorDescriptor: 'https://262.ecma-international.org/7.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://262.ecma-international.org/7.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://262.ecma-international.org/7.0/#sec-isarray', - IsCallable: 'https://262.ecma-international.org/7.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://262.ecma-international.org/7.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://262.ecma-international.org/7.0/#sec-isconcatspreadable', - IsConstructor: 'https://262.ecma-international.org/7.0/#sec-isconstructor', - IsDataDescriptor: 'https://262.ecma-international.org/7.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://262.ecma-international.org/7.0/#sec-isdetachedbuffer', - IsExtensible: 'https://262.ecma-international.org/7.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://262.ecma-international.org/7.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://262.ecma-international.org/7.0/#sec-isintailposition', - IsInteger: 'https://262.ecma-international.org/7.0/#sec-isinteger', - IsLabelledFunction: 'https://262.ecma-international.org/7.0/#sec-islabelledfunction', - IsPromise: 'https://262.ecma-international.org/7.0/#sec-ispromise', - IsPropertyKey: 'https://262.ecma-international.org/7.0/#sec-ispropertykey', - IsRegExp: 'https://262.ecma-international.org/7.0/#sec-isregexp', - IsWordChar: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToArrayLike: 'https://262.ecma-international.org/7.0/#sec-iterabletoarraylike', - IteratorClose: 'https://262.ecma-international.org/7.0/#sec-iteratorclose', - IteratorComplete: 'https://262.ecma-international.org/7.0/#sec-iteratorcomplete', - IteratorNext: 'https://262.ecma-international.org/7.0/#sec-iteratornext', - IteratorStep: 'https://262.ecma-international.org/7.0/#sec-iteratorstep', - IteratorValue: 'https://262.ecma-international.org/7.0/#sec-iteratorvalue', - LocalTime: 'https://262.ecma-international.org/7.0/#sec-localtime', - LoopContinues: 'https://262.ecma-international.org/7.0/#sec-loopcontinues', - MakeArgGetter: 'https://262.ecma-international.org/7.0/#sec-makearggetter', - MakeArgSetter: 'https://262.ecma-international.org/7.0/#sec-makeargsetter', - MakeClassConstructor: 'https://262.ecma-international.org/7.0/#sec-makeclassconstructor', - MakeConstructor: 'https://262.ecma-international.org/7.0/#sec-makeconstructor', - MakeDate: 'https://262.ecma-international.org/7.0/#sec-makedate', - MakeDay: 'https://262.ecma-international.org/7.0/#sec-makeday', - MakeMethod: 'https://262.ecma-international.org/7.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://262.ecma-international.org/7.0/#sec-makesuperpropertyreference', - MakeTime: 'https://262.ecma-international.org/7.0/#sec-maketime', - max: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions', - min: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions', - MinFromTime: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds', - ModuleNamespaceCreate: 'https://262.ecma-international.org/7.0/#sec-modulenamespacecreate', - modulo: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions', - MonthFromTime: 'https://262.ecma-international.org/7.0/#sec-month-number', - msFromTime: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds', - NewDeclarativeEnvironment: 'https://262.ecma-international.org/7.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://262.ecma-international.org/7.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://262.ecma-international.org/7.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://262.ecma-international.org/7.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://262.ecma-international.org/7.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://262.ecma-international.org/7.0/#sec-newpromisecapability', - NextJob: 'https://262.ecma-international.org/7.0/#sec-nextjob-result', - NormalCompletion: 'https://262.ecma-international.org/7.0/#sec-normalcompletion', - ObjectCreate: 'https://262.ecma-international.org/7.0/#sec-objectcreate', - ObjectDefineProperties: 'https://262.ecma-international.org/7.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://262.ecma-international.org/7.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://262.ecma-international.org/7.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://262.ecma-international.org/7.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://262.ecma-international.org/7.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://262.ecma-international.org/7.0/#sec-ordinarydelete', - OrdinaryGet: 'https://262.ecma-international.org/7.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://262.ecma-international.org/7.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://262.ecma-international.org/7.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://262.ecma-international.org/7.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://262.ecma-international.org/7.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://262.ecma-international.org/7.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://262.ecma-international.org/7.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://262.ecma-international.org/7.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof', - ParseModule: 'https://262.ecma-international.org/7.0/#sec-parsemodule', - ParseScript: 'https://262.ecma-international.org/7.0/#sec-parse-script', - PerformEval: 'https://262.ecma-international.org/7.0/#sec-performeval', - PerformPromiseAll: 'https://262.ecma-international.org/7.0/#sec-performpromiseall', - PerformPromiseRace: 'https://262.ecma-international.org/7.0/#sec-performpromiserace', - PerformPromiseThen: 'https://262.ecma-international.org/7.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://262.ecma-international.org/7.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://262.ecma-international.org/7.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://262.ecma-international.org/7.0/#sec-promisereactionjob', - PromiseResolveThenableJob: 'https://262.ecma-international.org/7.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://262.ecma-international.org/7.0/#sec-proxycreate', - PutValue: 'https://262.ecma-international.org/7.0/#sec-putvalue', - QuoteJSONString: 'https://262.ecma-international.org/7.0/#sec-quotejsonstring', - RegExpAlloc: 'https://262.ecma-international.org/7.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://262.ecma-international.org/7.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://262.ecma-international.org/7.0/#sec-regexpcreate', - RegExpExec: 'https://262.ecma-international.org/7.0/#sec-regexpexec', - RegExpInitialize: 'https://262.ecma-international.org/7.0/#sec-regexpinitialize', - RejectPromise: 'https://262.ecma-international.org/7.0/#sec-rejectpromise', - RepeatMatcher: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://262.ecma-international.org/7.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://262.ecma-international.org/7.0/#sec-resolvebinding', - ResolveThisBinding: 'https://262.ecma-international.org/7.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://262.ecma-international.org/7.0/#sec-returnifabrupt', - SameValue: 'https://262.ecma-international.org/7.0/#sec-samevalue', - SameValueNonNumber: 'https://262.ecma-international.org/7.0/#sec-samevaluenonnumber', - SameValueZero: 'https://262.ecma-international.org/7.0/#sec-samevaluezero', - ScriptEvaluation: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://262.ecma-international.org/7.0/#sec-scriptevaluationjob', - SecFromTime: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds', - SerializeJSONArray: 'https://262.ecma-international.org/7.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://262.ecma-international.org/7.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://262.ecma-international.org/7.0/#sec-serializejsonproperty', - Set: 'https://262.ecma-international.org/7.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://262.ecma-international.org/7.0/#sec-setdefaultglobalbindings', - SetFunctionName: 'https://262.ecma-international.org/7.0/#sec-setfunctionname', - SetIntegrityLevel: 'https://262.ecma-international.org/7.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://262.ecma-international.org/7.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://262.ecma-international.org/7.0/#sec-setvalueinbuffer', - SetViewValue: 'https://262.ecma-international.org/7.0/#sec-setviewvalue', - SortCompare: 'https://262.ecma-international.org/7.0/#sec-sortcompare', - SpeciesConstructor: 'https://262.ecma-international.org/7.0/#sec-speciesconstructor', - SplitMatch: 'https://262.ecma-international.org/7.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://262.ecma-international.org/7.0/#sec-strict-equality-comparison', - StringCreate: 'https://262.ecma-international.org/7.0/#sec-stringcreate', - SymbolDescriptiveString: 'https://262.ecma-international.org/7.0/#sec-symboldescriptivestring', - TestIntegrityLevel: 'https://262.ecma-international.org/7.0/#sec-testintegritylevel', - thisBooleanValue: 'https://262.ecma-international.org/7.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://262.ecma-international.org/7.0/#sec-properties-of-the-number-prototype-object', - thisStringValue: 'https://262.ecma-international.org/7.0/#sec-properties-of-the-string-prototype-object', - thisTimeValue: 'https://262.ecma-international.org/7.0/#sec-properties-of-the-date-prototype-object', - TimeClip: 'https://262.ecma-international.org/7.0/#sec-timeclip', - TimeFromYear: 'https://262.ecma-international.org/7.0/#sec-year-number', - TimeWithinDay: 'https://262.ecma-international.org/7.0/#sec-day-number-and-time-within-day', - ToBoolean: 'https://262.ecma-international.org/7.0/#sec-toboolean', - ToDateString: 'https://262.ecma-international.org/7.0/#sec-todatestring', - ToInt16: 'https://262.ecma-international.org/7.0/#sec-toint16', - ToInt32: 'https://262.ecma-international.org/7.0/#sec-toint32', - ToInt8: 'https://262.ecma-international.org/7.0/#sec-toint8', - ToInteger: 'https://262.ecma-international.org/7.0/#sec-tointeger', - ToLength: 'https://262.ecma-international.org/7.0/#sec-tolength', - ToNumber: 'https://262.ecma-international.org/7.0/#sec-tonumber', - ToObject: 'https://262.ecma-international.org/7.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://262.ecma-international.org/7.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://262.ecma-international.org/7.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://262.ecma-international.org/7.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://262.ecma-international.org/7.0/#sec-topropertykey', - ToString: 'https://262.ecma-international.org/7.0/#sec-tostring', - 'ToString Applied to the Number Type': 'https://262.ecma-international.org/7.0/#sec-tostring-applied-to-the-number-type', - ToUint16: 'https://262.ecma-international.org/7.0/#sec-touint16', - ToUint32: 'https://262.ecma-international.org/7.0/#sec-touint32', - ToUint8: 'https://262.ecma-international.org/7.0/#sec-touint8', - ToUint8Clamp: 'https://262.ecma-international.org/7.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://262.ecma-international.org/7.0/#sec-triggerpromisereactions', - Type: 'https://262.ecma-international.org/7.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://262.ecma-international.org/7.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://262.ecma-international.org/7.0/#typedarray-species-create', - UpdateEmpty: 'https://262.ecma-international.org/7.0/#sec-updateempty', - UTC: 'https://262.ecma-international.org/7.0/#sec-utc-t', - UTF16Decode: 'https://262.ecma-international.org/7.0/#sec-utf16decode', - UTF16Encoding: 'https://262.ecma-international.org/7.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://262.ecma-international.org/7.0/#sec-validateandapplypropertydescriptor', - ValidateTypedArray: 'https://262.ecma-international.org/7.0/#sec-validatetypedarray', - WeekDay: 'https://262.ecma-international.org/7.0/#sec-week-day', - YearFromTime: 'https://262.ecma-international.org/7.0/#sec-year-number' + abs: { + url: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/7.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/7.0/#sec-abstract-relational-comparison' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/7.0/#sec-addrestrictedfunctionproperties' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/7.0/#sec-advancestringindex' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-allocatearraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/7.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-allocatetypedarraybuffer' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/7.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-arrayspeciescreate' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/7.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/7.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/7.0/#sec-canonicalnumericindexstring' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-clonearraybuffer' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/7.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/7.0/#sec-completion-record-specification-type' + }, + Construct: { + url: 'https://262.ecma-international.org/7.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/7.0/#sec-copydatablockbytes' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/7.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-createarrayiterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/7.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/7.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/7.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/7.0/#sec-createdynamicfunction' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/7.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/7.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/7.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/7.0/#sec-createlistfromarraylike' + }, + CreateListIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-createlistiterator' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/7.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/7.0/#sec-createrealm' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/7.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-createsetiterator' + }, + CreateStringIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-createstringiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/7.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-date-number' + }, + Day: { + url: 'https://262.ecma-international.org/7.0/#sec-day-number-and-time-within-day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/7.0/#sec-year-number' + }, + DaylightSavingTA: { + url: 'https://262.ecma-international.org/7.0/#sec-daylight-saving-time-adjustment' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/7.0/#sec-year-number' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/7.0/#sec-month-number' + }, + Decode: { + url: 'https://262.ecma-international.org/7.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/7.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/7.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/7.0/#sec-encode' + }, + EnqueueJob: { + url: 'https://262.ecma-international.org/7.0/#sec-enqueuejob' + }, + EnumerableOwnNames: { + url: 'https://262.ecma-international.org/7.0/#sec-enumerableownnames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/7.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/7.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/7.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/7.0/#sec-evaluatecall' + }, + EvaluateDirectCall: { + url: 'https://262.ecma-international.org/7.0/#sec-evaluatedirectcall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/7.0/#sec-evaluatenew' + }, + floor: { + url: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/7.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/7.0/#sec-fulfillpromise' + }, + FunctionAllocate: { + url: 'https://262.ecma-international.org/7.0/#sec-functionallocate' + }, + FunctionCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-functioncreate' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/7.0/#sec-functiondeclarationinstantiation' + }, + FunctionInitialize: { + url: 'https://262.ecma-international.org/7.0/#sec-functioninitialize' + }, + GeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-generatorfunctioncreate' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/7.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/7.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/7.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/7.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/7.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/7.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/7.0/#sec-getactivescriptormodule' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/7.0/#sec-getfunctionrealm' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/7.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/7.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/7.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/7.0/#sec-getmethod' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/7.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/7.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/7.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-getprototypefromconstructor' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/7.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/7.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/7.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/7.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/7.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/7.0/#sec-getviewvalue' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/7.0/#sec-globaldeclarationinstantiation' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-hasownproperty' + }, + HasProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-hasproperty' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/7.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/7.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/7.0/#sec-initializeboundname' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/7.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/7.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/7.0/#sec-year-number' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/7.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/7.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/7.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/7.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/7.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/7.0/#sec-isarray' + }, + IsCallable: { + url: 'https://262.ecma-international.org/7.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/7.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/7.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/7.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/7.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/7.0/#sec-islabelledfunction' + }, + IsPromise: { + url: 'https://262.ecma-international.org/7.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/7.0/#sec-ispropertykey' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/7.0/#sec-isregexp' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToArrayLike: { + url: 'https://262.ecma-international.org/7.0/#sec-iterabletoarraylike' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/7.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/7.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/7.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/7.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/7.0/#sec-iteratorvalue' + }, + LocalTime: { + url: 'https://262.ecma-international.org/7.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/7.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/7.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/7.0/#sec-makeargsetter' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/7.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/7.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/7.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/7.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/7.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions' + }, + min: { + url: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/7.0/#sec-algorithm-conventions' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-month-number' + }, + msFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/7.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/7.0/#sec-newpromisecapability' + }, + NextJob: { + url: 'https://262.ecma-international.org/7.0/#sec-nextjob-result' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/7.0/#sec-normalcompletion' + }, + ObjectCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-objectcreate' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/7.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarydelete' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryisextensible' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof' + }, + ParseModule: { + url: 'https://262.ecma-international.org/7.0/#sec-parsemodule' + }, + ParseScript: { + url: 'https://262.ecma-international.org/7.0/#sec-parse-script' + }, + PerformEval: { + url: 'https://262.ecma-international.org/7.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/7.0/#sec-performpromiseall' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/7.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/7.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/7.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/7.0/#sec-preparefortailcall' + }, + PromiseReactionJob: { + url: 'https://262.ecma-international.org/7.0/#sec-promisereactionjob' + }, + PromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/7.0/#sec-promiseresolvethenablejob' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/7.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/7.0/#sec-quotejsonstring' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/7.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/7.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/7.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/7.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/7.0/#sec-rejectpromise' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/7.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/7.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/7.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/7.0/#sec-returnifabrupt' + }, + SameValue: { + url: 'https://262.ecma-international.org/7.0/#sec-samevalue' + }, + SameValueNonNumber: { + url: 'https://262.ecma-international.org/7.0/#sec-samevaluenonnumber' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/7.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/7.0/#sec-runtime-semantics-scriptevaluation' + }, + ScriptEvaluationJob: { + url: 'https://262.ecma-international.org/7.0/#sec-scriptevaluationjob' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-hours-minutes-second-and-milliseconds' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/7.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/7.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/7.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/7.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/7.0/#sec-setdefaultglobalbindings' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/7.0/#sec-setfunctionname' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/7.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/7.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/7.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/7.0/#sec-setviewvalue' + }, + SortCompare: { + url: 'https://262.ecma-international.org/7.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/7.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/7.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/7.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/7.0/#sec-stringcreate' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/7.0/#sec-symboldescriptivestring' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/7.0/#sec-testintegritylevel' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/7.0/#sec-thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/7.0/#sec-properties-of-the-number-prototype-object' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/7.0/#sec-properties-of-the-string-prototype-object' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/7.0/#sec-properties-of-the-date-prototype-object' + }, + TimeClip: { + url: 'https://262.ecma-international.org/7.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/7.0/#sec-year-number' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/7.0/#sec-day-number-and-time-within-day' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/7.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/7.0/#sec-todatestring' + }, + ToInt16: { + url: 'https://262.ecma-international.org/7.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/7.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/7.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/7.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/7.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/7.0/#sec-tonumber' + }, + ToObject: { + url: 'https://262.ecma-international.org/7.0/#sec-toobject' + }, + TopLevelModuleEvaluationJob: { + url: 'https://262.ecma-international.org/7.0/#sec-toplevelmoduleevaluationjob' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/7.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/7.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/7.0/#sec-tostring' + }, + 'ToString Applied to the Number Type': { + url: 'https://262.ecma-international.org/7.0/#sec-tostring-applied-to-the-number-type' + }, + ToUint16: { + url: 'https://262.ecma-international.org/7.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/7.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/7.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/7.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/7.0/#sec-triggerpromisereactions' + }, + Type: { + url: 'https://262.ecma-international.org/7.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/7.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/7.0/#typedarray-species-create' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/7.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/7.0/#sec-utc-t' + }, + UTF16Decode: { + url: 'https://262.ecma-international.org/7.0/#sec-utf16decode' + }, + UTF16Encoding: { + url: 'https://262.ecma-international.org/7.0/#sec-utf16encoding' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/7.0/#sec-validateandapplypropertydescriptor' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/7.0/#sec-validatetypedarray' + }, + WeekDay: { + url: 'https://262.ecma-international.org/7.0/#sec-week-day' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/7.0/#sec-year-number' + } }; diff --git a/node_modules/es-abstract/operations/2017.js b/node_modules/es-abstract/operations/2017.js index b3a313f5c..5fa6e6aea 100644 --- a/node_modules/es-abstract/operations/2017.js +++ b/node_modules/es-abstract/operations/2017.js @@ -3,323 +3,952 @@ module.exports = { IsPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op - abs: 'https://262.ecma-international.org/8.0/#eqn-abs', - 'Abstract Equality Comparison': 'https://262.ecma-international.org/8.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://262.ecma-international.org/8.0/#sec-abstract-relational-comparison', - AddRestrictedFunctionProperties: 'https://262.ecma-international.org/8.0/#sec-addrestrictedfunctionproperties', - AddWaiter: 'https://262.ecma-international.org/8.0/#sec-addwaiter', - AdvanceStringIndex: 'https://262.ecma-international.org/8.0/#sec-advancestringindex', - 'agent-order': 'https://262.ecma-international.org/8.0/#sec-agent-order', - AgentCanSuspend: 'https://262.ecma-international.org/8.0/#sec-agentcansuspend', - AgentSignifier: 'https://262.ecma-international.org/8.0/#sec-agentsignifier', - AllocateArrayBuffer: 'https://262.ecma-international.org/8.0/#sec-allocatearraybuffer', - AllocateSharedArrayBuffer: 'https://262.ecma-international.org/8.0/#sec-allocatesharedarraybuffer', - AllocateTypedArray: 'https://262.ecma-international.org/8.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://262.ecma-international.org/8.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://262.ecma-international.org/8.0/#sec-arraycreate', - ArraySetLength: 'https://262.ecma-international.org/8.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://262.ecma-international.org/8.0/#sec-arrayspeciescreate', - AsyncFunctionAwait: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-await', - AsyncFunctionCreate: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-create', - AsyncFunctionStart: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-start', - AtomicLoad: 'https://262.ecma-international.org/8.0/#sec-atomicload', - AtomicReadModifyWrite: 'https://262.ecma-international.org/8.0/#sec-atomicreadmodifywrite', - BlockDeclarationInstantiation: 'https://262.ecma-international.org/8.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://262.ecma-international.org/8.0/#sec-boundfunctioncreate', - Call: 'https://262.ecma-international.org/8.0/#sec-call', - Canonicalize: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://262.ecma-international.org/8.0/#sec-canonicalnumericindexstring', - CharacterRange: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://262.ecma-international.org/8.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://262.ecma-international.org/8.0/#sec-completepropertydescriptor', - Completion: 'https://262.ecma-international.org/8.0/#sec-completion-record-specification-type', - ComposeWriteEventBytes: 'https://262.ecma-international.org/8.0/#sec-composewriteeventbytes', - Construct: 'https://262.ecma-international.org/8.0/#sec-construct', - CopyDataBlockBytes: 'https://262.ecma-international.org/8.0/#sec-copydatablockbytes', - CreateArrayFromList: 'https://262.ecma-international.org/8.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://262.ecma-international.org/8.0/#sec-createarrayiterator', - CreateBuiltinFunction: 'https://262.ecma-international.org/8.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://262.ecma-international.org/8.0/#sec-createbytedatablock', - CreateDataProperty: 'https://262.ecma-international.org/8.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://262.ecma-international.org/8.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://262.ecma-international.org/8.0/#sec-createdynamicfunction', - CreateHTML: 'https://262.ecma-international.org/8.0/#sec-createhtml', - CreateIntrinsics: 'https://262.ecma-international.org/8.0/#sec-createintrinsics', - CreateIterResultObject: 'https://262.ecma-international.org/8.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://262.ecma-international.org/8.0/#sec-createlistfromarraylike', - CreateListIterator: 'https://262.ecma-international.org/8.0/#sec-createlistiterator', - CreateMapIterator: 'https://262.ecma-international.org/8.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://262.ecma-international.org/8.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://262.ecma-international.org/8.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://262.ecma-international.org/8.0/#sec-createperiterationenvironment', - CreateRealm: 'https://262.ecma-international.org/8.0/#sec-createrealm', - CreateResolvingFunctions: 'https://262.ecma-international.org/8.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://262.ecma-international.org/8.0/#sec-createsetiterator', - CreateSharedByteDataBlock: 'https://262.ecma-international.org/8.0/#sec-createsharedbytedatablock', - CreateStringIterator: 'https://262.ecma-international.org/8.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://262.ecma-international.org/8.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://262.ecma-international.org/8.0/#sec-date-number', - Day: 'https://262.ecma-international.org/8.0/#eqn-Day', - DayFromYear: 'https://262.ecma-international.org/8.0/#eqn-DaysFromYear', - DaylightSavingTA: 'https://262.ecma-international.org/8.0/#sec-daylight-saving-time-adjustment', - DaysInYear: 'https://262.ecma-international.org/8.0/#eqn-DaysInYear', - DayWithinYear: 'https://262.ecma-international.org/8.0/#eqn-DayWithinYear', - Decode: 'https://262.ecma-international.org/8.0/#sec-decode', - DefinePropertyOrThrow: 'https://262.ecma-international.org/8.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://262.ecma-international.org/8.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://262.ecma-international.org/8.0/#sec-detacharraybuffer', - Encode: 'https://262.ecma-international.org/8.0/#sec-encode', - EnqueueJob: 'https://262.ecma-international.org/8.0/#sec-enqueuejob', - EnterCriticalSection: 'https://262.ecma-international.org/8.0/#sec-entercriticalsection', - EnumerableOwnProperties: 'https://262.ecma-international.org/8.0/#sec-enumerableownproperties', - EnumerateObjectProperties: 'https://262.ecma-international.org/8.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://262.ecma-international.org/8.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://262.ecma-international.org/8.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://262.ecma-international.org/8.0/#sec-evaluatecall', - EvaluateDirectCall: 'https://262.ecma-international.org/8.0/#sec-evaluatedirectcall', - EvaluateNew: 'https://262.ecma-international.org/8.0/#sec-evaluatenew', - EventSet: 'https://262.ecma-international.org/8.0/#sec-event-set', - floor: 'https://262.ecma-international.org/8.0/#eqn-floor', - ForBodyEvaluation: 'https://262.ecma-international.org/8.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://262.ecma-international.org/8.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://262.ecma-international.org/8.0/#sec-fulfillpromise', - FunctionAllocate: 'https://262.ecma-international.org/8.0/#sec-functionallocate', - FunctionCreate: 'https://262.ecma-international.org/8.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://262.ecma-international.org/8.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://262.ecma-international.org/8.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://262.ecma-international.org/8.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://262.ecma-international.org/8.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://262.ecma-international.org/8.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://262.ecma-international.org/8.0/#sec-generatorstart', - GeneratorValidate: 'https://262.ecma-international.org/8.0/#sec-generatorvalidate', - GeneratorYield: 'https://262.ecma-international.org/8.0/#sec-generatoryield', - Get: 'https://262.ecma-international.org/8.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://262.ecma-international.org/8.0/#sec-getactivescriptormodule', - GetBase: 'https://262.ecma-international.org/8.0/#ao-getbase', - GetFunctionRealm: 'https://262.ecma-international.org/8.0/#sec-getfunctionrealm', - GetGlobalObject: 'https://262.ecma-international.org/8.0/#sec-getglobalobject', - GetIdentifierReference: 'https://262.ecma-international.org/8.0/#sec-getidentifierreference', - GetIterator: 'https://262.ecma-international.org/8.0/#sec-getiterator', - GetMethod: 'https://262.ecma-international.org/8.0/#sec-getmethod', - GetModifySetValueInBuffer: 'https://262.ecma-international.org/8.0/#sec-getmodifysetvalueinbuffer', - GetModuleNamespace: 'https://262.ecma-international.org/8.0/#sec-getmodulenamespace', - GetNewTarget: 'https://262.ecma-international.org/8.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://262.ecma-international.org/8.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://262.ecma-international.org/8.0/#sec-getprototypefromconstructor', - GetReferencedName: 'https://262.ecma-international.org/8.0/#ao-getreferencedname', - GetSubstitution: 'https://262.ecma-international.org/8.0/#sec-getsubstitution', - GetSuperConstructor: 'https://262.ecma-international.org/8.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://262.ecma-international.org/8.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://262.ecma-international.org/8.0/#sec-getthisenvironment', - GetThisValue: 'https://262.ecma-international.org/8.0/#sec-getthisvalue', - GetV: 'https://262.ecma-international.org/8.0/#sec-getv', - GetValue: 'https://262.ecma-international.org/8.0/#sec-getvalue', - GetValueFromBuffer: 'https://262.ecma-international.org/8.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://262.ecma-international.org/8.0/#sec-getviewvalue', - GetWaiterList: 'https://262.ecma-international.org/8.0/#sec-getwaiterlist', - GlobalDeclarationInstantiation: 'https://262.ecma-international.org/8.0/#sec-globaldeclarationinstantiation', - 'happens-before': 'https://262.ecma-international.org/8.0/#sec-happens-before', - HasOwnProperty: 'https://262.ecma-international.org/8.0/#sec-hasownproperty', - HasPrimitiveBase: 'https://262.ecma-international.org/8.0/#ao-hasprimitivebase', - HasProperty: 'https://262.ecma-international.org/8.0/#sec-hasproperty', - 'host-synchronizes-with': 'https://262.ecma-international.org/8.0/#sec-host-synchronizes-with', - HostEnsureCanCompileStrings: 'https://262.ecma-international.org/8.0/#sec-hostensurecancompilestrings', - HostEventSet: 'https://262.ecma-international.org/8.0/#sec-hosteventset', - HostPromiseRejectionTracker: 'https://262.ecma-international.org/8.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://262.ecma-international.org/8.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://262.ecma-international.org/8.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://262.ecma-international.org/8.0/#eqn-HourFromTime', - IfAbruptRejectPromise: 'https://262.ecma-international.org/8.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://262.ecma-international.org/8.0/#sec-importedlocalnames', - InitializeBoundName: 'https://262.ecma-international.org/8.0/#sec-initializeboundname', - InitializeHostDefinedRealm: 'https://262.ecma-international.org/8.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://262.ecma-international.org/8.0/#sec-initializereferencedbinding', - InLeapYear: 'https://262.ecma-international.org/8.0/#eqn-InLeapYear', - InstanceofOperator: 'https://262.ecma-international.org/8.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://262.ecma-international.org/8.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://262.ecma-international.org/8.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://262.ecma-international.org/8.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://262.ecma-international.org/8.0/#sec-internalizejsonproperty', - Invoke: 'https://262.ecma-international.org/8.0/#sec-invoke', - IsAccessorDescriptor: 'https://262.ecma-international.org/8.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://262.ecma-international.org/8.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://262.ecma-international.org/8.0/#sec-isarray', - IsCallable: 'https://262.ecma-international.org/8.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://262.ecma-international.org/8.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://262.ecma-international.org/8.0/#sec-isconcatspreadable', - IsConstructor: 'https://262.ecma-international.org/8.0/#sec-isconstructor', - IsDataDescriptor: 'https://262.ecma-international.org/8.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://262.ecma-international.org/8.0/#sec-isdetachedbuffer', - IsExtensible: 'https://262.ecma-international.org/8.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://262.ecma-international.org/8.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://262.ecma-international.org/8.0/#sec-isintailposition', - IsInteger: 'https://262.ecma-international.org/8.0/#sec-isinteger', - IsLabelledFunction: 'https://262.ecma-international.org/8.0/#sec-islabelledfunction', - IsPromise: 'https://262.ecma-international.org/8.0/#sec-ispromise', - IsPropertyKey: 'https://262.ecma-international.org/8.0/#sec-ispropertykey', - IsPropertyReference: 'https://262.ecma-international.org/8.0/#ao-ispropertyreference', - IsRegExp: 'https://262.ecma-international.org/8.0/#sec-isregexp', - IsSharedArrayBuffer: 'https://262.ecma-international.org/8.0/#sec-issharedarraybuffer', - IsStrictReference: 'https://262.ecma-international.org/8.0/#ao-isstrictreference', - IsSuperReference: 'https://262.ecma-international.org/8.0/#ao-issuperreference', - IsUnresolvableReference: 'https://262.ecma-international.org/8.0/#ao-isunresolvablereference', - IsWordChar: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToList: 'https://262.ecma-international.org/8.0/#sec-iterabletolist', - IteratorClose: 'https://262.ecma-international.org/8.0/#sec-iteratorclose', - IteratorComplete: 'https://262.ecma-international.org/8.0/#sec-iteratorcomplete', - IteratorNext: 'https://262.ecma-international.org/8.0/#sec-iteratornext', - IteratorStep: 'https://262.ecma-international.org/8.0/#sec-iteratorstep', - IteratorValue: 'https://262.ecma-international.org/8.0/#sec-iteratorvalue', - LeaveCriticalSection: 'https://262.ecma-international.org/8.0/#sec-leavecriticalsection', - LocalTime: 'https://262.ecma-international.org/8.0/#sec-localtime', - LoopContinues: 'https://262.ecma-international.org/8.0/#sec-loopcontinues', - MakeArgGetter: 'https://262.ecma-international.org/8.0/#sec-makearggetter', - MakeArgSetter: 'https://262.ecma-international.org/8.0/#sec-makeargsetter', - MakeClassConstructor: 'https://262.ecma-international.org/8.0/#sec-makeclassconstructor', - MakeConstructor: 'https://262.ecma-international.org/8.0/#sec-makeconstructor', - MakeDate: 'https://262.ecma-international.org/8.0/#sec-makedate', - MakeDay: 'https://262.ecma-international.org/8.0/#sec-makeday', - MakeMethod: 'https://262.ecma-international.org/8.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://262.ecma-international.org/8.0/#sec-makesuperpropertyreference', - MakeTime: 'https://262.ecma-international.org/8.0/#sec-maketime', - max: 'https://262.ecma-international.org/8.0/#eqn-max', - 'memory-order': 'https://262.ecma-international.org/8.0/#sec-memory-order', - min: 'https://262.ecma-international.org/8.0/#eqn-min', - MinFromTime: 'https://262.ecma-international.org/8.0/#eqn-MinFromTime', - ModuleNamespaceCreate: 'https://262.ecma-international.org/8.0/#sec-modulenamespacecreate', - modulo: 'https://262.ecma-international.org/8.0/#eqn-modulo', - MonthFromTime: 'https://262.ecma-international.org/8.0/#eqn-MonthFromTime', - msFromTime: 'https://262.ecma-international.org/8.0/#eqn-msFromTime', - NewDeclarativeEnvironment: 'https://262.ecma-international.org/8.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://262.ecma-international.org/8.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://262.ecma-international.org/8.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://262.ecma-international.org/8.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://262.ecma-international.org/8.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://262.ecma-international.org/8.0/#sec-newpromisecapability', - NormalCompletion: 'https://262.ecma-international.org/8.0/#sec-normalcompletion', - NumberToRawBytes: 'https://262.ecma-international.org/8.0/#sec-numbertorawbytes', - ObjectCreate: 'https://262.ecma-international.org/8.0/#sec-objectcreate', - ObjectDefineProperties: 'https://262.ecma-international.org/8.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://262.ecma-international.org/8.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://262.ecma-international.org/8.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://262.ecma-international.org/8.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://262.ecma-international.org/8.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://262.ecma-international.org/8.0/#sec-ordinarydelete', - OrdinaryGet: 'https://262.ecma-international.org/8.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://262.ecma-international.org/8.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://262.ecma-international.org/8.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://262.ecma-international.org/8.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://262.ecma-international.org/8.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://262.ecma-international.org/8.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://262.ecma-international.org/8.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://262.ecma-international.org/8.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://262.ecma-international.org/8.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://262.ecma-international.org/8.0/#sec-ordinarysetprototypeof', - OrdinaryToPrimitive: 'https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive', - ParseModule: 'https://262.ecma-international.org/8.0/#sec-parsemodule', - ParseScript: 'https://262.ecma-international.org/8.0/#sec-parse-script', - PerformEval: 'https://262.ecma-international.org/8.0/#sec-performeval', - PerformPromiseAll: 'https://262.ecma-international.org/8.0/#sec-performpromiseall', - PerformPromiseRace: 'https://262.ecma-international.org/8.0/#sec-performpromiserace', - PerformPromiseThen: 'https://262.ecma-international.org/8.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://262.ecma-international.org/8.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://262.ecma-international.org/8.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://262.ecma-international.org/8.0/#sec-promisereactionjob', - PromiseResolveThenableJob: 'https://262.ecma-international.org/8.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://262.ecma-international.org/8.0/#sec-proxycreate', - PutValue: 'https://262.ecma-international.org/8.0/#sec-putvalue', - QuoteJSONString: 'https://262.ecma-international.org/8.0/#sec-quotejsonstring', - RawBytesToNumber: 'https://262.ecma-international.org/8.0/#sec-rawbytestonumber', - 'reads-bytes-from': 'https://262.ecma-international.org/8.0/#sec-reads-bytes-from', - 'reads-from': 'https://262.ecma-international.org/8.0/#sec-reads-from', - RegExpAlloc: 'https://262.ecma-international.org/8.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://262.ecma-international.org/8.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://262.ecma-international.org/8.0/#sec-regexpcreate', - RegExpExec: 'https://262.ecma-international.org/8.0/#sec-regexpexec', - RegExpInitialize: 'https://262.ecma-international.org/8.0/#sec-regexpinitialize', - RejectPromise: 'https://262.ecma-international.org/8.0/#sec-rejectpromise', - RemoveWaiter: 'https://262.ecma-international.org/8.0/#sec-removewaiter', - RemoveWaiters: 'https://262.ecma-international.org/8.0/#sec-removewaiters', - RepeatMatcher: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://262.ecma-international.org/8.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://262.ecma-international.org/8.0/#sec-resolvebinding', - ResolveThisBinding: 'https://262.ecma-international.org/8.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://262.ecma-international.org/8.0/#sec-returnifabrupt', - RunJobs: 'https://262.ecma-international.org/8.0/#sec-runjobs', - SameValue: 'https://262.ecma-international.org/8.0/#sec-samevalue', - SameValueNonNumber: 'https://262.ecma-international.org/8.0/#sec-samevaluenonnumber', - SameValueZero: 'https://262.ecma-international.org/8.0/#sec-samevaluezero', - ScriptEvaluation: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://262.ecma-international.org/8.0/#sec-scriptevaluationjob', - SecFromTime: 'https://262.ecma-international.org/8.0/#eqn-SecFromTime', - SerializeJSONArray: 'https://262.ecma-international.org/8.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://262.ecma-international.org/8.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://262.ecma-international.org/8.0/#sec-serializejsonproperty', - Set: 'https://262.ecma-international.org/8.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://262.ecma-international.org/8.0/#sec-setdefaultglobalbindings', - SetFunctionName: 'https://262.ecma-international.org/8.0/#sec-setfunctionname', - SetImmutablePrototype: 'https://262.ecma-international.org/8.0/#sec-set-immutable-prototype', - SetIntegrityLevel: 'https://262.ecma-international.org/8.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://262.ecma-international.org/8.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://262.ecma-international.org/8.0/#sec-setvalueinbuffer', - SetViewValue: 'https://262.ecma-international.org/8.0/#sec-setviewvalue', - SharedDataBlockEventSet: 'https://262.ecma-international.org/8.0/#sec-sharedatablockeventset', - SortCompare: 'https://262.ecma-international.org/8.0/#sec-sortcompare', - SpeciesConstructor: 'https://262.ecma-international.org/8.0/#sec-speciesconstructor', - SplitMatch: 'https://262.ecma-international.org/8.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://262.ecma-international.org/8.0/#sec-strict-equality-comparison', - StringCreate: 'https://262.ecma-international.org/8.0/#sec-stringcreate', - StringGetOwnProperty: 'https://262.ecma-international.org/8.0/#sec-stringgetownproperty', - Suspend: 'https://262.ecma-international.org/8.0/#sec-suspend', - SymbolDescriptiveString: 'https://262.ecma-international.org/8.0/#sec-symboldescriptivestring', - 'synchronizes-with': 'https://262.ecma-international.org/8.0/#sec-synchronizes-with', - TestIntegrityLevel: 'https://262.ecma-international.org/8.0/#sec-testintegritylevel', - thisBooleanValue: 'https://262.ecma-international.org/8.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://262.ecma-international.org/8.0/#sec-thisnumbervalue', - thisStringValue: 'https://262.ecma-international.org/8.0/#sec-thisstringvalue', - thisTimeValue: 'https://262.ecma-international.org/8.0/#sec-thistimevalue', - TimeClip: 'https://262.ecma-international.org/8.0/#sec-timeclip', - TimeFromYear: 'https://262.ecma-international.org/8.0/#eqn-TimeFromYear', - TimeWithinDay: 'https://262.ecma-international.org/8.0/#eqn-TimeWithinDay', - ToBoolean: 'https://262.ecma-international.org/8.0/#sec-toboolean', - ToDateString: 'https://262.ecma-international.org/8.0/#sec-todatestring', - ToIndex: 'https://262.ecma-international.org/8.0/#sec-toindex', - ToInt16: 'https://262.ecma-international.org/8.0/#sec-toint16', - ToInt32: 'https://262.ecma-international.org/8.0/#sec-toint32', - ToInt8: 'https://262.ecma-international.org/8.0/#sec-toint8', - ToInteger: 'https://262.ecma-international.org/8.0/#sec-tointeger', - ToLength: 'https://262.ecma-international.org/8.0/#sec-tolength', - ToNumber: 'https://262.ecma-international.org/8.0/#sec-tonumber', - ToObject: 'https://262.ecma-international.org/8.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://262.ecma-international.org/8.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://262.ecma-international.org/8.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://262.ecma-international.org/8.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://262.ecma-international.org/8.0/#sec-topropertykey', - ToString: 'https://262.ecma-international.org/8.0/#sec-tostring', - 'ToString Applied to the Number Type': 'https://262.ecma-international.org/8.0/#sec-tostring-applied-to-the-number-type', - ToUint16: 'https://262.ecma-international.org/8.0/#sec-touint16', - ToUint32: 'https://262.ecma-international.org/8.0/#sec-touint32', - ToUint8: 'https://262.ecma-international.org/8.0/#sec-touint8', - ToUint8Clamp: 'https://262.ecma-international.org/8.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://262.ecma-international.org/8.0/#sec-triggerpromisereactions', - Type: 'https://262.ecma-international.org/8.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://262.ecma-international.org/8.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://262.ecma-international.org/8.0/#typedarray-species-create', - UpdateEmpty: 'https://262.ecma-international.org/8.0/#sec-updateempty', - UTC: 'https://262.ecma-international.org/8.0/#sec-utc-t', - UTF16Decode: 'https://262.ecma-international.org/8.0/#sec-utf16decode', - UTF16Encoding: 'https://262.ecma-international.org/8.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor', - ValidateAtomicAccess: 'https://262.ecma-international.org/8.0/#sec-validateatomicaccess', - ValidateSharedIntegerTypedArray: 'https://262.ecma-international.org/8.0/#sec-validatesharedintegertypedarray', - ValidateTypedArray: 'https://262.ecma-international.org/8.0/#sec-validatetypedarray', - ValueOfReadEvent: 'https://262.ecma-international.org/8.0/#sec-valueofreadevent', - WakeWaiter: 'https://262.ecma-international.org/8.0/#sec-wakewaiter', - WeekDay: 'https://262.ecma-international.org/8.0/#sec-week-day', - WordCharacters: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation', - YearFromTime: 'https://262.ecma-international.org/8.0/#eqn-YearFromTime' + abs: { + url: 'https://262.ecma-international.org/8.0/#eqn-abs' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/8.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/8.0/#sec-abstract-relational-comparison' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/8.0/#sec-addrestrictedfunctionproperties' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/8.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/8.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/8.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/8.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/8.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/8.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-allocatetypedarraybuffer' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/8.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-arrayspeciescreate' + }, + AsyncFunctionAwait: { + url: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-await' + }, + AsyncFunctionCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-create' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/8.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AtomicLoad: { + url: 'https://262.ecma-international.org/8.0/#sec-atomicload' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/8.0/#sec-atomicreadmodifywrite' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/8.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/8.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/8.0/#sec-canonicalnumericindexstring' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-clonearraybuffer' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/8.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/8.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/8.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/8.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/8.0/#sec-copydatablockbytes' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/8.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-createarrayiterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/8.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/8.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/8.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/8.0/#sec-createdynamicfunction' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/8.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/8.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/8.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/8.0/#sec-createlistfromarraylike' + }, + CreateListIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-createlistiterator' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/8.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/8.0/#sec-createrealm' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/8.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/8.0/#sec-createsharedbytedatablock' + }, + CreateStringIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-createstringiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/8.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/8.0/#sec-date-number' + }, + Day: { + url: 'https://262.ecma-international.org/8.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/8.0/#eqn-DaysFromYear' + }, + DaylightSavingTA: { + url: 'https://262.ecma-international.org/8.0/#sec-daylight-saving-time-adjustment' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/8.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/8.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/8.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/8.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/8.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/8.0/#sec-encode' + }, + EnqueueJob: { + url: 'https://262.ecma-international.org/8.0/#sec-enqueuejob' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/8.0/#sec-entercriticalsection' + }, + EnumerableOwnProperties: { + url: 'https://262.ecma-international.org/8.0/#sec-enumerableownproperties' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/8.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/8.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/8.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/8.0/#sec-evaluatecall' + }, + EvaluateDirectCall: { + url: 'https://262.ecma-international.org/8.0/#sec-evaluatedirectcall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/8.0/#sec-evaluatenew' + }, + EventSet: { + url: 'https://262.ecma-international.org/8.0/#sec-event-set' + }, + floor: { + url: 'https://262.ecma-international.org/8.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/8.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/8.0/#sec-fulfillpromise' + }, + FunctionAllocate: { + url: 'https://262.ecma-international.org/8.0/#sec-functionallocate' + }, + FunctionCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-functioncreate' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/8.0/#sec-functiondeclarationinstantiation' + }, + FunctionInitialize: { + url: 'https://262.ecma-international.org/8.0/#sec-functioninitialize' + }, + GeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-generatorfunctioncreate' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/8.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/8.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/8.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/8.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/8.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/8.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/8.0/#sec-getactivescriptormodule' + }, + GetBase: { + url: 'https://262.ecma-international.org/8.0/#ao-getbase' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/8.0/#sec-getfunctionrealm' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/8.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/8.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/8.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/8.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/8.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/8.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/8.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-getprototypefromconstructor' + }, + GetReferencedName: { + url: 'https://262.ecma-international.org/8.0/#ao-getreferencedname' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/8.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/8.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/8.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/8.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/8.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/8.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/8.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/8.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/8.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-hasownproperty' + }, + HasPrimitiveBase: { + url: 'https://262.ecma-international.org/8.0/#ao-hasprimitivebase' + }, + HasProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/8.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/8.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-HourFromTime' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/8.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/8.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/8.0/#sec-initializeboundname' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/8.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/8.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/8.0/#eqn-InLeapYear' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/8.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/8.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/8.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/8.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/8.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/8.0/#sec-isarray' + }, + IsCallable: { + url: 'https://262.ecma-international.org/8.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/8.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/8.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/8.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/8.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/8.0/#sec-islabelledfunction' + }, + IsPromise: { + url: 'https://262.ecma-international.org/8.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/8.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/8.0/#ao-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/8.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-issharedarraybuffer' + }, + IsStrictReference: { + url: 'https://262.ecma-international.org/8.0/#ao-isstrictreference' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/8.0/#ao-issuperreference' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/8.0/#ao-isunresolvablereference' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/8.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/8.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/8.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/8.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/8.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/8.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/8.0/#sec-leavecriticalsection' + }, + LocalTime: { + url: 'https://262.ecma-international.org/8.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/8.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/8.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/8.0/#sec-makeargsetter' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/8.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/8.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/8.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/8.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/8.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/8.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/8.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/8.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/8.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/8.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/8.0/#sec-newpromisecapability' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/8.0/#sec-normalcompletion' + }, + NumberToRawBytes: { + url: 'https://262.ecma-international.org/8.0/#sec-numbertorawbytes' + }, + ObjectCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-objectcreate' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/8.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarydelete' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryisextensible' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarysetprototypeof' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/8.0/#sec-parsemodule' + }, + ParseScript: { + url: 'https://262.ecma-international.org/8.0/#sec-parse-script' + }, + PerformEval: { + url: 'https://262.ecma-international.org/8.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/8.0/#sec-performpromiseall' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/8.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/8.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/8.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/8.0/#sec-preparefortailcall' + }, + PromiseReactionJob: { + url: 'https://262.ecma-international.org/8.0/#sec-promisereactionjob' + }, + PromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/8.0/#sec-promiseresolvethenablejob' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/8.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/8.0/#sec-quotejsonstring' + }, + RawBytesToNumber: { + url: 'https://262.ecma-international.org/8.0/#sec-rawbytestonumber' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/8.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/8.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/8.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/8.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/8.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/8.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/8.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/8.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/8.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/8.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/8.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/8.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/8.0/#sec-returnifabrupt' + }, + RunJobs: { + url: 'https://262.ecma-international.org/8.0/#sec-runjobs' + }, + SameValue: { + url: 'https://262.ecma-international.org/8.0/#sec-samevalue' + }, + SameValueNonNumber: { + url: 'https://262.ecma-international.org/8.0/#sec-samevaluenonnumber' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/8.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-scriptevaluation' + }, + ScriptEvaluationJob: { + url: 'https://262.ecma-international.org/8.0/#sec-scriptevaluationjob' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/8.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/8.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/8.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/8.0/#sec-setdefaultglobalbindings' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/8.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/8.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/8.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/8.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/8.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/8.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/8.0/#sec-sharedatablockeventset' + }, + SortCompare: { + url: 'https://262.ecma-international.org/8.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/8.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/8.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/8.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/8.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/8.0/#sec-stringgetownproperty' + }, + Suspend: { + url: 'https://262.ecma-international.org/8.0/#sec-suspend' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/8.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/8.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/8.0/#sec-testintegritylevel' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/8.0/#sec-thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/8.0/#sec-thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/8.0/#sec-thisstringvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/8.0/#sec-thistimevalue' + }, + TimeClip: { + url: 'https://262.ecma-international.org/8.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/8.0/#eqn-TimeFromYear' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/8.0/#eqn-TimeWithinDay' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/8.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/8.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/8.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/8.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/8.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/8.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/8.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/8.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/8.0/#sec-tonumber' + }, + ToObject: { + url: 'https://262.ecma-international.org/8.0/#sec-toobject' + }, + TopLevelModuleEvaluationJob: { + url: 'https://262.ecma-international.org/8.0/#sec-toplevelmoduleevaluationjob' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/8.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/8.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/8.0/#sec-tostring' + }, + 'ToString Applied to the Number Type': { + url: 'https://262.ecma-international.org/8.0/#sec-tostring-applied-to-the-number-type' + }, + ToUint16: { + url: 'https://262.ecma-international.org/8.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/8.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/8.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/8.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/8.0/#sec-triggerpromisereactions' + }, + Type: { + url: 'https://262.ecma-international.org/8.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/8.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/8.0/#typedarray-species-create' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/8.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/8.0/#sec-utc-t' + }, + UTF16Decode: { + url: 'https://262.ecma-international.org/8.0/#sec-utf16decode' + }, + UTF16Encoding: { + url: 'https://262.ecma-international.org/8.0/#sec-utf16encoding' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/8.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/8.0/#sec-validateatomicaccess' + }, + ValidateSharedIntegerTypedArray: { + url: 'https://262.ecma-international.org/8.0/#sec-validatesharedintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/8.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/8.0/#sec-valueofreadevent' + }, + WakeWaiter: { + url: 'https://262.ecma-international.org/8.0/#sec-wakewaiter' + }, + WeekDay: { + url: 'https://262.ecma-international.org/8.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/8.0/#sec-runtime-semantics-wordcharacters-abstract-operation' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/8.0/#eqn-YearFromTime' + } }; diff --git a/node_modules/es-abstract/operations/2018.js b/node_modules/es-abstract/operations/2018.js index 10d10f212..251a40920 100644 --- a/node_modules/es-abstract/operations/2018.js +++ b/node_modules/es-abstract/operations/2018.js @@ -1,350 +1,1033 @@ 'use strict'; module.exports = { - abs: 'https://262.ecma-international.org/9.0/#eqn-abs', - 'Abstract Equality Comparison': 'https://262.ecma-international.org/9.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison', - AddRestrictedFunctionProperties: 'https://262.ecma-international.org/9.0/#sec-addrestrictedfunctionproperties', - AddWaiter: 'https://262.ecma-international.org/9.0/#sec-addwaiter', - AdvanceStringIndex: 'https://262.ecma-international.org/9.0/#sec-advancestringindex', - 'agent-order': 'https://262.ecma-international.org/9.0/#sec-agent-order', - AgentCanSuspend: 'https://262.ecma-international.org/9.0/#sec-agentcansuspend', - AgentSignifier: 'https://262.ecma-international.org/9.0/#sec-agentsignifier', - AllocateArrayBuffer: 'https://262.ecma-international.org/9.0/#sec-allocatearraybuffer', - AllocateSharedArrayBuffer: 'https://262.ecma-international.org/9.0/#sec-allocatesharedarraybuffer', - AllocateTypedArray: 'https://262.ecma-international.org/9.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://262.ecma-international.org/9.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://262.ecma-international.org/9.0/#sec-arraycreate', - ArraySetLength: 'https://262.ecma-international.org/9.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://262.ecma-international.org/9.0/#sec-arrayspeciescreate', - AsyncFunctionCreate: 'https://262.ecma-international.org/9.0/#sec-async-functions-abstract-operations-async-function-create', - AsyncFunctionStart: 'https://262.ecma-international.org/9.0/#sec-async-functions-abstract-operations-async-function-start', - AsyncGeneratorEnqueue: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorenqueue', - AsyncGeneratorFunctionCreate: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorfunctioncreate', - AsyncGeneratorReject: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorreject', - AsyncGeneratorResolve: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorresolve', - AsyncGeneratorResumeNext: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorresumenext', - AsyncGeneratorStart: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorstart', - AsyncGeneratorYield: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratoryield', - AsyncIteratorClose: 'https://262.ecma-international.org/9.0/#sec-asynciteratorclose', - AtomicLoad: 'https://262.ecma-international.org/9.0/#sec-atomicload', - AtomicReadModifyWrite: 'https://262.ecma-international.org/9.0/#sec-atomicreadmodifywrite', - Await: 'https://262.ecma-international.org/9.0/#await', - BackreferenceMatcher: 'https://262.ecma-international.org/9.0/#sec-backreference-matcher', - BlockDeclarationInstantiation: 'https://262.ecma-international.org/9.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://262.ecma-international.org/9.0/#sec-boundfunctioncreate', - Call: 'https://262.ecma-international.org/9.0/#sec-call', - Canonicalize: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://262.ecma-international.org/9.0/#sec-canonicalnumericindexstring', - CaseClauseIsSelected: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-caseclauseisselected', - CharacterRange: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://262.ecma-international.org/9.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://262.ecma-international.org/9.0/#sec-completepropertydescriptor', - Completion: 'https://262.ecma-international.org/9.0/#sec-completion-record-specification-type', - ComposeWriteEventBytes: 'https://262.ecma-international.org/9.0/#sec-composewriteeventbytes', - Construct: 'https://262.ecma-international.org/9.0/#sec-construct', - CopyDataBlockBytes: 'https://262.ecma-international.org/9.0/#sec-copydatablockbytes', - CopyDataProperties: 'https://262.ecma-international.org/9.0/#sec-copydataproperties', - CreateArrayFromList: 'https://262.ecma-international.org/9.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://262.ecma-international.org/9.0/#sec-createarrayiterator', - CreateAsyncFromSyncIterator: 'https://262.ecma-international.org/9.0/#sec-createasyncfromsynciterator', - CreateBuiltinFunction: 'https://262.ecma-international.org/9.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://262.ecma-international.org/9.0/#sec-createbytedatablock', - CreateDataProperty: 'https://262.ecma-international.org/9.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://262.ecma-international.org/9.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://262.ecma-international.org/9.0/#sec-createdynamicfunction', - CreateHTML: 'https://262.ecma-international.org/9.0/#sec-createhtml', - CreateIntrinsics: 'https://262.ecma-international.org/9.0/#sec-createintrinsics', - CreateIterResultObject: 'https://262.ecma-international.org/9.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://262.ecma-international.org/9.0/#sec-createlistfromarraylike', - CreateListIteratorRecord: 'https://262.ecma-international.org/9.0/#sec-createlistiteratorRecord', - CreateMapIterator: 'https://262.ecma-international.org/9.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://262.ecma-international.org/9.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://262.ecma-international.org/9.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://262.ecma-international.org/9.0/#sec-createperiterationenvironment', - CreateRealm: 'https://262.ecma-international.org/9.0/#sec-createrealm', - CreateResolvingFunctions: 'https://262.ecma-international.org/9.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://262.ecma-international.org/9.0/#sec-createsetiterator', - CreateSharedByteDataBlock: 'https://262.ecma-international.org/9.0/#sec-createsharedbytedatablock', - CreateStringIterator: 'https://262.ecma-international.org/9.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://262.ecma-international.org/9.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://262.ecma-international.org/9.0/#sec-date-number', - DateString: 'https://262.ecma-international.org/9.0/#sec-datestring', - Day: 'https://262.ecma-international.org/9.0/#eqn-Day', - DayFromYear: 'https://262.ecma-international.org/9.0/#eqn-DaysFromYear', - DaysInYear: 'https://262.ecma-international.org/9.0/#eqn-DaysInYear', - DayWithinYear: 'https://262.ecma-international.org/9.0/#eqn-DayWithinYear', - Decode: 'https://262.ecma-international.org/9.0/#sec-decode', - DefinePropertyOrThrow: 'https://262.ecma-international.org/9.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://262.ecma-international.org/9.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://262.ecma-international.org/9.0/#sec-detacharraybuffer', - Encode: 'https://262.ecma-international.org/9.0/#sec-encode', - EnqueueJob: 'https://262.ecma-international.org/9.0/#sec-enqueuejob', - EnterCriticalSection: 'https://262.ecma-international.org/9.0/#sec-entercriticalsection', - EnumerableOwnPropertyNames: 'https://262.ecma-international.org/9.0/#sec-enumerableownpropertynames', - EnumerateObjectProperties: 'https://262.ecma-international.org/9.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://262.ecma-international.org/9.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://262.ecma-international.org/9.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://262.ecma-international.org/9.0/#sec-evaluatecall', - EvaluateNew: 'https://262.ecma-international.org/9.0/#sec-evaluatenew', - EventSet: 'https://262.ecma-international.org/9.0/#sec-event-set', - floor: 'https://262.ecma-international.org/9.0/#eqn-floor', - ForBodyEvaluation: 'https://262.ecma-international.org/9.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://262.ecma-international.org/9.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://262.ecma-international.org/9.0/#sec-fulfillpromise', - FunctionAllocate: 'https://262.ecma-international.org/9.0/#sec-functionallocate', - FunctionCreate: 'https://262.ecma-international.org/9.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://262.ecma-international.org/9.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://262.ecma-international.org/9.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://262.ecma-international.org/9.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://262.ecma-international.org/9.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://262.ecma-international.org/9.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://262.ecma-international.org/9.0/#sec-generatorstart', - GeneratorValidate: 'https://262.ecma-international.org/9.0/#sec-generatorvalidate', - GeneratorYield: 'https://262.ecma-international.org/9.0/#sec-generatoryield', - Get: 'https://262.ecma-international.org/9.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://262.ecma-international.org/9.0/#sec-getactivescriptormodule', - GetBase: 'https://262.ecma-international.org/9.0/#sec-getbase', - GetFunctionRealm: 'https://262.ecma-international.org/9.0/#sec-getfunctionrealm', - GetGeneratorKind: 'https://262.ecma-international.org/9.0/#sec-getgeneratorkind', - GetGlobalObject: 'https://262.ecma-international.org/9.0/#sec-getglobalobject', - GetIdentifierReference: 'https://262.ecma-international.org/9.0/#sec-getidentifierreference', - GetIterator: 'https://262.ecma-international.org/9.0/#sec-getiterator', - GetMethod: 'https://262.ecma-international.org/9.0/#sec-getmethod', - GetModifySetValueInBuffer: 'https://262.ecma-international.org/9.0/#sec-getmodifysetvalueinbuffer', - GetModuleNamespace: 'https://262.ecma-international.org/9.0/#sec-getmodulenamespace', - GetNewTarget: 'https://262.ecma-international.org/9.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://262.ecma-international.org/9.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://262.ecma-international.org/9.0/#sec-getprototypefromconstructor', - GetReferencedName: 'https://262.ecma-international.org/9.0/#sec-getreferencedname', - GetSubstitution: 'https://262.ecma-international.org/9.0/#sec-getsubstitution', - GetSuperConstructor: 'https://262.ecma-international.org/9.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://262.ecma-international.org/9.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://262.ecma-international.org/9.0/#sec-getthisenvironment', - GetThisValue: 'https://262.ecma-international.org/9.0/#sec-getthisvalue', - GetV: 'https://262.ecma-international.org/9.0/#sec-getv', - GetValue: 'https://262.ecma-international.org/9.0/#sec-getvalue', - GetValueFromBuffer: 'https://262.ecma-international.org/9.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://262.ecma-international.org/9.0/#sec-getviewvalue', - GetWaiterList: 'https://262.ecma-international.org/9.0/#sec-getwaiterlist', - GlobalDeclarationInstantiation: 'https://262.ecma-international.org/9.0/#sec-globaldeclarationinstantiation', - 'happens-before': 'https://262.ecma-international.org/9.0/#sec-happens-before', - HasOwnProperty: 'https://262.ecma-international.org/9.0/#sec-hasownproperty', - HasPrimitiveBase: 'https://262.ecma-international.org/9.0/#sec-hasprimitivebase', - HasProperty: 'https://262.ecma-international.org/9.0/#sec-hasproperty', - 'host-synchronizes-with': 'https://262.ecma-international.org/9.0/#sec-host-synchronizes-with', - HostEnsureCanCompileStrings: 'https://262.ecma-international.org/9.0/#sec-hostensurecancompilestrings', - HostEventSet: 'https://262.ecma-international.org/9.0/#sec-hosteventset', - HostPromiseRejectionTracker: 'https://262.ecma-international.org/9.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://262.ecma-international.org/9.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://262.ecma-international.org/9.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://262.ecma-international.org/9.0/#eqn-HourFromTime', - IfAbruptRejectPromise: 'https://262.ecma-international.org/9.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://262.ecma-international.org/9.0/#sec-importedlocalnames', - InitializeBoundName: 'https://262.ecma-international.org/9.0/#sec-initializeboundname', - InitializeHostDefinedRealm: 'https://262.ecma-international.org/9.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://262.ecma-international.org/9.0/#sec-initializereferencedbinding', - InLeapYear: 'https://262.ecma-international.org/9.0/#eqn-InLeapYear', - InnerModuleEvaluation: 'https://262.ecma-international.org/9.0/#sec-innermoduleevaluation', - InnerModuleInstantiation: 'https://262.ecma-international.org/9.0/#sec-innermoduleinstantiation', - InstanceofOperator: 'https://262.ecma-international.org/9.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://262.ecma-international.org/9.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://262.ecma-international.org/9.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://262.ecma-international.org/9.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://262.ecma-international.org/9.0/#sec-internalizejsonproperty', - Invoke: 'https://262.ecma-international.org/9.0/#sec-invoke', - IsAccessorDescriptor: 'https://262.ecma-international.org/9.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://262.ecma-international.org/9.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://262.ecma-international.org/9.0/#sec-isarray', - IsCallable: 'https://262.ecma-international.org/9.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://262.ecma-international.org/9.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://262.ecma-international.org/9.0/#sec-isconcatspreadable', - IsConstructor: 'https://262.ecma-international.org/9.0/#sec-isconstructor', - IsDataDescriptor: 'https://262.ecma-international.org/9.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://262.ecma-international.org/9.0/#sec-isdetachedbuffer', - IsExtensible: 'https://262.ecma-international.org/9.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://262.ecma-international.org/9.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://262.ecma-international.org/9.0/#sec-isintailposition', - IsInteger: 'https://262.ecma-international.org/9.0/#sec-isinteger', - IsLabelledFunction: 'https://262.ecma-international.org/9.0/#sec-islabelledfunction', - IsPromise: 'https://262.ecma-international.org/9.0/#sec-ispromise', - IsPropertyKey: 'https://262.ecma-international.org/9.0/#sec-ispropertykey', - IsPropertyReference: 'https://262.ecma-international.org/9.0/#sec-ispropertyreference', - IsRegExp: 'https://262.ecma-international.org/9.0/#sec-isregexp', - IsSharedArrayBuffer: 'https://262.ecma-international.org/9.0/#sec-issharedarraybuffer', - IsStrictReference: 'https://262.ecma-international.org/9.0/#sec-isstrictreference', - IsStringPrefix: 'https://262.ecma-international.org/9.0/#sec-isstringprefix', - IsSuperReference: 'https://262.ecma-international.org/9.0/#sec-issuperreference', - IsUnresolvableReference: 'https://262.ecma-international.org/9.0/#sec-isunresolvablereference', - IsWordChar: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToList: 'https://262.ecma-international.org/9.0/#sec-iterabletolist', - IteratorClose: 'https://262.ecma-international.org/9.0/#sec-iteratorclose', - IteratorComplete: 'https://262.ecma-international.org/9.0/#sec-iteratorcomplete', - IteratorNext: 'https://262.ecma-international.org/9.0/#sec-iteratornext', - IteratorStep: 'https://262.ecma-international.org/9.0/#sec-iteratorstep', - IteratorValue: 'https://262.ecma-international.org/9.0/#sec-iteratorvalue', - LeaveCriticalSection: 'https://262.ecma-international.org/9.0/#sec-leavecriticalsection', - LocalTime: 'https://262.ecma-international.org/9.0/#sec-localtime', - LoopContinues: 'https://262.ecma-international.org/9.0/#sec-loopcontinues', - MakeArgGetter: 'https://262.ecma-international.org/9.0/#sec-makearggetter', - MakeArgSetter: 'https://262.ecma-international.org/9.0/#sec-makeargsetter', - MakeClassConstructor: 'https://262.ecma-international.org/9.0/#sec-makeclassconstructor', - MakeConstructor: 'https://262.ecma-international.org/9.0/#sec-makeconstructor', - MakeDate: 'https://262.ecma-international.org/9.0/#sec-makedate', - MakeDay: 'https://262.ecma-international.org/9.0/#sec-makeday', - MakeMethod: 'https://262.ecma-international.org/9.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://262.ecma-international.org/9.0/#sec-makesuperpropertyreference', - MakeTime: 'https://262.ecma-international.org/9.0/#sec-maketime', - max: 'https://262.ecma-international.org/9.0/#eqn-max', - 'memory-order': 'https://262.ecma-international.org/9.0/#sec-memory-order', - min: 'https://262.ecma-international.org/9.0/#eqn-min', - MinFromTime: 'https://262.ecma-international.org/9.0/#eqn-MinFromTime', - ModuleDeclarationEnvironmentSetup: 'https://262.ecma-international.org/9.0/#sec-moduledeclarationenvironmentsetup', - ModuleExecution: 'https://262.ecma-international.org/9.0/#sec-moduleexecution', - ModuleNamespaceCreate: 'https://262.ecma-international.org/9.0/#sec-modulenamespacecreate', - modulo: 'https://262.ecma-international.org/9.0/#eqn-modulo', - MonthFromTime: 'https://262.ecma-international.org/9.0/#eqn-MonthFromTime', - msFromTime: 'https://262.ecma-international.org/9.0/#eqn-msFromTime', - NewDeclarativeEnvironment: 'https://262.ecma-international.org/9.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://262.ecma-international.org/9.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://262.ecma-international.org/9.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://262.ecma-international.org/9.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://262.ecma-international.org/9.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://262.ecma-international.org/9.0/#sec-newpromisecapability', - NormalCompletion: 'https://262.ecma-international.org/9.0/#sec-normalcompletion', - NumberToRawBytes: 'https://262.ecma-international.org/9.0/#sec-numbertorawbytes', - NumberToString: 'https://262.ecma-international.org/9.0/#sec-tostring-applied-to-the-number-type', - ObjectCreate: 'https://262.ecma-international.org/9.0/#sec-objectcreate', - ObjectDefineProperties: 'https://262.ecma-international.org/9.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://262.ecma-international.org/9.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://262.ecma-international.org/9.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://262.ecma-international.org/9.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://262.ecma-international.org/9.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://262.ecma-international.org/9.0/#sec-ordinarydelete', - OrdinaryGet: 'https://262.ecma-international.org/9.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://262.ecma-international.org/9.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://262.ecma-international.org/9.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://262.ecma-international.org/9.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://262.ecma-international.org/9.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://262.ecma-international.org/9.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://262.ecma-international.org/9.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://262.ecma-international.org/9.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://262.ecma-international.org/9.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://262.ecma-international.org/9.0/#sec-ordinarysetprototypeof', - OrdinarySetWithOwnDescriptor: 'https://262.ecma-international.org/9.0/#sec-ordinarysetwithowndescriptor', - OrdinaryToPrimitive: 'https://262.ecma-international.org/9.0/#sec-ordinarytoprimitive', - ParseModule: 'https://262.ecma-international.org/9.0/#sec-parsemodule', - ParseScript: 'https://262.ecma-international.org/9.0/#sec-parse-script', - PerformEval: 'https://262.ecma-international.org/9.0/#sec-performeval', - PerformPromiseAll: 'https://262.ecma-international.org/9.0/#sec-performpromiseall', - PerformPromiseRace: 'https://262.ecma-international.org/9.0/#sec-performpromiserace', - PerformPromiseThen: 'https://262.ecma-international.org/9.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://262.ecma-international.org/9.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://262.ecma-international.org/9.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://262.ecma-international.org/9.0/#sec-promisereactionjob', - PromiseResolve: 'https://262.ecma-international.org/9.0/#sec-promise-resolve', - PromiseResolveThenableJob: 'https://262.ecma-international.org/9.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://262.ecma-international.org/9.0/#sec-proxycreate', - PutValue: 'https://262.ecma-international.org/9.0/#sec-putvalue', - QuoteJSONString: 'https://262.ecma-international.org/9.0/#sec-quotejsonstring', - RawBytesToNumber: 'https://262.ecma-international.org/9.0/#sec-rawbytestonumber', - 'reads-bytes-from': 'https://262.ecma-international.org/9.0/#sec-reads-bytes-from', - 'reads-from': 'https://262.ecma-international.org/9.0/#sec-reads-from', - RegExpAlloc: 'https://262.ecma-international.org/9.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://262.ecma-international.org/9.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://262.ecma-international.org/9.0/#sec-regexpcreate', - RegExpExec: 'https://262.ecma-international.org/9.0/#sec-regexpexec', - RegExpInitialize: 'https://262.ecma-international.org/9.0/#sec-regexpinitialize', - RejectPromise: 'https://262.ecma-international.org/9.0/#sec-rejectpromise', - RemoveWaiter: 'https://262.ecma-international.org/9.0/#sec-removewaiter', - RemoveWaiters: 'https://262.ecma-international.org/9.0/#sec-removewaiters', - RepeatMatcher: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://262.ecma-international.org/9.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://262.ecma-international.org/9.0/#sec-resolvebinding', - ResolveThisBinding: 'https://262.ecma-international.org/9.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://262.ecma-international.org/9.0/#sec-returnifabrupt', - RunJobs: 'https://262.ecma-international.org/9.0/#sec-runjobs', - SameValue: 'https://262.ecma-international.org/9.0/#sec-samevalue', - SameValueNonNumber: 'https://262.ecma-international.org/9.0/#sec-samevaluenonnumber', - SameValueZero: 'https://262.ecma-international.org/9.0/#sec-samevaluezero', - ScriptEvaluation: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://262.ecma-international.org/9.0/#sec-scriptevaluationjob', - SecFromTime: 'https://262.ecma-international.org/9.0/#eqn-SecFromTime', - SerializeJSONArray: 'https://262.ecma-international.org/9.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://262.ecma-international.org/9.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://262.ecma-international.org/9.0/#sec-serializejsonproperty', - Set: 'https://262.ecma-international.org/9.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://262.ecma-international.org/9.0/#sec-setdefaultglobalbindings', - SetFunctionLength: 'https://262.ecma-international.org/9.0/#sec-setfunctionlength', - SetFunctionName: 'https://262.ecma-international.org/9.0/#sec-setfunctionname', - SetImmutablePrototype: 'https://262.ecma-international.org/9.0/#sec-set-immutable-prototype', - SetIntegrityLevel: 'https://262.ecma-international.org/9.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://262.ecma-international.org/9.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://262.ecma-international.org/9.0/#sec-setvalueinbuffer', - SetViewValue: 'https://262.ecma-international.org/9.0/#sec-setviewvalue', - SharedDataBlockEventSet: 'https://262.ecma-international.org/9.0/#sec-sharedatablockeventset', - SortCompare: 'https://262.ecma-international.org/9.0/#sec-sortcompare', - SpeciesConstructor: 'https://262.ecma-international.org/9.0/#sec-speciesconstructor', - SplitMatch: 'https://262.ecma-international.org/9.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://262.ecma-international.org/9.0/#sec-strict-equality-comparison', - StringCreate: 'https://262.ecma-international.org/9.0/#sec-stringcreate', - StringGetOwnProperty: 'https://262.ecma-international.org/9.0/#sec-stringgetownproperty', - Suspend: 'https://262.ecma-international.org/9.0/#sec-suspend', - SymbolDescriptiveString: 'https://262.ecma-international.org/9.0/#sec-symboldescriptivestring', - 'synchronizes-with': 'https://262.ecma-international.org/9.0/#sec-synchronizes-with', - TestIntegrityLevel: 'https://262.ecma-international.org/9.0/#sec-testintegritylevel', - thisBooleanValue: 'https://262.ecma-international.org/9.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://262.ecma-international.org/9.0/#sec-thisnumbervalue', - thisStringValue: 'https://262.ecma-international.org/9.0/#sec-thisstringvalue', - thisSymbolValue: 'https://262.ecma-international.org/9.0/#sec-thissymbolvalue', - thisTimeValue: 'https://262.ecma-international.org/9.0/#sec-thistimevalue', - ThrowCompletion: 'https://262.ecma-international.org/9.0/#sec-throwcompletion', - TimeClip: 'https://262.ecma-international.org/9.0/#sec-timeclip', - TimeFromYear: 'https://262.ecma-international.org/9.0/#eqn-TimeFromYear', - TimeString: 'https://262.ecma-international.org/9.0/#sec-timestring', - TimeWithinDay: 'https://262.ecma-international.org/9.0/#eqn-TimeWithinDay', - TimeZoneString: 'https://262.ecma-international.org/9.0/#sec-timezoneestring', - ToBoolean: 'https://262.ecma-international.org/9.0/#sec-toboolean', - ToDateString: 'https://262.ecma-international.org/9.0/#sec-todatestring', - ToIndex: 'https://262.ecma-international.org/9.0/#sec-toindex', - ToInt16: 'https://262.ecma-international.org/9.0/#sec-toint16', - ToInt32: 'https://262.ecma-international.org/9.0/#sec-toint32', - ToInt8: 'https://262.ecma-international.org/9.0/#sec-toint8', - ToInteger: 'https://262.ecma-international.org/9.0/#sec-tointeger', - ToLength: 'https://262.ecma-international.org/9.0/#sec-tolength', - ToNumber: 'https://262.ecma-international.org/9.0/#sec-tonumber', - ToObject: 'https://262.ecma-international.org/9.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://262.ecma-international.org/9.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://262.ecma-international.org/9.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://262.ecma-international.org/9.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://262.ecma-international.org/9.0/#sec-topropertykey', - ToString: 'https://262.ecma-international.org/9.0/#sec-tostring', - ToUint16: 'https://262.ecma-international.org/9.0/#sec-touint16', - ToUint32: 'https://262.ecma-international.org/9.0/#sec-touint32', - ToUint8: 'https://262.ecma-international.org/9.0/#sec-touint8', - ToUint8Clamp: 'https://262.ecma-international.org/9.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://262.ecma-international.org/9.0/#sec-triggerpromisereactions', - Type: 'https://262.ecma-international.org/9.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://262.ecma-international.org/9.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://262.ecma-international.org/9.0/#typedarray-species-create', - UnicodeEscape: 'https://262.ecma-international.org/9.0/#sec-unicodeescape', - UnicodeMatchProperty: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-unicodematchproperty-p', - UnicodeMatchPropertyValue: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v', - UpdateEmpty: 'https://262.ecma-international.org/9.0/#sec-updateempty', - UTC: 'https://262.ecma-international.org/9.0/#sec-utc-t', - UTF16Decode: 'https://262.ecma-international.org/9.0/#sec-utf16decode', - UTF16Encoding: 'https://262.ecma-international.org/9.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://262.ecma-international.org/9.0/#sec-validateandapplypropertydescriptor', - ValidateAtomicAccess: 'https://262.ecma-international.org/9.0/#sec-validateatomicaccess', - ValidateSharedIntegerTypedArray: 'https://262.ecma-international.org/9.0/#sec-validatesharedintegertypedarray', - ValidateTypedArray: 'https://262.ecma-international.org/9.0/#sec-validatetypedarray', - ValueOfReadEvent: 'https://262.ecma-international.org/9.0/#sec-valueofreadevent', - WakeWaiter: 'https://262.ecma-international.org/9.0/#sec-wakewaiter', - WeekDay: 'https://262.ecma-international.org/9.0/#sec-week-day', - WordCharacters: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-wordcharacters-abstract-operation', - YearFromTime: 'https://262.ecma-international.org/9.0/#eqn-YearFromTime' + abs: { + url: 'https://262.ecma-international.org/9.0/#eqn-abs' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/9.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/9.0/#sec-addrestrictedfunctionproperties' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/9.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/9.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/9.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/9.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/9.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/9.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-allocatetypedarraybuffer' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/9.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-arrayspeciescreate' + }, + AsyncFunctionCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-async-functions-abstract-operations-async-function-create' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/9.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorfunctioncreate' + }, + AsyncGeneratorReject: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorreject' + }, + AsyncGeneratorResolve: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorresolve' + }, + AsyncGeneratorResumeNext: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorresumenext' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/9.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/9.0/#sec-asynciteratorclose' + }, + AtomicLoad: { + url: 'https://262.ecma-international.org/9.0/#sec-atomicload' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/9.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/9.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/9.0/#sec-backreference-matcher' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/9.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/9.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/9.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-clonearraybuffer' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/9.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/9.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/9.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/9.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/9.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/9.0/#sec-copydataproperties' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/9.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-createasyncfromsynciterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/9.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/9.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/9.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/9.0/#sec-createdynamicfunction' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/9.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/9.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/9.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/9.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/9.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/9.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/9.0/#sec-createrealm' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/9.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/9.0/#sec-createsharedbytedatablock' + }, + CreateStringIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-createstringiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/9.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/9.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/9.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/9.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/9.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/9.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/9.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/9.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/9.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/9.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/9.0/#sec-encode' + }, + EnqueueJob: { + url: 'https://262.ecma-international.org/9.0/#sec-enqueuejob' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/9.0/#sec-entercriticalsection' + }, + EnumerableOwnPropertyNames: { + url: 'https://262.ecma-international.org/9.0/#sec-enumerableownpropertynames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/9.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/9.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/9.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/9.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/9.0/#sec-evaluatenew' + }, + EventSet: { + url: 'https://262.ecma-international.org/9.0/#sec-event-set' + }, + floor: { + url: 'https://262.ecma-international.org/9.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/9.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/9.0/#sec-fulfillpromise' + }, + FunctionAllocate: { + url: 'https://262.ecma-international.org/9.0/#sec-functionallocate' + }, + FunctionCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-functioncreate' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/9.0/#sec-functiondeclarationinstantiation' + }, + FunctionInitialize: { + url: 'https://262.ecma-international.org/9.0/#sec-functioninitialize' + }, + GeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-generatorfunctioncreate' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/9.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/9.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/9.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/9.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/9.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/9.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/9.0/#sec-getactivescriptormodule' + }, + GetBase: { + url: 'https://262.ecma-international.org/9.0/#sec-getbase' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/9.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/9.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/9.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/9.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/9.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/9.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/9.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/9.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/9.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-getprototypefromconstructor' + }, + GetReferencedName: { + url: 'https://262.ecma-international.org/9.0/#sec-getreferencedname' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/9.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/9.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/9.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/9.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/9.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/9.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/9.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/9.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/9.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-hasownproperty' + }, + HasPrimitiveBase: { + url: 'https://262.ecma-international.org/9.0/#sec-hasprimitivebase' + }, + HasProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/9.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/9.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-HourFromTime' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/9.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/9.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/9.0/#sec-initializeboundname' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/9.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/9.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/9.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/9.0/#sec-innermoduleevaluation' + }, + InnerModuleInstantiation: { + url: 'https://262.ecma-international.org/9.0/#sec-innermoduleinstantiation' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/9.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/9.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/9.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/9.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/9.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/9.0/#sec-isarray' + }, + IsCallable: { + url: 'https://262.ecma-international.org/9.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/9.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/9.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/9.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/9.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/9.0/#sec-islabelledfunction' + }, + IsPromise: { + url: 'https://262.ecma-international.org/9.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/9.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/9.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/9.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-issharedarraybuffer' + }, + IsStrictReference: { + url: 'https://262.ecma-international.org/9.0/#sec-isstrictreference' + }, + IsStringPrefix: { + url: 'https://262.ecma-international.org/9.0/#sec-isstringprefix' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/9.0/#sec-issuperreference' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/9.0/#sec-isunresolvablereference' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/9.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/9.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/9.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/9.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/9.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/9.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/9.0/#sec-leavecriticalsection' + }, + LocalTime: { + url: 'https://262.ecma-international.org/9.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/9.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/9.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/9.0/#sec-makeargsetter' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/9.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/9.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/9.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/9.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/9.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/9.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/9.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/9.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-MinFromTime' + }, + ModuleDeclarationEnvironmentSetup: { + url: 'https://262.ecma-international.org/9.0/#sec-moduledeclarationenvironmentsetup' + }, + ModuleExecution: { + url: 'https://262.ecma-international.org/9.0/#sec-moduleexecution' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/9.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/9.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/9.0/#sec-newpromisecapability' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/9.0/#sec-normalcompletion' + }, + NumberToRawBytes: { + url: 'https://262.ecma-international.org/9.0/#sec-numbertorawbytes' + }, + NumberToString: { + url: 'https://262.ecma-international.org/9.0/#sec-tostring-applied-to-the-number-type' + }, + ObjectCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-objectcreate' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/9.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarydelete' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryisextensible' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/9.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/9.0/#sec-parsemodule' + }, + ParseScript: { + url: 'https://262.ecma-international.org/9.0/#sec-parse-script' + }, + PerformEval: { + url: 'https://262.ecma-international.org/9.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/9.0/#sec-performpromiseall' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/9.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/9.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/9.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/9.0/#sec-preparefortailcall' + }, + PromiseReactionJob: { + url: 'https://262.ecma-international.org/9.0/#sec-promisereactionjob' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/9.0/#sec-promise-resolve' + }, + PromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/9.0/#sec-promiseresolvethenablejob' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/9.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/9.0/#sec-quotejsonstring' + }, + RawBytesToNumber: { + url: 'https://262.ecma-international.org/9.0/#sec-rawbytestonumber' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/9.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/9.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/9.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/9.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/9.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/9.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/9.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/9.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/9.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/9.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/9.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/9.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/9.0/#sec-returnifabrupt' + }, + RunJobs: { + url: 'https://262.ecma-international.org/9.0/#sec-runjobs' + }, + SameValue: { + url: 'https://262.ecma-international.org/9.0/#sec-samevalue' + }, + SameValueNonNumber: { + url: 'https://262.ecma-international.org/9.0/#sec-samevaluenonnumber' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/9.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-scriptevaluation' + }, + ScriptEvaluationJob: { + url: 'https://262.ecma-international.org/9.0/#sec-scriptevaluationjob' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/9.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/9.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/9.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/9.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/9.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/9.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/9.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/9.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/9.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/9.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/9.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/9.0/#sec-sharedatablockeventset' + }, + SortCompare: { + url: 'https://262.ecma-international.org/9.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/9.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/9.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/9.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/9.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-stringgetownproperty' + }, + Suspend: { + url: 'https://262.ecma-international.org/9.0/#sec-suspend' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/9.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/9.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/9.0/#sec-testintegritylevel' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/9.0/#sec-thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/9.0/#sec-thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/9.0/#sec-thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/9.0/#sec-thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/9.0/#sec-thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/9.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/9.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/9.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/9.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/9.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/9.0/#sec-timezoneestring' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/9.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/9.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/9.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/9.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/9.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/9.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/9.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/9.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/9.0/#sec-tonumber' + }, + ToObject: { + url: 'https://262.ecma-international.org/9.0/#sec-toobject' + }, + TopLevelModuleEvaluationJob: { + url: 'https://262.ecma-international.org/9.0/#sec-toplevelmoduleevaluationjob' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/9.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/9.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/9.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/9.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/9.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/9.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/9.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/9.0/#sec-triggerpromisereactions' + }, + Type: { + url: 'https://262.ecma-international.org/9.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/9.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/9.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/9.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/9.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/9.0/#sec-utc-t' + }, + UTF16Decode: { + url: 'https://262.ecma-international.org/9.0/#sec-utf16decode' + }, + UTF16Encoding: { + url: 'https://262.ecma-international.org/9.0/#sec-utf16encoding' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/9.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/9.0/#sec-validateatomicaccess' + }, + ValidateSharedIntegerTypedArray: { + url: 'https://262.ecma-international.org/9.0/#sec-validatesharedintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/9.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/9.0/#sec-valueofreadevent' + }, + WakeWaiter: { + url: 'https://262.ecma-international.org/9.0/#sec-wakewaiter' + }, + WeekDay: { + url: 'https://262.ecma-international.org/9.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/9.0/#sec-runtime-semantics-wordcharacters-abstract-operation' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/9.0/#eqn-YearFromTime' + } }; diff --git a/node_modules/es-abstract/operations/2019.js b/node_modules/es-abstract/operations/2019.js index 57a4be4a9..d19150c8d 100644 --- a/node_modules/es-abstract/operations/2019.js +++ b/node_modules/es-abstract/operations/2019.js @@ -1,355 +1,1048 @@ 'use strict'; module.exports = { - abs: 'https://262.ecma-international.org/10.0/#eqn-abs', - 'Abstract Equality Comparison': 'https://262.ecma-international.org/10.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://262.ecma-international.org/10.0/#sec-abstract-relational-comparison', - AddEntriesFromIterable: 'https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable', - AddRestrictedFunctionProperties: 'https://262.ecma-international.org/10.0/#sec-addrestrictedfunctionproperties', - AddWaiter: 'https://262.ecma-international.org/10.0/#sec-addwaiter', - AdvanceStringIndex: 'https://262.ecma-international.org/10.0/#sec-advancestringindex', - 'agent-order': 'https://262.ecma-international.org/10.0/#sec-agent-order', - AgentCanSuspend: 'https://262.ecma-international.org/10.0/#sec-agentcansuspend', - AgentSignifier: 'https://262.ecma-international.org/10.0/#sec-agentsignifier', - AllocateArrayBuffer: 'https://262.ecma-international.org/10.0/#sec-allocatearraybuffer', - AllocateSharedArrayBuffer: 'https://262.ecma-international.org/10.0/#sec-allocatesharedarraybuffer', - AllocateTypedArray: 'https://262.ecma-international.org/10.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://262.ecma-international.org/10.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://262.ecma-international.org/10.0/#sec-arraycreate', - ArraySetLength: 'https://262.ecma-international.org/10.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://262.ecma-international.org/10.0/#sec-arrayspeciescreate', - AsyncFromSyncIteratorContinuation: 'https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation', - AsyncFunctionCreate: 'https://262.ecma-international.org/10.0/#sec-async-functions-abstract-operations-async-function-create', - AsyncFunctionStart: 'https://262.ecma-international.org/10.0/#sec-async-functions-abstract-operations-async-function-start', - AsyncGeneratorEnqueue: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorenqueue', - AsyncGeneratorFunctionCreate: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorfunctioncreate', - AsyncGeneratorReject: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorreject', - AsyncGeneratorResolve: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorresolve', - AsyncGeneratorResumeNext: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorresumenext', - AsyncGeneratorStart: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorstart', - AsyncGeneratorYield: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratoryield', - AsyncIteratorClose: 'https://262.ecma-international.org/10.0/#sec-asynciteratorclose', - AtomicLoad: 'https://262.ecma-international.org/10.0/#sec-atomicload', - AtomicReadModifyWrite: 'https://262.ecma-international.org/10.0/#sec-atomicreadmodifywrite', - Await: 'https://262.ecma-international.org/10.0/#await', - BackreferenceMatcher: 'https://262.ecma-international.org/10.0/#sec-backreference-matcher', - BlockDeclarationInstantiation: 'https://262.ecma-international.org/10.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://262.ecma-international.org/10.0/#sec-boundfunctioncreate', - Call: 'https://262.ecma-international.org/10.0/#sec-call', - Canonicalize: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://262.ecma-international.org/10.0/#sec-canonicalnumericindexstring', - CaseClauseIsSelected: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-caseclauseisselected', - CharacterRange: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://262.ecma-international.org/10.0/#sec-clonearraybuffer', - CompletePropertyDescriptor: 'https://262.ecma-international.org/10.0/#sec-completepropertydescriptor', - Completion: 'https://262.ecma-international.org/10.0/#sec-completion-record-specification-type', - ComposeWriteEventBytes: 'https://262.ecma-international.org/10.0/#sec-composewriteeventbytes', - Construct: 'https://262.ecma-international.org/10.0/#sec-construct', - CopyDataBlockBytes: 'https://262.ecma-international.org/10.0/#sec-copydatablockbytes', - CopyDataProperties: 'https://262.ecma-international.org/10.0/#sec-copydataproperties', - CreateArrayFromList: 'https://262.ecma-international.org/10.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://262.ecma-international.org/10.0/#sec-createarrayiterator', - CreateAsyncFromSyncIterator: 'https://262.ecma-international.org/10.0/#sec-createasyncfromsynciterator', - CreateBuiltinFunction: 'https://262.ecma-international.org/10.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://262.ecma-international.org/10.0/#sec-createbytedatablock', - CreateDataProperty: 'https://262.ecma-international.org/10.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://262.ecma-international.org/10.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://262.ecma-international.org/10.0/#sec-createdynamicfunction', - CreateHTML: 'https://262.ecma-international.org/10.0/#sec-createhtml', - CreateIntrinsics: 'https://262.ecma-international.org/10.0/#sec-createintrinsics', - CreateIterResultObject: 'https://262.ecma-international.org/10.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://262.ecma-international.org/10.0/#sec-createlistfromarraylike', - CreateListIteratorRecord: 'https://262.ecma-international.org/10.0/#sec-createlistiteratorRecord', - CreateMapIterator: 'https://262.ecma-international.org/10.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://262.ecma-international.org/10.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://262.ecma-international.org/10.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://262.ecma-international.org/10.0/#sec-createperiterationenvironment', - CreateRealm: 'https://262.ecma-international.org/10.0/#sec-createrealm', - CreateResolvingFunctions: 'https://262.ecma-international.org/10.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://262.ecma-international.org/10.0/#sec-createsetiterator', - CreateSharedByteDataBlock: 'https://262.ecma-international.org/10.0/#sec-createsharedbytedatablock', - CreateStringIterator: 'https://262.ecma-international.org/10.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://262.ecma-international.org/10.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://262.ecma-international.org/10.0/#sec-date-number', - DateString: 'https://262.ecma-international.org/10.0/#sec-datestring', - Day: 'https://262.ecma-international.org/10.0/#eqn-Day', - DayFromYear: 'https://262.ecma-international.org/10.0/#eqn-DaysFromYear', - DaysInYear: 'https://262.ecma-international.org/10.0/#eqn-DaysInYear', - DayWithinYear: 'https://262.ecma-international.org/10.0/#eqn-DayWithinYear', - Decode: 'https://262.ecma-international.org/10.0/#sec-decode', - DefinePropertyOrThrow: 'https://262.ecma-international.org/10.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://262.ecma-international.org/10.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://262.ecma-international.org/10.0/#sec-detacharraybuffer', - Encode: 'https://262.ecma-international.org/10.0/#sec-encode', - EnqueueJob: 'https://262.ecma-international.org/10.0/#sec-enqueuejob', - EnterCriticalSection: 'https://262.ecma-international.org/10.0/#sec-entercriticalsection', - EnumerableOwnPropertyNames: 'https://262.ecma-international.org/10.0/#sec-enumerableownpropertynames', - EnumerateObjectProperties: 'https://262.ecma-international.org/10.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://262.ecma-international.org/10.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://262.ecma-international.org/10.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://262.ecma-international.org/10.0/#sec-evaluatecall', - EvaluateNew: 'https://262.ecma-international.org/10.0/#sec-evaluatenew', - EventSet: 'https://262.ecma-international.org/10.0/#sec-event-set', - ExecuteModule: 'https://262.ecma-international.org/10.0/#sec-source-text-module-record-execute-module', - FlattenIntoArray: 'https://262.ecma-international.org/10.0/#sec-flattenintoarray', - floor: 'https://262.ecma-international.org/10.0/#eqn-floor', - ForBodyEvaluation: 'https://262.ecma-international.org/10.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind', - FromPropertyDescriptor: 'https://262.ecma-international.org/10.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://262.ecma-international.org/10.0/#sec-fulfillpromise', - FunctionAllocate: 'https://262.ecma-international.org/10.0/#sec-functionallocate', - FunctionCreate: 'https://262.ecma-international.org/10.0/#sec-functioncreate', - FunctionDeclarationInstantiation: 'https://262.ecma-international.org/10.0/#sec-functiondeclarationinstantiation', - FunctionInitialize: 'https://262.ecma-international.org/10.0/#sec-functioninitialize', - GeneratorFunctionCreate: 'https://262.ecma-international.org/10.0/#sec-generatorfunctioncreate', - GeneratorResume: 'https://262.ecma-international.org/10.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://262.ecma-international.org/10.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://262.ecma-international.org/10.0/#sec-generatorstart', - GeneratorValidate: 'https://262.ecma-international.org/10.0/#sec-generatorvalidate', - GeneratorYield: 'https://262.ecma-international.org/10.0/#sec-generatoryield', - Get: 'https://262.ecma-international.org/10.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://262.ecma-international.org/10.0/#sec-getactivescriptormodule', - GetBase: 'https://262.ecma-international.org/10.0/#sec-getbase', - GetFunctionRealm: 'https://262.ecma-international.org/10.0/#sec-getfunctionrealm', - GetGeneratorKind: 'https://262.ecma-international.org/10.0/#sec-getgeneratorkind', - GetGlobalObject: 'https://262.ecma-international.org/10.0/#sec-getglobalobject', - GetIdentifierReference: 'https://262.ecma-international.org/10.0/#sec-getidentifierreference', - GetIterator: 'https://262.ecma-international.org/10.0/#sec-getiterator', - GetMethod: 'https://262.ecma-international.org/10.0/#sec-getmethod', - GetModifySetValueInBuffer: 'https://262.ecma-international.org/10.0/#sec-getmodifysetvalueinbuffer', - GetModuleNamespace: 'https://262.ecma-international.org/10.0/#sec-getmodulenamespace', - GetNewTarget: 'https://262.ecma-international.org/10.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://262.ecma-international.org/10.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://262.ecma-international.org/10.0/#sec-getprototypefromconstructor', - GetReferencedName: 'https://262.ecma-international.org/10.0/#sec-getreferencedname', - GetSubstitution: 'https://262.ecma-international.org/10.0/#sec-getsubstitution', - GetSuperConstructor: 'https://262.ecma-international.org/10.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://262.ecma-international.org/10.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://262.ecma-international.org/10.0/#sec-getthisenvironment', - GetThisValue: 'https://262.ecma-international.org/10.0/#sec-getthisvalue', - GetV: 'https://262.ecma-international.org/10.0/#sec-getv', - GetValue: 'https://262.ecma-international.org/10.0/#sec-getvalue', - GetValueFromBuffer: 'https://262.ecma-international.org/10.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://262.ecma-international.org/10.0/#sec-getviewvalue', - GetWaiterList: 'https://262.ecma-international.org/10.0/#sec-getwaiterlist', - GlobalDeclarationInstantiation: 'https://262.ecma-international.org/10.0/#sec-globaldeclarationinstantiation', - 'happens-before': 'https://262.ecma-international.org/10.0/#sec-happens-before', - HasOwnProperty: 'https://262.ecma-international.org/10.0/#sec-hasownproperty', - HasPrimitiveBase: 'https://262.ecma-international.org/10.0/#sec-hasprimitivebase', - HasProperty: 'https://262.ecma-international.org/10.0/#sec-hasproperty', - 'host-synchronizes-with': 'https://262.ecma-international.org/10.0/#sec-host-synchronizes-with', - HostEnsureCanCompileStrings: 'https://262.ecma-international.org/10.0/#sec-hostensurecancompilestrings', - HostEventSet: 'https://262.ecma-international.org/10.0/#sec-hosteventset', - HostPromiseRejectionTracker: 'https://262.ecma-international.org/10.0/#sec-host-promise-rejection-tracker', - HostReportErrors: 'https://262.ecma-international.org/10.0/#sec-host-report-errors', - HostResolveImportedModule: 'https://262.ecma-international.org/10.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://262.ecma-international.org/10.0/#eqn-HourFromTime', - IfAbruptRejectPromise: 'https://262.ecma-international.org/10.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://262.ecma-international.org/10.0/#sec-importedlocalnames', - InitializeBoundName: 'https://262.ecma-international.org/10.0/#sec-initializeboundname', - InitializeEnvironment: 'https://262.ecma-international.org/10.0/#sec-source-text-module-record-initialize-environment', - InitializeHostDefinedRealm: 'https://262.ecma-international.org/10.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://262.ecma-international.org/10.0/#sec-initializereferencedbinding', - InLeapYear: 'https://262.ecma-international.org/10.0/#eqn-InLeapYear', - InnerModuleEvaluation: 'https://262.ecma-international.org/10.0/#sec-innermoduleevaluation', - InnerModuleInstantiation: 'https://262.ecma-international.org/10.0/#sec-innermoduleinstantiation', - InstanceofOperator: 'https://262.ecma-international.org/10.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://262.ecma-international.org/10.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://262.ecma-international.org/10.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://262.ecma-international.org/10.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://262.ecma-international.org/10.0/#sec-internalizejsonproperty', - Invoke: 'https://262.ecma-international.org/10.0/#sec-invoke', - IsAccessorDescriptor: 'https://262.ecma-international.org/10.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://262.ecma-international.org/10.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://262.ecma-international.org/10.0/#sec-isarray', - IsCallable: 'https://262.ecma-international.org/10.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://262.ecma-international.org/10.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://262.ecma-international.org/10.0/#sec-isconcatspreadable', - IsConstructor: 'https://262.ecma-international.org/10.0/#sec-isconstructor', - IsDataDescriptor: 'https://262.ecma-international.org/10.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://262.ecma-international.org/10.0/#sec-isdetachedbuffer', - IsExtensible: 'https://262.ecma-international.org/10.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://262.ecma-international.org/10.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://262.ecma-international.org/10.0/#sec-isintailposition', - IsInteger: 'https://262.ecma-international.org/10.0/#sec-isinteger', - IsLabelledFunction: 'https://262.ecma-international.org/10.0/#sec-islabelledfunction', - IsPromise: 'https://262.ecma-international.org/10.0/#sec-ispromise', - IsPropertyKey: 'https://262.ecma-international.org/10.0/#sec-ispropertykey', - IsPropertyReference: 'https://262.ecma-international.org/10.0/#sec-ispropertyreference', - IsRegExp: 'https://262.ecma-international.org/10.0/#sec-isregexp', - IsSharedArrayBuffer: 'https://262.ecma-international.org/10.0/#sec-issharedarraybuffer', - IsStrictReference: 'https://262.ecma-international.org/10.0/#sec-isstrictreference', - IsStringPrefix: 'https://262.ecma-international.org/10.0/#sec-isstringprefix', - IsSuperReference: 'https://262.ecma-international.org/10.0/#sec-issuperreference', - IsUnresolvableReference: 'https://262.ecma-international.org/10.0/#sec-isunresolvablereference', - IsWordChar: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToList: 'https://262.ecma-international.org/10.0/#sec-iterabletolist', - IteratorClose: 'https://262.ecma-international.org/10.0/#sec-iteratorclose', - IteratorComplete: 'https://262.ecma-international.org/10.0/#sec-iteratorcomplete', - IteratorNext: 'https://262.ecma-international.org/10.0/#sec-iteratornext', - IteratorStep: 'https://262.ecma-international.org/10.0/#sec-iteratorstep', - IteratorValue: 'https://262.ecma-international.org/10.0/#sec-iteratorvalue', - LeaveCriticalSection: 'https://262.ecma-international.org/10.0/#sec-leavecriticalsection', - LocalTime: 'https://262.ecma-international.org/10.0/#sec-localtime', - LoopContinues: 'https://262.ecma-international.org/10.0/#sec-loopcontinues', - MakeArgGetter: 'https://262.ecma-international.org/10.0/#sec-makearggetter', - MakeArgSetter: 'https://262.ecma-international.org/10.0/#sec-makeargsetter', - MakeClassConstructor: 'https://262.ecma-international.org/10.0/#sec-makeclassconstructor', - MakeConstructor: 'https://262.ecma-international.org/10.0/#sec-makeconstructor', - MakeDate: 'https://262.ecma-international.org/10.0/#sec-makedate', - MakeDay: 'https://262.ecma-international.org/10.0/#sec-makeday', - MakeMethod: 'https://262.ecma-international.org/10.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://262.ecma-international.org/10.0/#sec-makesuperpropertyreference', - MakeTime: 'https://262.ecma-international.org/10.0/#sec-maketime', - max: 'https://262.ecma-international.org/10.0/#eqn-max', - 'memory-order': 'https://262.ecma-international.org/10.0/#sec-memory-order', - min: 'https://262.ecma-international.org/10.0/#eqn-min', - MinFromTime: 'https://262.ecma-international.org/10.0/#eqn-MinFromTime', - ModuleNamespaceCreate: 'https://262.ecma-international.org/10.0/#sec-modulenamespacecreate', - modulo: 'https://262.ecma-international.org/10.0/#eqn-modulo', - MonthFromTime: 'https://262.ecma-international.org/10.0/#eqn-MonthFromTime', - msFromTime: 'https://262.ecma-international.org/10.0/#eqn-msFromTime', - NewDeclarativeEnvironment: 'https://262.ecma-international.org/10.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://262.ecma-international.org/10.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://262.ecma-international.org/10.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://262.ecma-international.org/10.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://262.ecma-international.org/10.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://262.ecma-international.org/10.0/#sec-newpromisecapability', - NormalCompletion: 'https://262.ecma-international.org/10.0/#sec-normalcompletion', - NotifyWaiter: 'https://262.ecma-international.org/10.0/#sec-notifywaiter', - NumberToRawBytes: 'https://262.ecma-international.org/10.0/#sec-numbertorawbytes', - NumberToString: 'https://262.ecma-international.org/10.0/#sec-tostring-applied-to-the-number-type', - ObjectCreate: 'https://262.ecma-international.org/10.0/#sec-objectcreate', - ObjectDefineProperties: 'https://262.ecma-international.org/10.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://262.ecma-international.org/10.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://262.ecma-international.org/10.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://262.ecma-international.org/10.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://262.ecma-international.org/10.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://262.ecma-international.org/10.0/#sec-ordinarydelete', - OrdinaryGet: 'https://262.ecma-international.org/10.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://262.ecma-international.org/10.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://262.ecma-international.org/10.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://262.ecma-international.org/10.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://262.ecma-international.org/10.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://262.ecma-international.org/10.0/#sec-ordinaryisextensible', - OrdinaryOwnPropertyKeys: 'https://262.ecma-international.org/10.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://262.ecma-international.org/10.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://262.ecma-international.org/10.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://262.ecma-international.org/10.0/#sec-ordinarysetprototypeof', - OrdinarySetWithOwnDescriptor: 'https://262.ecma-international.org/10.0/#sec-ordinarysetwithowndescriptor', - OrdinaryToPrimitive: 'https://262.ecma-international.org/10.0/#sec-ordinarytoprimitive', - ParseModule: 'https://262.ecma-international.org/10.0/#sec-parsemodule', - ParseScript: 'https://262.ecma-international.org/10.0/#sec-parse-script', - PerformEval: 'https://262.ecma-international.org/10.0/#sec-performeval', - PerformPromiseAll: 'https://262.ecma-international.org/10.0/#sec-performpromiseall', - PerformPromiseRace: 'https://262.ecma-international.org/10.0/#sec-performpromiserace', - PerformPromiseThen: 'https://262.ecma-international.org/10.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://262.ecma-international.org/10.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://262.ecma-international.org/10.0/#sec-preparefortailcall', - PromiseReactionJob: 'https://262.ecma-international.org/10.0/#sec-promisereactionjob', - PromiseResolve: 'https://262.ecma-international.org/10.0/#sec-promise-resolve', - PromiseResolveThenableJob: 'https://262.ecma-international.org/10.0/#sec-promiseresolvethenablejob', - ProxyCreate: 'https://262.ecma-international.org/10.0/#sec-proxycreate', - PutValue: 'https://262.ecma-international.org/10.0/#sec-putvalue', - QuoteJSONString: 'https://262.ecma-international.org/10.0/#sec-quotejsonstring', - RawBytesToNumber: 'https://262.ecma-international.org/10.0/#sec-rawbytestonumber', - 'reads-bytes-from': 'https://262.ecma-international.org/10.0/#sec-reads-bytes-from', - 'reads-from': 'https://262.ecma-international.org/10.0/#sec-reads-from', - RegExpAlloc: 'https://262.ecma-international.org/10.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://262.ecma-international.org/10.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://262.ecma-international.org/10.0/#sec-regexpcreate', - RegExpExec: 'https://262.ecma-international.org/10.0/#sec-regexpexec', - RegExpInitialize: 'https://262.ecma-international.org/10.0/#sec-regexpinitialize', - RejectPromise: 'https://262.ecma-international.org/10.0/#sec-rejectpromise', - RemoveWaiter: 'https://262.ecma-international.org/10.0/#sec-removewaiter', - RemoveWaiters: 'https://262.ecma-international.org/10.0/#sec-removewaiters', - RepeatMatcher: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireObjectCoercible: 'https://262.ecma-international.org/10.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://262.ecma-international.org/10.0/#sec-resolvebinding', - ResolveThisBinding: 'https://262.ecma-international.org/10.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://262.ecma-international.org/10.0/#sec-returnifabrupt', - RunJobs: 'https://262.ecma-international.org/10.0/#sec-runjobs', - SameValue: 'https://262.ecma-international.org/10.0/#sec-samevalue', - SameValueNonNumber: 'https://262.ecma-international.org/10.0/#sec-samevaluenonnumber', - SameValueZero: 'https://262.ecma-international.org/10.0/#sec-samevaluezero', - ScriptEvaluation: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-scriptevaluation', - ScriptEvaluationJob: 'https://262.ecma-international.org/10.0/#sec-scriptevaluationjob', - SecFromTime: 'https://262.ecma-international.org/10.0/#eqn-SecFromTime', - SerializeJSONArray: 'https://262.ecma-international.org/10.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://262.ecma-international.org/10.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://262.ecma-international.org/10.0/#sec-serializejsonproperty', - Set: 'https://262.ecma-international.org/10.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://262.ecma-international.org/10.0/#sec-setdefaultglobalbindings', - SetFunctionLength: 'https://262.ecma-international.org/10.0/#sec-setfunctionlength', - SetFunctionName: 'https://262.ecma-international.org/10.0/#sec-setfunctionname', - SetImmutablePrototype: 'https://262.ecma-international.org/10.0/#sec-set-immutable-prototype', - SetIntegrityLevel: 'https://262.ecma-international.org/10.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://262.ecma-international.org/10.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://262.ecma-international.org/10.0/#sec-setvalueinbuffer', - SetViewValue: 'https://262.ecma-international.org/10.0/#sec-setviewvalue', - SharedDataBlockEventSet: 'https://262.ecma-international.org/10.0/#sec-sharedatablockeventset', - SortCompare: 'https://262.ecma-international.org/10.0/#sec-sortcompare', - SpeciesConstructor: 'https://262.ecma-international.org/10.0/#sec-speciesconstructor', - SplitMatch: 'https://262.ecma-international.org/10.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://262.ecma-international.org/10.0/#sec-strict-equality-comparison', - StringCreate: 'https://262.ecma-international.org/10.0/#sec-stringcreate', - StringGetOwnProperty: 'https://262.ecma-international.org/10.0/#sec-stringgetownproperty', - Suspend: 'https://262.ecma-international.org/10.0/#sec-suspend', - SymbolDescriptiveString: 'https://262.ecma-international.org/10.0/#sec-symboldescriptivestring', - SynchronizeEventSet: 'https://262.ecma-international.org/10.0/#sec-synchronizeeventset', - 'synchronizes-with': 'https://262.ecma-international.org/10.0/#sec-synchronizes-with', - TestIntegrityLevel: 'https://262.ecma-international.org/10.0/#sec-testintegritylevel', - thisBooleanValue: 'https://262.ecma-international.org/10.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://262.ecma-international.org/10.0/#sec-thisnumbervalue', - thisStringValue: 'https://262.ecma-international.org/10.0/#sec-thisstringvalue', - thisSymbolValue: 'https://262.ecma-international.org/10.0/#sec-thissymbolvalue', - thisTimeValue: 'https://262.ecma-international.org/10.0/#sec-thistimevalue', - ThrowCompletion: 'https://262.ecma-international.org/10.0/#sec-throwcompletion', - TimeClip: 'https://262.ecma-international.org/10.0/#sec-timeclip', - TimeFromYear: 'https://262.ecma-international.org/10.0/#eqn-TimeFromYear', - TimeString: 'https://262.ecma-international.org/10.0/#sec-timestring', - TimeWithinDay: 'https://262.ecma-international.org/10.0/#eqn-TimeWithinDay', - TimeZoneString: 'https://262.ecma-international.org/10.0/#sec-timezoneestring', - ToBoolean: 'https://262.ecma-international.org/10.0/#sec-toboolean', - ToDateString: 'https://262.ecma-international.org/10.0/#sec-todatestring', - ToIndex: 'https://262.ecma-international.org/10.0/#sec-toindex', - ToInt16: 'https://262.ecma-international.org/10.0/#sec-toint16', - ToInt32: 'https://262.ecma-international.org/10.0/#sec-toint32', - ToInt8: 'https://262.ecma-international.org/10.0/#sec-toint8', - ToInteger: 'https://262.ecma-international.org/10.0/#sec-tointeger', - ToLength: 'https://262.ecma-international.org/10.0/#sec-tolength', - ToNumber: 'https://262.ecma-international.org/10.0/#sec-tonumber', - ToObject: 'https://262.ecma-international.org/10.0/#sec-toobject', - TopLevelModuleEvaluationJob: 'https://262.ecma-international.org/10.0/#sec-toplevelmoduleevaluationjob', - ToPrimitive: 'https://262.ecma-international.org/10.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://262.ecma-international.org/10.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://262.ecma-international.org/10.0/#sec-topropertykey', - ToString: 'https://262.ecma-international.org/10.0/#sec-tostring', - ToUint16: 'https://262.ecma-international.org/10.0/#sec-touint16', - ToUint32: 'https://262.ecma-international.org/10.0/#sec-touint32', - ToUint8: 'https://262.ecma-international.org/10.0/#sec-touint8', - ToUint8Clamp: 'https://262.ecma-international.org/10.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://262.ecma-international.org/10.0/#sec-triggerpromisereactions', - TrimString: 'https://262.ecma-international.org/10.0/#sec-trimstring', - Type: 'https://262.ecma-international.org/10.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://262.ecma-international.org/10.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://262.ecma-international.org/10.0/#typedarray-species-create', - UnicodeEscape: 'https://262.ecma-international.org/10.0/#sec-unicodeescape', - UnicodeMatchProperty: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-unicodematchproperty-p', - UnicodeMatchPropertyValue: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v', - UpdateEmpty: 'https://262.ecma-international.org/10.0/#sec-updateempty', - UTC: 'https://262.ecma-international.org/10.0/#sec-utc-t', - UTF16Decode: 'https://262.ecma-international.org/10.0/#sec-utf16decode', - UTF16Encoding: 'https://262.ecma-international.org/10.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://262.ecma-international.org/10.0/#sec-validateandapplypropertydescriptor', - ValidateAtomicAccess: 'https://262.ecma-international.org/10.0/#sec-validateatomicaccess', - ValidateSharedIntegerTypedArray: 'https://262.ecma-international.org/10.0/#sec-validatesharedintegertypedarray', - ValidateTypedArray: 'https://262.ecma-international.org/10.0/#sec-validatetypedarray', - ValueOfReadEvent: 'https://262.ecma-international.org/10.0/#sec-valueofreadevent', - WeekDay: 'https://262.ecma-international.org/10.0/#sec-week-day', - WordCharacters: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-wordcharacters-abstract-operation', - YearFromTime: 'https://262.ecma-international.org/10.0/#eqn-YearFromTime' + abs: { + url: 'https://262.ecma-international.org/10.0/#eqn-abs' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/10.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/10.0/#sec-abstract-relational-comparison' + }, + AddEntriesFromIterable: { + url: 'https://262.ecma-international.org/10.0/#sec-add-entries-from-iterable' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/10.0/#sec-addrestrictedfunctionproperties' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/10.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/10.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/10.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/10.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/10.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/10.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-allocatetypedarraybuffer' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/10.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-arrayspeciescreate' + }, + AsyncFromSyncIteratorContinuation: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncfromsynciteratorcontinuation' + }, + AsyncFunctionCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-async-functions-abstract-operations-async-function-create' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/10.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorfunctioncreate' + }, + AsyncGeneratorReject: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorreject' + }, + AsyncGeneratorResolve: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorresolve' + }, + AsyncGeneratorResumeNext: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorresumenext' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/10.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/10.0/#sec-asynciteratorclose' + }, + AtomicLoad: { + url: 'https://262.ecma-international.org/10.0/#sec-atomicload' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/10.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/10.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/10.0/#sec-backreference-matcher' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/10.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/10.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/10.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-clonearraybuffer' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/10.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/10.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/10.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/10.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/10.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/10.0/#sec-copydataproperties' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/10.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-createasyncfromsynciterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/10.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/10.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/10.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/10.0/#sec-createdynamicfunction' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/10.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/10.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/10.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/10.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/10.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/10.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/10.0/#sec-createrealm' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/10.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/10.0/#sec-createsharedbytedatablock' + }, + CreateStringIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-createstringiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/10.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/10.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/10.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/10.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/10.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/10.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/10.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/10.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/10.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/10.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/10.0/#sec-encode' + }, + EnqueueJob: { + url: 'https://262.ecma-international.org/10.0/#sec-enqueuejob' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/10.0/#sec-entercriticalsection' + }, + EnumerableOwnPropertyNames: { + url: 'https://262.ecma-international.org/10.0/#sec-enumerableownpropertynames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/10.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/10.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/10.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/10.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/10.0/#sec-evaluatenew' + }, + EventSet: { + url: 'https://262.ecma-international.org/10.0/#sec-event-set' + }, + ExecuteModule: { + url: 'https://262.ecma-international.org/10.0/#sec-source-text-module-record-execute-module' + }, + FlattenIntoArray: { + url: 'https://262.ecma-international.org/10.0/#sec-flattenintoarray' + }, + floor: { + url: 'https://262.ecma-international.org/10.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/10.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/10.0/#sec-fulfillpromise' + }, + FunctionAllocate: { + url: 'https://262.ecma-international.org/10.0/#sec-functionallocate' + }, + FunctionCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-functioncreate' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/10.0/#sec-functiondeclarationinstantiation' + }, + FunctionInitialize: { + url: 'https://262.ecma-international.org/10.0/#sec-functioninitialize' + }, + GeneratorFunctionCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-generatorfunctioncreate' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/10.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/10.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/10.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/10.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/10.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/10.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/10.0/#sec-getactivescriptormodule' + }, + GetBase: { + url: 'https://262.ecma-international.org/10.0/#sec-getbase' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/10.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/10.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/10.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/10.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/10.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/10.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/10.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/10.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/10.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-getprototypefromconstructor' + }, + GetReferencedName: { + url: 'https://262.ecma-international.org/10.0/#sec-getreferencedname' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/10.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/10.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/10.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/10.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/10.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/10.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/10.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/10.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/10.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-hasownproperty' + }, + HasPrimitiveBase: { + url: 'https://262.ecma-international.org/10.0/#sec-hasprimitivebase' + }, + HasProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/10.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/10.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-HourFromTime' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/10.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/10.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/10.0/#sec-initializeboundname' + }, + InitializeEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-source-text-module-record-initialize-environment' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/10.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/10.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/10.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/10.0/#sec-innermoduleevaluation' + }, + InnerModuleInstantiation: { + url: 'https://262.ecma-international.org/10.0/#sec-innermoduleinstantiation' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/10.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/10.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/10.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/10.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/10.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/10.0/#sec-isarray' + }, + IsCallable: { + url: 'https://262.ecma-international.org/10.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/10.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/10.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/10.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/10.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/10.0/#sec-islabelledfunction' + }, + IsPromise: { + url: 'https://262.ecma-international.org/10.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/10.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/10.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/10.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-issharedarraybuffer' + }, + IsStrictReference: { + url: 'https://262.ecma-international.org/10.0/#sec-isstrictreference' + }, + IsStringPrefix: { + url: 'https://262.ecma-international.org/10.0/#sec-isstringprefix' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/10.0/#sec-issuperreference' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/10.0/#sec-isunresolvablereference' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/10.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/10.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/10.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/10.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/10.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/10.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/10.0/#sec-leavecriticalsection' + }, + LocalTime: { + url: 'https://262.ecma-international.org/10.0/#sec-localtime' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/10.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/10.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/10.0/#sec-makeargsetter' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/10.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/10.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/10.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/10.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/10.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/10.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/10.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/10.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/10.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/10.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/10.0/#sec-newpromisecapability' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/10.0/#sec-normalcompletion' + }, + NotifyWaiter: { + url: 'https://262.ecma-international.org/10.0/#sec-notifywaiter' + }, + NumberToRawBytes: { + url: 'https://262.ecma-international.org/10.0/#sec-numbertorawbytes' + }, + NumberToString: { + url: 'https://262.ecma-international.org/10.0/#sec-tostring-applied-to-the-number-type' + }, + ObjectCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-objectcreate' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/10.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarydelete' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryisextensible' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/10.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/10.0/#sec-parsemodule' + }, + ParseScript: { + url: 'https://262.ecma-international.org/10.0/#sec-parse-script' + }, + PerformEval: { + url: 'https://262.ecma-international.org/10.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/10.0/#sec-performpromiseall' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/10.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/10.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/10.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/10.0/#sec-preparefortailcall' + }, + PromiseReactionJob: { + url: 'https://262.ecma-international.org/10.0/#sec-promisereactionjob' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/10.0/#sec-promise-resolve' + }, + PromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/10.0/#sec-promiseresolvethenablejob' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/10.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/10.0/#sec-quotejsonstring' + }, + RawBytesToNumber: { + url: 'https://262.ecma-international.org/10.0/#sec-rawbytestonumber' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/10.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/10.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/10.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/10.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/10.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/10.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/10.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/10.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/10.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/10.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/10.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/10.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/10.0/#sec-returnifabrupt' + }, + RunJobs: { + url: 'https://262.ecma-international.org/10.0/#sec-runjobs' + }, + SameValue: { + url: 'https://262.ecma-international.org/10.0/#sec-samevalue' + }, + SameValueNonNumber: { + url: 'https://262.ecma-international.org/10.0/#sec-samevaluenonnumber' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/10.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-scriptevaluation' + }, + ScriptEvaluationJob: { + url: 'https://262.ecma-international.org/10.0/#sec-scriptevaluationjob' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/10.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/10.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/10.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/10.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/10.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/10.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/10.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/10.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/10.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/10.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/10.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/10.0/#sec-sharedatablockeventset' + }, + SortCompare: { + url: 'https://262.ecma-international.org/10.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/10.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/10.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/10.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/10.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-stringgetownproperty' + }, + Suspend: { + url: 'https://262.ecma-international.org/10.0/#sec-suspend' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/10.0/#sec-symboldescriptivestring' + }, + SynchronizeEventSet: { + url: 'https://262.ecma-international.org/10.0/#sec-synchronizeeventset' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/10.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/10.0/#sec-testintegritylevel' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/10.0/#sec-thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/10.0/#sec-thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/10.0/#sec-thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/10.0/#sec-thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/10.0/#sec-thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/10.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/10.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/10.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/10.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/10.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/10.0/#sec-timezoneestring' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/10.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/10.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/10.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/10.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/10.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/10.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/10.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/10.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/10.0/#sec-tonumber' + }, + ToObject: { + url: 'https://262.ecma-international.org/10.0/#sec-toobject' + }, + TopLevelModuleEvaluationJob: { + url: 'https://262.ecma-international.org/10.0/#sec-toplevelmoduleevaluationjob' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/10.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/10.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/10.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/10.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/10.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/10.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/10.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/10.0/#sec-triggerpromisereactions' + }, + TrimString: { + url: 'https://262.ecma-international.org/10.0/#sec-trimstring' + }, + Type: { + url: 'https://262.ecma-international.org/10.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/10.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/10.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/10.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/10.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/10.0/#sec-utc-t' + }, + UTF16Decode: { + url: 'https://262.ecma-international.org/10.0/#sec-utf16decode' + }, + UTF16Encoding: { + url: 'https://262.ecma-international.org/10.0/#sec-utf16encoding' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/10.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/10.0/#sec-validateatomicaccess' + }, + ValidateSharedIntegerTypedArray: { + url: 'https://262.ecma-international.org/10.0/#sec-validatesharedintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/10.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/10.0/#sec-valueofreadevent' + }, + WeekDay: { + url: 'https://262.ecma-international.org/10.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/10.0/#sec-runtime-semantics-wordcharacters-abstract-operation' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/10.0/#eqn-YearFromTime' + } }; diff --git a/node_modules/es-abstract/operations/2020.js b/node_modules/es-abstract/operations/2020.js index 9464726c9..1e448539f 100644 --- a/node_modules/es-abstract/operations/2020.js +++ b/node_modules/es-abstract/operations/2020.js @@ -1,418 +1,1228 @@ 'use strict'; module.exports = { - abs: 'https://262.ecma-international.org/11.0/#eqn-abs', - 'Abstract Equality Comparison': 'https://262.ecma-international.org/11.0/#sec-abstract-equality-comparison', - 'Abstract Relational Comparison': 'https://262.ecma-international.org/11.0/#sec-abstract-relational-comparison', - AddEntriesFromIterable: 'https://262.ecma-international.org/11.0/#sec-add-entries-from-iterable', - AddRestrictedFunctionProperties: 'https://262.ecma-international.org/11.0/#sec-addrestrictedfunctionproperties', - AddWaiter: 'https://262.ecma-international.org/11.0/#sec-addwaiter', - AdvanceStringIndex: 'https://262.ecma-international.org/11.0/#sec-advancestringindex', - 'agent-order': 'https://262.ecma-international.org/11.0/#sec-agent-order', - AgentCanSuspend: 'https://262.ecma-international.org/11.0/#sec-agentcansuspend', - AgentSignifier: 'https://262.ecma-international.org/11.0/#sec-agentsignifier', - AllocateArrayBuffer: 'https://262.ecma-international.org/11.0/#sec-allocatearraybuffer', - AllocateSharedArrayBuffer: 'https://262.ecma-international.org/11.0/#sec-allocatesharedarraybuffer', - AllocateTypedArray: 'https://262.ecma-international.org/11.0/#sec-allocatetypedarray', - AllocateTypedArrayBuffer: 'https://262.ecma-international.org/11.0/#sec-allocatetypedarraybuffer', - ArrayCreate: 'https://262.ecma-international.org/11.0/#sec-arraycreate', - ArraySetLength: 'https://262.ecma-international.org/11.0/#sec-arraysetlength', - ArraySpeciesCreate: 'https://262.ecma-international.org/11.0/#sec-arrayspeciescreate', - AsyncFromSyncIteratorContinuation: 'https://262.ecma-international.org/11.0/#sec-asyncfromsynciteratorcontinuation', - AsyncFunctionStart: 'https://262.ecma-international.org/11.0/#sec-async-functions-abstract-operations-async-function-start', - AsyncGeneratorEnqueue: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorenqueue', - AsyncGeneratorReject: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorreject', - AsyncGeneratorResolve: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorresolve', - AsyncGeneratorResumeNext: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorresumenext', - AsyncGeneratorStart: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorstart', - AsyncGeneratorYield: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratoryield', - AsyncIteratorClose: 'https://262.ecma-international.org/11.0/#sec-asynciteratorclose', - AtomicLoad: 'https://262.ecma-international.org/11.0/#sec-atomicload', - AtomicReadModifyWrite: 'https://262.ecma-international.org/11.0/#sec-atomicreadmodifywrite', - Await: 'https://262.ecma-international.org/11.0/#await', - BackreferenceMatcher: 'https://262.ecma-international.org/11.0/#sec-backreference-matcher', - 'BigInt::add': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add', - 'BigInt::bitwiseAND': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND', - 'BigInt::bitwiseNOT': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT', - 'BigInt::bitwiseOR': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR', - 'BigInt::bitwiseXOR': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR', - 'BigInt::divide': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide', - 'BigInt::equal': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal', - 'BigInt::exponentiate': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate', - 'BigInt::leftShift': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift', - 'BigInt::lessThan': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan', - 'BigInt::multiply': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply', - 'BigInt::remainder': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder', - 'BigInt::sameValue': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue', - 'BigInt::sameValueZero': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero', - 'BigInt::signedRightShift': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift', - 'BigInt::subtract': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract', - 'BigInt::toString': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring', - 'BigInt::unaryMinus': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus', - 'BigInt::unsignedRightShift': 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift', - BigIntBitwiseOp: 'https://262.ecma-international.org/11.0/#sec-bigintbitwiseop', - BinaryAnd: 'https://262.ecma-international.org/11.0/#sec-binaryand', - BinaryOr: 'https://262.ecma-international.org/11.0/#sec-binaryor', - BinaryXor: 'https://262.ecma-international.org/11.0/#sec-binaryxor', - BlockDeclarationInstantiation: 'https://262.ecma-international.org/11.0/#sec-blockdeclarationinstantiation', - BoundFunctionCreate: 'https://262.ecma-international.org/11.0/#sec-boundfunctioncreate', - Call: 'https://262.ecma-international.org/11.0/#sec-call', - Canonicalize: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-canonicalize-ch', - CanonicalNumericIndexString: 'https://262.ecma-international.org/11.0/#sec-canonicalnumericindexstring', - CaseClauseIsSelected: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-caseclauseisselected', - CharacterRange: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-characterrange-abstract-operation', - CharacterRangeOrUnion: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation', - CharacterSetMatcher: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation', - CloneArrayBuffer: 'https://262.ecma-international.org/11.0/#sec-clonearraybuffer', - CodePointAt: 'https://262.ecma-international.org/11.0/#sec-codepointat', - CompletePropertyDescriptor: 'https://262.ecma-international.org/11.0/#sec-completepropertydescriptor', - Completion: 'https://262.ecma-international.org/11.0/#sec-completion-record-specification-type', - ComposeWriteEventBytes: 'https://262.ecma-international.org/11.0/#sec-composewriteeventbytes', - Construct: 'https://262.ecma-international.org/11.0/#sec-construct', - CopyDataBlockBytes: 'https://262.ecma-international.org/11.0/#sec-copydatablockbytes', - CopyDataProperties: 'https://262.ecma-international.org/11.0/#sec-copydataproperties', - CreateArrayFromList: 'https://262.ecma-international.org/11.0/#sec-createarrayfromlist', - CreateArrayIterator: 'https://262.ecma-international.org/11.0/#sec-createarrayiterator', - CreateAsyncFromSyncIterator: 'https://262.ecma-international.org/11.0/#sec-createasyncfromsynciterator', - CreateBuiltinFunction: 'https://262.ecma-international.org/11.0/#sec-createbuiltinfunction', - CreateByteDataBlock: 'https://262.ecma-international.org/11.0/#sec-createbytedatablock', - CreateDataProperty: 'https://262.ecma-international.org/11.0/#sec-createdataproperty', - CreateDataPropertyOrThrow: 'https://262.ecma-international.org/11.0/#sec-createdatapropertyorthrow', - CreateDynamicFunction: 'https://262.ecma-international.org/11.0/#sec-createdynamicfunction', - CreateForInIterator: 'https://262.ecma-international.org/11.0/#sec-createforiniterator', - CreateHTML: 'https://262.ecma-international.org/11.0/#sec-createhtml', - CreateIntrinsics: 'https://262.ecma-international.org/11.0/#sec-createintrinsics', - CreateIterResultObject: 'https://262.ecma-international.org/11.0/#sec-createiterresultobject', - CreateListFromArrayLike: 'https://262.ecma-international.org/11.0/#sec-createlistfromarraylike', - CreateListIteratorRecord: 'https://262.ecma-international.org/11.0/#sec-createlistiteratorRecord', - CreateMapIterator: 'https://262.ecma-international.org/11.0/#sec-createmapiterator', - CreateMappedArgumentsObject: 'https://262.ecma-international.org/11.0/#sec-createmappedargumentsobject', - CreateMethodProperty: 'https://262.ecma-international.org/11.0/#sec-createmethodproperty', - CreatePerIterationEnvironment: 'https://262.ecma-international.org/11.0/#sec-createperiterationenvironment', - CreateRealm: 'https://262.ecma-international.org/11.0/#sec-createrealm', - CreateRegExpStringIterator: 'https://262.ecma-international.org/11.0/#sec-createregexpstringiterator', - CreateResolvingFunctions: 'https://262.ecma-international.org/11.0/#sec-createresolvingfunctions', - CreateSetIterator: 'https://262.ecma-international.org/11.0/#sec-createsetiterator', - CreateSharedByteDataBlock: 'https://262.ecma-international.org/11.0/#sec-createsharedbytedatablock', - CreateStringIterator: 'https://262.ecma-international.org/11.0/#sec-createstringiterator', - CreateUnmappedArgumentsObject: 'https://262.ecma-international.org/11.0/#sec-createunmappedargumentsobject', - DateFromTime: 'https://262.ecma-international.org/11.0/#sec-date-number', - DateString: 'https://262.ecma-international.org/11.0/#sec-datestring', - Day: 'https://262.ecma-international.org/11.0/#eqn-Day', - DayFromYear: 'https://262.ecma-international.org/11.0/#eqn-DaysFromYear', - DaysInYear: 'https://262.ecma-international.org/11.0/#eqn-DaysInYear', - DayWithinYear: 'https://262.ecma-international.org/11.0/#eqn-DayWithinYear', - Decode: 'https://262.ecma-international.org/11.0/#sec-decode', - DefinePropertyOrThrow: 'https://262.ecma-international.org/11.0/#sec-definepropertyorthrow', - DeletePropertyOrThrow: 'https://262.ecma-international.org/11.0/#sec-deletepropertyorthrow', - DetachArrayBuffer: 'https://262.ecma-international.org/11.0/#sec-detacharraybuffer', - Encode: 'https://262.ecma-international.org/11.0/#sec-encode', - EnterCriticalSection: 'https://262.ecma-international.org/11.0/#sec-entercriticalsection', - EnumerableOwnPropertyNames: 'https://262.ecma-international.org/11.0/#sec-enumerableownpropertynames', - EnumerateObjectProperties: 'https://262.ecma-international.org/11.0/#sec-enumerate-object-properties', - EscapeRegExpPattern: 'https://262.ecma-international.org/11.0/#sec-escaperegexppattern', - EvalDeclarationInstantiation: 'https://262.ecma-international.org/11.0/#sec-evaldeclarationinstantiation', - EvaluateCall: 'https://262.ecma-international.org/11.0/#sec-evaluatecall', - EvaluateNew: 'https://262.ecma-international.org/11.0/#sec-evaluatenew', - EvaluatePropertyAccessWithExpressionKey: 'https://262.ecma-international.org/11.0/#sec-evaluate-property-access-with-expression-key', - EvaluatePropertyAccessWithIdentifierKey: 'https://262.ecma-international.org/11.0/#sec-evaluate-property-access-with-identifier-key', - EventSet: 'https://262.ecma-international.org/11.0/#sec-event-set', - ExecuteModule: 'https://262.ecma-international.org/11.0/#sec-source-text-module-record-execute-module', - FinishDynamicImport: 'https://262.ecma-international.org/11.0/#sec-finishdynamicimport', - FlattenIntoArray: 'https://262.ecma-international.org/11.0/#sec-flattenintoarray', - floor: 'https://262.ecma-international.org/11.0/#eqn-floor', - ForBodyEvaluation: 'https://262.ecma-international.org/11.0/#sec-forbodyevaluation', - 'ForIn/OfBodyEvaluation': 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset', - 'ForIn/OfHeadEvaluation': 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-forinofheadevaluation', - FromPropertyDescriptor: 'https://262.ecma-international.org/11.0/#sec-frompropertydescriptor', - FulfillPromise: 'https://262.ecma-international.org/11.0/#sec-fulfillpromise', - FunctionDeclarationInstantiation: 'https://262.ecma-international.org/11.0/#sec-functiondeclarationinstantiation', - GeneratorResume: 'https://262.ecma-international.org/11.0/#sec-generatorresume', - GeneratorResumeAbrupt: 'https://262.ecma-international.org/11.0/#sec-generatorresumeabrupt', - GeneratorStart: 'https://262.ecma-international.org/11.0/#sec-generatorstart', - GeneratorValidate: 'https://262.ecma-international.org/11.0/#sec-generatorvalidate', - GeneratorYield: 'https://262.ecma-international.org/11.0/#sec-generatoryield', - Get: 'https://262.ecma-international.org/11.0/#sec-get-o-p', - GetActiveScriptOrModule: 'https://262.ecma-international.org/11.0/#sec-getactivescriptormodule', - GetBase: 'https://262.ecma-international.org/11.0/#sec-getbase', - GetFunctionRealm: 'https://262.ecma-international.org/11.0/#sec-getfunctionrealm', - GetGeneratorKind: 'https://262.ecma-international.org/11.0/#sec-getgeneratorkind', - GetGlobalObject: 'https://262.ecma-international.org/11.0/#sec-getglobalobject', - GetIdentifierReference: 'https://262.ecma-international.org/11.0/#sec-getidentifierreference', - GetIterator: 'https://262.ecma-international.org/11.0/#sec-getiterator', - GetMethod: 'https://262.ecma-international.org/11.0/#sec-getmethod', - GetModifySetValueInBuffer: 'https://262.ecma-international.org/11.0/#sec-getmodifysetvalueinbuffer', - GetModuleNamespace: 'https://262.ecma-international.org/11.0/#sec-getmodulenamespace', - GetNewTarget: 'https://262.ecma-international.org/11.0/#sec-getnewtarget', - GetOwnPropertyKeys: 'https://262.ecma-international.org/11.0/#sec-getownpropertykeys', - GetPrototypeFromConstructor: 'https://262.ecma-international.org/11.0/#sec-getprototypefromconstructor', - GetReferencedName: 'https://262.ecma-international.org/11.0/#sec-getreferencedname', - GetSubstitution: 'https://262.ecma-international.org/11.0/#sec-getsubstitution', - GetSuperConstructor: 'https://262.ecma-international.org/11.0/#sec-getsuperconstructor', - GetTemplateObject: 'https://262.ecma-international.org/11.0/#sec-gettemplateobject', - GetThisEnvironment: 'https://262.ecma-international.org/11.0/#sec-getthisenvironment', - GetThisValue: 'https://262.ecma-international.org/11.0/#sec-getthisvalue', - GetV: 'https://262.ecma-international.org/11.0/#sec-getv', - GetValue: 'https://262.ecma-international.org/11.0/#sec-getvalue', - GetValueFromBuffer: 'https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer', - GetViewValue: 'https://262.ecma-international.org/11.0/#sec-getviewvalue', - GetWaiterList: 'https://262.ecma-international.org/11.0/#sec-getwaiterlist', - GlobalDeclarationInstantiation: 'https://262.ecma-international.org/11.0/#sec-globaldeclarationinstantiation', - 'happens-before': 'https://262.ecma-international.org/11.0/#sec-happens-before', - HasOwnProperty: 'https://262.ecma-international.org/11.0/#sec-hasownproperty', - HasPrimitiveBase: 'https://262.ecma-international.org/11.0/#sec-hasprimitivebase', - HasProperty: 'https://262.ecma-international.org/11.0/#sec-hasproperty', - 'host-synchronizes-with': 'https://262.ecma-international.org/11.0/#sec-host-synchronizes-with', - HostEnqueuePromiseJob: 'https://262.ecma-international.org/11.0/#sec-hostenqueuepromisejob', - HostEnsureCanCompileStrings: 'https://262.ecma-international.org/11.0/#sec-hostensurecancompilestrings', - HostEventSet: 'https://262.ecma-international.org/11.0/#sec-hosteventset', - HostFinalizeImportMeta: 'https://262.ecma-international.org/11.0/#sec-hostfinalizeimportmeta', - HostGetImportMetaProperties: 'https://262.ecma-international.org/11.0/#sec-hostgetimportmetaproperties', - HostImportModuleDynamically: 'https://262.ecma-international.org/11.0/#sec-hostimportmoduledynamically', - HostPromiseRejectionTracker: 'https://262.ecma-international.org/11.0/#sec-host-promise-rejection-tracker', - HostResolveImportedModule: 'https://262.ecma-international.org/11.0/#sec-hostresolveimportedmodule', - HourFromTime: 'https://262.ecma-international.org/11.0/#eqn-HourFromTime', - IfAbruptRejectPromise: 'https://262.ecma-international.org/11.0/#sec-ifabruptrejectpromise', - ImportedLocalNames: 'https://262.ecma-international.org/11.0/#sec-importedlocalnames', - InitializeBoundName: 'https://262.ecma-international.org/11.0/#sec-initializeboundname', - InitializeEnvironment: 'https://262.ecma-international.org/11.0/#sec-source-text-module-record-initialize-environment', - InitializeHostDefinedRealm: 'https://262.ecma-international.org/11.0/#sec-initializehostdefinedrealm', - InitializeReferencedBinding: 'https://262.ecma-international.org/11.0/#sec-initializereferencedbinding', - InLeapYear: 'https://262.ecma-international.org/11.0/#eqn-InLeapYear', - InnerModuleEvaluation: 'https://262.ecma-international.org/11.0/#sec-innermoduleevaluation', - InnerModuleLinking: 'https://262.ecma-international.org/11.0/#sec-InnerModuleLinking', - InstanceofOperator: 'https://262.ecma-international.org/11.0/#sec-instanceofoperator', - IntegerIndexedElementGet: 'https://262.ecma-international.org/11.0/#sec-integerindexedelementget', - IntegerIndexedElementSet: 'https://262.ecma-international.org/11.0/#sec-integerindexedelementset', - IntegerIndexedObjectCreate: 'https://262.ecma-international.org/11.0/#sec-integerindexedobjectcreate', - InternalizeJSONProperty: 'https://262.ecma-international.org/11.0/#sec-internalizejsonproperty', - Invoke: 'https://262.ecma-international.org/11.0/#sec-invoke', - IsAccessorDescriptor: 'https://262.ecma-international.org/11.0/#sec-isaccessordescriptor', - IsAnonymousFunctionDefinition: 'https://262.ecma-international.org/11.0/#sec-isanonymousfunctiondefinition', - IsArray: 'https://262.ecma-international.org/11.0/#sec-isarray', - IsBigIntElementType: 'https://262.ecma-international.org/11.0/#sec-isbigintelementtype', - IsCallable: 'https://262.ecma-international.org/11.0/#sec-iscallable', - IsCompatiblePropertyDescriptor: 'https://262.ecma-international.org/11.0/#sec-iscompatiblepropertydescriptor', - IsConcatSpreadable: 'https://262.ecma-international.org/11.0/#sec-isconcatspreadable', - IsConstructor: 'https://262.ecma-international.org/11.0/#sec-isconstructor', - IsDataDescriptor: 'https://262.ecma-international.org/11.0/#sec-isdatadescriptor', - IsDetachedBuffer: 'https://262.ecma-international.org/11.0/#sec-isdetachedbuffer', - IsExtensible: 'https://262.ecma-international.org/11.0/#sec-isextensible-o', - IsGenericDescriptor: 'https://262.ecma-international.org/11.0/#sec-isgenericdescriptor', - IsInTailPosition: 'https://262.ecma-international.org/11.0/#sec-isintailposition', - IsInteger: 'https://262.ecma-international.org/11.0/#sec-isinteger', - IsLabelledFunction: 'https://262.ecma-international.org/11.0/#sec-islabelledfunction', - IsNonNegativeInteger: 'https://262.ecma-international.org/11.0/#sec-isnonnegativeinteger', - IsNoTearConfiguration: 'https://262.ecma-international.org/11.0/#sec-isnotearconfiguration', - IsPromise: 'https://262.ecma-international.org/11.0/#sec-ispromise', - IsPropertyKey: 'https://262.ecma-international.org/11.0/#sec-ispropertykey', - IsPropertyReference: 'https://262.ecma-international.org/11.0/#sec-ispropertyreference', - IsRegExp: 'https://262.ecma-international.org/11.0/#sec-isregexp', - IsSharedArrayBuffer: 'https://262.ecma-international.org/11.0/#sec-issharedarraybuffer', - IsStrictReference: 'https://262.ecma-international.org/11.0/#sec-isstrictreference', - IsStringPrefix: 'https://262.ecma-international.org/11.0/#sec-isstringprefix', - IsSuperReference: 'https://262.ecma-international.org/11.0/#sec-issuperreference', - IsUnclampedIntegerElementType: 'https://262.ecma-international.org/11.0/#sec-isunclampedintegerelementtype', - IsUnresolvableReference: 'https://262.ecma-international.org/11.0/#sec-isunresolvablereference', - IsUnsignedElementType: 'https://262.ecma-international.org/11.0/#sec-isunsignedelementtype', - IsValidIntegerIndex: 'https://262.ecma-international.org/11.0/#sec-isvalidintegerindex', - IsValidRegularExpressionLiteral: 'https://262.ecma-international.org/11.0/#sec-isvalidregularexpressionliteral', - IsWordChar: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-iswordchar-abstract-operation', - IterableToList: 'https://262.ecma-international.org/11.0/#sec-iterabletolist', - IteratorClose: 'https://262.ecma-international.org/11.0/#sec-iteratorclose', - IteratorComplete: 'https://262.ecma-international.org/11.0/#sec-iteratorcomplete', - IteratorNext: 'https://262.ecma-international.org/11.0/#sec-iteratornext', - IteratorStep: 'https://262.ecma-international.org/11.0/#sec-iteratorstep', - IteratorValue: 'https://262.ecma-international.org/11.0/#sec-iteratorvalue', - LeaveCriticalSection: 'https://262.ecma-international.org/11.0/#sec-leavecriticalsection', - LengthOfArrayLike: 'https://262.ecma-international.org/11.0/#sec-lengthofarraylike', - LocalTime: 'https://262.ecma-international.org/11.0/#sec-localtime', - LocalTZA: 'https://262.ecma-international.org/11.0/#sec-local-time-zone-adjustment', - LoopContinues: 'https://262.ecma-international.org/11.0/#sec-loopcontinues', - MakeArgGetter: 'https://262.ecma-international.org/11.0/#sec-makearggetter', - MakeArgSetter: 'https://262.ecma-international.org/11.0/#sec-makeargsetter', - MakeBasicObject: 'https://262.ecma-international.org/11.0/#sec-makebasicobject', - MakeClassConstructor: 'https://262.ecma-international.org/11.0/#sec-makeclassconstructor', - MakeConstructor: 'https://262.ecma-international.org/11.0/#sec-makeconstructor', - MakeDate: 'https://262.ecma-international.org/11.0/#sec-makedate', - MakeDay: 'https://262.ecma-international.org/11.0/#sec-makeday', - MakeMethod: 'https://262.ecma-international.org/11.0/#sec-makemethod', - MakeSuperPropertyReference: 'https://262.ecma-international.org/11.0/#sec-makesuperpropertyreference', - MakeTime: 'https://262.ecma-international.org/11.0/#sec-maketime', - max: 'https://262.ecma-international.org/11.0/#eqn-max', - 'memory-order': 'https://262.ecma-international.org/11.0/#sec-memory-order', - min: 'https://262.ecma-international.org/11.0/#eqn-min', - MinFromTime: 'https://262.ecma-international.org/11.0/#eqn-MinFromTime', - ModuleNamespaceCreate: 'https://262.ecma-international.org/11.0/#sec-modulenamespacecreate', - modulo: 'https://262.ecma-international.org/11.0/#eqn-modulo', - MonthFromTime: 'https://262.ecma-international.org/11.0/#eqn-MonthFromTime', - msFromTime: 'https://262.ecma-international.org/11.0/#eqn-msFromTime', - NewDeclarativeEnvironment: 'https://262.ecma-international.org/11.0/#sec-newdeclarativeenvironment', - NewFunctionEnvironment: 'https://262.ecma-international.org/11.0/#sec-newfunctionenvironment', - NewGlobalEnvironment: 'https://262.ecma-international.org/11.0/#sec-newglobalenvironment', - NewModuleEnvironment: 'https://262.ecma-international.org/11.0/#sec-newmoduleenvironment', - NewObjectEnvironment: 'https://262.ecma-international.org/11.0/#sec-newobjectenvironment', - NewPromiseCapability: 'https://262.ecma-international.org/11.0/#sec-newpromisecapability', - NewPromiseReactionJob: 'https://262.ecma-international.org/11.0/#sec-newpromisereactionjob', - NewPromiseResolveThenableJob: 'https://262.ecma-international.org/11.0/#sec-newpromiseresolvethenablejob', - NormalCompletion: 'https://262.ecma-international.org/11.0/#sec-normalcompletion', - NotifyWaiter: 'https://262.ecma-international.org/11.0/#sec-notifywaiter', - 'Number::add': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-add', - 'Number::bitwiseAND': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND', - 'Number::bitwiseNOT': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT', - 'Number::bitwiseOR': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR', - 'Number::bitwiseXOR': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR', - 'Number::divide': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide', - 'Number::equal': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal', - 'Number::exponentiate': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate', - 'Number::leftShift': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-leftShift', - 'Number::lessThan': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan', - 'Number::multiply': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply', - 'Number::remainder': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-remainder', - 'Number::sameValue': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue', - 'Number::sameValueZero': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero', - 'Number::signedRightShift': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-signedRightShift', - 'Number::subtract': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-subtract', - 'Number::toString': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring', - 'Number::unaryMinus': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus', - 'Number::unsignedRightShift': 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-unsignedRightShift', - NumberBitwiseOp: 'https://262.ecma-international.org/11.0/#sec-numberbitwiseop', - NumberToBigInt: 'https://262.ecma-international.org/11.0/#sec-numbertobigint', - NumericToRawBytes: 'https://262.ecma-international.org/11.0/#sec-numerictorawbytes', - ObjectDefineProperties: 'https://262.ecma-international.org/11.0/#sec-objectdefineproperties', - OrdinaryCallBindThis: 'https://262.ecma-international.org/11.0/#sec-ordinarycallbindthis', - OrdinaryCallEvaluateBody: 'https://262.ecma-international.org/11.0/#sec-ordinarycallevaluatebody', - OrdinaryCreateFromConstructor: 'https://262.ecma-international.org/11.0/#sec-ordinarycreatefromconstructor', - OrdinaryDefineOwnProperty: 'https://262.ecma-international.org/11.0/#sec-ordinarydefineownproperty', - OrdinaryDelete: 'https://262.ecma-international.org/11.0/#sec-ordinarydelete', - OrdinaryFunctionCreate: 'https://262.ecma-international.org/11.0/#sec-ordinaryfunctioncreate', - OrdinaryGet: 'https://262.ecma-international.org/11.0/#sec-ordinaryget', - OrdinaryGetOwnProperty: 'https://262.ecma-international.org/11.0/#sec-ordinarygetownproperty', - OrdinaryGetPrototypeOf: 'https://262.ecma-international.org/11.0/#sec-ordinarygetprototypeof', - OrdinaryHasInstance: 'https://262.ecma-international.org/11.0/#sec-ordinaryhasinstance', - OrdinaryHasProperty: 'https://262.ecma-international.org/11.0/#sec-ordinaryhasproperty', - OrdinaryIsExtensible: 'https://262.ecma-international.org/11.0/#sec-ordinaryisextensible', - OrdinaryObjectCreate: 'https://262.ecma-international.org/11.0/#sec-ordinaryobjectcreate', - OrdinaryOwnPropertyKeys: 'https://262.ecma-international.org/11.0/#sec-ordinaryownpropertykeys', - OrdinaryPreventExtensions: 'https://262.ecma-international.org/11.0/#sec-ordinarypreventextensions', - OrdinarySet: 'https://262.ecma-international.org/11.0/#sec-ordinaryset', - OrdinarySetPrototypeOf: 'https://262.ecma-international.org/11.0/#sec-ordinarysetprototypeof', - OrdinarySetWithOwnDescriptor: 'https://262.ecma-international.org/11.0/#sec-ordinarysetwithowndescriptor', - OrdinaryToPrimitive: 'https://262.ecma-international.org/11.0/#sec-ordinarytoprimitive', - ParseModule: 'https://262.ecma-international.org/11.0/#sec-parsemodule', - ParseScript: 'https://262.ecma-international.org/11.0/#sec-parse-script', - PerformEval: 'https://262.ecma-international.org/11.0/#sec-performeval', - PerformPromiseAll: 'https://262.ecma-international.org/11.0/#sec-performpromiseall', - PerformPromiseAllSettled: 'https://262.ecma-international.org/11.0/#sec-performpromiseallsettled', - PerformPromiseRace: 'https://262.ecma-international.org/11.0/#sec-performpromiserace', - PerformPromiseThen: 'https://262.ecma-international.org/11.0/#sec-performpromisethen', - PrepareForOrdinaryCall: 'https://262.ecma-international.org/11.0/#sec-prepareforordinarycall', - PrepareForTailCall: 'https://262.ecma-international.org/11.0/#sec-preparefortailcall', - PromiseResolve: 'https://262.ecma-international.org/11.0/#sec-promise-resolve', - ProxyCreate: 'https://262.ecma-international.org/11.0/#sec-proxycreate', - PutValue: 'https://262.ecma-international.org/11.0/#sec-putvalue', - QuoteJSONString: 'https://262.ecma-international.org/11.0/#sec-quotejsonstring', - RawBytesToNumeric: 'https://262.ecma-international.org/11.0/#sec-rawbytestonumeric', - 'reads-bytes-from': 'https://262.ecma-international.org/11.0/#sec-reads-bytes-from', - 'reads-from': 'https://262.ecma-international.org/11.0/#sec-reads-from', - RegExpAlloc: 'https://262.ecma-international.org/11.0/#sec-regexpalloc', - RegExpBuiltinExec: 'https://262.ecma-international.org/11.0/#sec-regexpbuiltinexec', - RegExpCreate: 'https://262.ecma-international.org/11.0/#sec-regexpcreate', - RegExpExec: 'https://262.ecma-international.org/11.0/#sec-regexpexec', - RegExpInitialize: 'https://262.ecma-international.org/11.0/#sec-regexpinitialize', - RejectPromise: 'https://262.ecma-international.org/11.0/#sec-rejectpromise', - RemoveWaiter: 'https://262.ecma-international.org/11.0/#sec-removewaiter', - RemoveWaiters: 'https://262.ecma-international.org/11.0/#sec-removewaiters', - RepeatMatcher: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-repeatmatcher-abstract-operation', - RequireInternalSlot: 'https://262.ecma-international.org/11.0/#sec-requireinternalslot', - RequireObjectCoercible: 'https://262.ecma-international.org/11.0/#sec-requireobjectcoercible', - ResolveBinding: 'https://262.ecma-international.org/11.0/#sec-resolvebinding', - ResolveThisBinding: 'https://262.ecma-international.org/11.0/#sec-resolvethisbinding', - ReturnIfAbrupt: 'https://262.ecma-international.org/11.0/#sec-returnifabrupt', - SameValue: 'https://262.ecma-international.org/11.0/#sec-samevalue', - SameValueNonNumeric: 'https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric', - SameValueZero: 'https://262.ecma-international.org/11.0/#sec-samevaluezero', - ScriptEvaluation: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-scriptevaluation', - SecFromTime: 'https://262.ecma-international.org/11.0/#eqn-SecFromTime', - SerializeJSONArray: 'https://262.ecma-international.org/11.0/#sec-serializejsonarray', - SerializeJSONObject: 'https://262.ecma-international.org/11.0/#sec-serializejsonobject', - SerializeJSONProperty: 'https://262.ecma-international.org/11.0/#sec-serializejsonproperty', - Set: 'https://262.ecma-international.org/11.0/#sec-set-o-p-v-throw', - SetDefaultGlobalBindings: 'https://262.ecma-international.org/11.0/#sec-setdefaultglobalbindings', - SetFunctionLength: 'https://262.ecma-international.org/11.0/#sec-setfunctionlength', - SetFunctionName: 'https://262.ecma-international.org/11.0/#sec-setfunctionname', - SetImmutablePrototype: 'https://262.ecma-international.org/11.0/#sec-set-immutable-prototype', - SetIntegrityLevel: 'https://262.ecma-international.org/11.0/#sec-setintegritylevel', - SetRealmGlobalObject: 'https://262.ecma-international.org/11.0/#sec-setrealmglobalobject', - SetValueInBuffer: 'https://262.ecma-international.org/11.0/#sec-setvalueinbuffer', - SetViewValue: 'https://262.ecma-international.org/11.0/#sec-setviewvalue', - SharedDataBlockEventSet: 'https://262.ecma-international.org/11.0/#sec-sharedatablockeventset', - SortCompare: 'https://262.ecma-international.org/11.0/#sec-sortcompare', - SpeciesConstructor: 'https://262.ecma-international.org/11.0/#sec-speciesconstructor', - SplitMatch: 'https://262.ecma-international.org/11.0/#sec-splitmatch', - 'Strict Equality Comparison': 'https://262.ecma-international.org/11.0/#sec-strict-equality-comparison', - StringCreate: 'https://262.ecma-international.org/11.0/#sec-stringcreate', - StringGetOwnProperty: 'https://262.ecma-international.org/11.0/#sec-stringgetownproperty', - StringPad: 'https://262.ecma-international.org/11.0/#sec-stringpad', - StringToBigInt: 'https://262.ecma-international.org/11.0/#sec-stringtobigint', - Suspend: 'https://262.ecma-international.org/11.0/#sec-suspend', - SymbolDescriptiveString: 'https://262.ecma-international.org/11.0/#sec-symboldescriptivestring', - 'synchronizes-with': 'https://262.ecma-international.org/11.0/#sec-synchronizes-with', - TestIntegrityLevel: 'https://262.ecma-international.org/11.0/#sec-testintegritylevel', - thisBigIntValue: 'https://262.ecma-international.org/11.0/#sec-thisbigintvalue', - thisBooleanValue: 'https://262.ecma-international.org/11.0/#sec-thisbooleanvalue', - thisNumberValue: 'https://262.ecma-international.org/11.0/#sec-thisnumbervalue', - thisStringValue: 'https://262.ecma-international.org/11.0/#sec-thisstringvalue', - thisSymbolValue: 'https://262.ecma-international.org/11.0/#sec-thissymbolvalue', - thisTimeValue: 'https://262.ecma-international.org/11.0/#sec-thistimevalue', - ThrowCompletion: 'https://262.ecma-international.org/11.0/#sec-throwcompletion', - TimeClip: 'https://262.ecma-international.org/11.0/#sec-timeclip', - TimeFromYear: 'https://262.ecma-international.org/11.0/#eqn-TimeFromYear', - TimeString: 'https://262.ecma-international.org/11.0/#sec-timestring', - TimeWithinDay: 'https://262.ecma-international.org/11.0/#eqn-TimeWithinDay', - TimeZoneString: 'https://262.ecma-international.org/11.0/#sec-timezoneestring', - ToBigInt: 'https://262.ecma-international.org/11.0/#sec-tobigint', - ToBigInt64: 'https://262.ecma-international.org/11.0/#sec-tobigint64', - ToBigUint64: 'https://262.ecma-international.org/11.0/#sec-tobiguint64', - ToBoolean: 'https://262.ecma-international.org/11.0/#sec-toboolean', - ToDateString: 'https://262.ecma-international.org/11.0/#sec-todatestring', - ToIndex: 'https://262.ecma-international.org/11.0/#sec-toindex', - ToInt16: 'https://262.ecma-international.org/11.0/#sec-toint16', - ToInt32: 'https://262.ecma-international.org/11.0/#sec-toint32', - ToInt8: 'https://262.ecma-international.org/11.0/#sec-toint8', - ToInteger: 'https://262.ecma-international.org/11.0/#sec-tointeger', - ToLength: 'https://262.ecma-international.org/11.0/#sec-tolength', - ToNumber: 'https://262.ecma-international.org/11.0/#sec-tonumber', - ToNumeric: 'https://262.ecma-international.org/11.0/#sec-tonumeric', - ToObject: 'https://262.ecma-international.org/11.0/#sec-toobject', - ToPrimitive: 'https://262.ecma-international.org/11.0/#sec-toprimitive', - ToPropertyDescriptor: 'https://262.ecma-international.org/11.0/#sec-topropertydescriptor', - ToPropertyKey: 'https://262.ecma-international.org/11.0/#sec-topropertykey', - ToString: 'https://262.ecma-international.org/11.0/#sec-tostring', - ToUint16: 'https://262.ecma-international.org/11.0/#sec-touint16', - ToUint32: 'https://262.ecma-international.org/11.0/#sec-touint32', - ToUint8: 'https://262.ecma-international.org/11.0/#sec-touint8', - ToUint8Clamp: 'https://262.ecma-international.org/11.0/#sec-touint8clamp', - TriggerPromiseReactions: 'https://262.ecma-international.org/11.0/#sec-triggerpromisereactions', - TrimString: 'https://262.ecma-international.org/11.0/#sec-trimstring', - Type: 'https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values', - TypedArrayCreate: 'https://262.ecma-international.org/11.0/#typedarray-create', - TypedArraySpeciesCreate: 'https://262.ecma-international.org/11.0/#typedarray-species-create', - UnicodeEscape: 'https://262.ecma-international.org/11.0/#sec-unicodeescape', - UnicodeMatchProperty: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-unicodematchproperty-p', - UnicodeMatchPropertyValue: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v', - UpdateEmpty: 'https://262.ecma-international.org/11.0/#sec-updateempty', - UTC: 'https://262.ecma-international.org/11.0/#sec-utc-t', - UTF16DecodeString: 'https://262.ecma-international.org/11.0/#sec-utf16decodestring', - UTF16DecodeSurrogatePair: 'https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair', - UTF16Encode: 'https://262.ecma-international.org/11.0/#sec-utf16encode', - UTF16Encoding: 'https://262.ecma-international.org/11.0/#sec-utf16encoding', - ValidateAndApplyPropertyDescriptor: 'https://262.ecma-international.org/11.0/#sec-validateandapplypropertydescriptor', - ValidateAtomicAccess: 'https://262.ecma-international.org/11.0/#sec-validateatomicaccess', - ValidateSharedIntegerTypedArray: 'https://262.ecma-international.org/11.0/#sec-validatesharedintegertypedarray', - ValidateTypedArray: 'https://262.ecma-international.org/11.0/#sec-validatetypedarray', - ValueOfReadEvent: 'https://262.ecma-international.org/11.0/#sec-valueofreadevent', - WeekDay: 'https://262.ecma-international.org/11.0/#sec-week-day', - WordCharacters: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-wordcharacters-abstract-operation', - YearFromTime: 'https://262.ecma-international.org/11.0/#eqn-YearFromTime' + abs: { + url: 'https://262.ecma-international.org/11.0/#eqn-abs' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/11.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/11.0/#sec-abstract-relational-comparison' + }, + AddEntriesFromIterable: { + url: 'https://262.ecma-international.org/11.0/#sec-add-entries-from-iterable' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/11.0/#sec-addrestrictedfunctionproperties' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/11.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/11.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/11.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/11.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/11.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/11.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-allocatetypedarraybuffer' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/11.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-arrayspeciescreate' + }, + AsyncFromSyncIteratorContinuation: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncfromsynciteratorcontinuation' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/11.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorReject: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorreject' + }, + AsyncGeneratorResolve: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorresolve' + }, + AsyncGeneratorResumeNext: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorresumenext' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/11.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/11.0/#sec-asynciteratorclose' + }, + AtomicLoad: { + url: 'https://262.ecma-international.org/11.0/#sec-atomicload' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/11.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/11.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/11.0/#sec-backreference-matcher' + }, + 'BigInt::add': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add' + }, + 'BigInt::bitwiseAND': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND' + }, + 'BigInt::bitwiseNOT': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT' + }, + 'BigInt::bitwiseOR': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR' + }, + 'BigInt::bitwiseXOR': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR' + }, + 'BigInt::divide': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide' + }, + 'BigInt::equal': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal' + }, + 'BigInt::exponentiate': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate' + }, + 'BigInt::leftShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift' + }, + 'BigInt::lessThan': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan' + }, + 'BigInt::multiply': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply' + }, + 'BigInt::remainder': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder' + }, + 'BigInt::sameValue': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue' + }, + 'BigInt::sameValueZero': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero' + }, + 'BigInt::signedRightShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift' + }, + 'BigInt::subtract': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract' + }, + 'BigInt::toString': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring' + }, + 'BigInt::unaryMinus': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus' + }, + 'BigInt::unsignedRightShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift' + }, + BigIntBitwiseOp: { + url: 'https://262.ecma-international.org/11.0/#sec-bigintbitwiseop' + }, + BinaryAnd: { + url: 'https://262.ecma-international.org/11.0/#sec-binaryand' + }, + BinaryOr: { + url: 'https://262.ecma-international.org/11.0/#sec-binaryor' + }, + BinaryXor: { + url: 'https://262.ecma-international.org/11.0/#sec-binaryxor' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/11.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-boundfunctioncreate' + }, + Call: { + url: 'https://262.ecma-international.org/11.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/11.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-clonearraybuffer' + }, + CodePointAt: { + url: 'https://262.ecma-international.org/11.0/#sec-codepointat' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/11.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/11.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/11.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/11.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/11.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/11.0/#sec-copydataproperties' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/11.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createasyncfromsynciterator' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/11.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/11.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/11.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/11.0/#sec-createdynamicfunction' + }, + CreateForInIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createforiniterator' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/11.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/11.0/#sec-createintrinsics' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/11.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/11.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/11.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/11.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/11.0/#sec-createrealm' + }, + CreateRegExpStringIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createregexpstringiterator' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/11.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/11.0/#sec-createsharedbytedatablock' + }, + CreateStringIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-createstringiterator' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/11.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/11.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/11.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/11.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/11.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/11.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/11.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/11.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/11.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/11.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/11.0/#sec-encode' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/11.0/#sec-entercriticalsection' + }, + EnumerableOwnPropertyNames: { + url: 'https://262.ecma-international.org/11.0/#sec-enumerableownpropertynames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/11.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/11.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/11.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/11.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/11.0/#sec-evaluatenew' + }, + EvaluatePropertyAccessWithExpressionKey: { + url: 'https://262.ecma-international.org/11.0/#sec-evaluate-property-access-with-expression-key' + }, + EvaluatePropertyAccessWithIdentifierKey: { + url: 'https://262.ecma-international.org/11.0/#sec-evaluate-property-access-with-identifier-key' + }, + EventSet: { + url: 'https://262.ecma-international.org/11.0/#sec-event-set' + }, + ExecuteModule: { + url: 'https://262.ecma-international.org/11.0/#sec-source-text-module-record-execute-module' + }, + FinishDynamicImport: { + url: 'https://262.ecma-international.org/11.0/#sec-finishdynamicimport' + }, + FlattenIntoArray: { + url: 'https://262.ecma-international.org/11.0/#sec-flattenintoarray' + }, + floor: { + url: 'https://262.ecma-international.org/11.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/11.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-forinofheadevaluation' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/11.0/#sec-fulfillpromise' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/11.0/#sec-functiondeclarationinstantiation' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/11.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/11.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/11.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/11.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/11.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/11.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/11.0/#sec-getactivescriptormodule' + }, + GetBase: { + url: 'https://262.ecma-international.org/11.0/#sec-getbase' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/11.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/11.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/11.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/11.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/11.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/11.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/11.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/11.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/11.0/#sec-getownpropertykeys' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-getprototypefromconstructor' + }, + GetReferencedName: { + url: 'https://262.ecma-international.org/11.0/#sec-getreferencedname' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/11.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/11.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/11.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/11.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/11.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/11.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/11.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/11.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/11.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-hasownproperty' + }, + HasPrimitiveBase: { + url: 'https://262.ecma-international.org/11.0/#sec-hasprimitivebase' + }, + HasProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/11.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/11.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-HourFromTime' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/11.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/11.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/11.0/#sec-initializeboundname' + }, + InitializeEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-source-text-module-record-initialize-environment' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/11.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/11.0/#sec-initializereferencedbinding' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/11.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/11.0/#sec-innermoduleevaluation' + }, + InnerModuleLinking: { + url: 'https://262.ecma-international.org/11.0/#sec-InnerModuleLinking' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/11.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/11.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/11.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/11.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/11.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/11.0/#sec-isarray' + }, + IsBigIntElementType: { + url: 'https://262.ecma-international.org/11.0/#sec-isbigintelementtype' + }, + IsCallable: { + url: 'https://262.ecma-international.org/11.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/11.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/11.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/11.0/#sec-isintailposition' + }, + IsInteger: { + url: 'https://262.ecma-international.org/11.0/#sec-isinteger' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/11.0/#sec-islabelledfunction' + }, + IsNonNegativeInteger: { + url: 'https://262.ecma-international.org/11.0/#sec-isnonnegativeinteger' + }, + IsNoTearConfiguration: { + url: 'https://262.ecma-international.org/11.0/#sec-isnotearconfiguration' + }, + IsPromise: { + url: 'https://262.ecma-international.org/11.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/11.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/11.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/11.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-issharedarraybuffer' + }, + IsStrictReference: { + url: 'https://262.ecma-international.org/11.0/#sec-isstrictreference' + }, + IsStringPrefix: { + url: 'https://262.ecma-international.org/11.0/#sec-isstringprefix' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/11.0/#sec-issuperreference' + }, + IsUnclampedIntegerElementType: { + url: 'https://262.ecma-international.org/11.0/#sec-isunclampedintegerelementtype' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/11.0/#sec-isunresolvablereference' + }, + IsUnsignedElementType: { + url: 'https://262.ecma-international.org/11.0/#sec-isunsignedelementtype' + }, + IsValidIntegerIndex: { + url: 'https://262.ecma-international.org/11.0/#sec-isvalidintegerindex' + }, + IsValidRegularExpressionLiteral: { + url: 'https://262.ecma-international.org/11.0/#sec-isvalidregularexpressionliteral' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/11.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/11.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/11.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/11.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/11.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/11.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/11.0/#sec-leavecriticalsection' + }, + LengthOfArrayLike: { + url: 'https://262.ecma-international.org/11.0/#sec-lengthofarraylike' + }, + LocalTime: { + url: 'https://262.ecma-international.org/11.0/#sec-localtime' + }, + LocalTZA: { + url: 'https://262.ecma-international.org/11.0/#sec-local-time-zone-adjustment' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/11.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/11.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/11.0/#sec-makeargsetter' + }, + MakeBasicObject: { + url: 'https://262.ecma-international.org/11.0/#sec-makebasicobject' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/11.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/11.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/11.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/11.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/11.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/11.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/11.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/11.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/11.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/11.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/11.0/#sec-newpromisecapability' + }, + NewPromiseReactionJob: { + url: 'https://262.ecma-international.org/11.0/#sec-newpromisereactionjob' + }, + NewPromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/11.0/#sec-newpromiseresolvethenablejob' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/11.0/#sec-normalcompletion' + }, + NotifyWaiter: { + url: 'https://262.ecma-international.org/11.0/#sec-notifywaiter' + }, + 'Number::add': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-add' + }, + 'Number::bitwiseAND': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseAND' + }, + 'Number::bitwiseNOT': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseNOT' + }, + 'Number::bitwiseOR': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseOR' + }, + 'Number::bitwiseXOR': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-bitwiseXOR' + }, + 'Number::divide': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-divide' + }, + 'Number::equal': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-equal' + }, + 'Number::exponentiate': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate' + }, + 'Number::leftShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-leftShift' + }, + 'Number::lessThan': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-lessThan' + }, + 'Number::multiply': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-multiply' + }, + 'Number::remainder': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-remainder' + }, + 'Number::sameValue': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValue' + }, + 'Number::sameValueZero': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-sameValueZero' + }, + 'Number::signedRightShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-signedRightShift' + }, + 'Number::subtract': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-subtract' + }, + 'Number::toString': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring' + }, + 'Number::unaryMinus': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-unaryMinus' + }, + 'Number::unsignedRightShift': { + url: 'https://262.ecma-international.org/11.0/#sec-numeric-types-number-unsignedRightShift' + }, + NumberBitwiseOp: { + url: 'https://262.ecma-international.org/11.0/#sec-numberbitwiseop' + }, + NumberToBigInt: { + url: 'https://262.ecma-international.org/11.0/#sec-numbertobigint' + }, + NumericToRawBytes: { + url: 'https://262.ecma-international.org/11.0/#sec-numerictorawbytes' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/11.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarydelete' + }, + OrdinaryFunctionCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryfunctioncreate' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryisextensible' + }, + OrdinaryObjectCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryobjectcreate' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/11.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/11.0/#sec-parsemodule' + }, + ParseScript: { + url: 'https://262.ecma-international.org/11.0/#sec-parse-script' + }, + PerformEval: { + url: 'https://262.ecma-international.org/11.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/11.0/#sec-performpromiseall' + }, + PerformPromiseAllSettled: { + url: 'https://262.ecma-international.org/11.0/#sec-performpromiseallsettled' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/11.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/11.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/11.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/11.0/#sec-preparefortailcall' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/11.0/#sec-promise-resolve' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/11.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/11.0/#sec-quotejsonstring' + }, + RawBytesToNumeric: { + url: 'https://262.ecma-international.org/11.0/#sec-rawbytestonumeric' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/11.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/11.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/11.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/11.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/11.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/11.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/11.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/11.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/11.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireInternalSlot: { + url: 'https://262.ecma-international.org/11.0/#sec-requireinternalslot' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/11.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/11.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/11.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/11.0/#sec-returnifabrupt' + }, + SameValue: { + url: 'https://262.ecma-international.org/11.0/#sec-samevalue' + }, + SameValueNonNumeric: { + url: 'https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/11.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-scriptevaluation' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/11.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/11.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/11.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/11.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/11.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/11.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/11.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/11.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/11.0/#sec-setrealmglobalobject' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/11.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/11.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/11.0/#sec-sharedatablockeventset' + }, + SortCompare: { + url: 'https://262.ecma-international.org/11.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/11.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/11.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/11.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/11.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-stringgetownproperty' + }, + StringPad: { + url: 'https://262.ecma-international.org/11.0/#sec-stringpad' + }, + StringToBigInt: { + url: 'https://262.ecma-international.org/11.0/#sec-stringtobigint' + }, + Suspend: { + url: 'https://262.ecma-international.org/11.0/#sec-suspend' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/11.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/11.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/11.0/#sec-testintegritylevel' + }, + thisBigIntValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thisbigintvalue' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/11.0/#sec-thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/11.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/11.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/11.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/11.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/11.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/11.0/#sec-timezoneestring' + }, + ToBigInt: { + url: 'https://262.ecma-international.org/11.0/#sec-tobigint' + }, + ToBigInt64: { + url: 'https://262.ecma-international.org/11.0/#sec-tobigint64' + }, + ToBigUint64: { + url: 'https://262.ecma-international.org/11.0/#sec-tobiguint64' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/11.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/11.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/11.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/11.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/11.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/11.0/#sec-toint8' + }, + ToInteger: { + url: 'https://262.ecma-international.org/11.0/#sec-tointeger' + }, + ToLength: { + url: 'https://262.ecma-international.org/11.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/11.0/#sec-tonumber' + }, + ToNumeric: { + url: 'https://262.ecma-international.org/11.0/#sec-tonumeric' + }, + ToObject: { + url: 'https://262.ecma-international.org/11.0/#sec-toobject' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/11.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/11.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/11.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/11.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/11.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/11.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/11.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/11.0/#sec-triggerpromisereactions' + }, + TrimString: { + url: 'https://262.ecma-international.org/11.0/#sec-trimstring' + }, + Type: { + url: 'https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/11.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/11.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/11.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/11.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/11.0/#sec-utc-t' + }, + UTF16DecodeString: { + url: 'https://262.ecma-international.org/11.0/#sec-utf16decodestring' + }, + UTF16DecodeSurrogatePair: { + url: 'https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair' + }, + UTF16Encode: { + url: 'https://262.ecma-international.org/11.0/#sec-utf16encode' + }, + UTF16Encoding: { + url: 'https://262.ecma-international.org/11.0/#sec-utf16encoding' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/11.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/11.0/#sec-validateatomicaccess' + }, + ValidateSharedIntegerTypedArray: { + url: 'https://262.ecma-international.org/11.0/#sec-validatesharedintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/11.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/11.0/#sec-valueofreadevent' + }, + WeekDay: { + url: 'https://262.ecma-international.org/11.0/#sec-week-day' + }, + WordCharacters: { + url: 'https://262.ecma-international.org/11.0/#sec-runtime-semantics-wordcharacters-abstract-operation' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/11.0/#eqn-YearFromTime' + } }; diff --git a/node_modules/es-abstract/operations/2021.js b/node_modules/es-abstract/operations/2021.js new file mode 100644 index 000000000..54d020943 --- /dev/null +++ b/node_modules/es-abstract/operations/2021.js @@ -0,0 +1,1279 @@ +'use strict'; + +module.exports = { + abs: { + url: 'https://262.ecma-international.org/12.0/#eqn-abs' + }, + 'Abstract Equality Comparison': { + url: 'https://262.ecma-international.org/12.0/#sec-abstract-equality-comparison' + }, + 'Abstract Relational Comparison': { + url: 'https://262.ecma-international.org/12.0/#sec-abstract-relational-comparison' + }, + AddEntriesFromIterable: { + url: 'https://262.ecma-international.org/12.0/#sec-add-entries-from-iterable' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/12.0/#sec-addrestrictedfunctionproperties' + }, + AddToKeptObjects: { + url: 'https://262.ecma-international.org/12.0/#sec-addtokeptobjects' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/12.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/12.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/12.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/12.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/12.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/12.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-allocatetypedarraybuffer' + }, + ApplyStringOrNumericBinaryOperator: { + url: 'https://262.ecma-international.org/12.0/#sec-applystringornumericbinaryoperator' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/12.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-arrayspeciescreate' + }, + AsyncFromSyncIteratorContinuation: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncfromsynciteratorcontinuation' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/12.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorReject: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorreject' + }, + AsyncGeneratorResolve: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorresolve' + }, + AsyncGeneratorResumeNext: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorresumenext' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorValidate: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratorvalidate' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/12.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/12.0/#sec-asynciteratorclose' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/12.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/12.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/12.0/#sec-backreference-matcher' + }, + 'BigInt::add': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-add' + }, + 'BigInt::bitwiseAND': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-bitwiseAND' + }, + 'BigInt::bitwiseNOT': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-bitwiseNOT' + }, + 'BigInt::bitwiseOR': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-bitwiseOR' + }, + 'BigInt::bitwiseXOR': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-bitwiseXOR' + }, + 'BigInt::divide': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-divide' + }, + 'BigInt::equal': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-equal' + }, + 'BigInt::exponentiate': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-exponentiate' + }, + 'BigInt::leftShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-leftShift' + }, + 'BigInt::lessThan': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-lessThan' + }, + 'BigInt::multiply': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-multiply' + }, + 'BigInt::remainder': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-remainder' + }, + 'BigInt::sameValue': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-sameValue' + }, + 'BigInt::sameValueZero': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-sameValueZero' + }, + 'BigInt::signedRightShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-signedRightShift' + }, + 'BigInt::subtract': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-subtract' + }, + 'BigInt::toString': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-tostring' + }, + 'BigInt::unaryMinus': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-unaryMinus' + }, + 'BigInt::unsignedRightShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-bigint-unsignedRightShift' + }, + BigIntBitwiseOp: { + url: 'https://262.ecma-international.org/12.0/#sec-bigintbitwiseop' + }, + BinaryAnd: { + url: 'https://262.ecma-international.org/12.0/#sec-binaryand' + }, + BinaryOr: { + url: 'https://262.ecma-international.org/12.0/#sec-binaryor' + }, + BinaryXor: { + url: 'https://262.ecma-international.org/12.0/#sec-binaryxor' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/12.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-boundfunctioncreate' + }, + ByteListBitwiseOp: { + url: 'https://262.ecma-international.org/12.0/#sec-bytelistbitwiseop' + }, + ByteListEqual: { + url: 'https://262.ecma-international.org/12.0/#sec-bytelistequal' + }, + Call: { + url: 'https://262.ecma-international.org/12.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/12.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + clamp: { + url: 'https://262.ecma-international.org/12.0/#clamping' + }, + CleanupFinalizationRegistry: { + url: 'https://262.ecma-international.org/12.0/#sec-cleanup-finalization-registry' + }, + ClearKeptObjects: { + url: 'https://262.ecma-international.org/12.0/#sec-clear-kept-objects' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-clonearraybuffer' + }, + CodePointAt: { + url: 'https://262.ecma-international.org/12.0/#sec-codepointat' + }, + CodePointsToString: { + url: 'https://262.ecma-international.org/12.0/#sec-codepointstostring' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/12.0/#sec-completion-record-specification-type' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/12.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/12.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/12.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/12.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/12.0/#sec-copydataproperties' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/12.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createasyncfromsynciterator' + }, + CreateAsyncIteratorFromClosure: { + url: 'https://262.ecma-international.org/12.0/#sec-createasynciteratorfromclosure' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/12.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/12.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/12.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/12.0/#sec-createdynamicfunction' + }, + CreateForInIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createforiniterator' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/12.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/12.0/#sec-createintrinsics' + }, + CreateIteratorFromClosure: { + url: 'https://262.ecma-international.org/12.0/#sec-createiteratorfromclosure' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/12.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/12.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/12.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/12.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-createmethodproperty' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/12.0/#sec-createrealm' + }, + CreateRegExpStringIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createregexpstringiterator' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/12.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/12.0/#sec-createsharedbytedatablock' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/12.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/12.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/12.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/12.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/12.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/12.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/12.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/12.0/#sec-decode' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/12.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/12.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/12.0/#sec-encode' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/12.0/#sec-entercriticalsection' + }, + EnumerableOwnPropertyNames: { + url: 'https://262.ecma-international.org/12.0/#sec-enumerableownpropertynames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/12.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/12.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/12.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/12.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/12.0/#sec-evaluatenew' + }, + EvaluatePropertyAccessWithExpressionKey: { + url: 'https://262.ecma-international.org/12.0/#sec-evaluate-property-access-with-expression-key' + }, + EvaluatePropertyAccessWithIdentifierKey: { + url: 'https://262.ecma-international.org/12.0/#sec-evaluate-property-access-with-identifier-key' + }, + EvaluateStringOrNumericBinaryExpression: { + url: 'https://262.ecma-international.org/12.0/#sec-evaluatestringornumericbinaryexpression' + }, + EventSet: { + url: 'https://262.ecma-international.org/12.0/#sec-event-set' + }, + ExecuteModule: { + url: 'https://262.ecma-international.org/12.0/#sec-source-text-module-record-execute-module' + }, + FinishDynamicImport: { + url: 'https://262.ecma-international.org/12.0/#sec-finishdynamicimport' + }, + FlattenIntoArray: { + url: 'https://262.ecma-international.org/12.0/#sec-flattenintoarray' + }, + floor: { + url: 'https://262.ecma-international.org/12.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/12.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-forinofheadevaluation' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/12.0/#sec-fulfillpromise' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/12.0/#sec-functiondeclarationinstantiation' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/12.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/12.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/12.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/12.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/12.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/12.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/12.0/#sec-getactivescriptormodule' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/12.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/12.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/12.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/12.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/12.0/#sec-getiterator' + }, + GetMethod: { + url: 'https://262.ecma-international.org/12.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/12.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/12.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/12.0/#sec-getownpropertykeys' + }, + GetPromiseResolve: { + url: 'https://262.ecma-international.org/12.0/#sec-getpromiseresolve' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-getprototypefromconstructor' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/12.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/12.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/12.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/12.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/12.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/12.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/12.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/12.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/12.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-hasownproperty' + }, + HasProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/12.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/12.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-HourFromTime' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/12.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/12.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/12.0/#sec-initializeboundname' + }, + InitializeEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-source-text-module-record-initialize-environment' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/12.0/#sec-initializehostdefinedrealm' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/12.0/#sec-initializereferencedbinding' + }, + InitializeTypedArrayFromArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-initializetypedarrayfromarraybuffer' + }, + InitializeTypedArrayFromArrayLike: { + url: 'https://262.ecma-international.org/12.0/#sec-initializetypedarrayfromarraylike' + }, + InitializeTypedArrayFromList: { + url: 'https://262.ecma-international.org/12.0/#sec-initializetypedarrayfromlist' + }, + InitializeTypedArrayFromTypedArray: { + url: 'https://262.ecma-international.org/12.0/#sec-initializetypedarrayfromtypedarray' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/12.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/12.0/#sec-innermoduleevaluation' + }, + InnerModuleLinking: { + url: 'https://262.ecma-international.org/12.0/#sec-InnerModuleLinking' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/12.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/12.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/12.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/12.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/12.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/12.0/#sec-isarray' + }, + IsBigIntElementType: { + url: 'https://262.ecma-international.org/12.0/#sec-isbigintelementtype' + }, + IsCallable: { + url: 'https://262.ecma-international.org/12.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/12.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/12.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/12.0/#sec-isintailposition' + }, + IsIntegralNumber: { + url: 'https://262.ecma-international.org/12.0/#sec-isintegralnumber' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/12.0/#sec-islabelledfunction' + }, + IsNoTearConfiguration: { + url: 'https://262.ecma-international.org/12.0/#sec-isnotearconfiguration' + }, + IsPromise: { + url: 'https://262.ecma-international.org/12.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/12.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/12.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/12.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-issharedarraybuffer' + }, + IsStringPrefix: { + url: 'https://262.ecma-international.org/12.0/#sec-isstringprefix' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/12.0/#sec-issuperreference' + }, + IsUnclampedIntegerElementType: { + url: 'https://262.ecma-international.org/12.0/#sec-isunclampedintegerelementtype' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/12.0/#sec-isunresolvablereference' + }, + IsUnsignedElementType: { + url: 'https://262.ecma-international.org/12.0/#sec-isunsignedelementtype' + }, + IsValidIntegerIndex: { + url: 'https://262.ecma-international.org/12.0/#sec-isvalidintegerindex' + }, + IsValidRegularExpressionLiteral: { + url: 'https://262.ecma-international.org/12.0/#sec-isvalidregularexpressionliteral' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/12.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/12.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/12.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/12.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/12.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/12.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/12.0/#sec-leavecriticalsection' + }, + LengthOfArrayLike: { + url: 'https://262.ecma-international.org/12.0/#sec-lengthofarraylike' + }, + LocalTime: { + url: 'https://262.ecma-international.org/12.0/#sec-localtime' + }, + LocalTZA: { + url: 'https://262.ecma-international.org/12.0/#sec-local-time-zone-adjustment' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/12.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/12.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/12.0/#sec-makeargsetter' + }, + MakeBasicObject: { + url: 'https://262.ecma-international.org/12.0/#sec-makebasicobject' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/12.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/12.0/#sec-makeday' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/12.0/#sec-makemethod' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/12.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/12.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/12.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/12.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/12.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/12.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/12.0/#sec-newobjectenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/12.0/#sec-newpromisecapability' + }, + NewPromiseReactionJob: { + url: 'https://262.ecma-international.org/12.0/#sec-newpromisereactionjob' + }, + NewPromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/12.0/#sec-newpromiseresolvethenablejob' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/12.0/#sec-normalcompletion' + }, + NotifyWaiter: { + url: 'https://262.ecma-international.org/12.0/#sec-notifywaiter' + }, + 'Number::add': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-add' + }, + 'Number::bitwiseAND': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-bitwiseAND' + }, + 'Number::bitwiseNOT': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-bitwiseNOT' + }, + 'Number::bitwiseOR': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-bitwiseOR' + }, + 'Number::bitwiseXOR': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-bitwiseXOR' + }, + 'Number::divide': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-divide' + }, + 'Number::equal': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-equal' + }, + 'Number::exponentiate': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-exponentiate' + }, + 'Number::leftShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-leftShift' + }, + 'Number::lessThan': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-lessThan' + }, + 'Number::multiply': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-multiply' + }, + 'Number::remainder': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-remainder' + }, + 'Number::sameValue': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-sameValue' + }, + 'Number::sameValueZero': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-sameValueZero' + }, + 'Number::signedRightShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-signedRightShift' + }, + 'Number::subtract': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-subtract' + }, + 'Number::toString': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-tostring' + }, + 'Number::unaryMinus': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-unaryMinus' + }, + 'Number::unsignedRightShift': { + url: 'https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift' + }, + NumberBitwiseOp: { + url: 'https://262.ecma-international.org/12.0/#sec-numberbitwiseop' + }, + NumberToBigInt: { + url: 'https://262.ecma-international.org/12.0/#sec-numbertobigint' + }, + NumericToRawBytes: { + url: 'https://262.ecma-international.org/12.0/#sec-numerictorawbytes' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/12.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarydelete' + }, + OrdinaryFunctionCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryfunctioncreate' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryisextensible' + }, + OrdinaryObjectCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryobjectcreate' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/12.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/12.0/#sec-parsemodule' + }, + ParsePattern: { + url: 'https://262.ecma-international.org/12.0/#sec-parsepattern' + }, + ParseScript: { + url: 'https://262.ecma-international.org/12.0/#sec-parse-script' + }, + ParseText: { + url: 'https://262.ecma-international.org/12.0/#sec-parsetext' + }, + PerformEval: { + url: 'https://262.ecma-international.org/12.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/12.0/#sec-performpromiseall' + }, + PerformPromiseAllSettled: { + url: 'https://262.ecma-international.org/12.0/#sec-performpromiseallsettled' + }, + PerformPromiseAny: { + url: 'https://262.ecma-international.org/12.0/#sec-performpromiseany' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/12.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/12.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/12.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/12.0/#sec-preparefortailcall' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/12.0/#sec-promise-resolve' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/12.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/12.0/#sec-quotejsonstring' + }, + RawBytesToNumeric: { + url: 'https://262.ecma-international.org/12.0/#sec-rawbytestonumeric' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/12.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/12.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/12.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/12.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/12.0/#sec-regexpexec' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/12.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/12.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/12.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/12.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireInternalSlot: { + url: 'https://262.ecma-international.org/12.0/#sec-requireinternalslot' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/12.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/12.0/#sec-resolvebinding' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/12.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/12.0/#sec-returnifabrupt' + }, + SameValue: { + url: 'https://262.ecma-international.org/12.0/#sec-samevalue' + }, + SameValueNonNumeric: { + url: 'https://262.ecma-international.org/12.0/#sec-samevaluenonnumeric' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/12.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-scriptevaluation' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/12.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/12.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/12.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/12.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/12.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/12.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/12.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/12.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/12.0/#sec-setrealmglobalobject' + }, + SetTypedArrayFromArrayLike: { + url: 'https://262.ecma-international.org/12.0/#sec-settypedarrayfromarraylike' + }, + SetTypedArrayFromTypedArray: { + url: 'https://262.ecma-international.org/12.0/#sec-settypedarrayfromtypedarray' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/12.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/12.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/12.0/#sec-sharedatablockeventset' + }, + SortCompare: { + url: 'https://262.ecma-international.org/12.0/#sec-sortcompare' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/12.0/#sec-speciesconstructor' + }, + SplitMatch: { + url: 'https://262.ecma-international.org/12.0/#sec-splitmatch' + }, + 'Strict Equality Comparison': { + url: 'https://262.ecma-international.org/12.0/#sec-strict-equality-comparison' + }, + StringCreate: { + url: 'https://262.ecma-international.org/12.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-stringgetownproperty' + }, + StringIndexOf: { + url: 'https://262.ecma-international.org/12.0/#sec-stringindexof' + }, + StringPad: { + url: 'https://262.ecma-international.org/12.0/#sec-stringpad' + }, + StringToBigInt: { + url: 'https://262.ecma-international.org/12.0/#sec-stringtobigint' + }, + StringToCodePoints: { + url: 'https://262.ecma-international.org/12.0/#sec-stringtocodepoints' + }, + substring: { + url: 'https://262.ecma-international.org/12.0/#substring' + }, + SuspendAgent: { + url: 'https://262.ecma-international.org/12.0/#sec-suspendagent' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/12.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/12.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/12.0/#sec-testintegritylevel' + }, + thisBigIntValue: { + url: 'https://262.ecma-international.org/12.0/#thisbigintvalue' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/12.0/#thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/12.0/#thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/12.0/#thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/12.0/#thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/12.0/#thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/12.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/12.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/12.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/12.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/12.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/12.0/#sec-timezoneestring' + }, + ToBigInt: { + url: 'https://262.ecma-international.org/12.0/#sec-tobigint' + }, + ToBigInt64: { + url: 'https://262.ecma-international.org/12.0/#sec-tobigint64' + }, + ToBigUint64: { + url: 'https://262.ecma-international.org/12.0/#sec-tobiguint64' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/12.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/12.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/12.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/12.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/12.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/12.0/#sec-toint8' + }, + ToIntegerOrInfinity: { + url: 'https://262.ecma-international.org/12.0/#sec-tointegerorinfinity' + }, + ToLength: { + url: 'https://262.ecma-international.org/12.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/12.0/#sec-tonumber' + }, + ToNumeric: { + url: 'https://262.ecma-international.org/12.0/#sec-tonumeric' + }, + ToObject: { + url: 'https://262.ecma-international.org/12.0/#sec-toobject' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/12.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/12.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/12.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/12.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/12.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/12.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/12.0/#sec-touint8clamp' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/12.0/#sec-triggerpromisereactions' + }, + TrimString: { + url: 'https://262.ecma-international.org/12.0/#sec-trimstring' + }, + Type: { + url: 'https://262.ecma-international.org/12.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/12.0/#typedarray-create' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/12.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/12.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/12.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/12.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/12.0/#sec-utc-t' + }, + UTF16EncodeCodePoint: { + url: 'https://262.ecma-international.org/12.0/#sec-utf16encodecodepoint' + }, + UTF16SurrogatePairToCodePoint: { + url: 'https://262.ecma-international.org/12.0/#sec-utf16decodesurrogatepair' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/12.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/12.0/#sec-validateatomicaccess' + }, + ValidateIntegerTypedArray: { + url: 'https://262.ecma-international.org/12.0/#sec-validateintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/12.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/12.0/#sec-valueofreadevent' + }, + WeakRefDeref: { + url: 'https://262.ecma-international.org/12.0/#sec-weakrefderef' + }, + WeekDay: { + url: 'https://262.ecma-international.org/12.0/#sec-week-day' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/12.0/#eqn-YearFromTime' + }, + Yield: { + url: 'https://262.ecma-international.org/12.0/#sec-yield' + } +}; diff --git a/node_modules/es-abstract/operations/2022.js b/node_modules/es-abstract/operations/2022.js new file mode 100644 index 000000000..d1b88ebb8 --- /dev/null +++ b/node_modules/es-abstract/operations/2022.js @@ -0,0 +1,1369 @@ +'use strict'; + +module.exports = { + abs: { + url: 'https://262.ecma-international.org/13.0/#eqn-abs' + }, + AddEntriesFromIterable: { + url: 'https://262.ecma-international.org/13.0/#sec-add-entries-from-iterable' + }, + AddRestrictedFunctionProperties: { + url: 'https://262.ecma-international.org/13.0/#sec-addrestrictedfunctionproperties' + }, + AddToKeptObjects: { + url: 'https://262.ecma-international.org/13.0/#sec-addtokeptobjects' + }, + AddWaiter: { + url: 'https://262.ecma-international.org/13.0/#sec-addwaiter' + }, + AdvanceStringIndex: { + url: 'https://262.ecma-international.org/13.0/#sec-advancestringindex' + }, + 'agent-order': { + url: 'https://262.ecma-international.org/13.0/#sec-agent-order' + }, + AgentCanSuspend: { + url: 'https://262.ecma-international.org/13.0/#sec-agentcansuspend' + }, + AgentSignifier: { + url: 'https://262.ecma-international.org/13.0/#sec-agentsignifier' + }, + AllocateArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-allocatearraybuffer' + }, + AllocateSharedArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-allocatesharedarraybuffer' + }, + AllocateTypedArray: { + url: 'https://262.ecma-international.org/13.0/#sec-allocatetypedarray' + }, + AllocateTypedArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-allocatetypedarraybuffer' + }, + ApplyStringOrNumericBinaryOperator: { + url: 'https://262.ecma-international.org/13.0/#sec-applystringornumericbinaryoperator' + }, + ArrayCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-arraycreate' + }, + ArraySetLength: { + url: 'https://262.ecma-international.org/13.0/#sec-arraysetlength' + }, + ArraySpeciesCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-arrayspeciescreate' + }, + AsyncBlockStart: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncblockstart' + }, + AsyncFromSyncIteratorContinuation: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncfromsynciteratorcontinuation' + }, + AsyncFunctionStart: { + url: 'https://262.ecma-international.org/13.0/#sec-async-functions-abstract-operations-async-function-start' + }, + AsyncGeneratorAwaitReturn: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorawaitreturn' + }, + AsyncGeneratorCompleteStep: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorcompletestep' + }, + AsyncGeneratorDrainQueue: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratordrainqueue' + }, + AsyncGeneratorEnqueue: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorenqueue' + }, + AsyncGeneratorResume: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorresume' + }, + AsyncGeneratorStart: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorstart' + }, + AsyncGeneratorUnwrapYieldResumption: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorunwrapyieldresumption' + }, + AsyncGeneratorValidate: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratorvalidate' + }, + AsyncGeneratorYield: { + url: 'https://262.ecma-international.org/13.0/#sec-asyncgeneratoryield' + }, + AsyncIteratorClose: { + url: 'https://262.ecma-international.org/13.0/#sec-asynciteratorclose' + }, + AsyncModuleExecutionFulfilled: { + url: 'https://262.ecma-international.org/13.0/#sec-async-module-execution-fulfilled' + }, + AsyncModuleExecutionRejected: { + url: 'https://262.ecma-international.org/13.0/#sec-async-module-execution-rejected' + }, + AtomicReadModifyWrite: { + url: 'https://262.ecma-international.org/13.0/#sec-atomicreadmodifywrite' + }, + Await: { + url: 'https://262.ecma-international.org/13.0/#await' + }, + BackreferenceMatcher: { + url: 'https://262.ecma-international.org/13.0/#sec-backreference-matcher' + }, + 'BigInt::add': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-add' + }, + 'BigInt::bitwiseAND': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-bitwiseAND' + }, + 'BigInt::bitwiseNOT': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-bitwiseNOT' + }, + 'BigInt::bitwiseOR': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-bitwiseOR' + }, + 'BigInt::bitwiseXOR': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-bitwiseXOR' + }, + 'BigInt::divide': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-divide' + }, + 'BigInt::equal': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-equal' + }, + 'BigInt::exponentiate': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-exponentiate' + }, + 'BigInt::leftShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-leftShift' + }, + 'BigInt::lessThan': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-lessThan' + }, + 'BigInt::multiply': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-multiply' + }, + 'BigInt::remainder': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-remainder' + }, + 'BigInt::sameValue': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-sameValue' + }, + 'BigInt::sameValueZero': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-sameValueZero' + }, + 'BigInt::signedRightShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-signedRightShift' + }, + 'BigInt::subtract': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-subtract' + }, + 'BigInt::toString': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-tostring' + }, + 'BigInt::unaryMinus': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-unaryMinus' + }, + 'BigInt::unsignedRightShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-bigint-unsignedRightShift' + }, + BigIntBitwiseOp: { + url: 'https://262.ecma-international.org/13.0/#sec-bigintbitwiseop' + }, + BinaryAnd: { + url: 'https://262.ecma-international.org/13.0/#sec-binaryand' + }, + BinaryOr: { + url: 'https://262.ecma-international.org/13.0/#sec-binaryor' + }, + BinaryXor: { + url: 'https://262.ecma-international.org/13.0/#sec-binaryxor' + }, + BlockDeclarationInstantiation: { + url: 'https://262.ecma-international.org/13.0/#sec-blockdeclarationinstantiation' + }, + BoundFunctionCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-boundfunctioncreate' + }, + ByteListBitwiseOp: { + url: 'https://262.ecma-international.org/13.0/#sec-bytelistbitwiseop' + }, + ByteListEqual: { + url: 'https://262.ecma-international.org/13.0/#sec-bytelistequal' + }, + Call: { + url: 'https://262.ecma-international.org/13.0/#sec-call' + }, + Canonicalize: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-canonicalize-ch' + }, + CanonicalNumericIndexString: { + url: 'https://262.ecma-international.org/13.0/#sec-canonicalnumericindexstring' + }, + CaseClauseIsSelected: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-caseclauseisselected' + }, + CharacterRange: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-characterrange-abstract-operation' + }, + CharacterRangeOrUnion: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-characterrangeorunion-abstract-operation' + }, + CharacterSetMatcher: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation' + }, + clamp: { + url: 'https://262.ecma-international.org/13.0/#clamping' + }, + CleanupFinalizationRegistry: { + url: 'https://262.ecma-international.org/13.0/#sec-cleanup-finalization-registry' + }, + ClearKeptObjects: { + url: 'https://262.ecma-international.org/13.0/#sec-clear-kept-objects' + }, + CloneArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-clonearraybuffer' + }, + CodePointAt: { + url: 'https://262.ecma-international.org/13.0/#sec-codepointat' + }, + CodePointsToString: { + url: 'https://262.ecma-international.org/13.0/#sec-codepointstostring' + }, + CompletePropertyDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-completepropertydescriptor' + }, + Completion: { + url: 'https://262.ecma-international.org/13.0/#sec-completion-ao' + }, + CompletionRecord: { + url: 'https://262.ecma-international.org/13.0/#sec-completion-record-specification-type' + }, + ComposeWriteEventBytes: { + url: 'https://262.ecma-international.org/13.0/#sec-composewriteeventbytes' + }, + Construct: { + url: 'https://262.ecma-international.org/13.0/#sec-construct' + }, + CopyDataBlockBytes: { + url: 'https://262.ecma-international.org/13.0/#sec-copydatablockbytes' + }, + CopyDataProperties: { + url: 'https://262.ecma-international.org/13.0/#sec-copydataproperties' + }, + CreateArrayFromList: { + url: 'https://262.ecma-international.org/13.0/#sec-createarrayfromlist' + }, + CreateArrayIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createarrayiterator' + }, + CreateAsyncFromSyncIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createasyncfromsynciterator' + }, + CreateAsyncIteratorFromClosure: { + url: 'https://262.ecma-international.org/13.0/#sec-createasynciteratorfromclosure' + }, + CreateBuiltinFunction: { + url: 'https://262.ecma-international.org/13.0/#sec-createbuiltinfunction' + }, + CreateByteDataBlock: { + url: 'https://262.ecma-international.org/13.0/#sec-createbytedatablock' + }, + CreateDataProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-createdataproperty' + }, + CreateDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/13.0/#sec-createdatapropertyorthrow' + }, + CreateDynamicFunction: { + url: 'https://262.ecma-international.org/13.0/#sec-createdynamicfunction' + }, + CreateForInIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createforiniterator' + }, + CreateHTML: { + url: 'https://262.ecma-international.org/13.0/#sec-createhtml' + }, + CreateIntrinsics: { + url: 'https://262.ecma-international.org/13.0/#sec-createintrinsics' + }, + CreateIteratorFromClosure: { + url: 'https://262.ecma-international.org/13.0/#sec-createiteratorfromclosure' + }, + CreateIterResultObject: { + url: 'https://262.ecma-international.org/13.0/#sec-createiterresultobject' + }, + CreateListFromArrayLike: { + url: 'https://262.ecma-international.org/13.0/#sec-createlistfromarraylike' + }, + CreateListIteratorRecord: { + url: 'https://262.ecma-international.org/13.0/#sec-createlistiteratorRecord' + }, + CreateMapIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createmapiterator' + }, + CreateMappedArgumentsObject: { + url: 'https://262.ecma-international.org/13.0/#sec-createmappedargumentsobject' + }, + CreateMethodProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-createmethodproperty' + }, + CreateNonEnumerableDataPropertyOrThrow: { + url: 'https://262.ecma-international.org/13.0/#sec-createnonenumerabledatapropertyorthrow' + }, + CreatePerIterationEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-createperiterationenvironment' + }, + CreateRealm: { + url: 'https://262.ecma-international.org/13.0/#sec-createrealm' + }, + CreateRegExpStringIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createregexpstringiterator' + }, + CreateResolvingFunctions: { + url: 'https://262.ecma-international.org/13.0/#sec-createresolvingfunctions' + }, + CreateSetIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-createsetiterator' + }, + CreateSharedByteDataBlock: { + url: 'https://262.ecma-international.org/13.0/#sec-createsharedbytedatablock' + }, + CreateUnmappedArgumentsObject: { + url: 'https://262.ecma-international.org/13.0/#sec-createunmappedargumentsobject' + }, + DateFromTime: { + url: 'https://262.ecma-international.org/13.0/#sec-date-number' + }, + DateString: { + url: 'https://262.ecma-international.org/13.0/#sec-datestring' + }, + Day: { + url: 'https://262.ecma-international.org/13.0/#eqn-Day' + }, + DayFromYear: { + url: 'https://262.ecma-international.org/13.0/#eqn-DaysFromYear' + }, + DaysInYear: { + url: 'https://262.ecma-international.org/13.0/#eqn-DaysInYear' + }, + DayWithinYear: { + url: 'https://262.ecma-international.org/13.0/#eqn-DayWithinYear' + }, + Decode: { + url: 'https://262.ecma-international.org/13.0/#sec-decode' + }, + DefineField: { + url: 'https://262.ecma-international.org/13.0/#sec-definefield' + }, + DefineMethodProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-definemethodproperty' + }, + DefinePropertyOrThrow: { + url: 'https://262.ecma-international.org/13.0/#sec-definepropertyorthrow' + }, + DeletePropertyOrThrow: { + url: 'https://262.ecma-international.org/13.0/#sec-deletepropertyorthrow' + }, + DetachArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-detacharraybuffer' + }, + Encode: { + url: 'https://262.ecma-international.org/13.0/#sec-encode' + }, + EnterCriticalSection: { + url: 'https://262.ecma-international.org/13.0/#sec-entercriticalsection' + }, + EnumerableOwnPropertyNames: { + url: 'https://262.ecma-international.org/13.0/#sec-enumerableownpropertynames' + }, + EnumerateObjectProperties: { + url: 'https://262.ecma-international.org/13.0/#sec-enumerate-object-properties' + }, + EscapeRegExpPattern: { + url: 'https://262.ecma-international.org/13.0/#sec-escaperegexppattern' + }, + EvalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/13.0/#sec-evaldeclarationinstantiation' + }, + EvaluateCall: { + url: 'https://262.ecma-international.org/13.0/#sec-evaluatecall' + }, + EvaluateNew: { + url: 'https://262.ecma-international.org/13.0/#sec-evaluatenew' + }, + EvaluatePropertyAccessWithExpressionKey: { + url: 'https://262.ecma-international.org/13.0/#sec-evaluate-property-access-with-expression-key' + }, + EvaluatePropertyAccessWithIdentifierKey: { + url: 'https://262.ecma-international.org/13.0/#sec-evaluate-property-access-with-identifier-key' + }, + EvaluateStringOrNumericBinaryExpression: { + url: 'https://262.ecma-international.org/13.0/#sec-evaluatestringornumericbinaryexpression' + }, + EventSet: { + url: 'https://262.ecma-international.org/13.0/#sec-event-set' + }, + ExecuteAsyncModule: { + url: 'https://262.ecma-international.org/13.0/#sec-execute-async-module' + }, + FinishDynamicImport: { + url: 'https://262.ecma-international.org/13.0/#sec-finishdynamicimport' + }, + FlattenIntoArray: { + url: 'https://262.ecma-international.org/13.0/#sec-flattenintoarray' + }, + floor: { + url: 'https://262.ecma-international.org/13.0/#eqn-floor' + }, + ForBodyEvaluation: { + url: 'https://262.ecma-international.org/13.0/#sec-forbodyevaluation' + }, + 'ForIn/OfBodyEvaluation': { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset' + }, + 'ForIn/OfHeadEvaluation': { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-forinofheadevaluation' + }, + FromPropertyDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-frompropertydescriptor' + }, + FulfillPromise: { + url: 'https://262.ecma-international.org/13.0/#sec-fulfillpromise' + }, + FunctionDeclarationInstantiation: { + url: 'https://262.ecma-international.org/13.0/#sec-functiondeclarationinstantiation' + }, + GatherAvailableAncestors: { + url: 'https://262.ecma-international.org/13.0/#sec-gather-available-ancestors' + }, + GeneratorResume: { + url: 'https://262.ecma-international.org/13.0/#sec-generatorresume' + }, + GeneratorResumeAbrupt: { + url: 'https://262.ecma-international.org/13.0/#sec-generatorresumeabrupt' + }, + GeneratorStart: { + url: 'https://262.ecma-international.org/13.0/#sec-generatorstart' + }, + GeneratorValidate: { + url: 'https://262.ecma-international.org/13.0/#sec-generatorvalidate' + }, + GeneratorYield: { + url: 'https://262.ecma-international.org/13.0/#sec-generatoryield' + }, + Get: { + url: 'https://262.ecma-international.org/13.0/#sec-get-o-p' + }, + GetActiveScriptOrModule: { + url: 'https://262.ecma-international.org/13.0/#sec-getactivescriptormodule' + }, + GetFunctionRealm: { + url: 'https://262.ecma-international.org/13.0/#sec-getfunctionrealm' + }, + GetGeneratorKind: { + url: 'https://262.ecma-international.org/13.0/#sec-getgeneratorkind' + }, + GetGlobalObject: { + url: 'https://262.ecma-international.org/13.0/#sec-getglobalobject' + }, + GetIdentifierReference: { + url: 'https://262.ecma-international.org/13.0/#sec-getidentifierreference' + }, + GetIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-getiterator' + }, + GetMatchIndexPair: { + url: 'https://262.ecma-international.org/13.0/#sec-getmatchindexpair' + }, + GetMatchString: { + url: 'https://262.ecma-international.org/13.0/#sec-getmatchstring' + }, + GetMethod: { + url: 'https://262.ecma-international.org/13.0/#sec-getmethod' + }, + GetModifySetValueInBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-getmodifysetvalueinbuffer' + }, + GetModuleNamespace: { + url: 'https://262.ecma-international.org/13.0/#sec-getmodulenamespace' + }, + GetNewTarget: { + url: 'https://262.ecma-international.org/13.0/#sec-getnewtarget' + }, + GetOwnPropertyKeys: { + url: 'https://262.ecma-international.org/13.0/#sec-getownpropertykeys' + }, + GetPromiseResolve: { + url: 'https://262.ecma-international.org/13.0/#sec-getpromiseresolve' + }, + GetPrototypeFromConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-getprototypefromconstructor' + }, + GetStringIndex: { + url: 'https://262.ecma-international.org/13.0/#sec-getstringindex' + }, + GetSubstitution: { + url: 'https://262.ecma-international.org/13.0/#sec-getsubstitution' + }, + GetSuperConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-getsuperconstructor' + }, + GetTemplateObject: { + url: 'https://262.ecma-international.org/13.0/#sec-gettemplateobject' + }, + GetThisEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-getthisenvironment' + }, + GetThisValue: { + url: 'https://262.ecma-international.org/13.0/#sec-getthisvalue' + }, + GetV: { + url: 'https://262.ecma-international.org/13.0/#sec-getv' + }, + GetValue: { + url: 'https://262.ecma-international.org/13.0/#sec-getvalue' + }, + GetValueFromBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-getvaluefrombuffer' + }, + GetViewValue: { + url: 'https://262.ecma-international.org/13.0/#sec-getviewvalue' + }, + GetWaiterList: { + url: 'https://262.ecma-international.org/13.0/#sec-getwaiterlist' + }, + GlobalDeclarationInstantiation: { + url: 'https://262.ecma-international.org/13.0/#sec-globaldeclarationinstantiation' + }, + 'happens-before': { + url: 'https://262.ecma-international.org/13.0/#sec-happens-before' + }, + HasOwnProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-hasownproperty' + }, + HasProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-hasproperty' + }, + 'host-synchronizes-with': { + url: 'https://262.ecma-international.org/13.0/#sec-host-synchronizes-with' + }, + HostEventSet: { + url: 'https://262.ecma-international.org/13.0/#sec-hosteventset' + }, + HourFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-HourFromTime' + }, + IfAbruptCloseIterator: { + url: 'https://262.ecma-international.org/13.0/#sec-ifabruptcloseiterator' + }, + IfAbruptRejectPromise: { + url: 'https://262.ecma-international.org/13.0/#sec-ifabruptrejectpromise' + }, + ImportedLocalNames: { + url: 'https://262.ecma-international.org/13.0/#sec-importedlocalnames' + }, + InitializeBoundName: { + url: 'https://262.ecma-international.org/13.0/#sec-initializeboundname' + }, + InitializeHostDefinedRealm: { + url: 'https://262.ecma-international.org/13.0/#sec-initializehostdefinedrealm' + }, + InitializeInstanceElements: { + url: 'https://262.ecma-international.org/13.0/#sec-initializeinstanceelements' + }, + InitializeReferencedBinding: { + url: 'https://262.ecma-international.org/13.0/#sec-initializereferencedbinding' + }, + InitializeTypedArrayFromArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-initializetypedarrayfromarraybuffer' + }, + InitializeTypedArrayFromArrayLike: { + url: 'https://262.ecma-international.org/13.0/#sec-initializetypedarrayfromarraylike' + }, + InitializeTypedArrayFromList: { + url: 'https://262.ecma-international.org/13.0/#sec-initializetypedarrayfromlist' + }, + InitializeTypedArrayFromTypedArray: { + url: 'https://262.ecma-international.org/13.0/#sec-initializetypedarrayfromtypedarray' + }, + InLeapYear: { + url: 'https://262.ecma-international.org/13.0/#eqn-InLeapYear' + }, + InnerModuleEvaluation: { + url: 'https://262.ecma-international.org/13.0/#sec-innermoduleevaluation' + }, + InnerModuleLinking: { + url: 'https://262.ecma-international.org/13.0/#sec-InnerModuleLinking' + }, + InstallErrorCause: { + url: 'https://262.ecma-international.org/13.0/#sec-installerrorcause' + }, + InstanceofOperator: { + url: 'https://262.ecma-international.org/13.0/#sec-instanceofoperator' + }, + IntegerIndexedElementGet: { + url: 'https://262.ecma-international.org/13.0/#sec-integerindexedelementget' + }, + IntegerIndexedElementSet: { + url: 'https://262.ecma-international.org/13.0/#sec-integerindexedelementset' + }, + IntegerIndexedObjectCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-integerindexedobjectcreate' + }, + InternalizeJSONProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-internalizejsonproperty' + }, + Invoke: { + url: 'https://262.ecma-international.org/13.0/#sec-invoke' + }, + IsAccessorDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-isaccessordescriptor' + }, + IsAnonymousFunctionDefinition: { + url: 'https://262.ecma-international.org/13.0/#sec-isanonymousfunctiondefinition' + }, + IsArray: { + url: 'https://262.ecma-international.org/13.0/#sec-isarray' + }, + IsBigIntElementType: { + url: 'https://262.ecma-international.org/13.0/#sec-isbigintelementtype' + }, + IsCallable: { + url: 'https://262.ecma-international.org/13.0/#sec-iscallable' + }, + IsCompatiblePropertyDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-iscompatiblepropertydescriptor' + }, + IsConcatSpreadable: { + url: 'https://262.ecma-international.org/13.0/#sec-isconcatspreadable' + }, + IsConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-isconstructor' + }, + IsDataDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-isdatadescriptor' + }, + IsDetachedBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-isdetachedbuffer' + }, + IsExtensible: { + url: 'https://262.ecma-international.org/13.0/#sec-isextensible-o' + }, + IsGenericDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-isgenericdescriptor' + }, + IsInTailPosition: { + url: 'https://262.ecma-international.org/13.0/#sec-isintailposition' + }, + IsIntegralNumber: { + url: 'https://262.ecma-international.org/13.0/#sec-isintegralnumber' + }, + IsLabelledFunction: { + url: 'https://262.ecma-international.org/13.0/#sec-islabelledfunction' + }, + IsLessThan: { + url: 'https://262.ecma-international.org/13.0/#sec-islessthan' + }, + IsLooselyEqual: { + url: 'https://262.ecma-international.org/13.0/#sec-islooselyequal' + }, + IsNoTearConfiguration: { + url: 'https://262.ecma-international.org/13.0/#sec-isnotearconfiguration' + }, + IsPrivateReference: { + url: 'https://262.ecma-international.org/13.0/#sec-isprivatereference' + }, + IsPromise: { + url: 'https://262.ecma-international.org/13.0/#sec-ispromise' + }, + IsPropertyKey: { + url: 'https://262.ecma-international.org/13.0/#sec-ispropertykey' + }, + IsPropertyReference: { + url: 'https://262.ecma-international.org/13.0/#sec-ispropertyreference' + }, + IsRegExp: { + url: 'https://262.ecma-international.org/13.0/#sec-isregexp' + }, + IsSharedArrayBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-issharedarraybuffer' + }, + IsStrictlyEqual: { + url: 'https://262.ecma-international.org/13.0/#sec-isstrictlyequal' + }, + IsStringPrefix: { + url: 'https://262.ecma-international.org/13.0/#sec-isstringprefix' + }, + IsStringWellFormedUnicode: { + url: 'https://262.ecma-international.org/13.0/#sec-isstringwellformedunicode' + }, + IsSuperReference: { + url: 'https://262.ecma-international.org/13.0/#sec-issuperreference' + }, + IsUnclampedIntegerElementType: { + url: 'https://262.ecma-international.org/13.0/#sec-isunclampedintegerelementtype' + }, + IsUnresolvableReference: { + url: 'https://262.ecma-international.org/13.0/#sec-isunresolvablereference' + }, + IsUnsignedElementType: { + url: 'https://262.ecma-international.org/13.0/#sec-isunsignedelementtype' + }, + IsValidIntegerIndex: { + url: 'https://262.ecma-international.org/13.0/#sec-isvalidintegerindex' + }, + IsValidRegularExpressionLiteral: { + url: 'https://262.ecma-international.org/13.0/#sec-isvalidregularexpressionliteral' + }, + IsWordChar: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-iswordchar-abstract-operation' + }, + IterableToList: { + url: 'https://262.ecma-international.org/13.0/#sec-iterabletolist' + }, + IteratorClose: { + url: 'https://262.ecma-international.org/13.0/#sec-iteratorclose' + }, + IteratorComplete: { + url: 'https://262.ecma-international.org/13.0/#sec-iteratorcomplete' + }, + IteratorNext: { + url: 'https://262.ecma-international.org/13.0/#sec-iteratornext' + }, + IteratorStep: { + url: 'https://262.ecma-international.org/13.0/#sec-iteratorstep' + }, + IteratorValue: { + url: 'https://262.ecma-international.org/13.0/#sec-iteratorvalue' + }, + LeaveCriticalSection: { + url: 'https://262.ecma-international.org/13.0/#sec-leavecriticalsection' + }, + LengthOfArrayLike: { + url: 'https://262.ecma-international.org/13.0/#sec-lengthofarraylike' + }, + LocalTime: { + url: 'https://262.ecma-international.org/13.0/#sec-localtime' + }, + LocalTZA: { + url: 'https://262.ecma-international.org/13.0/#sec-local-time-zone-adjustment' + }, + LoopContinues: { + url: 'https://262.ecma-international.org/13.0/#sec-loopcontinues' + }, + MakeArgGetter: { + url: 'https://262.ecma-international.org/13.0/#sec-makearggetter' + }, + MakeArgSetter: { + url: 'https://262.ecma-international.org/13.0/#sec-makeargsetter' + }, + MakeBasicObject: { + url: 'https://262.ecma-international.org/13.0/#sec-makebasicobject' + }, + MakeClassConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-makeclassconstructor' + }, + MakeConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-makeconstructor' + }, + MakeDate: { + url: 'https://262.ecma-international.org/13.0/#sec-makedate' + }, + MakeDay: { + url: 'https://262.ecma-international.org/13.0/#sec-makeday' + }, + MakeMatchIndicesIndexPairArray: { + url: 'https://262.ecma-international.org/13.0/#sec-makematchindicesindexpairarray' + }, + MakeMethod: { + url: 'https://262.ecma-international.org/13.0/#sec-makemethod' + }, + MakePrivateReference: { + url: 'https://262.ecma-international.org/13.0/#sec-makeprivatereference' + }, + MakeSuperPropertyReference: { + url: 'https://262.ecma-international.org/13.0/#sec-makesuperpropertyreference' + }, + MakeTime: { + url: 'https://262.ecma-international.org/13.0/#sec-maketime' + }, + max: { + url: 'https://262.ecma-international.org/13.0/#eqn-max' + }, + 'memory-order': { + url: 'https://262.ecma-international.org/13.0/#sec-memory-order' + }, + min: { + url: 'https://262.ecma-international.org/13.0/#eqn-min' + }, + MinFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-MinFromTime' + }, + ModuleNamespaceCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-modulenamespacecreate' + }, + modulo: { + url: 'https://262.ecma-international.org/13.0/#eqn-modulo' + }, + MonthFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-MonthFromTime' + }, + msFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-msFromTime' + }, + NewDeclarativeEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newdeclarativeenvironment' + }, + NewFunctionEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newfunctionenvironment' + }, + NewGlobalEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newglobalenvironment' + }, + NewModuleEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newmoduleenvironment' + }, + NewObjectEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newobjectenvironment' + }, + NewPrivateEnvironment: { + url: 'https://262.ecma-international.org/13.0/#sec-newprivateenvironment' + }, + NewPromiseCapability: { + url: 'https://262.ecma-international.org/13.0/#sec-newpromisecapability' + }, + NewPromiseReactionJob: { + url: 'https://262.ecma-international.org/13.0/#sec-newpromisereactionjob' + }, + NewPromiseResolveThenableJob: { + url: 'https://262.ecma-international.org/13.0/#sec-newpromiseresolvethenablejob' + }, + NormalCompletion: { + url: 'https://262.ecma-international.org/13.0/#sec-normalcompletion' + }, + NotifyWaiter: { + url: 'https://262.ecma-international.org/13.0/#sec-notifywaiter' + }, + 'Number::add': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-add' + }, + 'Number::bitwiseAND': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-bitwiseAND' + }, + 'Number::bitwiseNOT': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-bitwiseNOT' + }, + 'Number::bitwiseOR': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-bitwiseOR' + }, + 'Number::bitwiseXOR': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-bitwiseXOR' + }, + 'Number::divide': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-divide' + }, + 'Number::equal': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-equal' + }, + 'Number::exponentiate': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-exponentiate' + }, + 'Number::leftShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-leftShift' + }, + 'Number::lessThan': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-lessThan' + }, + 'Number::multiply': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-multiply' + }, + 'Number::remainder': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-remainder' + }, + 'Number::sameValue': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-sameValue' + }, + 'Number::sameValueZero': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-sameValueZero' + }, + 'Number::signedRightShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-signedRightShift' + }, + 'Number::subtract': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-subtract' + }, + 'Number::toString': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-tostring' + }, + 'Number::unaryMinus': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-unaryMinus' + }, + 'Number::unsignedRightShift': { + url: 'https://262.ecma-international.org/13.0/#sec-numeric-types-number-unsignedRightShift' + }, + NumberBitwiseOp: { + url: 'https://262.ecma-international.org/13.0/#sec-numberbitwiseop' + }, + NumberToBigInt: { + url: 'https://262.ecma-international.org/13.0/#sec-numbertobigint' + }, + NumericToRawBytes: { + url: 'https://262.ecma-international.org/13.0/#sec-numerictorawbytes' + }, + ObjectDefineProperties: { + url: 'https://262.ecma-international.org/13.0/#sec-objectdefineproperties' + }, + OrdinaryCallBindThis: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarycallbindthis' + }, + OrdinaryCallEvaluateBody: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarycallevaluatebody' + }, + OrdinaryCreateFromConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarycreatefromconstructor' + }, + OrdinaryDefineOwnProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarydefineownproperty' + }, + OrdinaryDelete: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarydelete' + }, + OrdinaryFunctionCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryfunctioncreate' + }, + OrdinaryGet: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryget' + }, + OrdinaryGetOwnProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarygetownproperty' + }, + OrdinaryGetPrototypeOf: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarygetprototypeof' + }, + OrdinaryHasInstance: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryhasinstance' + }, + OrdinaryHasProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryhasproperty' + }, + OrdinaryIsExtensible: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryisextensible' + }, + OrdinaryObjectCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryobjectcreate' + }, + OrdinaryOwnPropertyKeys: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryownpropertykeys' + }, + OrdinaryPreventExtensions: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarypreventextensions' + }, + OrdinarySet: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinaryset' + }, + OrdinarySetPrototypeOf: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarysetprototypeof' + }, + OrdinarySetWithOwnDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarysetwithowndescriptor' + }, + OrdinaryToPrimitive: { + url: 'https://262.ecma-international.org/13.0/#sec-ordinarytoprimitive' + }, + ParseModule: { + url: 'https://262.ecma-international.org/13.0/#sec-parsemodule' + }, + ParsePattern: { + url: 'https://262.ecma-international.org/13.0/#sec-parsepattern' + }, + ParseScript: { + url: 'https://262.ecma-international.org/13.0/#sec-parse-script' + }, + ParseText: { + url: 'https://262.ecma-international.org/13.0/#sec-parsetext' + }, + PerformEval: { + url: 'https://262.ecma-international.org/13.0/#sec-performeval' + }, + PerformPromiseAll: { + url: 'https://262.ecma-international.org/13.0/#sec-performpromiseall' + }, + PerformPromiseAllSettled: { + url: 'https://262.ecma-international.org/13.0/#sec-performpromiseallsettled' + }, + PerformPromiseAny: { + url: 'https://262.ecma-international.org/13.0/#sec-performpromiseany' + }, + PerformPromiseRace: { + url: 'https://262.ecma-international.org/13.0/#sec-performpromiserace' + }, + PerformPromiseThen: { + url: 'https://262.ecma-international.org/13.0/#sec-performpromisethen' + }, + PrepareForOrdinaryCall: { + url: 'https://262.ecma-international.org/13.0/#sec-prepareforordinarycall' + }, + PrepareForTailCall: { + url: 'https://262.ecma-international.org/13.0/#sec-preparefortailcall' + }, + PrivateElementFind: { + url: 'https://262.ecma-international.org/13.0/#sec-privateelementfind' + }, + PrivateFieldAdd: { + url: 'https://262.ecma-international.org/13.0/#sec-privatefieldadd' + }, + PrivateGet: { + url: 'https://262.ecma-international.org/13.0/#sec-privateget' + }, + PrivateMethodOrAccessorAdd: { + url: 'https://262.ecma-international.org/13.0/#sec-privatemethodoraccessoradd' + }, + PrivateSet: { + url: 'https://262.ecma-international.org/13.0/#sec-privateset' + }, + PromiseResolve: { + url: 'https://262.ecma-international.org/13.0/#sec-promise-resolve' + }, + ProxyCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-proxycreate' + }, + PutValue: { + url: 'https://262.ecma-international.org/13.0/#sec-putvalue' + }, + QuoteJSONString: { + url: 'https://262.ecma-international.org/13.0/#sec-quotejsonstring' + }, + RawBytesToNumeric: { + url: 'https://262.ecma-international.org/13.0/#sec-rawbytestonumeric' + }, + 'reads-bytes-from': { + url: 'https://262.ecma-international.org/13.0/#sec-reads-bytes-from' + }, + 'reads-from': { + url: 'https://262.ecma-international.org/13.0/#sec-reads-from' + }, + RegExpAlloc: { + url: 'https://262.ecma-international.org/13.0/#sec-regexpalloc' + }, + RegExpBuiltinExec: { + url: 'https://262.ecma-international.org/13.0/#sec-regexpbuiltinexec' + }, + RegExpCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-regexpcreate' + }, + RegExpExec: { + url: 'https://262.ecma-international.org/13.0/#sec-regexpexec' + }, + RegExpHasFlag: { + url: 'https://262.ecma-international.org/13.0/#sec-regexphasflag' + }, + RegExpInitialize: { + url: 'https://262.ecma-international.org/13.0/#sec-regexpinitialize' + }, + RejectPromise: { + url: 'https://262.ecma-international.org/13.0/#sec-rejectpromise' + }, + RemoveWaiter: { + url: 'https://262.ecma-international.org/13.0/#sec-removewaiter' + }, + RemoveWaiters: { + url: 'https://262.ecma-international.org/13.0/#sec-removewaiters' + }, + RepeatMatcher: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-repeatmatcher-abstract-operation' + }, + RequireInternalSlot: { + url: 'https://262.ecma-international.org/13.0/#sec-requireinternalslot' + }, + RequireObjectCoercible: { + url: 'https://262.ecma-international.org/13.0/#sec-requireobjectcoercible' + }, + ResolveBinding: { + url: 'https://262.ecma-international.org/13.0/#sec-resolvebinding' + }, + ResolvePrivateIdentifier: { + url: 'https://262.ecma-international.org/13.0/#sec-resolve-private-identifier' + }, + ResolveThisBinding: { + url: 'https://262.ecma-international.org/13.0/#sec-resolvethisbinding' + }, + ReturnIfAbrupt: { + url: 'https://262.ecma-international.org/13.0/#sec-returnifabrupt' + }, + RoundMVResult: { + url: 'https://262.ecma-international.org/13.0/#sec-roundmvresult' + }, + SameValue: { + url: 'https://262.ecma-international.org/13.0/#sec-samevalue' + }, + SameValueNonNumeric: { + url: 'https://262.ecma-international.org/13.0/#sec-samevaluenonnumeric' + }, + SameValueZero: { + url: 'https://262.ecma-international.org/13.0/#sec-samevaluezero' + }, + ScriptEvaluation: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-scriptevaluation' + }, + SecFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-SecFromTime' + }, + SerializeJSONArray: { + url: 'https://262.ecma-international.org/13.0/#sec-serializejsonarray' + }, + SerializeJSONObject: { + url: 'https://262.ecma-international.org/13.0/#sec-serializejsonobject' + }, + SerializeJSONProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-serializejsonproperty' + }, + Set: { + url: 'https://262.ecma-international.org/13.0/#sec-set-o-p-v-throw' + }, + SetDefaultGlobalBindings: { + url: 'https://262.ecma-international.org/13.0/#sec-setdefaultglobalbindings' + }, + SetFunctionLength: { + url: 'https://262.ecma-international.org/13.0/#sec-setfunctionlength' + }, + SetFunctionName: { + url: 'https://262.ecma-international.org/13.0/#sec-setfunctionname' + }, + SetImmutablePrototype: { + url: 'https://262.ecma-international.org/13.0/#sec-set-immutable-prototype' + }, + SetIntegrityLevel: { + url: 'https://262.ecma-international.org/13.0/#sec-setintegritylevel' + }, + SetRealmGlobalObject: { + url: 'https://262.ecma-international.org/13.0/#sec-setrealmglobalobject' + }, + SetTypedArrayFromArrayLike: { + url: 'https://262.ecma-international.org/13.0/#sec-settypedarrayfromarraylike' + }, + SetTypedArrayFromTypedArray: { + url: 'https://262.ecma-international.org/13.0/#sec-settypedarrayfromtypedarray' + }, + SetValueInBuffer: { + url: 'https://262.ecma-international.org/13.0/#sec-setvalueinbuffer' + }, + SetViewValue: { + url: 'https://262.ecma-international.org/13.0/#sec-setviewvalue' + }, + SharedDataBlockEventSet: { + url: 'https://262.ecma-international.org/13.0/#sec-sharedatablockeventset' + }, + SortIndexedProperties: { + url: 'https://262.ecma-international.org/13.0/#sec-sortindexedproperties' + }, + SpeciesConstructor: { + url: 'https://262.ecma-international.org/13.0/#sec-speciesconstructor' + }, + StringCreate: { + url: 'https://262.ecma-international.org/13.0/#sec-stringcreate' + }, + StringGetOwnProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-stringgetownproperty' + }, + StringIndexOf: { + url: 'https://262.ecma-international.org/13.0/#sec-stringindexof' + }, + StringPad: { + url: 'https://262.ecma-international.org/13.0/#sec-stringpad' + }, + StringToBigInt: { + url: 'https://262.ecma-international.org/13.0/#sec-stringtobigint' + }, + StringToCodePoints: { + url: 'https://262.ecma-international.org/13.0/#sec-stringtocodepoints' + }, + StringToNumber: { + url: 'https://262.ecma-international.org/13.0/#sec-stringtonumber' + }, + substring: { + url: 'https://262.ecma-international.org/13.0/#substring' + }, + SuspendAgent: { + url: 'https://262.ecma-international.org/13.0/#sec-suspendagent' + }, + SymbolDescriptiveString: { + url: 'https://262.ecma-international.org/13.0/#sec-symboldescriptivestring' + }, + 'synchronizes-with': { + url: 'https://262.ecma-international.org/13.0/#sec-synchronizes-with' + }, + TestIntegrityLevel: { + url: 'https://262.ecma-international.org/13.0/#sec-testintegritylevel' + }, + thisBigIntValue: { + url: 'https://262.ecma-international.org/13.0/#thisbigintvalue' + }, + thisBooleanValue: { + url: 'https://262.ecma-international.org/13.0/#thisbooleanvalue' + }, + thisNumberValue: { + url: 'https://262.ecma-international.org/13.0/#thisnumbervalue' + }, + thisStringValue: { + url: 'https://262.ecma-international.org/13.0/#thisstringvalue' + }, + thisSymbolValue: { + url: 'https://262.ecma-international.org/13.0/#thissymbolvalue' + }, + thisTimeValue: { + url: 'https://262.ecma-international.org/13.0/#thistimevalue' + }, + ThrowCompletion: { + url: 'https://262.ecma-international.org/13.0/#sec-throwcompletion' + }, + TimeClip: { + url: 'https://262.ecma-international.org/13.0/#sec-timeclip' + }, + TimeFromYear: { + url: 'https://262.ecma-international.org/13.0/#eqn-TimeFromYear' + }, + TimeString: { + url: 'https://262.ecma-international.org/13.0/#sec-timestring' + }, + TimeWithinDay: { + url: 'https://262.ecma-international.org/13.0/#eqn-TimeWithinDay' + }, + TimeZoneString: { + url: 'https://262.ecma-international.org/13.0/#sec-timezoneestring' + }, + ToBigInt: { + url: 'https://262.ecma-international.org/13.0/#sec-tobigint' + }, + ToBigInt64: { + url: 'https://262.ecma-international.org/13.0/#sec-tobigint64' + }, + ToBigUint64: { + url: 'https://262.ecma-international.org/13.0/#sec-tobiguint64' + }, + ToBoolean: { + url: 'https://262.ecma-international.org/13.0/#sec-toboolean' + }, + ToDateString: { + url: 'https://262.ecma-international.org/13.0/#sec-todatestring' + }, + ToIndex: { + url: 'https://262.ecma-international.org/13.0/#sec-toindex' + }, + ToInt16: { + url: 'https://262.ecma-international.org/13.0/#sec-toint16' + }, + ToInt32: { + url: 'https://262.ecma-international.org/13.0/#sec-toint32' + }, + ToInt8: { + url: 'https://262.ecma-international.org/13.0/#sec-toint8' + }, + ToIntegerOrInfinity: { + url: 'https://262.ecma-international.org/13.0/#sec-tointegerorinfinity' + }, + ToLength: { + url: 'https://262.ecma-international.org/13.0/#sec-tolength' + }, + ToNumber: { + url: 'https://262.ecma-international.org/13.0/#sec-tonumber' + }, + ToNumeric: { + url: 'https://262.ecma-international.org/13.0/#sec-tonumeric' + }, + ToObject: { + url: 'https://262.ecma-international.org/13.0/#sec-toobject' + }, + ToPrimitive: { + url: 'https://262.ecma-international.org/13.0/#sec-toprimitive' + }, + ToPropertyDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-topropertydescriptor' + }, + ToPropertyKey: { + url: 'https://262.ecma-international.org/13.0/#sec-topropertykey' + }, + ToString: { + url: 'https://262.ecma-international.org/13.0/#sec-tostring' + }, + ToUint16: { + url: 'https://262.ecma-international.org/13.0/#sec-touint16' + }, + ToUint32: { + url: 'https://262.ecma-international.org/13.0/#sec-touint32' + }, + ToUint8: { + url: 'https://262.ecma-international.org/13.0/#sec-touint8' + }, + ToUint8Clamp: { + url: 'https://262.ecma-international.org/13.0/#sec-touint8clamp' + }, + ToZeroPaddedDecimalString: { + url: 'https://262.ecma-international.org/13.0/#sec-tozeropaddeddecimalstring' + }, + TriggerPromiseReactions: { + url: 'https://262.ecma-international.org/13.0/#sec-triggerpromisereactions' + }, + TrimString: { + url: 'https://262.ecma-international.org/13.0/#sec-trimstring' + }, + Type: { + url: 'https://262.ecma-international.org/13.0/#sec-ecmascript-data-types-and-values' + }, + TypedArrayCreate: { + url: 'https://262.ecma-international.org/13.0/#typedarray-create' + }, + TypedArrayElementSize: { + url: 'https://262.ecma-international.org/13.0/#sec-typedarrayelementsize' + }, + TypedArrayElementType: { + url: 'https://262.ecma-international.org/13.0/#sec-typedarrayelementtype' + }, + TypedArraySpeciesCreate: { + url: 'https://262.ecma-international.org/13.0/#typedarray-species-create' + }, + UnicodeEscape: { + url: 'https://262.ecma-international.org/13.0/#sec-unicodeescape' + }, + UnicodeMatchProperty: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-unicodematchproperty-p' + }, + UnicodeMatchPropertyValue: { + url: 'https://262.ecma-international.org/13.0/#sec-runtime-semantics-unicodematchpropertyvalue-p-v' + }, + UpdateEmpty: { + url: 'https://262.ecma-international.org/13.0/#sec-updateempty' + }, + UTC: { + url: 'https://262.ecma-international.org/13.0/#sec-utc-t' + }, + UTF16EncodeCodePoint: { + url: 'https://262.ecma-international.org/13.0/#sec-utf16encodecodepoint' + }, + UTF16SurrogatePairToCodePoint: { + url: 'https://262.ecma-international.org/13.0/#sec-utf16decodesurrogatepair' + }, + ValidateAndApplyPropertyDescriptor: { + url: 'https://262.ecma-international.org/13.0/#sec-validateandapplypropertydescriptor' + }, + ValidateAtomicAccess: { + url: 'https://262.ecma-international.org/13.0/#sec-validateatomicaccess' + }, + ValidateIntegerTypedArray: { + url: 'https://262.ecma-international.org/13.0/#sec-validateintegertypedarray' + }, + ValidateTypedArray: { + url: 'https://262.ecma-international.org/13.0/#sec-validatetypedarray' + }, + ValueOfReadEvent: { + url: 'https://262.ecma-international.org/13.0/#sec-valueofreadevent' + }, + WeakRefDeref: { + url: 'https://262.ecma-international.org/13.0/#sec-weakrefderef' + }, + WeekDay: { + url: 'https://262.ecma-international.org/13.0/#sec-week-day' + }, + YearFromTime: { + url: 'https://262.ecma-international.org/13.0/#eqn-YearFromTime' + }, + Yield: { + url: 'https://262.ecma-international.org/13.0/#sec-yield' + } +}; diff --git a/node_modules/es-abstract/package.json b/node_modules/es-abstract/package.json index 142f8db1b..917c12b8a 100644 --- a/node_modules/es-abstract/package.json +++ b/node_modules/es-abstract/package.json @@ -1,6 +1,6 @@ { "name": "es-abstract", - "version": "1.18.3", + "version": "1.21.1", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", @@ -19,25 +19,16 @@ "description": "ECMAScript spec abstract operations.", "license": "MIT", "main": "index.js", - "type": "commonjs", - "exports": { - ".": "./index.js", - "./package.json": "./package.json", - "./2020/*": "./2020/*.js", - "./2019/*": "./2019/*.js", - "./2018/*": "./2018/*.js", - "./2017/*": "./2017/*.js", - "./2016/*": "./2016/*.js", - "./2015/*": "./2015/*.js", - "./helpers/*": "./helpers/*.js", - "./5/*": "./5/*.js", - "./": "./" + "browser": { + "worker_threads": false }, + "type": "commonjs", "sideEffects": false, "scripts": { "prespackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs rm || true", "spackle": "node operations/spackle 1", "postspackle": "git ls-files | xargs git check-attr spackled | grep -v 'unspecified$' | cut -d: -f1 | xargs git add", + "prepack": "npmignore --auto --commentLines=autogenerated", "prepublish": "not-in-publish || npm run prepublishOnly", "prepublishOnly": "safe-publish-latest && npm run spackle", "pretest": "npm run lint", @@ -46,7 +37,7 @@ "posttest": "aud --production", "tests-only": "nyc node test", "lint": "eslint .", - "eccheck": "eclint check *.js **/*.js > /dev/null" + "eccheck": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')" }, "repository": { "type": "git", @@ -64,46 +55,70 @@ "ES7" ], "dependencies": { + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", - "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", - "object-inspect": "^1.10.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.4", + "is-array-buffer": "^3.0.1", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" }, "devDependencies": { - "@ljharb/eslint-config": "^17.6.0", - "array.prototype.indexof": "^1.0.2", - "aud": "^1.1.5", + "@ljharb/eslint-config": "^21.0.1", + "array.from": "^1.1.3", + "array.prototype.filter": "^1.0.2", + "array.prototype.flatmap": "^1.3.1", + "array.prototype.indexof": "^1.0.5", + "aud": "^2.0.2", + "available-regexp-flags": "^1.0.0", "cheerio": "=1.0.0-rc.3", - "diff": "^5.0.0", + "diff": "^5.1.0", "eclint": "^2.8.1", - "es-value-fixtures": "^1.2.1", - "eslint": "^7.27.0", - "foreach": "^2.0.5", - "functions-have-names": "^1.2.2", - "has-bigints": "^1.0.1", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "functions-have-names": "^1.2.3", + "has-bigints": "^1.0.2", "has-strict-mode": "^1.0.1", "in-publish": "^2.0.1", + "is-core-module": "^2.11.0", "make-arrow-function": "^1.2.0", "make-async-function": "^1.0.0", "make-async-generator-function": "^1.0.0", "make-generator-function": "^2.0.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "object.fromentries": "^2.0.4", - "safe-publish-latest": "^1.1.4", + "object.fromentries": "^2.0.6", + "safe-publish-latest": "^2.0.0", "ses": "^0.10.4", - "tape": "^5.2.2" + "tape": "^5.6.1" }, "testling": { "files": "test/index.js", @@ -126,10 +141,17 @@ "engines": { "node": ">= 0.4" }, - "greenkeeper": { - "//": "nyc is ignored because it requires node 4+, and we support older than that", + "publishConfig": { "ignore": [ - "nyc" + ".github", + "", + "# dev scripts", + "operations/*.js", + "!operations/20*.js", + "", + "test/", + "", + ".gitattributes" ] } } diff --git a/node_modules/es-abstract/test/GetIntrinsic.js b/node_modules/es-abstract/test/GetIntrinsic.js deleted file mode 100644 index 2f21e7647..000000000 --- a/node_modules/es-abstract/test/GetIntrinsic.js +++ /dev/null @@ -1,207 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('get-intrinsic'); - -var test = require('tape'); -var forEach = require('foreach'); -var debug = require('object-inspect'); -var generatorFns = require('make-generator-function')(); -var asyncFns = require('make-async-function').list(); -var asyncGenFns = require('make-async-generator-function')(); - -var callBound = require('call-bind/callBound'); -var v = require('es-value-fixtures'); -var $gOPD = require('../helpers/getOwnPropertyDescriptor'); -var defineProperty = require('./helpers/defineProperty'); - -var $isProto = callBound('%Object.prototype.isPrototypeOf%'); - -test('export', function (t) { - t.equal(typeof GetIntrinsic, 'function', 'it is a function'); - t.equal(GetIntrinsic.length, 2, 'function has length of 2'); - - t.end(); -}); - -test('throws', function (t) { - t['throws']( - function () { GetIntrinsic('not an intrinsic'); }, - SyntaxError, - 'nonexistent intrinsic throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic(''); }, - TypeError, - 'empty string intrinsic throws a type error' - ); - - t['throws']( - function () { GetIntrinsic('.'); }, - SyntaxError, - '"just a dot" intrinsic throws a syntax error' - ); - - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { GetIntrinsic(nonString); }, - TypeError, - debug(nonString) + ' is not a String' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { GetIntrinsic('%', nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - forEach([ - 'toString', - 'propertyIsEnumerable', - 'hasOwnProperty' - ], function (objectProtoMember) { - t['throws']( - function () { GetIntrinsic(objectProtoMember); }, - SyntaxError, - debug(objectProtoMember) + ' is not an intrinsic' - ); - }); - - t.end(); -}); - -test('base intrinsics', function (t) { - t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); - t.equal(GetIntrinsic('Object'), Object, 'Object yields Object'); - t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); - t.equal(GetIntrinsic('Array'), Array, 'Array yields Array'); - - t.end(); -}); - -test('dotted paths', function (t) { - t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); - t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString'); - t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); - t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push'); - - test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { - var original = GetIntrinsic('%ObjProto_toString%'); - - forEach([ - '%Object.prototype.toString%', - 'Object.prototype.toString', - '%ObjectPrototype.toString%', - 'ObjectPrototype.toString', - '%ObjProto_toString%', - 'ObjProto_toString' - ], function (name) { - defineProperty(Object.prototype, 'toString', { - value: function toString() { - return original.apply(this, arguments); - } - }); - st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); - }); - - defineProperty(Object.prototype, 'toString', { value: original }); - st.end(); - }); - - test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { - var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%'); - - forEach([ - '%Object.prototype.propertyIsEnumerable%', - 'Object.prototype.propertyIsEnumerable', - '%ObjectPrototype.propertyIsEnumerable%', - 'ObjectPrototype.propertyIsEnumerable' - ], function (name) { - // eslint-disable-next-line no-extend-native - Object.prototype.propertyIsEnumerable = function propertyIsEnumerable() { - return original.apply(this, arguments); - }; - st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); - }); - - // eslint-disable-next-line no-extend-native - Object.prototype.propertyIsEnumerable = original; - st.end(); - }); - - test('dotted path reports correct error', function (st) { - st['throws'](function () { - GetIntrinsic('%NonExistentIntrinsic.prototype.property%'); - }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%'); - - st['throws'](function () { - GetIntrinsic('%NonExistentIntrinsicPrototype.property%'); - }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%'); - - st.end(); - }); - - t.end(); -}); - -test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) { - var actual = $gOPD(Map.prototype, 'size'); - t.ok(actual, 'Map.prototype.size has a descriptor'); - t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); - t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); - t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it'); - - t.end(); -}); - -test('generator functions', { skip: !generatorFns.length }, function (t) { - var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%'); - var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%'); - var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%'); - - forEach(generatorFns, function (genFn) { - var fnName = genFn.name; - fnName = fnName ? "'" + fnName + "'" : 'genFn'; - - t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%'); - t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName); - t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype'); - }); - - t.end(); -}); - -test('async functions', { skip: !asyncFns.length }, function (t) { - var $AsyncFunction = GetIntrinsic('%AsyncFunction%'); - var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%'); - - forEach(asyncFns, function (asyncFn) { - var fnName = asyncFn.name; - fnName = fnName ? "'" + fnName + "'" : 'asyncFn'; - - t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%'); - t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName); - }); - - t.end(); -}); - -test('async generator functions', { skip: !asyncGenFns.length }, function (t) { - var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%'); - var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%'); - var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%'); - - forEach(asyncGenFns, function (asyncGenFn) { - var fnName = asyncGenFn.name; - fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn'; - - t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%'); - t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName); - t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype'); - }); - - t.end(); -}); diff --git a/node_modules/es-abstract/test/diffOps.js b/node_modules/es-abstract/test/diffOps.js deleted file mode 100644 index 06641b187..000000000 --- a/node_modules/es-abstract/test/diffOps.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -var keys = require('object-keys'); -var forEach = require('foreach'); -var indexOf = require('array.prototype.indexof'); -var has = require('has'); - -module.exports = function diffOperations(actual, expected, expectedMissing) { - var actualKeys = keys(actual); - var expectedKeys = keys(expected); - - var extra = []; - var missing = []; - var extraMissing = []; - - forEach(actualKeys, function (op) { - if (!(op in expected)) { - if (actual[op] && typeof actual[op] === 'object') { - forEach(keys(actual[op]), function (nestedOp) { - var fullNestedOp = op + '::' + nestedOp; - if (!(fullNestedOp in expected)) { - extra.push(fullNestedOp); - } else if (indexOf(expectedMissing, fullNestedOp) !== -1) { - extra.push(fullNestedOp); - } - }); - } else { - extra.push(op); - } - } else if (indexOf(expectedMissing, op) !== -1) { - extra.push(op); - } - }); - var checkMissing = function checkMissing(op, actualValue) { - if (typeof actualValue !== 'function' && indexOf(expectedMissing, op) === -1) { - missing.push(op); - } - }; - forEach(expectedKeys, function (op) { - if (op.indexOf('::') > -1) { - var parts = op.split('::'); - var value = actual[parts[0]]; - if (value && typeof value === 'object' && typeof value[parts[1]] === 'function') { - checkMissing(op, value[parts[1]]); - } - } else { - checkMissing(op, actual[op]); - } - }); - - forEach(expectedMissing, function (expectedOp) { - if (!has(expected, expectedOp)) { - extraMissing.push(expectedOp); - } - }); - - return { missing: missing, extra: extra, extraMissing: extraMissing }; -}; diff --git a/node_modules/es-abstract/test/es2015.js b/node_modules/es-abstract/test/es2015.js deleted file mode 100644 index 33a8ead4c..000000000 --- a/node_modules/es-abstract/test/es2015.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict'; - -var ES = require('../').ES2015; -var boundES = require('./helpers/createBoundESNamespace')(ES); - -var ops = require('../operations/2015'); - -var expectedMissing = [ - 'AddRestrictedFunctionProperties', - 'AllocateArrayBuffer', - 'AllocateTypedArray', - 'BoundFunctionCreate', - 'Canonicalize', - 'CharacterRange', - 'CharacterSetMatcher', - 'CloneArrayBuffer', - 'Completion', - 'Construct', - 'CopyDataBlockBytes', - 'CreateArrayFromList', - 'CreateArrayIterator', - 'CreateBuiltinFunction', - 'CreateByteDataBlock', - 'CreateDynamicFunction', - 'CreateIntrinsics', - 'CreateListIterator', - 'CreateMapIterator', - 'CreateMappedArgumentsObject', - 'CreatePerIterationEnvironment', - 'CreateRealm', - 'CreateSetIterator', - 'CreateUnmappedArgumentsObject', - 'DaylightSavingTA', - 'Decode', - 'DetachArrayBuffer', - 'Encode', - 'EnqueueJob', - 'EscapeRegExpPattern', - 'EvalDeclarationInstantiation', - 'EvaluateCall', - 'EvaluateDirectCall', - 'EvaluateNew', - 'ForBodyEvaluation', - 'ForIn/OfBodyEvaluation', - 'ForIn/OfHeadEvaluation', - 'FulfillPromise', - 'FunctionAllocate', - 'FunctionCreate', - 'FunctionInitialize', - 'GeneratorFunctionCreate', - 'GeneratorResume', - 'GeneratorResumeAbrupt', - 'GeneratorStart', - 'GeneratorValidate', - 'GeneratorYield', - 'GetBase', - 'GetFunctionRealm', - 'GetGlobalObject', - 'GetIdentifierReference', - 'GetModuleNamespace', - 'GetNewTarget', - 'GetReferencedName', - 'GetSuperConstructor', - 'GetTemplateObject', - 'GetThisEnvironment', - 'GetThisValue', - 'GetValue', - 'GetValueFromBuffer', - 'GetViewValue', - 'HasPrimitiveBase', - 'HostResolveImportedModule', - 'ImportedLocalNames', - 'InitializeHostDefinedRealm', - 'InitializeReferencedBinding', - 'IntegerIndexedElementGet', - 'IntegerIndexedElementSet', - 'IntegerIndexedObjectCreate', - 'InternalizeJSONProperty', - 'IsAnonymousFunctionDefinition', - 'IsCompatiblePropertyDescriptor', - 'IsDetachedBuffer', - 'IsInTailPosition', - 'IsLabelledFunction', - 'IsPropertyReference', - 'IsStrictReference', - 'IsSuperReference', - 'IsUnresolvableReference', - 'IsWordChar', - 'LocalTime', - 'LoopContinues', - 'MakeArgGetter', - 'MakeArgSetter', - 'MakeClassConstructor', - 'MakeConstructor', - 'MakeMethod', - 'MakeSuperPropertyReference', - 'max', - 'min', - 'ModuleNamespaceCreate', - 'msPerDay', // constant - 'NewDeclarativeEnvironment', - 'NewFunctionEnvironment', - 'NewGlobalEnvironment', - 'NewModuleEnvironment', - 'NewObjectEnvironment', - 'NewPromiseCapability', - 'NormalCompletion', - 'ObjectDefineProperties', - 'OrdinaryCallBindThis', - 'OrdinaryCallEvaluateBody', - 'ParseModule', - 'PerformEval', - 'PerformPromiseAll', - 'PerformPromiseRace', - 'PerformPromiseThen', - 'PrepareForOrdinaryCall', - 'PrepareForTailCall', - 'ProxyCreate', - 'PutValue', // takes a Reference - 'RegExpAlloc', // creates a regex with uninitialized internal lots - 'RegExpBuiltinExec', - 'RegExpInitialize', // initializes allocated regex's internal slots - 'RejectPromise', - 'RepeatMatcher', - 'ResolveBinding', - 'ResolveThisBinding', - 'SerializeJSONArray', - 'SerializeJSONObject', - 'SerializeJSONProperty', - 'SetDefaultGlobalBindings', - 'SetRealmGlobalObject', - 'SetValueInBuffer', - 'SetViewValue', - 'sign', - 'SortCompare', // mystery access to `comparefn` arg - 'TriggerPromiseReactions', - 'TypedArrayFrom', - 'UpdateEmpty', // completion records - 'UTC' // depends on LocalTZA, DaylightSavingTA -]; - -require('./tests').es2015(boundES, ops, expectedMissing); - -require('./helpers/runManifestTest')(require('tape'), ES, 2015); diff --git a/node_modules/es-abstract/test/es2016.js b/node_modules/es-abstract/test/es2016.js deleted file mode 100644 index c813ac530..000000000 --- a/node_modules/es-abstract/test/es2016.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; - -var ES = require('../').ES2016; -var boundES = require('./helpers/createBoundESNamespace')(ES); - -var ops = require('../operations/2016'); - -var expectedMissing = [ - 'AddRestrictedFunctionProperties', - 'AllocateArrayBuffer', - 'AllocateTypedArray', - 'AllocateTypedArrayBuffer', - 'BlockDeclarationInstantiation', - 'BoundFunctionCreate', - 'Canonicalize', - 'CharacterRange', - 'CharacterRangeOrUnion', - 'CharacterSetMatcher', - 'CloneArrayBuffer', - 'Completion', - 'Construct', - 'CopyDataBlockBytes', - 'CreateArrayFromList', - 'CreateArrayIterator', - 'CreateBuiltinFunction', - 'CreateByteDataBlock', - 'CreateDynamicFunction', - 'CreateIntrinsics', - 'CreateListIterator', - 'CreateMapIterator', - 'CreateMappedArgumentsObject', - 'CreatePerIterationEnvironment', - 'CreateRealm', - 'CreateResolvingFunctions', - 'CreateSetIterator', - 'CreateStringIterator', - 'CreateUnmappedArgumentsObject', - 'DaylightSavingTA', - 'Decode', - 'DetachArrayBuffer', - 'Encode', - 'EnqueueJob', - 'EnumerateObjectProperties', - 'EscapeRegExpPattern', - 'EvalDeclarationInstantiation', - 'EvaluateCall', - 'EvaluateDirectCall', - 'EvaluateNew', - 'ForBodyEvaluation', - 'ForIn/OfBodyEvaluation', - 'ForIn/OfHeadEvaluation', - 'FulfillPromise', - 'FunctionAllocate', - 'FunctionCreate', - 'FunctionDeclarationInstantiation', - 'FunctionInitialize', - 'GeneratorFunctionCreate', - 'GeneratorResume', - 'GeneratorResumeAbrupt', - 'GeneratorStart', - 'GeneratorValidate', - 'GeneratorYield', - 'GetActiveScriptOrModule', - 'GetFunctionRealm', - 'GetGlobalObject', - 'GetIdentifierReference', - 'GetModuleNamespace', - 'GetNewTarget', - 'GetSuperConstructor', - 'GetTemplateObject', - 'GetThisEnvironment', - 'GetThisValue', - 'GetValue', - 'GetValueFromBuffer', - 'GetViewValue', - 'GlobalDeclarationInstantiation', - 'HostPromiseRejectionTracker', - 'HostReportErrors', - 'HostResolveImportedModule', - 'IfAbruptRejectPromise', - 'ImportedLocalNames', - 'InitializeBoundName', - 'InitializeHostDefinedRealm', - 'InitializeReferencedBinding', - 'IntegerIndexedElementGet', - 'IntegerIndexedElementSet', - 'IntegerIndexedObjectCreate', - 'InternalizeJSONProperty', - 'IsAnonymousFunctionDefinition', - 'IsCompatiblePropertyDescriptor', - 'IsDetachedBuffer', - 'IsInTailPosition', - 'IsLabelledFunction', - 'IsWordChar', - 'LocalTime', - 'LoopContinues', - 'MakeArgGetter', - 'MakeArgSetter', - 'MakeClassConstructor', - 'MakeConstructor', - 'MakeMethod', - 'MakeSuperPropertyReference', - 'max', - 'min', - 'ModuleNamespaceCreate', - 'NewDeclarativeEnvironment', - 'NewFunctionEnvironment', - 'NewGlobalEnvironment', - 'NewModuleEnvironment', - 'NewObjectEnvironment', - 'NewPromiseCapability', - 'NextJob', - 'NormalCompletion', - 'ObjectDefineProperties', - 'OrdinaryCallBindThis', - 'OrdinaryCallEvaluateBody', - 'OrdinaryDelete', - 'OrdinaryGet', - 'OrdinaryIsExtensible', - 'OrdinaryOwnPropertyKeys', - 'OrdinaryPreventExtensions', - 'OrdinarySet', - 'ParseModule', - 'ParseScript', - 'PerformEval', - 'PerformPromiseAll', - 'PerformPromiseRace', - 'PerformPromiseThen', - 'PrepareForOrdinaryCall', - 'PrepareForTailCall', - 'PromiseReactionJob', - 'PromiseResolveThenableJob', - 'ProxyCreate', - 'PutValue', // takes a Reference - 'RegExpAlloc', // creates a regex with uninitialized internal lots - 'RegExpBuiltinExec', - 'RegExpInitialize', // initializes allocated regex's internal slots - 'RejectPromise', - 'RepeatMatcher', - 'ResolveBinding', - 'ResolveThisBinding', - 'ReturnIfAbrupt', - 'ScriptEvaluation', - 'ScriptEvaluationJob', - 'SerializeJSONArray', - 'SerializeJSONObject', - 'SerializeJSONProperty', - 'SetDefaultGlobalBindings', - 'SetRealmGlobalObject', - 'SetValueInBuffer', - 'SetViewValue', - 'SortCompare', // mystery access to `comparefn` arg - 'TopLevelModuleEvaluationJob', - 'ToString Applied to the Number Type', - 'TriggerPromiseReactions', - 'TypedArrayCreate', - 'TypedArraySpeciesCreate', - 'UpdateEmpty', // completion records - 'UTC', // depends on LocalTZA, DaylightSavingTA - 'ValidateTypedArray' -]; - -require('./tests').es2016(boundES, ops, expectedMissing); - -require('./helpers/runManifestTest')(require('tape'), ES, 2016); diff --git a/node_modules/es-abstract/test/es2017.js b/node_modules/es-abstract/test/es2017.js deleted file mode 100644 index ab6ca6f9d..000000000 --- a/node_modules/es-abstract/test/es2017.js +++ /dev/null @@ -1,211 +0,0 @@ -'use strict'; - -var ES = require('../').ES2017; -var boundES = require('./helpers/createBoundESNamespace')(ES); - -var ops = require('../operations/2017'); - -var expectedMissing = [ - 'AddWaiter', - 'agent-order', - 'AgentCanSuspend', - 'AgentSignifier', - 'AllocateArrayBuffer', - 'AllocateSharedArrayBuffer', - 'AllocateTypedArray', - 'AllocateTypedArrayBuffer', - 'AsyncFunctionAwait', - 'AsyncFunctionCreate', - 'AsyncFunctionStart', - 'AtomicLoad', - 'AtomicReadModifyWrite', - 'BlockDeclarationInstantiation', - 'BoundFunctionCreate', - 'Canonicalize', - 'CharacterRange', - 'CharacterRangeOrUnion', - 'CharacterSetMatcher', - 'CloneArrayBuffer', - 'Completion', - 'ComposeWriteEventBytes', - 'Construct', - 'CopyDataBlockBytes', - 'CreateArrayFromList', - 'CreateArrayIterator', - 'CreateBuiltinFunction', - 'CreateByteDataBlock', - 'CreateDynamicFunction', - 'CreateIntrinsics', - 'CreateListIterator', - 'CreateMapIterator', - 'CreateMappedArgumentsObject', - 'CreatePerIterationEnvironment', - 'CreateRealm', - 'CreateResolvingFunctions', - 'CreateSetIterator', - 'CreateSharedByteDataBlock', - 'CreateStringIterator', - 'CreateUnmappedArgumentsObject', - 'DaylightSavingTA', - 'Decode', - 'DetachArrayBuffer', - 'Encode', - 'EnqueueJob', - 'EnterCriticalSection', - 'EnumerateObjectProperties', - 'EscapeRegExpPattern', - 'EvalDeclarationInstantiation', - 'EvaluateCall', - 'EvaluateDirectCall', - 'EvaluateNew', - 'EventSet', - 'ForBodyEvaluation', - 'ForIn/OfBodyEvaluation', - 'ForIn/OfHeadEvaluation', - 'FulfillPromise', - 'FunctionAllocate', - 'FunctionCreate', - 'FunctionDeclarationInstantiation', - 'FunctionInitialize', - 'GeneratorFunctionCreate', - 'GeneratorResume', - 'GeneratorResumeAbrupt', - 'GeneratorStart', - 'GeneratorValidate', - 'GeneratorYield', - 'GetActiveScriptOrModule', - 'GetBase', - 'GetFunctionRealm', - 'GetGlobalObject', - 'GetIdentifierReference', - 'GetModifySetValueInBuffer', - 'GetModuleNamespace', - 'GetNewTarget', - 'GetReferencedName', - 'GetSuperConstructor', - 'GetTemplateObject', - 'GetThisEnvironment', - 'GetThisValue', - 'GetValue', - 'GetValueFromBuffer', - 'GetViewValue', - 'GetWaiterList', - 'GlobalDeclarationInstantiation', - 'happens-before', - 'HasPrimitiveBase', - 'host-synchronizes-with', - 'HostEnsureCanCompileStrings', - 'HostEventSet', - 'HostPromiseRejectionTracker', - 'HostReportErrors', - 'HostResolveImportedModule', - 'IfAbruptRejectPromise', - 'ImportedLocalNames', - 'InitializeBoundName', - 'InitializeHostDefinedRealm', - 'InitializeReferencedBinding', - 'IntegerIndexedElementGet', - 'IntegerIndexedElementSet', - 'IntegerIndexedObjectCreate', - 'InternalizeJSONProperty', - 'IsAnonymousFunctionDefinition', - 'IsCompatiblePropertyDescriptor', - 'IsDetachedBuffer', - 'IsInTailPosition', - 'IsLabelledFunction', - 'IsPropertyReference', - 'IsSharedArrayBuffer', - 'IsStrictReference', - 'IsSuperReference', - 'IsUnresolvableReference', - 'IsWordChar', - 'LeaveCriticalSection', - 'LocalTime', - 'LoopContinues', - 'MakeArgGetter', - 'MakeArgSetter', - 'MakeClassConstructor', - 'MakeConstructor', - 'MakeMethod', - 'MakeSuperPropertyReference', - 'max', - 'memory-order', - 'min', - 'ModuleNamespaceCreate', - 'NewDeclarativeEnvironment', - 'NewFunctionEnvironment', - 'NewGlobalEnvironment', - 'NewModuleEnvironment', - 'NewObjectEnvironment', - 'NewPromiseCapability', - 'NormalCompletion', - 'NumberToRawBytes', - 'ObjectDefineProperties', - 'OrdinaryCallBindThis', - 'OrdinaryCallEvaluateBody', - 'OrdinaryDelete', - 'OrdinaryGet', - 'OrdinaryIsExtensible', - 'OrdinaryOwnPropertyKeys', - 'OrdinaryPreventExtensions', - 'OrdinarySet', - 'OrdinaryToPrimitive', - 'ParseModule', - 'ParseScript', - 'PerformEval', - 'PerformPromiseAll', - 'PerformPromiseRace', - 'PerformPromiseThen', - 'PrepareForOrdinaryCall', - 'PrepareForTailCall', - 'PromiseReactionJob', - 'PromiseResolveThenableJob', - 'ProxyCreate', - 'PutValue', // takes a Reference - 'RawBytesToNumber', - 'reads-bytes-from', - 'reads-from', - 'RegExpAlloc', // creates a regex with uninitialized internal lots - 'RegExpBuiltinExec', - 'RegExpInitialize', // initializes allocated regex's internal slots - 'RejectPromise', - 'RemoveWaiter', - 'RemoveWaiters', - 'RepeatMatcher', - 'ResolveBinding', - 'ResolveThisBinding', - 'ReturnIfAbrupt', - 'RunJobs', - 'ScriptEvaluation', - 'ScriptEvaluationJob', - 'SerializeJSONArray', - 'SerializeJSONObject', - 'SerializeJSONProperty', - 'SetDefaultGlobalBindings', - 'SetImmutablePrototype', - 'SetRealmGlobalObject', - 'SetValueInBuffer', - 'SetViewValue', - 'SharedDataBlockEventSet', - 'SortCompare', // mystery access to `comparefn` arg - 'Suspend', - 'TopLevelModuleEvaluationJob', - 'ToString Applied to the Number Type', - 'TriggerPromiseReactions', - 'TypedArrayCreate', - 'TypedArraySpeciesCreate', - 'UpdateEmpty', // completion records - 'UTC', // depends on LocalTZA, DaylightSavingTA - 'ValidateAtomicAccess', - 'ValidateSharedIntegerTypedArray', - 'ValidateTypedArray', - 'ValueOfReadEvent', - 'WakeWaiter', - 'WordCharacters', // depends on Canonicalize - 'AddRestrictedFunctionProperties', - 'synchronizes-with' -]; - -require('./tests').es2017(boundES, ops, expectedMissing); - -require('./helpers/runManifestTest')(require('tape'), ES, 2017); diff --git a/node_modules/es-abstract/test/es2018.js b/node_modules/es-abstract/test/es2018.js deleted file mode 100644 index 112e95891..000000000 --- a/node_modules/es-abstract/test/es2018.js +++ /dev/null @@ -1,229 +0,0 @@ -'use strict'; - -var ES = require('../').ES2018; -var boundES = require('./helpers/createBoundESNamespace')(ES); - -var ops = require('../operations/2018'); - -var expectedMissing = [ - 'AddRestrictedFunctionProperties', - 'AddWaiter', - 'agent-order', - 'AgentCanSuspend', - 'AgentSignifier', - 'AllocateArrayBuffer', - 'AllocateSharedArrayBuffer', - 'AllocateTypedArray', - 'AllocateTypedArrayBuffer', - 'AsyncFunctionCreate', - 'AsyncFunctionStart', - 'AsyncGeneratorEnqueue', - 'AsyncGeneratorFunctionCreate', - 'AsyncGeneratorReject', - 'AsyncGeneratorResolve', - 'AsyncGeneratorResumeNext', - 'AsyncGeneratorStart', - 'AsyncGeneratorYield', - 'AsyncIteratorClose', - 'AtomicLoad', - 'AtomicReadModifyWrite', - 'Await', - 'BackreferenceMatcher', - 'BlockDeclarationInstantiation', - 'BoundFunctionCreate', - 'Canonicalize', - 'CaseClauseIsSelected', - 'CharacterRange', - 'CharacterRangeOrUnion', - 'CharacterSetMatcher', - 'CloneArrayBuffer', - 'Completion', - 'ComposeWriteEventBytes', - 'Construct', - 'CopyDataBlockBytes', - 'CreateArrayFromList', - 'CreateArrayIterator', - 'CreateAsyncFromSyncIterator', - 'CreateBuiltinFunction', - 'CreateByteDataBlock', - 'CreateDynamicFunction', - 'CreateIntrinsics', - 'CreateListIteratorRecord', - 'CreateMapIterator', - 'CreateMappedArgumentsObject', - 'CreatePerIterationEnvironment', - 'CreateRealm', - 'CreateResolvingFunctions', - 'CreateSetIterator', - 'CreateSharedByteDataBlock', - 'CreateStringIterator', - 'CreateUnmappedArgumentsObject', - 'Decode', - 'DetachArrayBuffer', - 'Encode', - 'EnqueueJob', - 'EnterCriticalSection', - 'EnumerateObjectProperties', - 'EscapeRegExpPattern', - 'EvalDeclarationInstantiation', - 'EvaluateCall', - 'EvaluateNew', - 'EventSet', - 'ForBodyEvaluation', - 'ForIn/OfBodyEvaluation', - 'ForIn/OfHeadEvaluation', - 'FulfillPromise', - 'FunctionAllocate', - 'FunctionCreate', - 'FunctionDeclarationInstantiation', - 'FunctionInitialize', - 'GeneratorFunctionCreate', - 'GeneratorResume', - 'GeneratorResumeAbrupt', - 'GeneratorStart', - 'GeneratorValidate', - 'GeneratorYield', - 'GetActiveScriptOrModule', - 'GetBase', - 'GetFunctionRealm', - 'GetGeneratorKind', - 'GetGlobalObject', - 'GetIdentifierReference', - 'GetModifySetValueInBuffer', - 'GetModuleNamespace', - 'GetNewTarget', - 'GetReferencedName', - 'GetSuperConstructor', - 'GetTemplateObject', - 'GetThisEnvironment', - 'GetThisValue', - 'GetValue', - 'GetValueFromBuffer', - 'GetViewValue', - 'GetWaiterList', - 'GlobalDeclarationInstantiation', - 'happens-before', - 'HasPrimitiveBase', - 'host-synchronizes-with', - 'HostEnsureCanCompileStrings', - 'HostEventSet', - 'HostPromiseRejectionTracker', - 'HostReportErrors', - 'HostResolveImportedModule', - 'IfAbruptRejectPromise', - 'ImportedLocalNames', - 'InitializeBoundName', - 'InitializeHostDefinedRealm', - 'InitializeReferencedBinding', - 'InnerModuleEvaluation', - 'InnerModuleInstantiation', - 'IntegerIndexedElementGet', - 'IntegerIndexedElementSet', - 'IntegerIndexedObjectCreate', - 'InternalizeJSONProperty', - 'IsAnonymousFunctionDefinition', - 'IsCompatiblePropertyDescriptor', - 'IsDetachedBuffer', - 'IsInTailPosition', - 'IsLabelledFunction', - 'IsPropertyReference', - 'IsSharedArrayBuffer', - 'IsStrictReference', - 'IsSuperReference', - 'IsUnresolvableReference', - 'IsWordChar', - 'LeaveCriticalSection', - 'LocalTime', - 'LoopContinues', - 'MakeArgGetter', - 'MakeArgSetter', - 'MakeClassConstructor', - 'MakeConstructor', - 'MakeMethod', - 'MakeSuperPropertyReference', - 'max', - 'memory-order', - 'min', - 'ModuleDeclarationEnvironmentSetup', - 'ModuleExecution', - 'ModuleNamespaceCreate', - 'NewDeclarativeEnvironment', - 'NewFunctionEnvironment', - 'NewGlobalEnvironment', - 'NewModuleEnvironment', - 'NewObjectEnvironment', - 'NewPromiseCapability', - 'NormalCompletion', - 'NumberToRawBytes', - 'ObjectDefineProperties', - 'OrdinaryCallBindThis', - 'OrdinaryCallEvaluateBody', - 'OrdinaryDelete', - 'OrdinaryGet', - 'OrdinaryIsExtensible', - 'OrdinaryOwnPropertyKeys', - 'OrdinaryPreventExtensions', - 'OrdinarySet', - 'OrdinarySetWithOwnDescriptor', - 'OrdinaryToPrimitive', - 'ParseModule', - 'ParseScript', - 'PerformEval', - 'PerformPromiseAll', - 'PerformPromiseRace', - 'PerformPromiseThen', - 'PrepareForOrdinaryCall', - 'PrepareForTailCall', - 'PromiseReactionJob', - 'PromiseResolveThenableJob', - 'ProxyCreate', - 'PutValue', // takes a Reference - 'RawBytesToNumber', - 'reads-bytes-from', - 'reads-from', - 'RegExpAlloc', // creates a regex with uninitialized internal lots - 'RegExpBuiltinExec', - 'RegExpInitialize', // initializes allocated regex's internal slots - 'RejectPromise', - 'RemoveWaiter', - 'RemoveWaiters', - 'RepeatMatcher', - 'ResolveBinding', - 'ResolveThisBinding', - 'ReturnIfAbrupt', - 'RunJobs', - 'ScriptEvaluation', - 'ScriptEvaluationJob', - 'SerializeJSONArray', - 'SerializeJSONObject', - 'SerializeJSONProperty', - 'SetDefaultGlobalBindings', - 'SetImmutablePrototype', - 'SetRealmGlobalObject', - 'SetValueInBuffer', - 'SetViewValue', - 'SharedDataBlockEventSet', - 'SortCompare', // mystery access to `comparefn` arg - 'Suspend', - 'synchronizes-with', - 'ThrowCompletion', - 'TimeZoneString', - 'TopLevelModuleEvaluationJob', - 'TriggerPromiseReactions', - 'TypedArrayCreate', - 'TypedArraySpeciesCreate', - 'UnicodeMatchProperty', - 'UnicodeMatchPropertyValue', - 'UpdateEmpty', // completion records - 'UTC', // depends on LocalTZA - 'ValidateAtomicAccess', - 'ValidateSharedIntegerTypedArray', - 'ValidateTypedArray', - 'ValueOfReadEvent', - 'WakeWaiter', - 'WordCharacters' // depends on Canonicalize -]; - -require('./tests').es2018(boundES, ops, expectedMissing); - -require('./helpers/runManifestTest')(require('tape'), ES, 2018); diff --git a/node_modules/es-abstract/test/es2019.js b/node_modules/es-abstract/test/es2019.js deleted file mode 100644 index a7cc84af5..000000000 --- a/node_modules/es-abstract/test/es2019.js +++ /dev/null @@ -1,231 +0,0 @@ -'use strict'; - -var ES = require('../').ES2019; -var boundES = require('./helpers/createBoundESNamespace')(ES); - -var ops = require('../operations/2019'); - -var expectedMissing = [ - 'AddRestrictedFunctionProperties', - 'AddWaiter', - 'agent-order', - 'AgentCanSuspend', - 'AgentSignifier', - 'AllocateArrayBuffer', - 'AllocateSharedArrayBuffer', - 'AllocateTypedArray', - 'AllocateTypedArrayBuffer', - 'AsyncFromSyncIteratorContinuation', - 'AsyncFunctionCreate', - 'AsyncFunctionStart', - 'AsyncGeneratorEnqueue', - 'AsyncGeneratorFunctionCreate', - 'AsyncGeneratorReject', - 'AsyncGeneratorResolve', - 'AsyncGeneratorResumeNext', - 'AsyncGeneratorStart', - 'AsyncGeneratorYield', - 'AsyncIteratorClose', - 'AtomicLoad', - 'AtomicReadModifyWrite', - 'Await', - 'BackreferenceMatcher', - 'BlockDeclarationInstantiation', - 'BoundFunctionCreate', - 'Canonicalize', - 'CaseClauseIsSelected', - 'CharacterRange', - 'CharacterRangeOrUnion', - 'CharacterSetMatcher', - 'CloneArrayBuffer', - 'Completion', - 'ComposeWriteEventBytes', - 'Construct', - 'CopyDataBlockBytes', - 'CreateArrayFromList', - 'CreateArrayIterator', - 'CreateAsyncFromSyncIterator', - 'CreateBuiltinFunction', - 'CreateByteDataBlock', - 'CreateDynamicFunction', - 'CreateIntrinsics', - 'CreateListIteratorRecord', - 'CreateMapIterator', - 'CreateMappedArgumentsObject', - 'CreatePerIterationEnvironment', - 'CreateRealm', - 'CreateResolvingFunctions', - 'CreateSetIterator', - 'CreateSharedByteDataBlock', - 'CreateStringIterator', - 'CreateUnmappedArgumentsObject', - 'Decode', - 'DetachArrayBuffer', - 'Encode', - 'EnqueueJob', - 'EnterCriticalSection', - 'EnumerateObjectProperties', - 'EscapeRegExpPattern', - 'EvalDeclarationInstantiation', - 'EvaluateCall', - 'EvaluateNew', - 'EventSet', - 'ExecuteModule', - 'ForBodyEvaluation', - 'ForIn/OfBodyEvaluation', - 'ForIn/OfHeadEvaluation', - 'FulfillPromise', - 'FunctionAllocate', - 'FunctionCreate', - 'FunctionDeclarationInstantiation', - 'FunctionInitialize', - 'GeneratorFunctionCreate', - 'GeneratorResume', - 'GeneratorResumeAbrupt', - 'GeneratorStart', - 'GeneratorValidate', - 'GeneratorYield', - 'GetActiveScriptOrModule', - 'GetBase', - 'GetFunctionRealm', - 'GetGeneratorKind', - 'GetGlobalObject', - 'GetIdentifierReference', - 'GetModifySetValueInBuffer', - 'GetModuleNamespace', - 'GetNewTarget', - 'GetReferencedName', - 'GetSuperConstructor', - 'GetTemplateObject', - 'GetThisEnvironment', - 'GetThisValue', - 'GetValue', - 'GetValueFromBuffer', - 'GetViewValue', - 'GetWaiterList', - 'GlobalDeclarationInstantiation', - 'happens-before', - 'HasPrimitiveBase', - 'host-synchronizes-with', - 'HostEnsureCanCompileStrings', - 'HostEventSet', - 'HostPromiseRejectionTracker', - 'HostReportErrors', - 'HostResolveImportedModule', - 'IfAbruptRejectPromise', - 'ImportedLocalNames', - 'InitializeBoundName', - 'InitializeEnvironment', - 'InitializeHostDefinedRealm', - 'InitializeReferencedBinding', - 'InnerModuleEvaluation', - 'InnerModuleInstantiation', - 'IntegerIndexedElementGet', - 'IntegerIndexedElementSet', - 'IntegerIndexedObjectCreate', - 'InternalizeJSONProperty', - 'IsAnonymousFunctionDefinition', - 'IsCompatiblePropertyDescriptor', - 'IsDetachedBuffer', - 'IsInTailPosition', - 'IsLabelledFunction', - 'IsPropertyReference', - 'IsSharedArrayBuffer', - 'IsStrictReference', - 'IsSuperReference', - 'IsUnresolvableReference', - 'IsWordChar', - 'LeaveCriticalSection', - 'LocalTime', - 'LoopContinues', - 'MakeArgGetter', - 'MakeArgSetter', - 'MakeClassConstructor', - 'MakeConstructor', - 'MakeMethod', - 'MakeSuperPropertyReference', - 'max', - 'memory-order', - 'min', - 'ModuleNamespaceCreate', - 'NewDeclarativeEnvironment', - 'NewFunctionEnvironment', - 'NewGlobalEnvironment', - 'NewModuleEnvironment', - 'NewObjectEnvironment', - 'NewPromiseCapability', - 'NormalCompletion', - 'NotifyWaiter', - 'NumberToRawBytes', - 'ObjectDefineProperties', - 'OrdinaryCallBindThis', - 'OrdinaryCallEvaluateBody', - 'OrdinaryDelete', - 'OrdinaryGet', - 'OrdinaryIsExtensible', - 'OrdinaryOwnPropertyKeys', - 'OrdinaryPreventExtensions', - 'OrdinarySet', - 'OrdinarySetWithOwnDescriptor', - 'OrdinaryToPrimitive', - 'ParseModule', - 'ParseScript', - 'PerformEval', - 'PerformPromiseAll', - 'PerformPromiseRace', - 'PerformPromiseThen', - 'PrepareForOrdinaryCall', - 'PrepareForTailCall', - 'PromiseReactionJob', - 'PromiseResolveThenableJob', - 'ProxyCreate', - 'PutValue', // takes a Reference - 'RawBytesToNumber', - 'reads-bytes-from', - 'reads-from', - 'RegExpAlloc', // creates a regex with uninitialized internal lots - 'RegExpBuiltinExec', - 'RegExpInitialize', // initializes allocated regex's internal slots - 'RejectPromise', - 'RemoveWaiter', - 'RemoveWaiters', - 'RepeatMatcher', - 'ResolveBinding', - 'ResolveThisBinding', - 'ReturnIfAbrupt', - 'RunJobs', - 'ScriptEvaluation', - 'ScriptEvaluationJob', - 'SerializeJSONArray', - 'SerializeJSONObject', - 'SerializeJSONProperty', - 'SetDefaultGlobalBindings', - 'SetImmutablePrototype', - 'SetRealmGlobalObject', - 'SetValueInBuffer', - 'SetViewValue', - 'SharedDataBlockEventSet', - 'SortCompare', // mystery access to `comparefn` arg - 'Suspend', - 'SynchronizeEventSet', - 'synchronizes-with', - 'ThrowCompletion', - 'TimeZoneString', - 'TopLevelModuleEvaluationJob', - 'TriggerPromiseReactions', - 'TypedArrayCreate', - 'TypedArraySpeciesCreate', - 'UnicodeMatchProperty', - 'UnicodeMatchPropertyValue', - 'UpdateEmpty', // completion records - 'UTC', // depends on LocalTZA - 'ValidateAtomicAccess', - 'ValidateSharedIntegerTypedArray', - 'ValidateTypedArray', - 'ValueOfReadEvent', - 'WordCharacters' // depends on Canonicalize -]; - -require('./tests').es2019(boundES, ops, expectedMissing); - -require('./helpers/runManifestTest')(require('tape'), ES, 2019); diff --git a/node_modules/es-abstract/test/es2020.js b/node_modules/es-abstract/test/es2020.js deleted file mode 100644 index 83f0b3ae0..000000000 --- a/node_modules/es-abstract/test/es2020.js +++ /dev/null @@ -1,240 +0,0 @@ -'use strict'; - -var ES = require('../').ES2020; -var boundES = require('./helpers/createBoundESNamespace')(ES); - -var ops = require('../operations/2020'); - -var expectedMissing = [ - 'AddRestrictedFunctionProperties', - 'AddWaiter', - 'agent-order', - 'AgentCanSuspend', - 'AgentSignifier', - 'AllocateArrayBuffer', - 'AllocateSharedArrayBuffer', - 'AllocateTypedArray', - 'AllocateTypedArrayBuffer', - 'AsyncFromSyncIteratorContinuation', - 'AsyncFunctionStart', - 'AsyncGeneratorEnqueue', - 'AsyncGeneratorReject', - 'AsyncGeneratorResolve', - 'AsyncGeneratorResumeNext', - 'AsyncGeneratorStart', - 'AsyncGeneratorYield', - 'AsyncIteratorClose', - 'AtomicLoad', - 'AtomicReadModifyWrite', - 'Await', - 'BackreferenceMatcher', - 'BlockDeclarationInstantiation', - 'BoundFunctionCreate', - 'Canonicalize', - 'CaseClauseIsSelected', - 'CharacterRange', - 'CharacterRangeOrUnion', - 'CharacterSetMatcher', - 'CloneArrayBuffer', - 'Completion', - 'ComposeWriteEventBytes', - 'Construct', - 'CopyDataBlockBytes', - 'CreateArrayFromList', - 'CreateArrayIterator', - 'CreateAsyncFromSyncIterator', - 'CreateBuiltinFunction', - 'CreateByteDataBlock', - 'CreateDynamicFunction', - 'CreateForInIterator', - 'CreateIntrinsics', - 'CreateListIteratorRecord', - 'CreateMapIterator', - 'CreateMappedArgumentsObject', - 'CreatePerIterationEnvironment', - 'CreateRealm', - 'CreateRegExpStringIterator', - 'CreateResolvingFunctions', - 'CreateSetIterator', - 'CreateSharedByteDataBlock', - 'CreateStringIterator', - 'CreateUnmappedArgumentsObject', - 'Decode', - 'DetachArrayBuffer', - 'Encode', - 'EnterCriticalSection', - 'EnumerateObjectProperties', - 'EscapeRegExpPattern', - 'EvalDeclarationInstantiation', - 'EvaluateCall', - 'EvaluateNew', - 'EvaluatePropertyAccessWithExpressionKey', - 'EvaluatePropertyAccessWithIdentifierKey', - 'EventSet', - 'ExecuteModule', - 'FinishDynamicImport', - 'ForBodyEvaluation', - 'ForIn/OfBodyEvaluation', - 'ForIn/OfHeadEvaluation', - 'FulfillPromise', - 'FunctionDeclarationInstantiation', - 'GeneratorResume', - 'GeneratorResumeAbrupt', - 'GeneratorStart', - 'GeneratorValidate', - 'GeneratorYield', - 'GetActiveScriptOrModule', - 'GetBase', - 'GetFunctionRealm', - 'GetGeneratorKind', - 'GetGlobalObject', - 'GetIdentifierReference', - 'GetModifySetValueInBuffer', - 'GetModuleNamespace', - 'GetNewTarget', - 'GetReferencedName', - 'GetSuperConstructor', - 'GetTemplateObject', - 'GetThisEnvironment', - 'GetThisValue', - 'GetValue', - 'GetValueFromBuffer', - 'GetViewValue', - 'GetWaiterList', - 'GlobalDeclarationInstantiation', - 'happens-before', - 'HasPrimitiveBase', - 'host-synchronizes-with', - 'HostEnqueuePromiseJob', - 'HostEnsureCanCompileStrings', - 'HostEventSet', - 'HostFinalizeImportMeta', - 'HostGetImportMetaProperties', - 'HostImportModuleDynamically', - 'HostPromiseRejectionTracker', - 'HostResolveImportedModule', - 'IfAbruptRejectPromise', - 'ImportedLocalNames', - 'InitializeBoundName', - 'InitializeEnvironment', - 'InitializeHostDefinedRealm', - 'InitializeReferencedBinding', - 'InnerModuleEvaluation', - 'InnerModuleLinking', - 'IntegerIndexedElementGet', - 'IntegerIndexedElementSet', - 'IntegerIndexedObjectCreate', - 'InternalizeJSONProperty', - 'IsAnonymousFunctionDefinition', - 'IsCompatiblePropertyDescriptor', - 'IsDetachedBuffer', - 'IsInTailPosition', - 'IsLabelledFunction', - 'IsPropertyReference', - 'IsSharedArrayBuffer', - 'IsStrictReference', - 'IsSuperReference', - 'IsUnresolvableReference', - 'IsValidIntegerIndex', - 'IsValidRegularExpressionLiteral', - 'IsWordChar', - 'LeaveCriticalSection', - 'LocalTime', - 'LocalTZA', - 'LoopContinues', - 'MakeArgGetter', - 'MakeArgSetter', - 'MakeBasicObject', - 'MakeClassConstructor', - 'MakeConstructor', - 'MakeMethod', - 'MakeSuperPropertyReference', - 'max', - 'memory-order', - 'min', - 'ModuleNamespaceCreate', - 'NewDeclarativeEnvironment', - 'NewFunctionEnvironment', - 'NewGlobalEnvironment', - 'NewModuleEnvironment', - 'NewObjectEnvironment', - 'NewPromiseCapability', - 'NewPromiseReactionJob', - 'NewPromiseResolveThenableJob', - 'NormalCompletion', - 'NotifyWaiter', - 'NumericToRawBytes', - 'ObjectDefineProperties', - 'OrdinaryCallBindThis', - 'OrdinaryCallEvaluateBody', - 'OrdinaryDelete', - 'OrdinaryFunctionCreate', - 'OrdinaryGet', - 'OrdinaryIsExtensible', - 'OrdinaryOwnPropertyKeys', - 'OrdinaryPreventExtensions', - 'OrdinarySet', - 'OrdinarySetWithOwnDescriptor', - 'OrdinaryToPrimitive', - 'ParseModule', - 'ParseScript', - 'PerformEval', - 'PerformPromiseAll', - 'PerformPromiseAllSettled', - 'PerformPromiseRace', - 'PerformPromiseThen', - 'PrepareForOrdinaryCall', - 'PrepareForTailCall', - 'ProxyCreate', - 'PutValue', // takes a Reference - 'RawBytesToNumeric', - 'reads-bytes-from', - 'reads-from', - 'RegExpAlloc', // creates a regex with uninitialized internal lots - 'RegExpBuiltinExec', - 'RegExpInitialize', // initializes allocated regex's internal slots - 'RejectPromise', - 'RemoveWaiter', - 'RemoveWaiters', - 'RepeatMatcher', - 'RequireInternalSlot', - 'ResolveBinding', - 'ResolveThisBinding', - 'ReturnIfAbrupt', - 'ScriptEvaluation', - 'SerializeJSONArray', - 'SerializeJSONObject', - 'SerializeJSONProperty', - 'SetDefaultGlobalBindings', - 'SetImmutablePrototype', - 'SetRealmGlobalObject', - 'SetValueInBuffer', - 'SetViewValue', - 'SharedDataBlockEventSet', - 'SortCompare', // mystery access to `comparefn` arg - 'StringToBigInt', - 'Suspend', - 'synchronizes-with', - 'ThrowCompletion', - 'TimeZoneString', - 'ToBigInt', - 'ToBigInt64', - 'ToBigUint64', - 'TriggerPromiseReactions', - 'TypedArrayCreate', - 'TypedArraySpeciesCreate', - 'UnicodeMatchProperty', - 'UnicodeMatchPropertyValue', - 'UpdateEmpty', // completion records - 'UTC', // depends on LocalTZA - 'UTF16Encode', - 'ValidateAtomicAccess', - 'ValidateSharedIntegerTypedArray', - 'ValidateTypedArray', - 'ValueOfReadEvent', - 'WordCharacters' // depends on Canonicalize -]; - -require('./tests').es2020(boundES, ops, expectedMissing); - -require('./helpers/runManifestTest')(require('tape'), ES, 2020); diff --git a/node_modules/es-abstract/test/es5.js b/node_modules/es-abstract/test/es5.js deleted file mode 100644 index c4033f673..000000000 --- a/node_modules/es-abstract/test/es5.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var ES = require('../').ES5; -var boundES = require('./helpers/createBoundESNamespace')(ES); - -var ops = require('../operations/es5'); - -var expectedMissing = [ - 'SplitMatch' -]; - -require('./tests').es5(boundES, ops, expectedMissing); - -require('./helpers/runManifestTest')(require('tape'), ES, 5); diff --git a/node_modules/es-abstract/test/es6.js b/node_modules/es-abstract/test/es6.js deleted file mode 100644 index e7c9d98a2..000000000 --- a/node_modules/es-abstract/test/es6.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var ES = require('../'); -var ES6 = ES.ES6; -var ES2015 = ES.ES2015; -var ES6entry = require('../es6'); - -test('legacy es6 export', function (t) { - t.equal(ES6, ES2015, 'main ES6 === main ES2015'); - t.end(); -}); - -test('legacy es6 entry point', function (t) { - t.equal(ES6, ES6entry, 'main ES6 === ES6 entry point'); - t.end(); -}); diff --git a/node_modules/es-abstract/test/es7.js b/node_modules/es-abstract/test/es7.js deleted file mode 100644 index ee57e153b..000000000 --- a/node_modules/es-abstract/test/es7.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var ES = require('../'); -var ES7 = ES.ES7; -var ES2016 = ES.ES2016; -var ES7entry = require('../es7'); - -test('legacy es7 export', function (t) { - t.equal(ES7, ES2016, 'main ES7 === main ES2016'); - t.end(); -}); - -test('legacy es7 entry point', function (t) { - t.equal(ES7, ES7entry, 'main ES7 === ES7 entry point'); - t.end(); -}); diff --git a/node_modules/es-abstract/test/helpers/OwnPropertyKeys.js b/node_modules/es-abstract/test/helpers/OwnPropertyKeys.js deleted file mode 100644 index 9c2b4fc44..000000000 --- a/node_modules/es-abstract/test/helpers/OwnPropertyKeys.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasSymbols = require('has-symbols')(); - -var OwnPropertyKeys = require('../../helpers/OwnPropertyKeys'); -var defineProperty = require('./defineProperty'); - -test('OwnPropertyKeys', function (t) { - t.deepEqual(OwnPropertyKeys({ a: 1, b: 2 }).sort(), ['a', 'b'].sort(), 'returns own string keys'); - - t.test('Symbols', { skip: !hasSymbols }, function (st) { - var o = { a: 1 }; - var sym = Symbol(); - o[sym] = 2; - - st.deepEqual(OwnPropertyKeys(o), ['a', sym], 'returns own string and symbol keys'); - - st.end(); - }); - - t.test('non-enumerables', { skip: !defineProperty.oDP }, function (st) { - var o = { a: 1, b: 42, c: NaN }; - defineProperty(o, 'b', { enumerable: false, value: 42 }); - defineProperty(o, 'c', { enumerable: false, get: function () { return NaN; } }); - - if (hasSymbols) { - defineProperty(o, 'd', { enumerable: false, value: true }); - defineProperty(o, 'e', { enumerable: false, get: function () { return true; } }); - } - - st.deepEqual( - OwnPropertyKeys(o).sort(), - (hasSymbols ? ['a', 'b', 'c', 'd', 'e'] : ['a', 'b', 'c']).sort(), - 'returns non-enumerable own keys, including accessors and symbols if available' - ); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/es-abstract/test/helpers/assertRecord.js b/node_modules/es-abstract/test/helpers/assertRecord.js deleted file mode 100644 index 02311013f..000000000 --- a/node_modules/es-abstract/test/helpers/assertRecord.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -var forEach = require('foreach'); -var debug = require('object-inspect'); - -var assertRecord = require('../../helpers/assertRecord'); -var v = require('es-value-fixtures'); - -module.exports = function assertRecordTests(ES, test) { - test('Property Descriptor', function (t) { - var record = 'Property Descriptor'; - - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { assertRecord(ES.Type, record, 'arg', primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t['throws']( - function () { assertRecord(ES.Type, record, 'arg', { invalid: true }); }, - TypeError, - 'invalid keys not allowed on a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES.Type, record, 'arg', {}); }, - 'empty object is an incomplete Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES.Type, record, 'arg', v.accessorDescriptor()); }, - 'accessor descriptor is a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES.Type, record, 'arg', v.mutatorDescriptor()); }, - 'mutator descriptor is a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES.Type, record, 'arg', v.dataDescriptor()); }, - 'data descriptor is a Property Descriptor' - ); - - t.doesNotThrow( - function () { assertRecord(ES.Type, record, 'arg', v.genericDescriptor()); }, - 'generic descriptor is a Property Descriptor' - ); - - t['throws']( - function () { assertRecord(ES.Type, record, 'arg', v.bothDescriptor()); }, - TypeError, - 'a Property Descriptor can not be both a Data and an Accessor Descriptor' - ); - - t.end(); - }); -}; diff --git a/node_modules/es-abstract/test/helpers/createBoundESNamespace.js b/node_modules/es-abstract/test/helpers/createBoundESNamespace.js deleted file mode 100644 index 0150404d9..000000000 --- a/node_modules/es-abstract/test/helpers/createBoundESNamespace.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); - -var OwnPropertyKeys = require('../../helpers/OwnPropertyKeys'); - -module.exports = function createBoundESNamespace(ES) { - var keys = OwnPropertyKeys(ES); - var result = {}; - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var prop = ES[key]; - if (typeof prop === 'function') { - prop = bind.call(prop, undefined); - } else if (prop && typeof prop === 'object') { - prop = createBoundESNamespace(prop); - } - result[key] = prop; - } - - return result; -}; diff --git a/node_modules/es-abstract/test/helpers/defineProperty.js b/node_modules/es-abstract/test/helpers/defineProperty.js deleted file mode 100644 index 03102a839..000000000 --- a/node_modules/es-abstract/test/helpers/defineProperty.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../../GetIntrinsic'); - -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); - -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = null; - } -} - -module.exports = function defineProperty(O, P, Desc) { - if ($defineProperty) { - return $defineProperty(O, P, Desc); - } - if ((Desc.enumerable && Desc.configurable && Desc.writable) || !(P in O)) { - O[P] = Desc.value; // eslint-disable-line no-param-reassign - return O; - } - - throw new SyntaxError('helper does not yet support this configuration'); -}; -module.exports.oDP = $defineProperty; diff --git a/node_modules/es-abstract/test/helpers/index.js b/node_modules/es-abstract/test/helpers/index.js deleted file mode 100644 index 4260bc2f5..000000000 --- a/node_modules/es-abstract/test/helpers/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -require('./getSymbolDescription'); -require('./isByteValue'); -require('./isCodePoint'); -require('./OwnPropertyKeys'); diff --git a/node_modules/es-abstract/test/helpers/isByteValue.js b/node_modules/es-abstract/test/helpers/isByteValue.js deleted file mode 100644 index f89491024..000000000 --- a/node_modules/es-abstract/test/helpers/isByteValue.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var test = require('tape'); -var forEach = require('foreach'); -var debug = require('object-inspect'); - -var isByteValue = require('../../helpers/isByteValue'); -var v = require('es-value-fixtures'); - -test('isByteValue', function (t) { - forEach([].concat( - v.notNonNegativeIntegers, - -1, - -42, - -Infinity, - Infinity, - v.nonIntegerNumbers - ), function (nonByteValue) { - t.equal(isByteValue(nonByteValue), false, debug(nonByteValue) + ' is not a byte value'); - }); - - for (var i = 0; i <= 255; i += 1) { - t.equal(isByteValue(i), true, i + ' is a byte value'); - } - t.equal(isByteValue(256), false, '256 is not a byte value'); - - t.end(); -}); diff --git a/node_modules/es-abstract/test/helpers/isCodePoint.js b/node_modules/es-abstract/test/helpers/isCodePoint.js deleted file mode 100644 index 9106615a5..000000000 --- a/node_modules/es-abstract/test/helpers/isCodePoint.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var test = require('tape'); -var forEach = require('foreach'); -var debug = require('object-inspect'); - -var isCodePoint = require('../../helpers/isCodePoint'); -var v = require('es-value-fixtures'); - -test('isCodePoint', function (t) { - forEach(v.notNonNegativeIntegers.concat(0x10FFFF + 1), function (nonCodePoints) { - t.equal(isCodePoint(nonCodePoints), false, debug(nonCodePoints) + ' is not a Code Point'); - }); - - forEach([-0, 0, 1, 7, 42, 0x10FFFF], function (codePoint) { - t.equal(isCodePoint(codePoint), true, debug(codePoint) + ' is a Code Point'); - }); - - t.end(); -}); diff --git a/node_modules/es-abstract/test/helpers/runManifestTest.js b/node_modules/es-abstract/test/helpers/runManifestTest.js deleted file mode 100644 index 2fdb4f216..000000000 --- a/node_modules/es-abstract/test/helpers/runManifestTest.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -var path = require('path'); -var fs = require('fs'); - -var forEach = require('foreach'); -var keys = require('object-keys'); - -module.exports = function runManifestTest(test, ES, edition) { - test('ES' + edition + ' manifest', { skip: !fs.readdirSync }, function (t) { - var files = fs.readdirSync(path.join(__dirname, '../../' + edition), 'utf-8'); - var map = { - AbstractEqualityComparison: 'Abstract Equality Comparison', - AbstractRelationalComparison: 'Abstract Relational Comparison', - StrictEqualityComparison: 'Strict Equality Comparison' - }; - forEach(files, function (file) { - var name = path.basename(file, path.extname(file)); - var actual = ES[map[name] || name]; - var expected = require(path.join(__dirname, '../../' + edition + '/', file)); // eslint-disable-line global-require - t.equal(actual, expected, 'ES["' + name + '"] === ' + file); - }); - var actualCount = keys(ES).length; - t.equal(actualCount, files.length, 'expected ' + files.length + ' files, got ' + actualCount); - t.end(); - }); -}; diff --git a/node_modules/es-abstract/test/index.js b/node_modules/es-abstract/test/index.js deleted file mode 100644 index 5ebe3dbcc..000000000 --- a/node_modules/es-abstract/test/index.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var ES = require('../'); -var test = require('tape'); -var keys = require('object-keys'); -var forEach = require('foreach'); - -var ESkeys = keys(ES).sort(); -var ES6keys = keys(ES.ES6).sort(); - -test('exposed properties', function (t) { - t.deepEqual(ESkeys, ES6keys.concat(['ES2020', 'ES2019', 'ES2018', 'ES2017', 'ES7', 'ES2016', 'ES6', 'ES2015', 'ES5']).sort(), 'main ES object keys match ES6 keys'); - t.end(); -}); - -test('methods match', function (t) { - forEach(ES6keys, function (key) { - t.equal(ES.ES6[key], ES[key], 'method ' + key + ' on main ES object is ES6 method'); - }); - t.end(); -}); - -require('./GetIntrinsic'); - -require('./helpers'); - -require('./es5'); -require('./es6'); -require('./es2015'); -require('./es7'); -require('./es2016'); -require('./es2017'); -require('./es2018'); -require('./es2019'); -require('./es2020'); diff --git a/node_modules/es-abstract/test/ses-compat.js b/node_modules/es-abstract/test/ses-compat.js deleted file mode 100644 index c3e60f4ae..000000000 --- a/node_modules/es-abstract/test/ses-compat.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -/* globals lockdown */ -require('ses'); - -lockdown({ errorTaming: 'unsafe' }); - -require('.'); diff --git a/node_modules/es-abstract/test/tests.js b/node_modules/es-abstract/test/tests.js deleted file mode 100644 index e3ec4003a..000000000 --- a/node_modules/es-abstract/test/tests.js +++ /dev/null @@ -1,6962 +0,0 @@ -'use strict'; - -var tape = require('tape'); - -var forEach = require('foreach'); -var debug = require('object-inspect'); -var assign = require('object.assign'); -var keys = require('object-keys'); -var has = require('has'); -var arrowFns = require('make-arrow-function').list(); -var hasStrictMode = require('has-strict-mode')(); -var functionsHaveNames = require('functions-have-names')(); -var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); -var hasBigInts = require('has-bigints')(); - -var $getProto = require('../helpers/getProto'); -var $setProto = require('../helpers/setProto'); -var defineProperty = require('./helpers/defineProperty'); -var getInferredName = require('../helpers/getInferredName'); -var getOwnPropertyDescriptor = require('../helpers/getOwnPropertyDescriptor'); -var assertRecordTests = require('./helpers/assertRecord'); -var v = require('es-value-fixtures'); -var diffOps = require('./diffOps'); - -var $BigInt = hasBigInts ? BigInt : null; - -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; - -var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false - -// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated -var noThrowOnStrictViolation = (function () { - try { - delete [].length; - return true; - } catch (e) { - } - return false; -}()); - -var makeTest = function makeTest(skips) { - return function test(opName, maybeOpts, maybeCb) { - var origOpts = arguments.length > 2 ? maybeOpts : {}; - var opts = assign( - {}, - origOpts, - { skip: (skips && skips[opName]) || origOpts.skip } - ); - var cb = arguments.length > 2 ? maybeCb : maybeOpts; - return tape(opName, opts, cb); - }; -}; - -var leadingPoo = '\uD83D'; -var trailingPoo = '\uDCA9'; -var wholePoo = leadingPoo + trailingPoo; - -var getArraySubclassWithSpeciesConstructor = function getArraySubclass(speciesConstructor) { - var Bar = function Bar() { - var inst = []; - Object.setPrototypeOf(inst, Bar.prototype); - defineProperty(inst, 'constructor', { value: Bar }); - return inst; - }; - Bar.prototype = Object.create(Array.prototype); - Object.setPrototypeOf(Bar, Array); - defineProperty(Bar, Symbol.species, { value: speciesConstructor }); - - return Bar; -}; - -var testIterator = function (t, iterator, expected) { - var resultCount = 0; - var result; - while (result = iterator.next(), !result.done) { // eslint-disable-line no-sequences - t.deepEqual(result, { done: false, value: expected[resultCount] }, 'result ' + resultCount); - resultCount += 1; - } - t.equal(resultCount, expected.length, 'expected ' + expected.length + ', got ' + resultCount); -}; - -var hasSpecies = v.hasSymbols && Symbol.species; - -var hasLastIndex = 'lastIndex' in (/a/).exec('a'); // IE 8 -var hasGroups = 'groups' in (/a/).exec('a'); // modern engines -var kludgeMatch = function kludgeMatch(R, matchObject) { - if (hasGroups) { - assign(matchObject, { groups: matchObject.groups }); - } - if (hasLastIndex) { - assign(matchObject, { lastIndex: R.lastIndex }); - } - return matchObject; -}; - -var testEnumerableOwnNames = function (t, enumerableOwnNames) { - forEach(v.primitives, function (nonObject) { - t['throws']( - function () { enumerableOwnNames(nonObject); }, - debug(nonObject) + ' is not an Object' - ); - }); - - var Child = function Child() { - this.own = {}; - }; - Child.prototype = { - inherited: {} - }; - - var obj = new Child(); - - t.equal('own' in obj, true, 'has "own"'); - t.equal(has(obj, 'own'), true, 'has own "own"'); - t.equal(Object.prototype.propertyIsEnumerable.call(obj, 'own'), true, 'has enumerable "own"'); - - t.equal('inherited' in obj, true, 'has "inherited"'); - t.equal(has(obj, 'inherited'), false, 'has non-own "inherited"'); - t.equal(has(Child.prototype, 'inherited'), true, 'Child.prototype has own "inherited"'); - t.equal(Child.prototype.inherited, obj.inherited, 'Child.prototype.inherited === obj.inherited'); - t.equal(Object.prototype.propertyIsEnumerable.call(Child.prototype, 'inherited'), true, 'has enumerable "inherited"'); - - t.equal('toString' in obj, true, 'has "toString"'); - t.equal(has(obj, 'toString'), false, 'has non-own "toString"'); - t.equal(has(Object.prototype, 'toString'), true, 'Object.prototype has own "toString"'); - t.equal(Object.prototype.toString, obj.toString, 'Object.prototype.toString === obj.toString'); - // eslint-disable-next-line no-useless-call - t.equal(Object.prototype.propertyIsEnumerable.call(Object.prototype, 'toString'), false, 'has non-enumerable "toString"'); - - return obj; -}; - -var testToNumber = function (t, ES, ToNumber) { - t.equal(NaN, ToNumber(undefined), 'undefined coerces to NaN'); - t.equal(ToNumber(null), 0, 'null coerces to +0'); - t.equal(ToNumber(false), 0, 'false coerces to +0'); - t.equal(1, ToNumber(true), 'true coerces to 1'); - - t.test('numbers', function (st) { - st.equal(NaN, ToNumber(NaN), 'NaN returns itself'); - forEach(v.zeroes.concat(v.infinities, 42), function (num) { - st.equal(num, ToNumber(num), num + ' returns itself'); - }); - forEach(['foo', '0', '4a', '2.0', 'Infinity', '-Infinity'], function (numString) { - st.equal(+numString, ToNumber(numString), '"' + numString + '" coerces to ' + Number(numString)); - }); - st.end(); - }); - - t.test('objects', function (st) { - forEach(v.objects, function (object) { - st.equal(ToNumber(object), ToNumber(ES.ToPrimitive(object)), 'object ' + object + ' coerces to same as ToPrimitive of object does'); - }); - st['throws'](function () { return ToNumber(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - st.end(); - }); - - // TODO: check if this applies to ES5 - t.test('binary literals', function (st) { - st.equal(ToNumber('0b10'), 2, '0b10 is 2'); - st.equal(ToNumber({ toString: function () { return '0b11'; } }), 3, 'Object that toStrings to 0b11 is 3'); - - st.equal(ToNumber('0b12'), NaN, '0b12 is NaN'); - st.equal(ToNumber({ toString: function () { return '0b112'; } }), NaN, 'Object that toStrings to 0b112 is NaN'); - st.end(); - }); - - // TODO: check if this applies to ES5 - t.test('octal literals', function (st) { - st.equal(ToNumber('0o10'), 8, '0o10 is 8'); - st.equal(ToNumber({ toString: function () { return '0o11'; } }), 9, 'Object that toStrings to 0o11 is 9'); - - st.equal(ToNumber('0o18'), NaN, '0o18 is NaN'); - st.equal(ToNumber({ toString: function () { return '0o118'; } }), NaN, 'Object that toStrings to 0o118 is NaN'); - st.end(); - }); - - // TODO: check if this applies to ES5 - t.test('signed hex numbers', function (st) { - st.equal(ToNumber('-0xF'), NaN, '-0xF is NaN'); - st.equal(ToNumber(' -0xF '), NaN, 'space-padded -0xF is NaN'); - st.equal(ToNumber('+0xF'), NaN, '+0xF is NaN'); - st.equal(ToNumber(' +0xF '), NaN, 'space-padded +0xF is NaN'); - - st.end(); - }); - - // TODO: check if this applies to ES5 - t.test('trimming of whitespace and non-whitespace characters', function (st) { - var whitespace = ' \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'; - st.equal(0, ToNumber(whitespace + 0 + whitespace), 'whitespace is trimmed'); - - // Zero-width space (zws), next line character (nel), and non-character (bom) are not whitespace. - var nonWhitespaces = { - '\\u0085': '\u0085', - '\\u200b': '\u200b', - '\\ufffe': '\ufffe' - }; - - forEach(nonWhitespaces, function (desc, nonWS) { - st.equal(ToNumber(nonWS + 0 + nonWS), NaN, 'non-whitespace ' + desc + ' not trimmed'); - }); - - st.end(); - }); - - // TODO: skip for ES5 - forEach(v.symbols, function (symbol) { - t['throws']( - function () { ToNumber(symbol); }, - TypeError, - 'Symbols can’t be converted to a Number: ' + debug(symbol) - ); - - var boxed = Object(symbol); - t['throws']( - function () { ToNumber(boxed); }, - TypeError, - 'boxed Symbols can’t be converted to a Number: ' + debug(boxed) - ); - }); - - // TODO: check if this applies to ES5 - t.test('dates', function (st) { - var invalid = new Date(NaN); - st.equal(ToNumber(invalid), NaN, 'invalid Date coerces to NaN'); - var now = +new Date(); - st.equal(ToNumber(new Date(now)), now, 'Date coerces to timestamp'); - st.end(); - }); -}; - -var es5 = function ES5(ES, ops, expectedMissing, skips) { - var test = makeTest(skips); - - test('has expected operations', function (t) { - var diff = diffOps(ES, ops, expectedMissing); - - t.deepEqual(diff.extra, [], 'no extra ops'); - - t.deepEqual(diff.missing, [], 'no unexpected missing ops'); - - t.deepEqual(diff.extraMissing, [], 'no unexpected "expected missing" ops'); - - t.end(); - }); - - test('ToPrimitive', function (t) { - t.test('primitives', function (st) { - var testPrimitive = function (primitive) { - st.equal(ES.ToPrimitive(primitive), primitive, debug(primitive) + ' is returned correctly'); - }; - forEach(v.primitives, testPrimitive); - st.end(); - }); - - t.test('objects', function (st) { - st.equal(ES.ToPrimitive(v.coercibleObject), 3, 'coercibleObject with no hint coerces to valueOf'); - st.equal(ES.ToPrimitive({}), '[object Object]', '{} with no hint coerces to Object#toString'); - st.equal(ES.ToPrimitive(v.coercibleObject, Number), 3, 'coercibleObject with hint Number coerces to valueOf'); - st.equal(ES.ToPrimitive({}, Number), '[object Object]', '{} with hint Number coerces to NaN'); - st.equal(ES.ToPrimitive(v.coercibleObject, String), 42, 'coercibleObject with hint String coerces to nonstringified toString'); - st.equal(ES.ToPrimitive({}, String), '[object Object]', '{} with hint String coerces to Object#toString'); - st.equal(ES.ToPrimitive(v.coercibleFnObject), v.coercibleFnObject.toString(), 'coercibleFnObject coerces to toString'); - st.equal(ES.ToPrimitive(v.toStringOnlyObject), 7, 'toStringOnlyObject returns non-stringified toString'); - st.equal(ES.ToPrimitive(v.valueOfOnlyObject), 4, 'valueOfOnlyObject returns valueOf'); - st['throws'](function () { return ES.ToPrimitive(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); - st['throws'](function () { return ES.ToPrimitive(v.uncoercibleFnObject); }, TypeError, 'uncoercibleFnObject throws a TypeError'); - st.end(); - }); - - t.test('dates', function (st) { - var invalid = new Date(NaN); - st.equal(ES.ToPrimitive(invalid), Date.prototype.toString.call(invalid), 'invalid Date coerces to Date#toString'); - var now = new Date(); - st.equal(ES.ToPrimitive(now), Date.prototype.toString.call(now), 'Date coerces to Date#toString'); - st.end(); - }); - - t.end(); - }); - - test('ToBoolean', function (t) { - t.equal(false, ES.ToBoolean(undefined), 'undefined coerces to false'); - t.equal(false, ES.ToBoolean(null), 'null coerces to false'); - t.equal(false, ES.ToBoolean(false), 'false returns false'); - t.equal(true, ES.ToBoolean(true), 'true returns true'); - - t.test('numbers', function (st) { - forEach(v.zeroes.concat(NaN), function (falsyNumber) { - st.equal(false, ES.ToBoolean(falsyNumber), 'falsy number ' + falsyNumber + ' coerces to false'); - }); - forEach(v.infinities.concat([42, 1]), function (truthyNumber) { - st.equal(true, ES.ToBoolean(truthyNumber), 'truthy number ' + truthyNumber + ' coerces to true'); - }); - - st.end(); - }); - - t.equal(false, ES.ToBoolean(''), 'empty string coerces to false'); - t.equal(true, ES.ToBoolean('foo'), 'nonempty string coerces to true'); - - t.test('objects', function (st) { - forEach(v.objects, function (obj) { - st.equal(true, ES.ToBoolean(obj), 'object coerces to true'); - }); - st.equal(true, ES.ToBoolean(v.uncoercibleObject), 'uncoercibleObject coerces to true'); - - st.end(); - }); - - t.end(); - }); - - test('ToNumber', function (t) { - t.equal(NaN, ES.ToNumber(undefined), 'undefined coerces to NaN'); - t.equal(ES.ToNumber(null), 0, 'null coerces to +0'); - t.equal(ES.ToNumber(false), 0, 'false coerces to +0'); - t.equal(1, ES.ToNumber(true), 'true coerces to 1'); - - t.test('numbers', function (st) { - st.equal(NaN, ES.ToNumber(NaN), 'NaN returns itself'); - forEach(v.zeroes.concat(v.infinities, 42), function (num) { - st.equal(num, ES.ToNumber(num), num + ' returns itself'); - }); - forEach(['foo', '0', '4a', '2.0', 'Infinity', '-Infinity'], function (numString) { - st.equal(+numString, ES.ToNumber(numString), '"' + numString + '" coerces to ' + Number(numString)); - }); - st.end(); - }); - - t.test('objects', function (st) { - forEach(v.objects, function (object) { - st.equal(ES.ToNumber(object), ES.ToNumber(ES.ToPrimitive(object)), 'object ' + object + ' coerces to same as ToPrimitive of object does'); - }); - st['throws'](function () { return ES.ToNumber(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - st.end(); - }); - - t.test('binary literals', function (st) { - st.equal(ES.ToNumber('0b10'), NaN, '0b10 is NaN'); - st.equal(ES.ToNumber({ toString: function () { return '0b11'; } }), NaN, 'Object that toStrings to 0b11 is NaN'); - - st.equal(ES.ToNumber('0b12'), NaN, '0b12 is NaN'); - st.equal(ES.ToNumber({ toString: function () { return '0b112'; } }), NaN, 'Object that toStrings to 0b112 is NaN'); - st.end(); - }); - - t.test('octal literals', function (st) { - st.equal(ES.ToNumber('0o10'), NaN, '0o10 is NaN'); - st.equal(ES.ToNumber({ toString: function () { return '0o11'; } }), NaN, 'Object that toStrings to 0o11 is NaN'); - - st.equal(ES.ToNumber('0o18'), NaN, '0o18 is NaN'); - st.equal(ES.ToNumber({ toString: function () { return '0o118'; } }), NaN, 'Object that toStrings to 0o118 is NaN'); - st.end(); - }); - - t.test('signed hex numbers', function (st) { - st.equal(ES.ToNumber('-0xF'), NaN, '-0xF is NaN'); - st.equal(ES.ToNumber(' -0xF '), NaN, 'space-padded -0xF is NaN'); - st.equal(ES.ToNumber('+0xF'), NaN, '+0xF is NaN'); - st.equal(ES.ToNumber(' +0xF '), NaN, 'space-padded +0xF is NaN'); - - st.end(); - }); - - // TODO: check if this applies to ES5 - t.test('trimming of whitespace and non-whitespace characters', function (st) { - var whitespace = ' \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085'; - st.equal(ES.ToNumber(whitespace + 0 + whitespace), 0, 'whitespace is trimmed'); - - // Zero-width space (zws), next line character (nel), and non-character (bom) are not whitespace. - var nonWhitespaces = { - '\\u200b': '\u200b', - '\\ufffe': '\ufffe' - }; - - forEach(nonWhitespaces, function (desc, nonWS) { - st.equal(ES.ToNumber(nonWS + 0 + nonWS), NaN, 'non-whitespace ' + desc + ' not trimmed'); - }); - - st.end(); - }); - - t.test('dates', function (st) { - var invalid = new Date(NaN); - st.equal(ES.ToNumber(invalid), NaN, 'invalid Date coerces to NaN'); - var now = +new Date(); - st.equal(ES.ToNumber(new Date(now)), now, 'Date coerces to timestamp'); - st.end(); - }); - - t.end(); - }); - - test('ToInteger', function (t) { - forEach([NaN], function (num) { - t.equal(0, ES.ToInteger(num), debug(num) + ' returns +0'); - }); - forEach(v.zeroes.concat(v.infinities, 42), function (num) { - t.equal(num, ES.ToInteger(num), debug(num) + ' returns itself'); - t.equal(-num, ES.ToInteger(-num), '-' + debug(num) + ' returns itself'); - }); - t.equal(3, ES.ToInteger(Math.PI), 'pi returns 3'); - t['throws'](function () { return ES.ToInteger(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.end(); - }); - - test('ToInt32', function (t) { - t.equal(ES.ToInt32(NaN), 0, 'NaN coerces to +0'); - forEach(v.zeroes.concat(v.infinities), function (num) { - t.equal(ES.ToInt32(num), 0, num + ' returns +0'); - t.equal(ES.ToInt32(-num), 0, '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.equal(ES.ToInt32(0x100000000), 0, '2^32 returns +0'); - t.equal(ES.ToInt32(0x100000000 - 1), -1, '2^32 - 1 returns -1'); - t.equal(ES.ToInt32(0x80000000), -0x80000000, '2^31 returns -2^31'); - t.equal(ES.ToInt32(0x80000000 - 1), 0x80000000 - 1, '2^31 - 1 returns 2^31 - 1'); - forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { - t.equal(ES.ToInt32(num), ES.ToInt32(ES.ToUint32(num)), 'ToInt32(x) === ToInt32(ToUint32(x)) for 0x' + num.toString(16)); - t.equal(ES.ToInt32(-num), ES.ToInt32(ES.ToUint32(-num)), 'ToInt32(x) === ToInt32(ToUint32(x)) for -0x' + num.toString(16)); - }); - t.end(); - }); - - test('ToUint32', function (t) { - t.equal(0, ES.ToUint32(NaN), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.equal(0, ES.ToUint32(num), num + ' returns +0'); - t.equal(0, ES.ToUint32(-num), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint32(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.equal(ES.ToUint32(0x100000000), 0, '2^32 returns +0'); - t.equal(ES.ToUint32(0x100000000 - 1), 0x100000000 - 1, '2^32 - 1 returns 2^32 - 1'); - t.equal(ES.ToUint32(0x80000000), 0x80000000, '2^31 returns 2^31'); - t.equal(ES.ToUint32(0x80000000 - 1), 0x80000000 - 1, '2^31 - 1 returns 2^31 - 1'); - forEach([0, Infinity, NaN, 0x100000000, 0x80000000, 0x10000, 0x42], function (num) { - t.equal(ES.ToUint32(num), ES.ToUint32(ES.ToInt32(num)), 'ToUint32(x) === ToUint32(ToInt32(x)) for 0x' + num.toString(16)); - t.equal(ES.ToUint32(-num), ES.ToUint32(ES.ToInt32(-num)), 'ToUint32(x) === ToUint32(ToInt32(x)) for -0x' + num.toString(16)); - }); - t.end(); - }); - - test('ToUint16', function (t) { - t.equal(0, ES.ToUint16(NaN), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.equal(0, ES.ToUint16(num), num + ' returns +0'); - t.equal(0, ES.ToUint16(-num), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.equal(ES.ToUint16(0x100000000), 0, '2^32 returns +0'); - t.equal(ES.ToUint16(0x100000000 - 1), 0x10000 - 1, '2^32 - 1 returns 2^16 - 1'); - t.equal(ES.ToUint16(0x80000000), 0, '2^31 returns +0'); - t.equal(ES.ToUint16(0x80000000 - 1), 0x10000 - 1, '2^31 - 1 returns 2^16 - 1'); - t.equal(ES.ToUint16(0x10000), 0, '2^16 returns +0'); - t.equal(ES.ToUint16(0x10000 - 1), 0x10000 - 1, '2^16 - 1 returns 2^16 - 1'); - t.end(); - }); - - test('ToString', function (t) { - forEach(v.objects.concat(v.nonSymbolPrimitives), function (item) { - t.equal(ES.ToString(item), String(item), 'ES.ToString(' + debug(item) + ') ToStrings to String(' + debug(item) + ')'); - }); - - t['throws'](function () { return ES.ToString(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - - t.end(); - }); - - test('ToObject', function (t) { - t['throws'](function () { return ES.ToObject(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.ToObject(null); }, TypeError, 'null throws'); - forEach(v.numbers, function (number) { - var obj = ES.ToObject(number); - t.equal(typeof obj, 'object', 'number ' + number + ' coerces to object'); - t.equal(true, obj instanceof Number, 'object of ' + number + ' is Number object'); - t.equal(obj.valueOf(), number, 'object of ' + number + ' coerces to ' + number); - }); - t.end(); - }); - - test('CheckObjectCoercible', function (t) { - t['throws'](function () { return ES.CheckObjectCoercible(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.CheckObjectCoercible(null); }, TypeError, 'null throws'); - var checkCoercible = function (value) { - t.doesNotThrow(function () { return ES.CheckObjectCoercible(value); }, debug(value) + ' does not throw'); - }; - forEach(v.objects.concat(v.nonNullPrimitives), checkCoercible); - t.end(); - }); - - test('IsCallable', function (t) { - t.equal(true, ES.IsCallable(function () {}), 'function is callable'); - var nonCallables = [/a/g, {}, Object.prototype, NaN].concat(v.nonFunctions); - forEach(nonCallables, function (nonCallable) { - t.equal(false, ES.IsCallable(nonCallable), debug(nonCallable) + ' is not callable'); - }); - t.end(); - }); - - test('SameValue', function (t) { - t.equal(true, ES.SameValue(NaN, NaN), 'NaN is SameValue as NaN'); - t.equal(false, ES.SameValue(0, -0), '+0 is not SameValue as -0'); - forEach(v.objects.concat(v.primitives), function (val) { - t.equal(val === val, ES.SameValue(val, val), debug(val) + ' is SameValue to itself'); - }); - t.end(); - }); - - test('Type', function (t) { - t.equal(ES.Type(), 'Undefined', 'Type() is Undefined'); - t.equal(ES.Type(undefined), 'Undefined', 'Type(undefined) is Undefined'); - t.equal(ES.Type(null), 'Null', 'Type(null) is Null'); - t.equal(ES.Type(true), 'Boolean', 'Type(true) is Boolean'); - t.equal(ES.Type(false), 'Boolean', 'Type(false) is Boolean'); - t.equal(ES.Type(0), 'Number', 'Type(0) is Number'); - t.equal(ES.Type(NaN), 'Number', 'Type(NaN) is Number'); - t.equal(ES.Type('abc'), 'String', 'Type("abc") is String'); - t.equal(ES.Type(function () {}), 'Object', 'Type(function () {}) is Object'); - t.equal(ES.Type({}), 'Object', 'Type({}) is Object'); - - t.end(); - }); - - assertRecordTests(ES, test); - - test('IsAccessorDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.IsAccessorDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsAccessorDescriptor(), false, 'no value is not an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(undefined), false, 'undefined value is not an Accessor Descriptor'); - - t.equal(ES.IsAccessorDescriptor(v.accessorDescriptor()), true, 'accessor descriptor is an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.mutatorDescriptor()), true, 'mutator descriptor is an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.dataDescriptor()), false, 'data descriptor is not an Accessor Descriptor'); - t.equal(ES.IsAccessorDescriptor(v.genericDescriptor()), false, 'generic descriptor is not an Accessor Descriptor'); - - t.end(); - }); - - test('IsDataDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.IsDataDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsDataDescriptor(), false, 'no value is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); - - t.equal(ES.IsDataDescriptor(v.accessorDescriptor()), false, 'accessor descriptor is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.mutatorDescriptor()), false, 'mutator descriptor is not a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.dataDescriptor()), true, 'data descriptor is a Data Descriptor'); - t.equal(ES.IsDataDescriptor(v.genericDescriptor()), false, 'generic descriptor is not a Data Descriptor'); - - t.end(); - }); - - test('IsGenericDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.IsGenericDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsGenericDescriptor(), false, 'no value is not a Data Descriptor'); - t.equal(ES.IsGenericDescriptor(undefined), false, 'undefined value is not a Data Descriptor'); - - t.equal(ES.IsGenericDescriptor(v.accessorDescriptor()), false, 'accessor descriptor is not a generic Descriptor'); - t.equal(ES.IsGenericDescriptor(v.mutatorDescriptor()), false, 'mutator descriptor is not a generic Descriptor'); - t.equal(ES.IsGenericDescriptor(v.dataDescriptor()), false, 'data descriptor is not a generic Descriptor'); - - t.equal(ES.IsGenericDescriptor(v.genericDescriptor()), true, 'generic descriptor is a generic Descriptor'); - - t.end(); - }); - - test('FromPropertyDescriptor', function (t) { - t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); - t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); - - forEach(v.nonNullPrimitives.concat(null), function (primitive) { - t['throws']( - function () { ES.FromPropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(accessor), { - get: accessor['[[Get]]'], - set: accessor['[[Set]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(mutator), { - get: mutator['[[Get]]'], - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }); - var data = v.dataDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(data), { - value: data['[[Value]]'], - writable: data['[[Writable]]'], - enumerable: !!data['[[Enumerable]]'], - configurable: !!data['[[Configurable]]'] - }); - - t['throws']( - function () { ES.FromPropertyDescriptor(v.genericDescriptor()); }, - TypeError, - 'a complete Property Descriptor is required' - ); - - t.end(); - }); - - test('ToPropertyDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.ToPropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - get: accessor['[[Get]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }), accessor); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.ToPropertyDescriptor({ - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }), mutator); - - var data = v.descriptors.nonConfigurable(v.dataDescriptor()); - t.deepEqual(ES.ToPropertyDescriptor({ - value: data['[[Value]]'], - writable: data['[[Writable]]'], - configurable: !!data['[[Configurable]]'] - }), data); - - var both = v.bothDescriptor(); - t['throws']( - function () { - ES.ToPropertyDescriptor({ get: both['[[Get]]'], value: both['[[Value]]'] }); - }, - TypeError, - 'data and accessor descriptors are mutually exclusive' - ); - - t['throws']( - function () { ES.ToPropertyDescriptor({ get: 'not callable' }); }, - TypeError, - '"get" must be undefined or callable' - ); - - t['throws']( - function () { ES.ToPropertyDescriptor({ set: 'not callable' }); }, - TypeError, - '"set" must be undefined or callable' - ); - - forEach(v.nonFunctions, function (nonFunction) { - if (typeof nonFunction !== 'undefined') { - t['throws']( - function () { ES.ToPropertyDescriptor({ get: nonFunction }); }, - TypeError, - '`.get` has ' + debug(nonFunction) + ', which is not a Function' - ); - t['throws']( - function () { ES.ToPropertyDescriptor({ set: nonFunction }); }, - TypeError, - '`.set` has ' + debug(nonFunction) + ', which is not a Function' - ); - } - }); - - forEach(['get', 'set'], function (accessorName) { - forEach(['value', 'writable'], function (dataName) { - var o = {}; - o[accessorName] = undefined; - o[dataName] = undefined; - - t['throws']( - function () { ES.ToPropertyDescriptor(o); }, - TypeError, - accessorName + ' + ' + dataName + ' is invalid' - ); - }); - }); - - t.end(); - }); - - test('Abstract Equality Comparison', function (t) { - t.test('same types use ===', function (st) { - forEach(v.primitives.concat(v.objects), function (value) { - st.equal(ES['Abstract Equality Comparison'](value, value), value === value, debug(value) + ' is abstractly equal to itself'); - }); - st.end(); - }); - - t.test('different types coerce', function (st) { - var pairs = [ - [null, undefined], - [3, '3'], - [true, '3'], - [true, 3], - [false, 0], - [false, '0'], - [3, [3]], - ['3', [3]], - [true, [1]], - [false, [0]], - [String(v.coercibleObject), v.coercibleObject], - [Number(String(v.coercibleObject)), v.coercibleObject], - [Number(v.coercibleObject), v.coercibleObject], - [String(Number(v.coercibleObject)), v.coercibleObject] - ]; - forEach(pairs, function (pair) { - var a = pair[0]; - var b = pair[1]; - // eslint-disable-next-line eqeqeq - st.equal(ES['Abstract Equality Comparison'](a, b), a == b, debug(a) + ' == ' + debug(b)); - // eslint-disable-next-line eqeqeq - st.equal(ES['Abstract Equality Comparison'](b, a), b == a, debug(b) + ' == ' + debug(a)); - }); - st.end(); - }); - - t.end(); - }); - - test('Strict Equality Comparison', function (t) { - t.test('same types use ===', function (st) { - forEach(v.primitives.concat(v.objects), function (value) { - st.equal(ES['Strict Equality Comparison'](value, value), value === value, debug(value) + ' is strictly equal to itself'); - }); - st.end(); - }); - - t.test('different types are not ===', function (st) { - var pairs = [ - [null, undefined], - [3, '3'], - [true, '3'], - [true, 3], - [false, 0], - [false, '0'], - [3, [3]], - ['3', [3]], - [true, [1]], - [false, [0]], - [String(v.coercibleObject), v.coercibleObject], - [Number(String(v.coercibleObject)), v.coercibleObject], - [Number(v.coercibleObject), v.coercibleObject], - [String(Number(v.coercibleObject)), v.coercibleObject] - ]; - forEach(pairs, function (pair) { - var a = pair[0]; - var b = pair[1]; - st.equal(ES['Strict Equality Comparison'](a, b), a === b, debug(a) + ' === ' + debug(b)); - st.equal(ES['Strict Equality Comparison'](b, a), b === a, debug(b) + ' === ' + debug(a)); - }); - st.end(); - }); - - t.end(); - }); - - test('Abstract Relational Comparison', function (t) { - t.test('at least one operand is NaN', function (st) { - st.equal(ES['Abstract Relational Comparison'](NaN, {}, true), undefined, 'LeftFirst: first is NaN, returns undefined'); - st.equal(ES['Abstract Relational Comparison']({}, NaN, true), undefined, 'LeftFirst: second is NaN, returns undefined'); - st.equal(ES['Abstract Relational Comparison'](NaN, {}, false), undefined, '!LeftFirst: first is NaN, returns undefined'); - st.equal(ES['Abstract Relational Comparison']({}, NaN, false), undefined, '!LeftFirst: second is NaN, returns undefined'); - st.end(); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES['Abstract Relational Comparison'](3, 4, nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - forEach(v.zeroes, function (zero) { - t.equal(ES['Abstract Relational Comparison'](zero, 1, true), true, 'LeftFirst: ' + debug(zero) + ' is less than 1'); - t.equal(ES['Abstract Relational Comparison'](zero, 1, false), true, '!LeftFirst: ' + debug(zero) + ' is less than 1'); - t.equal(ES['Abstract Relational Comparison'](1, zero, true), false, 'LeftFirst: 1 is not less than ' + debug(zero)); - t.equal(ES['Abstract Relational Comparison'](1, zero, false), false, '!LeftFirst: 1 is not less than ' + debug(zero)); - - t.equal(ES['Abstract Relational Comparison'](zero, zero, true), false, 'LeftFirst: ' + debug(zero) + ' is not less than ' + debug(zero)); - t.equal(ES['Abstract Relational Comparison'](zero, zero, false), false, '!LeftFirst: ' + debug(zero) + ' is not less than ' + debug(zero)); - }); - - t.equal(ES['Abstract Relational Comparison'](Infinity, -Infinity, true), false, 'LeftFirst: ∞ is not less than -∞'); - t.equal(ES['Abstract Relational Comparison'](Infinity, -Infinity, false), false, '!LeftFirst: ∞ is not less than -∞'); - t.equal(ES['Abstract Relational Comparison'](-Infinity, Infinity, true), true, 'LeftFirst: -∞ is less than ∞'); - t.equal(ES['Abstract Relational Comparison'](-Infinity, Infinity, false), true, '!LeftFirst: -∞ is less than ∞'); - t.equal(ES['Abstract Relational Comparison'](-Infinity, 0, true), true, 'LeftFirst: -∞ is less than +0'); - t.equal(ES['Abstract Relational Comparison'](-Infinity, 0, false), true, '!LeftFirst: -∞ is less than +0'); - t.equal(ES['Abstract Relational Comparison'](0, -Infinity, true), false, 'LeftFirst: +0 is not less than -∞'); - t.equal(ES['Abstract Relational Comparison'](0, -Infinity, false), false, '!LeftFirst: +0 is not less than -∞'); - - t.equal(ES['Abstract Relational Comparison'](3, 4, true), true, 'LeftFirst: 3 is less than 4'); - t.equal(ES['Abstract Relational Comparison'](4, 3, true), false, 'LeftFirst: 3 is not less than 4'); - t.equal(ES['Abstract Relational Comparison'](3, 4, false), true, '!LeftFirst: 3 is less than 4'); - t.equal(ES['Abstract Relational Comparison'](4, 3, false), false, '!LeftFirst: 3 is not less than 4'); - - t.equal(ES['Abstract Relational Comparison']('3', '4', true), true, 'LeftFirst: "3" is less than "4"'); - t.equal(ES['Abstract Relational Comparison']('4', '3', true), false, 'LeftFirst: "3" is not less than "4"'); - t.equal(ES['Abstract Relational Comparison']('3', '4', false), true, '!LeftFirst: "3" is less than "4"'); - t.equal(ES['Abstract Relational Comparison']('4', '3', false), false, '!LeftFirst: "3" is not less than "4"'); - - t.equal(ES['Abstract Relational Comparison']('a', 'abc', true), true, 'LeftFirst: "a" is less than "abc"'); - t.equal(ES['Abstract Relational Comparison']('abc', 'a', true), false, 'LeftFirst: "abc" is not less than "a"'); - t.equal(ES['Abstract Relational Comparison']('a', 'abc', false), true, '!LeftFirst: "a" is less than "abc"'); - t.equal(ES['Abstract Relational Comparison']('abc', 'a', false), false, '!LeftFirst: "abc" is not less than "a"'); - - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, 42, true), true, 'LeftFirst: coercible object is less than 42'); - t.equal(ES['Abstract Relational Comparison'](42, v.coercibleObject, true), false, 'LeftFirst: 42 is not less than coercible object'); - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, 42, false), true, '!LeftFirst: coercible object is less than 42'); - t.equal(ES['Abstract Relational Comparison'](42, v.coercibleObject, false), false, '!LeftFirst: 42 is not less than coercible object'); - - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, '3', true), false, 'LeftFirst: coercible object is not less than "3"'); - t.equal(ES['Abstract Relational Comparison']('3', v.coercibleObject, true), false, 'LeftFirst: "3" is not less than coercible object'); - t.equal(ES['Abstract Relational Comparison'](v.coercibleObject, '3', false), false, '!LeftFirst: coercible object is not less than "3"'); - t.equal(ES['Abstract Relational Comparison']('3', v.coercibleObject, false), false, '!LeftFirst: "3" is not less than coercible object'); - - t.end(); - }); - - test('SecFromTime', function (t) { - var now = new Date(); - t.equal(ES.SecFromTime(now.getTime()), now.getUTCSeconds(), 'second from Date timestamp matches getUTCSeconds'); - t.end(); - }); - - test('MinFromTime', function (t) { - var now = new Date(); - t.equal(ES.MinFromTime(now.getTime()), now.getUTCMinutes(), 'minute from Date timestamp matches getUTCMinutes'); - t.end(); - }); - - test('HourFromTime', function (t) { - var now = new Date(); - t.equal(ES.HourFromTime(now.getTime()), now.getUTCHours(), 'hour from Date timestamp matches getUTCHours'); - t.end(); - }); - - test('msFromTime', function (t) { - var now = new Date(); - t.equal(ES.msFromTime(now.getTime()), now.getUTCMilliseconds(), 'ms from Date timestamp matches getUTCMilliseconds'); - t.end(); - }); - - var msPerSecond = 1e3; - var msPerMinute = 60 * msPerSecond; - var msPerHour = 60 * msPerMinute; - var msPerDay = 24 * msPerHour; - - test('Day', function (t) { - var time = Date.UTC(2019, 8, 10, 2, 3, 4, 5); - var add = 2.5; - var later = new Date(time + (add * msPerDay)); - - t.equal(ES.Day(later.getTime()), ES.Day(time) + Math.floor(add), 'adding 2.5 days worth of ms, gives a Day delta of 2'); - t.end(); - }); - - test('DayFromYear', function (t) { - t.equal(ES.DayFromYear(2021) - ES.DayFromYear(2020), 366, '2021 is a leap year, has 366 days'); - t.equal(ES.DayFromYear(2020) - ES.DayFromYear(2019), 365, '2020 is not a leap year, has 365 days'); - t.equal(ES.DayFromYear(2019) - ES.DayFromYear(2018), 365, '2019 is not a leap year, has 365 days'); - t.equal(ES.DayFromYear(2018) - ES.DayFromYear(2017), 365, '2018 is not a leap year, has 365 days'); - t.equal(ES.DayFromYear(2017) - ES.DayFromYear(2016), 366, '2017 is a leap year, has 366 days'); - - t.end(); - }); - - test('TimeWithinDay', function (t) { - var time = Date.UTC(2019, 8, 10, 2, 3, 4, 5); - var add = 2.5; - var later = new Date(time + (add * msPerDay)); - - t.equal(ES.TimeWithinDay(later.getTime()), ES.TimeWithinDay(time) + (0.5 * msPerDay), 'adding 2.5 days worth of ms, gives a TimeWithinDay delta of +0.5'); - t.end(); - }); - - test('TimeFromYear', function (t) { - for (var i = 1900; i < 2100; i += 1) { - t.equal(ES.TimeFromYear(i), Date.UTC(i, 0, 1), 'TimeFromYear matches a Date object’s year: ' + i); - } - t.end(); - }); - - test('YearFromTime', function (t) { - for (var i = 1900; i < 2100; i += 1) { - t.equal(ES.YearFromTime(Date.UTC(i, 0, 1)), i, 'YearFromTime matches a Date object’s year on 1/1: ' + i); - t.equal(ES.YearFromTime(Date.UTC(i, 10, 1)), i, 'YearFromTime matches a Date object’s year on 10/1: ' + i); - } - t.end(); - }); - - test('WeekDay', function (t) { - var now = new Date(); - var today = now.getUTCDay(); - for (var i = 0; i < 7; i += 1) { - var weekDay = ES.WeekDay(now.getTime() + (i * msPerDay)); - t.equal(weekDay, (today + i) % 7, i + ' days after today (' + today + '), WeekDay is ' + weekDay); - } - t.end(); - }); - - test('DaysInYear', function (t) { - t.equal(ES.DaysInYear(2021), 365, '2021 is not a leap year'); - t.equal(ES.DaysInYear(2020), 366, '2020 is a leap year'); - t.equal(ES.DaysInYear(2019), 365, '2019 is not a leap year'); - t.equal(ES.DaysInYear(2018), 365, '2018 is not a leap year'); - t.equal(ES.DaysInYear(2017), 365, '2017 is not a leap year'); - t.equal(ES.DaysInYear(2016), 366, '2016 is a leap year'); - t.equal(ES.DaysInYear(2000), 366, '2000 is a leap year'); - t.equal(ES.DaysInYear(1900), 365, '1900 is not a leap year'); - - t.end(); - }); - - test('InLeapYear', function (t) { - t.equal(ES.InLeapYear(Date.UTC(2021, 0, 1)), 0, '2021 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2020, 0, 1)), 1, '2020 is a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2019, 0, 1)), 0, '2019 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2018, 0, 1)), 0, '2018 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2017, 0, 1)), 0, '2017 is not a leap year'); - t.equal(ES.InLeapYear(Date.UTC(2016, 0, 1)), 1, '2016 is a leap year'); - - t.end(); - }); - - test('DayWithinYear', function (t) { - t.equal(ES.DayWithinYear(Date.UTC(2019, 0, 1)), 0, '1/1 is the 1st day'); - t.equal(ES.DayWithinYear(Date.UTC(2019, 11, 31)), 364, '12/31 is the 365th day in a non leap year'); - t.equal(ES.DayWithinYear(Date.UTC(2016, 11, 31)), 365, '12/31 is the 366th day in a leap year'); - - t.end(); - }); - - test('MonthFromTime', function (t) { - t.equal(ES.MonthFromTime(Date.UTC(2019, 0, 1)), 0, 'non-leap: 1/1 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 0, 31)), 0, 'non-leap: 1/31 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 1, 1)), 1, 'non-leap: 2/1 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 1, 28)), 1, 'non-leap: 2/28 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 1, 29)), 2, 'non-leap: 2/29 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 2, 1)), 2, 'non-leap: 3/1 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 2, 31)), 2, 'non-leap: 3/31 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 3, 1)), 3, 'non-leap: 4/1 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 3, 30)), 3, 'non-leap: 4/30 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 4, 1)), 4, 'non-leap: 5/1 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 4, 31)), 4, 'non-leap: 5/31 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 5, 1)), 5, 'non-leap: 6/1 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 5, 30)), 5, 'non-leap: 6/30 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 6, 1)), 6, 'non-leap: 7/1 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 6, 31)), 6, 'non-leap: 7/31 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 7, 1)), 7, 'non-leap: 8/1 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 7, 30)), 7, 'non-leap: 8/30 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 8, 1)), 8, 'non-leap: 9/1 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 8, 30)), 8, 'non-leap: 9/30 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 9, 1)), 9, 'non-leap: 10/1 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 9, 31)), 9, 'non-leap: 10/31 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 10, 1)), 10, 'non-leap: 11/1 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 10, 30)), 10, 'non-leap: 11/30 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 11, 1)), 11, 'non-leap: 12/1 gives December'); - t.equal(ES.MonthFromTime(Date.UTC(2019, 11, 31)), 11, 'non-leap: 12/31 gives December'); - - t.equal(ES.MonthFromTime(Date.UTC(2016, 0, 1)), 0, 'leap: 1/1 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 0, 31)), 0, 'leap: 1/31 gives January'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 1, 1)), 1, 'leap: 2/1 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 1, 28)), 1, 'leap: 2/28 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 1, 29)), 1, 'leap: 2/29 gives February'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 2, 1)), 2, 'leap: 3/1 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 2, 31)), 2, 'leap: 3/31 gives March'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 3, 1)), 3, 'leap: 4/1 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 3, 30)), 3, 'leap: 4/30 gives April'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 4, 1)), 4, 'leap: 5/1 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 4, 31)), 4, 'leap: 5/31 gives May'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 5, 1)), 5, 'leap: 6/1 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 5, 30)), 5, 'leap: 6/30 gives June'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 6, 1)), 6, 'leap: 7/1 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 6, 31)), 6, 'leap: 7/31 gives July'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 7, 1)), 7, 'leap: 8/1 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 7, 30)), 7, 'leap: 8/30 gives August'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 8, 1)), 8, 'leap: 9/1 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 8, 30)), 8, 'leap: 9/30 gives September'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 9, 1)), 9, 'leap: 10/1 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 9, 31)), 9, 'leap: 10/31 gives October'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 10, 1)), 10, 'leap: 11/1 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 10, 30)), 10, 'leap: 11/30 gives November'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 11, 1)), 11, 'leap: 12/1 gives December'); - t.equal(ES.MonthFromTime(Date.UTC(2016, 11, 31)), 11, 'leap: 12/31 gives December'); - t.end(); - }); - - test('DateFromTime', function (t) { - var i; - for (i = 1; i <= 28; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2019, 1, i)), i, '2019.02.' + i + ' is date ' + i); - } - for (i = 1; i <= 29; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2016, 1, i)), i, '2016.02.' + i + ' is date ' + i); - } - for (i = 1; i <= 30; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2019, 2, i)), i, '2019.03.' + i + ' is date ' + i); - t.equal(ES.DateFromTime(Date.UTC(2019, 3, i)), i, '2019.04.' + i + ' is date ' + i); - t.equal(ES.DateFromTime(Date.UTC(2019, 5, i)), i, '2019.06.' + i + ' is date ' + i); - t.equal(ES.DateFromTime(Date.UTC(2019, 7, i)), i, '2019.08.' + i + ' is date ' + i); - t.equal(ES.DateFromTime(Date.UTC(2019, 8, i)), i, '2019.09.' + i + ' is date ' + i); - t.equal(ES.DateFromTime(Date.UTC(2019, 10, i)), i, '2019.11.' + i + ' is date ' + i); - } - for (i = 1; i <= 31; i += 1) { - t.equal(ES.DateFromTime(Date.UTC(2019, 0, i)), i, '2019.01.' + i + ' is date ' + i); - t.equal(ES.DateFromTime(Date.UTC(2019, 4, i)), i, '2019.05.' + i + ' is date ' + i); - t.equal(ES.DateFromTime(Date.UTC(2019, 6, i)), i, '2019.07.' + i + ' is date ' + i); - t.equal(ES.DateFromTime(Date.UTC(2019, 9, i)), i, '2019.10.' + i + ' is date ' + i); - t.equal(ES.DateFromTime(Date.UTC(2019, 11, i)), i, '2019.12.' + i + ' is date ' + i); - } - t.end(); - }); - - test('MakeDay', function (t) { - forEach([NaN, Infinity, -Infinity], function (nonFiniteNumber) { - t.equal(ES.MakeDay(nonFiniteNumber, 0, 0), NaN, 'year: ' + debug(nonFiniteNumber) + ' is not finite'); - t.equal(ES.MakeDay(0, nonFiniteNumber, 0), NaN, 'month: ' + debug(nonFiniteNumber) + ' is not finite'); - t.equal(ES.MakeDay(0, 0, nonFiniteNumber), NaN, 'date: ' + debug(nonFiniteNumber) + ' is not finite'); - }); - - var day2015 = 16687; - t.equal(ES.MakeDay(2015, 8, 9), day2015, '2015.09.09 is day 16687'); - var day2016 = day2015 + 366; // 2016 is a leap year - t.equal(ES.MakeDay(2016, 8, 9), day2016, '2015.09.09 is day 17053'); - var day2017 = day2016 + 365; - t.equal(ES.MakeDay(2017, 8, 9), day2017, '2017.09.09 is day 17418'); - var day2018 = day2017 + 365; - t.equal(ES.MakeDay(2018, 8, 9), day2018, '2018.09.09 is day 17783'); - var day2019 = day2018 + 365; - t.equal(ES.MakeDay(2019, 8, 9), day2019, '2019.09.09 is day 18148'); - - t.end(); - }); - - test('MakeDate', function (t) { - forEach(v.infinities.concat(NaN), function (nonFiniteNumber) { - t.equal(ES.MakeDate(nonFiniteNumber, 0), NaN, debug(nonFiniteNumber) + ' is not a finite `day`'); - t.equal(ES.MakeDate(0, nonFiniteNumber), NaN, debug(nonFiniteNumber) + ' is not a finite `time`'); - }); - t.equal(ES.MakeDate(0, 0), 0, 'zero day and zero time is zero date'); - t.equal(ES.MakeDate(0, 123), 123, 'zero day and nonzero time is a date of the "time"'); - t.equal(ES.MakeDate(1, 0), msPerDay, 'day of 1 and zero time is a date of "ms per day"'); - t.equal(ES.MakeDate(3, 0), 3 * msPerDay, 'day of 3 and zero time is a date of thrice "ms per day"'); - t.equal(ES.MakeDate(1, 123), msPerDay + 123, 'day of 1 and nonzero time is a date of "ms per day" plus the "time"'); - t.equal(ES.MakeDate(3, 123), (3 * msPerDay) + 123, 'day of 3 and nonzero time is a date of thrice "ms per day" plus the "time"'); - - t.end(); - }); - - test('MakeTime', function (t) { - forEach(v.infinities.concat(NaN), function (nonFiniteNumber) { - t.equal(ES.MakeTime(nonFiniteNumber, 0, 0, 0), NaN, debug(nonFiniteNumber) + ' is not a finite `hour`'); - t.equal(ES.MakeTime(0, nonFiniteNumber, 0, 0), NaN, debug(nonFiniteNumber) + ' is not a finite `min`'); - t.equal(ES.MakeTime(0, 0, nonFiniteNumber, 0), NaN, debug(nonFiniteNumber) + ' is not a finite `sec`'); - t.equal(ES.MakeTime(0, 0, 0, nonFiniteNumber), NaN, debug(nonFiniteNumber) + ' is not a finite `ms`'); - }); - - t.equal( - ES.MakeTime(1.2, 2.3, 3.4, 4.5), - (1 * msPerHour) + (2 * msPerMinute) + (3 * msPerSecond) + 4, - 'all numbers are converted to integer, multiplied by the right number of ms, and summed' - ); - - t.end(); - }); - - test('TimeClip', function (t) { - forEach(v.infinities.concat(NaN), function (nonFiniteNumber) { - t.equal(ES.TimeClip(nonFiniteNumber), NaN, debug(nonFiniteNumber) + ' is not a finite `time`'); - }); - t.equal(ES.TimeClip(8.64e15 + 1), NaN, '8.64e15 is the largest magnitude considered "finite"'); - t.equal(ES.TimeClip(-8.64e15 - 1), NaN, '-8.64e15 is the largest magnitude considered "finite"'); - - forEach(v.zeroes.concat([-10, 10, +new Date()]), function (time) { - t.looseEqual(ES.TimeClip(time), time, debug(time) + ' is a time of ' + debug(time)); - }); - - t.end(); - }); - - test('modulo', function (t) { - t.equal(3 % 2, 1, '+3 % 2 is +1'); - t.equal(ES.modulo(3, 2), 1, '+3 mod 2 is +1'); - - t.equal(-3 % 2, -1, '-3 % 2 is -1'); - t.equal(ES.modulo(-3, 2), 1, '-3 mod 2 is +1'); - t.end(); - }); -}; - -var es2015 = function ES2015(ES, ops, expectedMissing, skips) { - es5(ES, ops, expectedMissing, assign(assign({}, skips), { - CheckObjectCoercible: true, - FromPropertyDescriptor: true, - ToNumber: true, - ToString: true, - Type: true - })); - var test = makeTest(skips); - - var getNamelessFunction = function () { - var f = Object(function () {}); - try { - delete f.name; - } catch (e) { /**/ } - return f; - }; - - test('AdvanceStringIndex', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.AdvanceStringIndex(nonString); }, - TypeError, - '"S" argument must be a String; ' + debug(nonString) + ' is not' - ); - }); - - var notInts = v.nonNumbers.concat( - v.nonIntegerNumbers, - v.infinities, - [NaN, [], new Date(), Math.pow(2, 53), -1] - ); - forEach(notInts, function (nonInt) { - t['throws']( - function () { ES.AdvanceStringIndex('abc', nonInt); }, - TypeError, - '"index" argument must be an integer, ' + debug(nonInt) + ' is not.' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.AdvanceStringIndex('abc', 0, nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - var str = 'a' + wholePoo + 'c'; - - t.test('non-unicode mode', function (st) { - for (var i = 0; i < str.length + 2; i += 1) { - st.equal(ES.AdvanceStringIndex(str, i, false), i + 1, i + ' advances to ' + (i + 1)); - } - - st.end(); - }); - - t.test('unicode mode', function (st) { - st.equal(ES.AdvanceStringIndex(str, 0, true), 1, '0 advances to 1'); - st.equal(ES.AdvanceStringIndex(str, 1, true), 3, '1 advances to 3'); - st.equal(ES.AdvanceStringIndex(str, 2, true), 3, '2 advances to 3'); - st.equal(ES.AdvanceStringIndex(str, 3, true), 4, '3 advances to 4'); - st.equal(ES.AdvanceStringIndex(str, 4, true), 5, '4 advances to 5'); - - st.end(); - }); - - t.test('lone surrogates', function (st) { - var halfPoo = 'a' + leadingPoo + 'c'; - - st.equal(ES.AdvanceStringIndex(halfPoo, 0, true), 1, '0 advances to 1'); - st.equal(ES.AdvanceStringIndex(halfPoo, 1, true), 2, '1 advances to 2'); - st.equal(ES.AdvanceStringIndex(halfPoo, 2, true), 3, '2 advances to 3'); - st.equal(ES.AdvanceStringIndex(halfPoo, 3, true), 4, '3 advances to 4'); - - st.end(); - }); - - t.test('surrogate pairs', function (st) { - var lowestPair = String.fromCharCode('0xD800') + String.fromCharCode('0xDC00'); - var highestPair = String.fromCharCode('0xDBFF') + String.fromCharCode('0xDFFF'); - - st.equal(ES.AdvanceStringIndex(lowestPair, 0, true), 2, 'lowest surrogate pair, 0 -> 2'); - st.equal(ES.AdvanceStringIndex(highestPair, 0, true), 2, 'highest surrogate pair, 0 -> 2'); - st.equal(ES.AdvanceStringIndex(wholePoo, 0, true), 2, 'poop, 0 -> 2'); - - st.end(); - }); - - t.end(); - }); - - test('ArrayCreate', function (t) { - forEach(v.nonIntegerNumbers.concat([-1]), function (nonIntegerNumber) { - t['throws']( - function () { ES.ArrayCreate(nonIntegerNumber); }, - TypeError, - 'length must be an integer number >= 0' - ); - }); - - t['throws']( - function () { ES.ArrayCreate(Math.pow(2, 32)); }, - RangeError, - 'length must be < 2**32' - ); - - t.deepEqual(ES.ArrayCreate(-0), [], 'length of -0 creates an empty array'); - t.deepEqual(ES.ArrayCreate(0), [], 'length of +0 creates an empty array'); - // eslint-disable-next-line no-sparse-arrays, comma-spacing - t.deepEqual(ES.ArrayCreate(1), [,], 'length of 1 creates a sparse array of length 1'); - // eslint-disable-next-line no-sparse-arrays, comma-spacing - t.deepEqual(ES.ArrayCreate(2), [,,], 'length of 2 creates a sparse array of length 2'); - - t.test('proto argument', { skip: !$setProto }, function (st) { - var fakeProto = { - push: { toString: function () { return 'not array push'; } } - }; - st.equal(ES.ArrayCreate(0, fakeProto).push, fakeProto.push, 'passing the proto argument works'); - st.end(); - }); - - t.end(); - }); - - test('ArraySetLength', function (t) { - forEach(v.primitives.concat(v.objects), function (nonArray) { - t['throws']( - function () { ES.ArraySetLength(nonArray, { '[[Value]]': 0 }); }, - TypeError, - 'A: ' + debug(nonArray) + ' is not an Array' - ); - }); - - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.ArraySetLength([], primitive); }, - TypeError, - 'Desc: ' + debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.test('making length nonwritable', { skip: !getOwnPropertyDescriptor }, function (st) { - var a = []; - ES.ArraySetLength(a, { '[[Writable]]': false }); - st.deepEqual( - getOwnPropertyDescriptor(a, 'length'), - { - configurable: false, - enumerable: false, - value: 0, - writable: false - }, - 'without a value, length becomes nonwritable' - ); - st.end(); - }); - - forEach([-1, Math.pow(2, 32)].concat(v.nonIntegerNumbers), function (nonLength) { - t['throws']( - function () { ES.ArraySetLength([], { '[[Value]]': nonLength }); }, - RangeError, - 'a non-integer, negative, or > (2**31 - 1) is not a valid length: ' + debug(nonLength) - ); - }); - - var arr = []; - ES.ArraySetLength(arr, { '[[Value]]': 7 }); - t.equal(arr.length, 7, 'array now has a length of 7'); - - t.end(); - }); - - test('ArraySpeciesCreate', function (t) { - t.test('errors', function (st) { - var testNonNumber = function (nonNumber) { - st['throws']( - function () { ES.ArraySpeciesCreate([], nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a number' - ); - }; - forEach(v.nonNumbers, testNonNumber); - - st['throws']( - function () { ES.ArraySpeciesCreate([], -1); }, - TypeError, - '-1 is not >= 0' - ); - st['throws']( - function () { ES.ArraySpeciesCreate([], -Infinity); }, - TypeError, - '-Infinity is not >= 0' - ); - - var testNonIntegers = function (nonInteger) { - st['throws']( - function () { ES.ArraySpeciesCreate([], nonInteger); }, - TypeError, - debug(nonInteger) + ' is not an integer' - ); - }; - forEach(v.nonIntegerNumbers, testNonIntegers); - - st.end(); - }); - - t.test('works with a non-array', function (st) { - forEach(v.objects.concat(v.primitives), function (nonArray) { - var arr = ES.ArraySpeciesCreate(nonArray, 0); - st.ok(ES.IsArray(arr), 'is an array'); - st.equal(arr.length, 0, 'length is correct'); - st.equal(arr.constructor, Array, 'constructor is correct'); - }); - - st.end(); - }); - - t.test('works with a normal array', function (st) { - var len = 2; - var orig = [1, 2, 3]; - var arr = ES.ArraySpeciesCreate(orig, len); - - st.ok(ES.IsArray(arr), 'is an array'); - st.equal(arr.length, len, 'length is correct'); - st.equal(arr.constructor, orig.constructor, 'constructor is correct'); - - st.end(); - }); - - t.test('-0 length produces +0 length', function (st) { - var len = -0; - st.equal(len, -0, '-0 is negative zero'); - st.notEqual(len, 0, '-0 is not positive zero'); - - var orig = [1, 2, 3]; - var arr = ES.ArraySpeciesCreate(orig, len); - - st.equal(ES.IsArray(arr), true); - st.equal(arr.length, 0); - st.equal(arr.constructor, orig.constructor); - - st.end(); - }); - - t.test('works with species construtor', { skip: !hasSpecies }, function (st) { - var sentinel = {}; - var Foo = function Foo(len) { - this.length = len; - this.sentinel = sentinel; - }; - var Bar = getArraySubclassWithSpeciesConstructor(Foo); - var bar = new Bar(); - - st.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - var arr = ES.ArraySpeciesCreate(bar, 3); - st.equal(arr.constructor, Foo, 'result used species constructor'); - st.equal(arr.length, 3, 'length property is correct'); - st.equal(arr.sentinel, sentinel, 'Foo constructor was exercised'); - - st.end(); - }); - - t.test('works with null species constructor', { skip: !hasSpecies }, function (st) { - var Bar = getArraySubclassWithSpeciesConstructor(null); - var bar = new Bar(); - - st.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - var arr = ES.ArraySpeciesCreate(bar, 3); - st.equal(arr.constructor, Array, 'result used default constructor'); - st.equal(arr.length, 3, 'length property is correct'); - - st.end(); - }); - - t.test('works with undefined species constructor', { skip: !hasSpecies }, function (st) { - var Bar = getArraySubclassWithSpeciesConstructor(); - var bar = new Bar(); - - st.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - var arr = ES.ArraySpeciesCreate(bar, 3); - st.equal(arr.constructor, Array, 'result used default constructor'); - st.equal(arr.length, 3, 'length property is correct'); - - st.end(); - }); - - t.test('throws with object non-construtor species constructor', { skip: !hasSpecies }, function (st) { - forEach(v.objects, function (obj) { - var Bar = getArraySubclassWithSpeciesConstructor(obj); - var bar = new Bar(); - - st.equal(ES.IsArray(bar), true, 'Bar instance is an array'); - - st['throws']( - function () { ES.ArraySpeciesCreate(bar, 3); }, - TypeError, - debug(obj) + ' is not a constructor' - ); - }); - - st.end(); - }); - - t.end(); - }); - - test('Call', function (t) { - var receiver = {}; - var notFuncs = v.nonFunctions.concat([/a/g, new RegExp('a', 'g')]); - t.plan(notFuncs.length + v.nonArrays.length + 5); - - forEach(notFuncs, function (notFunc) { - t['throws']( - function () { return ES.Call(notFunc, receiver); }, - TypeError, - debug(notFunc) + ' (' + typeof notFunc + ') is not callable' - ); - }); - - forEach(v.nonArrays, function (nonArray) { - t['throws']( - function () { ES.Call(Function.prototype, null, nonArray); }, - TypeError, - debug(nonArray) + ' is not an array' - ); - }); - - ES.Call( - function (a, b) { - t.equal(this, receiver, 'context matches expected'); - t.deepEqual([a, b], [1, 2], 'named args are correct'); - t.equal(arguments.length, 3, 'extra argument was passed'); - t.equal(arguments[2], 3, 'extra argument was correct'); - }, - receiver, - [1, 2, 3] - ); - - t.test('Call doesn’t use func.apply', function (st) { - st.plan(4); - - var bad = function (a, b) { - st.equal(this, receiver, 'context matches expected'); - st.deepEqual([a, b], [1, 2], 'named args are correct'); - st.equal(arguments.length, 3, 'extra argument was passed'); - st.equal(arguments[2], 3, 'extra argument was correct'); - }; - - defineProperty(bad, 'apply', { - value: function () { - st.fail('bad.apply shouldn’t get called'); - } - }); - - ES.Call(bad, receiver, [1, 2, 3]); - st.end(); - }); - - t.end(); - }); - - test('CanonicalNumericIndexString', function (t) { - var throwsOnNonString = function (notString) { - t['throws']( - function () { return ES.CanonicalNumericIndexString(notString); }, - TypeError, - debug(notString) + ' is not a string' - ); - }; - forEach(v.objects.concat(v.numbers), throwsOnNonString); - t.equal(ES.CanonicalNumericIndexString('-0'), -0, '"-0" returns -0'); - for (var i = -50; i < 50; i += 10) { - t.equal(i, ES.CanonicalNumericIndexString(String(i)), '"' + i + '" returns ' + i); - t.equal(undefined, ES.CanonicalNumericIndexString(String(i) + 'a'), '"' + i + 'a" returns undefined'); - } - t.end(); - }); - - test('CompletePropertyDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.CompletePropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var generic = v.genericDescriptor(); - t.deepEqual( - ES.CompletePropertyDescriptor(generic), - { - '[[Configurable]]': !!generic['[[Configurable]]'], - '[[Enumerable]]': !!generic['[[Enumerable]]'], - '[[Value]]': undefined, - '[[Writable]]': false - }, - 'completes a Generic Descriptor' - ); - - var data = v.dataDescriptor(); - t.deepEqual( - ES.CompletePropertyDescriptor(data), - { - '[[Configurable]]': !!data['[[Configurable]]'], - '[[Enumerable]]': false, - '[[Value]]': data['[[Value]]'], - '[[Writable]]': !!data['[[Writable]]'] - }, - 'completes a Data Descriptor' - ); - - var accessor = v.accessorDescriptor(); - t.deepEqual( - ES.CompletePropertyDescriptor(accessor), - { - '[[Get]]': accessor['[[Get]]'], - '[[Enumerable]]': !!accessor['[[Enumerable]]'], - '[[Configurable]]': !!accessor['[[Configurable]]'], - '[[Set]]': undefined - }, - 'completes an Accessor Descriptor' - ); - - var mutator = v.mutatorDescriptor(); - t.deepEqual( - ES.CompletePropertyDescriptor(mutator), - { - '[[Set]]': mutator['[[Set]]'], - '[[Enumerable]]': !!mutator['[[Enumerable]]'], - '[[Configurable]]': !!mutator['[[Configurable]]'], - '[[Get]]': undefined - }, - 'completes a mutator Descriptor' - ); - - t['throws']( - function () { ES.CompletePropertyDescriptor(v.bothDescriptor()); }, - TypeError, - 'data and accessor descriptors are mutually exclusive' - ); - - t.end(); - }); - - test('CreateDataProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.CreateDataProperty(primitive); }, - TypeError, - debug(primitive) + ' is not an object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.CreateDataProperty({}, nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a property key' - ); - }); - - var sentinel = { id: 'sentinel' }; - var secondSentinel = { id: 'second sentinel' }; - forEach(v.propertyKeys, function (propertyKey) { - var obj = {}; - var status = ES.CreateDataProperty(obj, propertyKey, sentinel); - t.equal(status, true, 'status is true'); - t.equal( - obj[propertyKey], - sentinel, - debug(sentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' - ); - var secondStatus = ES.CreateDataProperty(obj, propertyKey, secondSentinel); - t.equal(secondStatus, true, 'second status is true'); - t.equal( - obj[propertyKey], - secondSentinel, - debug(secondSentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' - ); - - t.test('with defineProperty', { skip: !defineProperty.oDP }, function (st) { - var nonWritable = defineProperty({}, propertyKey, { configurable: true, writable: false }); - - var nonWritableStatus = ES.CreateDataProperty(nonWritable, propertyKey, sentinel); - st.equal(nonWritableStatus, false, 'create data property failed'); - st.notEqual( - nonWritable[propertyKey], - sentinel, - debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object when key is nonwritable' - ); - - var nonConfigurable = defineProperty({}, propertyKey, { configurable: false, writable: true }); - - var nonConfigurableStatus = ES.CreateDataProperty(nonConfigurable, propertyKey, sentinel); - st.equal(nonConfigurableStatus, false, 'create data property failed'); - st.notEqual( - nonConfigurable[propertyKey], - sentinel, - debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object when key is nonconfigurable' - ); - st.end(); - }); - }); - - t.end(); - }); - - test('CreateDataPropertyOrThrow', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.CreateDataPropertyOrThrow(primitive); }, - TypeError, - debug(primitive) + ' is not an object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.CreateDataPropertyOrThrow({}, nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a property key' - ); - }); - - var sentinel = {}; - forEach(v.propertyKeys, function (propertyKey) { - var obj = {}; - var status = ES.CreateDataPropertyOrThrow(obj, propertyKey, sentinel); - t.equal(status, true, 'status is true'); - t.equal( - obj[propertyKey], - sentinel, - debug(sentinel) + ' is installed on "' + debug(propertyKey) + '" on the object' - ); - - if (typeof Object.preventExtensions === 'function') { - var notExtensible = {}; - Object.preventExtensions(notExtensible); - - t['throws']( - function () { ES.CreateDataPropertyOrThrow(notExtensible, propertyKey, sentinel); }, - TypeError, - 'can not install ' + debug(propertyKey) + ' on non-extensible object' - ); - t.notEqual( - notExtensible[propertyKey], - sentinel, - debug(sentinel) + ' is not installed on "' + debug(propertyKey) + '" on the object' - ); - } - }); - - t.end(); - }); - - test('CreateListFromArrayLike', function (t) { - forEach(v.primitives, function (nonObject) { - t['throws']( - function () { ES.CreateListFromArrayLike(nonObject); }, - TypeError, - debug(nonObject) + ' is not an Object' - ); - }); - forEach(v.nonArrays, function (nonArray) { - t['throws']( - function () { ES.CreateListFromArrayLike({}, nonArray); }, - TypeError, - debug(nonArray) + ' is not an Array' - ); - }); - - t.deepEqual( - ES.CreateListFromArrayLike({ length: 2, 0: 'a', 1: 'b', 2: 'c' }), - ['a', 'b'], - 'arraylike stops at the length' - ); - - t.end(); - }); - - test('CreateHTML', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.CreateHTML('', nonString, '', ''); }, - TypeError, - 'tag: ' + debug(nonString) + ' is not a String' - ); - t['throws']( - function () { ES.CreateHTML('', '', nonString, ''); }, - TypeError, - 'attribute: ' + debug(nonString) + ' is not a String' - ); - }); - - t.equal( - ES.CreateHTML( - { toString: function () { return 'the string'; } }, - 'some HTML tag!', - '' - ), - 'the string', - 'works with an empty string attribute value' - ); - - t.equal( - ES.CreateHTML( - { toString: function () { return 'the string'; } }, - 'some HTML tag!', - 'attr', - 'value "with quotes"' - ), - 'the string', - 'works with an attribute, and a value with quotes' - ); - - t.end(); - }); - - test('CreateMethodProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.CreateMethodProperty(primitive, 'key'); }, - TypeError, - 'O must be an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.CreateMethodProperty({}, nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('defines correctly', function (st) { - var obj = {}; - var key = 'the key'; - var value = { foo: 'bar' }; - - st.equal(ES.CreateMethodProperty(obj, key, value), true, 'defines property successfully'); - st.test('property descriptor', { skip: !getOwnPropertyDescriptor }, function (s2t) { - s2t.deepEqual( - getOwnPropertyDescriptor(obj, key), - { - configurable: true, - enumerable: false, - value: value, - writable: true - }, - 'sets the correct property descriptor' - ); - - s2t.end(); - }); - st.equal(obj[key], value, 'sets the correct value'); - - st.end(); - }); - - t.test('fails as expected on a frozen object', { skip: !Object.freeze }, function (st) { - var obj = Object.freeze({ foo: 'bar' }); - st['throws']( - function () { ES.CreateMethodProperty(obj, 'foo', { value: 'baz' }); }, - TypeError, - 'nonconfigurable key can not be defined' - ); - - st.end(); - }); - - t.test('fails as expected on a function with a nonconfigurable name', { skip: !functionsHaveNames || functionsHaveConfigurableNames }, function (st) { - st['throws']( - function () { ES.CreateMethodProperty(function () {}, 'name', { value: 'baz' }); }, - TypeError, - 'nonconfigurable function name can not be defined' - ); - st.end(); - }); - - t.end(); - }); - - test('CreateIterResultObject', function (t) { - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.CreateIterResultObject({}, nonBoolean); }, - TypeError, - '"done" argument must be a boolean; ' + debug(nonBoolean) + ' is not' - ); - }); - - var value = {}; - t.deepEqual( - ES.CreateIterResultObject(value, true), - { value: value, done: true }, - 'creates a "done" iteration result' - ); - t.deepEqual( - ES.CreateIterResultObject(value, false), - { value: value, done: false }, - 'creates a "not done" iteration result' - ); - - t.end(); - }); - - test('DefinePropertyOrThrow', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.DefinePropertyOrThrow(primitive, 'key', {}); }, - TypeError, - 'O must be an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.DefinePropertyOrThrow({}, nonPropertyKey, {}); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('defines correctly', function (st) { - var obj = {}; - var key = 'the key'; - var descriptor = { - configurable: true, - enumerable: false, - value: { foo: 'bar' }, - writable: true - }; - - st.equal(ES.DefinePropertyOrThrow(obj, key, descriptor), true, 'defines property successfully'); - st.test('property descriptor', { skip: !getOwnPropertyDescriptor }, function (s2t) { - s2t.deepEqual( - getOwnPropertyDescriptor(obj, key), - descriptor, - 'sets the correct property descriptor' - ); - - s2t.end(); - }); - st.deepEqual(obj[key], descriptor.value, 'sets the correct value'); - - st.end(); - }); - - t.test('fails as expected on a frozen object', { skip: !Object.freeze }, function (st) { - var obj = Object.freeze({ foo: 'bar' }); - st['throws']( - function () { - ES.DefinePropertyOrThrow(obj, 'foo', { configurable: true, value: 'baz' }); - }, - TypeError, - 'nonconfigurable key can not be defined' - ); - - st.end(); - }); - - t.test('fails as expected on a function with a nonconfigurable name', { skip: !functionsHaveNames || functionsHaveConfigurableNames }, function (st) { - st['throws']( - function () { - ES.DefinePropertyOrThrow(function () {}, 'name', { configurable: true, value: 'baz' }); - }, - TypeError, - 'nonconfigurable function name can not be defined' - ); - st.end(); - }); - - t.end(); - }); - - test('DeletePropertyOrThrow', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.DeletePropertyOrThrow(primitive, 'key', {}); }, - TypeError, - 'O must be an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.DeletePropertyOrThrow({}, nonPropertyKey, {}); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('defines correctly', function (st) { - var obj = { 'the key': 42 }; - var key = 'the key'; - - st.equal(ES.DeletePropertyOrThrow(obj, key), true, 'deletes property successfully'); - st.equal(key in obj, false, 'key is no longer in the object'); - - st.end(); - }); - - t.test('fails as expected on a frozen object', { skip: !Object.freeze }, function (st) { - var obj = Object.freeze({ foo: 'bar' }); - st['throws']( - function () { ES.DeletePropertyOrThrow(obj, 'foo'); }, - TypeError, - 'nonconfigurable key can not be deleted' - ); - - st.end(); - }); - - t.test('fails as expected on a function with a nonconfigurable name', { skip: !functionsHaveNames || functionsHaveConfigurableNames }, function (st) { - st['throws']( - function () { ES.DeletePropertyOrThrow(function () {}, 'name'); }, - TypeError, - 'nonconfigurable function name can not be deleted' - ); - st.end(); - }); - - t.end(); - }); - - test('EnumerableOwnNames', function (t) { - var obj = testEnumerableOwnNames(t, function (O) { return ES.EnumerableOwnNames(O); }); - - t.deepEqual( - ES.EnumerableOwnNames(obj), - ['own'], - 'returns enumerable own names' - ); - - t.end(); - }); - - test('FromPropertyDescriptor', function (t) { - t.equal(ES.FromPropertyDescriptor(), undefined, 'no value begets undefined'); - t.equal(ES.FromPropertyDescriptor(undefined), undefined, 'undefined value begets undefined'); - - forEach(v.nonUndefinedPrimitives, function (primitive) { - t['throws']( - function () { ES.FromPropertyDescriptor(primitive); }, - TypeError, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var accessor = v.accessorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(accessor), { - get: accessor['[[Get]]'], - enumerable: !!accessor['[[Enumerable]]'], - configurable: !!accessor['[[Configurable]]'] - }); - - var mutator = v.mutatorDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(mutator), { - set: mutator['[[Set]]'], - enumerable: !!mutator['[[Enumerable]]'], - configurable: !!mutator['[[Configurable]]'] - }); - var data = v.dataDescriptor(); - t.deepEqual(ES.FromPropertyDescriptor(data), { - value: data['[[Value]]'], - writable: data['[[Writable]]'] - }); - - t.deepEqual(ES.FromPropertyDescriptor(v.genericDescriptor()), { - enumerable: false, - configurable: true - }); - - var both = v.bothDescriptor(); - t['throws']( - function () { - ES.FromPropertyDescriptor({ get: both['[[Get]]'], value: both['[[Value]]'] }); - }, - TypeError, - 'data and accessor descriptors are mutually exclusive' - ); - - t.end(); - }); - - test('Get', function (t) { - t['throws'](function () { return ES.Get('a', 'a'); }, TypeError, 'Throws a TypeError if `O` is not an Object'); - t['throws'](function () { return ES.Get({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); - - var value = {}; - t.test('Symbols', { skip: !v.hasSymbols }, function (st) { - var sym = Symbol('sym'); - var obj = {}; - obj[sym] = value; - st.equal(ES.Get(obj, sym), value, 'returns property `P` if it exists on object `O`'); - st.end(); - }); - t.equal(ES.Get({ a: value }, 'a'), value, 'returns property `P` if it exists on object `O`'); - t.end(); - }); - - test('GetIterator', function (t) { - var arr = [1, 2]; - testIterator(t, ES.GetIterator(arr), arr); - - testIterator(t, ES.GetIterator('abc'), 'abc'.split('')); - - var sentinel = {}; - forEach(v.primitives, function (nonObject) { - var method = function () { - return nonObject; - }; - t['throws']( - function () { ES.GetIterator(sentinel, method); }, - TypeError, - debug(nonObject) + ' is not an Object; iterator method must return an Object' - ); - }); - - var i = 0; - var manualMethod = function () { - t.equal(this, sentinel, 'receiver is expected object'); - return { - next: function () { - var value = arr[i]; - i += 1; - return { - done: i > arr.length, - value: value - }; - } - }; - }; - testIterator(t, ES.GetIterator(sentinel, manualMethod), arr); - - t.test('Symbol.iterator', { skip: !v.hasSymbols }, function (st) { - var m = new Map(); - m.set(1, 'a'); - m.set(2, 'b'); - - testIterator(st, ES.GetIterator(m), [[1, 'a'], [2, 'b']]); - - forEach(v.primitives, function (nonObject) { - var badIterable = {}; - badIterable[Symbol.iterator] = function () { - return nonObject; - }; - st['throws']( - function () { return ES.GetIterator(badIterable); }, - TypeError, - debug(nonObject) + ' is not an Object; iterator method must return an Object' - ); - }); - - st.end(); - }); - - t.end(); - }); - - test('GetMethod', function (t) { - t['throws'](function () { return ES.GetMethod({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); - t.equal(ES.GetMethod({}, 'a'), undefined, 'returns undefined in property is undefined'); - t.equal(ES.GetMethod({ a: null }, 'a'), undefined, 'returns undefined if property is null'); - t.equal(ES.GetMethod({ a: undefined }, 'a'), undefined, 'returns undefined if property is undefined'); - var obj = { a: function () {} }; - t['throws'](function () { ES.GetMethod({ a: 'b' }, 'a'); }, TypeError, 'throws TypeError if property exists and is not callable'); - t.equal(ES.GetMethod(obj, 'a'), obj.a, 'returns property if it is callable'); - t.end(); - }); - - test('GetOwnPropertyKeys', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.GetOwnPropertyKeys(primitive, 'String'); }, - TypeError, - 'O: ' + debug(primitive) + ' is not an Object' - ); - }); - - t['throws']( - function () { ES.GetOwnPropertyKeys({}, 'not string or symbol'); }, - TypeError, - 'Type: must be "String" or "Symbol"' - ); - - t.test('Symbols', { skip: !v.hasSymbols }, function (st) { - var O = { a: 1 }; - O[Symbol.iterator] = true; - var s = Symbol('test'); - defineProperty(O, s, { enumerable: false, value: true }); - - st.deepEqual( - ES.GetOwnPropertyKeys(O, 'Symbol'), - [Symbol.iterator, s], - 'works with Symbols, enumerable or not' - ); - - st.end(); - }); - - t.test('non-enumerable names', { skip: !defineProperty.oDP }, function (st) { - var O = { a: 1 }; - defineProperty(O, 'b', { enumerable: false, value: 2 }); - if (v.hasSymbols) { - O[Symbol.iterator] = true; - } - - st.deepEqual( - ES.GetOwnPropertyKeys(O, 'String').sort(), - ['a', 'b'].sort(), - 'works with Strings, enumerable or not' - ); - - st.end(); - }); - - t.deepEqual( - ES.GetOwnPropertyKeys({ a: 1, b: 2 }, 'String').sort(), - ['a', 'b'].sort(), - 'works with enumerable keys' - ); - - t.end(); - }); - - test('GetPrototypeFromConstructor', function (t) { - forEach(v.nonFunctions, function (nonFunction) { - t['throws']( - function () { ES.GetPrototypeFromConstructor(nonFunction, '%Array%'); }, - TypeError, - debug(nonFunction) + ' is not a constructor' - ); - }); - - forEach(arrowFns, function (arrowFn) { - t['throws']( - function () { ES.GetPrototypeFromConstructor(arrowFn, '%Array%'); }, - TypeError, - debug(arrowFn) + ' is not a constructor' - ); - }); - - var f = function () {}; - t.equal( - ES.GetPrototypeFromConstructor(f, '%Array.prototype%'), - f.prototype, - 'function with normal `prototype` property returns it' - ); - forEach([true, 'foo', 42], function (truthyPrimitive) { - f.prototype = truthyPrimitive; - t.equal( - ES.GetPrototypeFromConstructor(f, '%Array.prototype%'), - Array.prototype, - 'function with non-object `prototype` property (' + debug(truthyPrimitive) + ') returns default intrinsic' - ); - }); - - t.end(); - }); - - test('GetSubstitution', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.GetSubstitution(nonString, '', 0, [], ''); }, - TypeError, - '`matched`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', nonString, 0, [], ''); }, - TypeError, - '`str`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', '', 0, [], nonString); }, - TypeError, - '`replacement`: ' + debug(nonString) + ' is not a String' - ); - - if (canDistinguishSparseFromUndefined || typeof nonString !== 'undefined') { - t['throws']( - function () { ES.GetSubstitution('', '', 0, [nonString], ''); }, - TypeError, - '`captures`: ' + debug([nonString]) + ' is not an Array of strings' - ); - } - }); - - forEach(v.notNonNegativeIntegers, function (nonNonNegativeInteger) { - t['throws']( - function () { ES.GetSubstitution('', '', nonNonNegativeInteger, [], ''); }, - TypeError, - '`position`: ' + debug(nonNonNegativeInteger) + ' is not a non-negative integer' - ); - }); - - forEach(v.nonArrays, function (nonArray) { - t['throws']( - function () { ES.GetSubstitution('', '', 0, nonArray, ''); }, - TypeError, - '`captures`: ' + debug(nonArray) + ' is not an Array' - ); - }); - - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], '123'), - '123', - 'returns the substitution' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '$$2$'), - '$2$', - 'supports $$, and trailing $' - ); - - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$&<'), - '>abcdef<', - 'supports $&' - ); - - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$`<'), - '><', - 'supports $` at position 0' - ); - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], '>$`<'), - '>ab<', - 'supports $` at position > 0' - ); - - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 7, [], ">$'<"), - '><', - "supports $' at a position where there's less than `matched.length` chars left" - ); - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], ">$'<"), - '>ghi<', - "supports $' at a position where there's more than `matched.length` chars left" - ); - - for (var i = 0; i < 100; i += 1) { - var captures = []; - captures[i] = 'test'; - if (i > 0) { - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$' + i + '<'), - '>undefined<', - 'supports $' + i + ' with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$' + i), - '>undefined', - 'supports $' + i + ' at the end of the replacement, with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, '>$' + i + '<'), - '><', - 'supports $' + i + ' with a capture at that index' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, '>$' + i), - '>', - 'supports $' + i + ' at the end of the replacement, with a capture at that index' - ); - } - if (i < 10) { - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$0' + i + '<'), - i === 0 ? '><' : '>undefined<', - 'supports $0' + i + ' with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], '>$0' + i), - i === 0 ? '>' : '>undefined', - 'supports $0' + i + ' at the end of the replacement, with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, '>$0' + i + '<'), - '><', - 'supports $0' + i + ' with a capture at that index' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, '>$0' + i), - '>', - 'supports $0' + i + ' at the end of the replacement, with a capture at that index' - ); - } - } - - t.end(); - }); - - test('GetV', function (t) { - t['throws'](function () { return ES.GetV({ 7: 7 }, 7); }, TypeError, 'Throws a TypeError if `P` is not a property key'); - var obj = { a: function () {} }; - t.equal(ES.GetV(obj, 'a'), obj.a, 'returns property if it exists'); - t.equal(ES.GetV(obj, 'b'), undefined, 'returns undefiend if property does not exist'); - t.end(); - }); - - test('HasOwnProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.HasOwnProperty(primitive, 'key'); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.HasOwnProperty({}, nonKey); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.HasOwnProperty({}, 'toString'), false, 'inherited properties are not own'); - t.equal( - ES.HasOwnProperty({ toString: 1 }, 'toString'), - true, - 'shadowed inherited own properties are own' - ); - t.equal(ES.HasOwnProperty({ a: 1 }, 'a'), true, 'own properties are own'); - - t.end(); - }); - - test('HasProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.HasProperty(primitive, 'key'); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.HasProperty({}, nonKey); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.HasProperty({}, 'nope'), false, 'object does not have nonexistent properties'); - t.equal(ES.HasProperty({}, 'toString'), true, 'object has inherited properties'); - t.equal( - ES.HasProperty({ toString: 1 }, 'toString'), - true, - 'object has shadowed inherited own properties' - ); - t.equal(ES.HasProperty({ a: 1 }, 'a'), true, 'object has own properties'); - - t.end(); - }); - - test('InstanceofOperator', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.InstanceofOperator(primitive, function () {}); }, - TypeError, - debug(primitive) + ' is not an object' - ); - }); - - forEach(v.nonFunctions, function (nonFunction) { - t['throws']( - function () { ES.InstanceofOperator({}, nonFunction); }, - TypeError, - debug(nonFunction) + ' is not callable' - ); - }); - - var C = function C() {}; - var D = function D() {}; - - t.equal(ES.InstanceofOperator(new C(), C), true, 'constructor function has an instance of itself'); - t.equal(ES.InstanceofOperator(new D(), C), false, 'constructor/instance mismatch is false'); - t.equal(ES.InstanceofOperator(new C(), D), false, 'instance/constructor mismatch is false'); - t.equal(ES.InstanceofOperator({}, C), false, 'plain object is not an instance of a constructor'); - t.equal(ES.InstanceofOperator({}, Object), true, 'plain object is an instance of Object'); - - t.test('Symbol.hasInstance', { skip: !v.hasSymbols || !Symbol.hasInstance }, function (st) { - st.plan(5); - - var O = {}; - var C2 = function () {}; - st.equal(ES.InstanceofOperator(O, C2), false, 'O is not an instance of C2'); - - defineProperty(C2, Symbol.hasInstance, { - configurable: true, - value: function (obj) { - st.equal(this, C2, 'hasInstance receiver is C2'); - st.equal(obj, O, 'hasInstance argument is O'); - - return {}; // testing coercion to boolean - } - }); - - st.equal(ES.InstanceofOperator(O, C2), true, 'O is now an instance of C2'); - - defineProperty(C2, Symbol.hasInstance, { - configurable: true, - value: undefined - }); - - st.equal(ES.InstanceofOperator(O, C2), false, 'O is no longer an instance of C2'); - - st.end(); - }); - - t.end(); - }); - - test('Invoke', function (t) { - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.Invoke({}, nonKey); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - t['throws']( - function () { ES.Invoke({ o: false }, 'o'); }, - TypeError, - 'fails on a non-function' - ); - - forEach(v.nonArrays, function (nonArray) { - t['throws']( - function () { ES.Invoke({}, '', nonArray); }, - TypeError, - debug(nonArray) + ' is not an Array' - ); - }); - - t.test('invoked callback', function (st) { - var aValue = {}; - var bValue = {}; - var obj = { - f: function (a) { - st.equal(arguments.length, 2, '2 args passed'); - st.equal(a, aValue, 'first arg is correct'); - st.equal(arguments[1], bValue, 'second arg is correct'); - } - }; - st.plan(3); - ES.Invoke(obj, 'f', [aValue, bValue]); - }); - - t.end(); - }); - - test('IsArray', function (t) { - t.equal(true, ES.IsArray([]), '[] is array'); - t.equal(false, ES.IsArray({}), '{} is not array'); - t.equal(false, ES.IsArray({ length: 1, 0: true }), 'arraylike object is not array'); - forEach(v.objects.concat(v.primitives), function (value) { - t.equal(false, ES.IsArray(value), debug(value) + ' is not array'); - }); - t.end(); - }); - - test('IsConcatSpreadable', function (t) { - forEach(v.primitives, function (primitive) { - t.equal(ES.IsConcatSpreadable(primitive), false, debug(primitive) + ' is not an Object'); - }); - - var hasSymbolConcatSpreadable = v.hasSymbols && Symbol.isConcatSpreadable; - t.test('Symbol.isConcatSpreadable', { skip: !hasSymbolConcatSpreadable }, function (st) { - forEach(v.falsies, function (falsy) { - var obj = {}; - obj[Symbol.isConcatSpreadable] = falsy; - st.equal( - ES.IsConcatSpreadable(obj), - false, - 'an object with ' + debug(falsy) + ' as Symbol.isConcatSpreadable is not concat spreadable' - ); - }); - - forEach(v.truthies, function (truthy) { - var obj = {}; - obj[Symbol.isConcatSpreadable] = truthy; - st.equal( - ES.IsConcatSpreadable(obj), - true, - 'an object with ' + debug(truthy) + ' as Symbol.isConcatSpreadable is concat spreadable' - ); - }); - - st.end(); - }); - - forEach(v.objects, function (object) { - t.equal( - ES.IsConcatSpreadable(object), - false, - 'non-array without Symbol.isConcatSpreadable is not concat spreadable' - ); - }); - - t.equal(ES.IsConcatSpreadable([]), true, 'arrays are concat spreadable'); - - t.end(); - }); - - test('IsConstructor', function (t) { - t.equal(true, ES.IsConstructor(function () {}), 'function is constructor'); - t.equal(false, ES.IsConstructor(/a/g), 'regex is not constructor'); - forEach(v.objects, function (object) { - t.equal(false, ES.IsConstructor(object), object + ' object is not constructor'); - }); - - try { - var arrow = Function('return () => {}')(); // eslint-disable-line no-new-func - t.equal(ES.IsConstructor(arrow), false, 'arrow function is not constructor'); - } catch (e) { - t.comment('SKIP: arrow function syntax not supported.'); - } - - try { - var foo = Function('return class Foo {}')(); // eslint-disable-line no-new-func - t.equal(ES.IsConstructor(foo), true, 'class is constructor'); - } catch (e) { - t.comment('SKIP: class syntax not supported.'); - } - - if (typeof Reflect !== 'object' || typeof Proxy !== 'function' || has(Proxy, 'prototype')) { - t.comment('SKIP: Proxy is constructor'); - } else { - t.equal(ES.IsConstructor(Proxy), true, 'Proxy is constructor'); - } - - t.end(); - }); - - test('IsExtensible', function (t) { - forEach(v.objects, function (object) { - t.equal(true, ES.IsExtensible(object), debug(object) + ' object is extensible'); - }); - forEach(v.primitives, function (primitive) { - t.equal(false, ES.IsExtensible(primitive), debug(primitive) + ' is not extensible'); - }); - if (Object.preventExtensions) { - t.equal(false, ES.IsExtensible(Object.preventExtensions({})), 'object with extensions prevented is not extensible'); - } - t.end(); - }); - - test('IsPromise', { skip: typeof Promise !== 'function' }, function (t) { - forEach(v.objects.concat(v.primitives), function (nonPromise) { - t.equal(ES.IsPromise(nonPromise), false, debug(nonPromise) + ' is not a Promise'); - }); - - var thenable = { then: Promise.prototype.then }; - t.equal(ES.IsPromise(thenable), false, 'generic thenable is not a Promise'); - - t.equal(ES.IsPromise(Promise.resolve()), true, 'Promise is a Promise'); - - t.end(); - }); - - test('IsPropertyDescriptor', function (t) { - forEach(v.primitives, function (primitive) { - t.equal( - ES.IsPropertyDescriptor(primitive), - false, - debug(primitive) + ' is not a Property Descriptor' - ); - }); - - t.equal(ES.IsPropertyDescriptor({ invalid: true }), false, 'invalid keys not allowed on a Property Descriptor'); - - t.equal(ES.IsPropertyDescriptor({}), true, 'empty object is an incomplete Property Descriptor'); - - t.equal(ES.IsPropertyDescriptor(v.accessorDescriptor()), true, 'accessor descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.mutatorDescriptor()), true, 'mutator descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.dataDescriptor()), true, 'data descriptor is a Property Descriptor'); - t.equal(ES.IsPropertyDescriptor(v.genericDescriptor()), true, 'generic descriptor is a Property Descriptor'); - - t['throws']( - function () { ES.IsPropertyDescriptor(v.bothDescriptor()); }, - TypeError, - 'a Property Descriptor can not be both a Data and an Accessor Descriptor' - ); - - t['throws']( - function () { ES.IsPropertyDescriptor(v.bothDescriptorWritable()); }, - TypeError, - 'a Property Descriptor can not be both a Data and an Accessor Descriptor' - ); - - t.end(); - }); - - test('IsPropertyKey', function (t) { - forEach(v.numbers.concat(v.objects), function (notKey) { - t.equal(false, ES.IsPropertyKey(notKey), debug(notKey) + ' is not property key'); - }); - - t.equal(true, ES.IsPropertyKey('foo'), 'string is property key'); - - forEach(v.symbols, function (symbol) { - t.equal(true, ES.IsPropertyKey(symbol), debug(symbol) + ' is property key'); - }); - t.end(); - }); - - test('IsRegExp', function (t) { - forEach([/a/g, new RegExp('a', 'g')], function (regex) { - t.equal(true, ES.IsRegExp(regex), regex + ' is regex'); - }); - - forEach(v.objects.concat(v.primitives), function (nonRegex) { - t.equal(false, ES.IsRegExp(nonRegex), debug(nonRegex) + ' is not regex'); - }); - - t.test('Symbol.match', { skip: !v.hasSymbols || !Symbol.match }, function (st) { - var obj = {}; - obj[Symbol.match] = true; - st.equal(true, ES.IsRegExp(obj), 'object with truthy Symbol.match is regex'); - - var regex = /a/; - defineProperty(regex, Symbol.match, { value: false }); - st.equal(false, ES.IsRegExp(regex), 'regex with falsy Symbol.match is not regex'); - - st.end(); - }); - - t.end(); - }); - - test('IsInteger', function (t) { - for (var i = -100; i < 100; i += 10) { - t.equal(true, ES.IsInteger(i), i + ' is integer'); - t.equal(false, ES.IsInteger(i + 0.2), (i + 0.2) + ' is not integer'); - } - t.equal(true, ES.IsInteger(-0), '-0 is integer'); - var notInts = v.nonNumbers.concat(v.nonIntegerNumbers, v.infinities, [NaN, [], new Date()]); - forEach(notInts, function (notInt) { - t.equal(false, ES.IsInteger(notInt), debug(notInt) + ' is not integer'); - }); - t.equal(false, ES.IsInteger(v.uncoercibleObject), 'uncoercibleObject is not integer'); - t.end(); - }); - - test('IteratorNext', function (t) { - forEach(v.primitives, function (nonObject) { - t['throws']( - function () { ES.IteratorNext(nonObject); }, - TypeError, - debug(nonObject) + ' is not an Object' - ); - - t['throws']( - function () { ES.IteratorNext({ next: function () { return nonObject; } }); }, - TypeError, - '`next()` returns ' + debug(nonObject) + ', which is not an Object' - ); - }); - - var iterator = { - next: function (value) { - return [arguments.length, value]; - } - }; - t.deepEqual( - ES.IteratorNext(iterator), - [0, undefined], - 'returns expected value from `.next()`; `next` receives expected 0 arguments' - ); - t.deepEqual( - ES.IteratorNext(iterator, iterator), - [1, iterator], - 'returns expected value from `.next()`; `next` receives expected 1 argument' - ); - - t.end(); - }); - - test('IteratorComplete', function (t) { - forEach(v.primitives, function (nonObject) { - t['throws']( - function () { ES.IteratorComplete(nonObject); }, - TypeError, - debug(nonObject) + ' is not an Object' - ); - }); - - forEach(v.truthies, function (truthy) { - t.equal(ES.IteratorComplete({ done: truthy }), true, '{ done: ' + debug(truthy) + ' } is true'); - }); - - forEach(v.falsies, function (falsy) { - t.equal(ES.IteratorComplete({ done: falsy }), false, '{ done: ' + debug(falsy) + ' } is false'); - }); - - t.end(); - }); - - test('IteratorValue', function (t) { - forEach(v.primitives, function (nonObject) { - t['throws']( - function () { ES.IteratorValue(nonObject); }, - TypeError, - debug(nonObject) + ' is not an Object' - ); - }); - - var sentinel = {}; - t.equal(ES.IteratorValue({ value: sentinel }), sentinel, 'Gets `.value` off the object'); - - t.end(); - }); - - test('IteratorStep', function (t) { - t.deepEqual( - ES.IteratorStep({ - next: function () { - return { - done: false, - value: [1, arguments.length] - }; - } - }), - { done: false, value: [1, 0] }, - 'not-done iterator result yields iterator result' - ); - t.deepEqual( - ES.IteratorStep({ - next: function () { - return { - done: true, - value: [2, arguments.length] - }; - } - }), - false, - 'done iterator result yields false' - ); - - t.end(); - }); - - test('IteratorClose', function (t) { - forEach(v.primitives, function (nonObject) { - t['throws']( - function () { ES.IteratorClose(nonObject); }, - TypeError, - debug(nonObject) + ' is not an Object' - ); - - t['throws']( - function () { ES.IteratorClose({ 'return': function () { return nonObject; } }, function () {}); }, - TypeError, - '`.return` returns ' + debug(nonObject) + ', which is not an Object' - ); - }); - - forEach(v.nonFunctions, function (nonFunction) { - t['throws']( - function () { ES.IteratorClose({}, nonFunction); }, - TypeError, - debug(nonFunction) + ' is not a thunk for a Completion Record' - ); - - if (nonFunction != null) { - t['throws']( - function () { ES.IteratorClose({ 'return': nonFunction }, function () {}); }, - TypeError, - '`.return` of ' + debug(nonFunction) + ' is not a Function' - ); - } - }); - - var sentinel = {}; - t.equal( - ES.IteratorClose({ 'return': undefined }, function () { return sentinel; }), - sentinel, - 'when `.return` is `undefined`, invokes and returns the completion thunk' - ); - - /* eslint no-throw-literal: 0 */ - t['throws']( - function () { ES.IteratorClose({ 'return': function () { throw sentinel; } }, function () {}); }, - sentinel, - '`.return` that throws, when completionThunk does not, throws exception from `.return`' - ); - t['throws']( - function () { ES.IteratorClose({ 'return': function () { throw sentinel; } }, function () { throw -1; }); }, - -1, - '`.return` that throws, when completionThunk does too, throws exception from completionThunk' - ); - t['throws']( - function () { ES.IteratorClose({ 'return': function () { } }, function () { throw -1; }); }, - -1, - '`.return` that does not throw, when completionThunk does, throws exception from completionThunk' - ); - - t.equal( - ES.IteratorClose({ 'return': function () { return sentinel; } }, function () { return 42; }), - 42, - 'when `.return` and completionThunk do not throw, and `.return` returns an Object, returns completionThunk' - ); - - t.end(); - }); - - test('ObjectCreate', function (t) { - forEach(v.nonNullPrimitives, function (value) { - t['throws']( - function () { ES.ObjectCreate(value); }, - TypeError, - debug(value) + ' is not null, or an object' - ); - }); - - t.test('proto arg', function (st) { - var Parent = function Parent() {}; - Parent.prototype.foo = {}; - var child = ES.ObjectCreate(Parent.prototype); - st.equal(child instanceof Parent, true, 'child is instanceof Parent'); - st.equal(child.foo, Parent.prototype.foo, 'child inherits properties from Parent.prototype'); - - st.end(); - }); - - t.test('internal slots arg', function (st) { - st.doesNotThrow(function () { ES.ObjectCreate({}, []); }, 'an empty slot list is valid'); - - st['throws']( - function () { ES.ObjectCreate({}, ['a']); }, - SyntaxError, - 'internal slots are not supported' - ); - - st.end(); - }); - - t.test('null proto', { skip: !Object.create && !$setProto }, function (st) { - st.equal('toString' in {}, true, 'normal objects have toString'); - st.equal('toString' in ES.ObjectCreate(null), false, 'makes a null object'); - - st.end(); - }); - - t.test('null proto when no native Object.create', { skip: Object.create || $setProto }, function (st) { - st['throws']( - function () { ES.ObjectCreate(null); }, - SyntaxError, - 'without a native Object.create, can not create null objects' - ); - - st.end(); - }); - - t.end(); - }); - - test('OrdinaryCreateFromConstructor', function (t) { - forEach(v.nonFunctions, function (nonFunction) { - t['throws']( - function () { ES.OrdinaryCreateFromConstructor(nonFunction, '%Array.prototype%'); }, - TypeError, - debug(nonFunction) + ' is not a constructor' - ); - }); - - forEach(arrowFns, function (arrowFn) { - t['throws']( - function () { ES.OrdinaryCreateFromConstructor(arrowFn, '%Array.prototype%'); }, - TypeError, - debug(arrowFn) + ' is not a constructor' - ); - }); - - t.test('proto arg', function (st) { - var Parent = function Parent() {}; - Parent.prototype.foo = {}; - var child = ES.OrdinaryCreateFromConstructor(Parent, '%Array.prototype%'); - st.equal(child instanceof Parent, true, 'child is instanceof Parent'); - st.equal(child instanceof Array, false, 'child is not instanceof Array'); - st.equal(child.foo, Parent.prototype.foo, 'child inherits properties from Parent.prototype'); - - st.end(); - }); - - t.test('internal slots arg', function (st) { - st.doesNotThrow( - function () { ES.OrdinaryCreateFromConstructor(function () {}, '%Array.prototype%', []); }, - 'an empty slot list is valid' - ); - - st['throws']( - function () { ES.OrdinaryCreateFromConstructor(function () {}, '%Array.prototype%', ['a']); }, - SyntaxError, - 'internal slots are not supported' - ); - - st.end(); - }); - - t.end(); - }); - - test('OrdinaryGetOwnProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.OrdinaryGetOwnProperty(primitive, ''); }, - TypeError, - 'O: ' + debug(primitive) + ' is not an Object' - ); - }); - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.OrdinaryGetOwnProperty({}, nonPropertyKey); }, - TypeError, - 'P: ' + debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.OrdinaryGetOwnProperty({}, 'not in the object'), undefined, 'missing property yields undefined'); - t.equal(ES.OrdinaryGetOwnProperty({}, 'toString'), undefined, 'inherited non-own property yields undefined'); - - t.deepEqual( - ES.OrdinaryGetOwnProperty({ a: 1 }, 'a'), - ES.ToPropertyDescriptor({ - configurable: true, - enumerable: true, - value: 1, - writable: true - }), - 'own assigned data property yields expected descriptor' - ); - - t.deepEqual( - ES.OrdinaryGetOwnProperty(/a/, 'lastIndex'), - ES.ToPropertyDescriptor({ - configurable: false, - enumerable: false, - value: 0, - writable: true - }), - 'regex lastIndex yields expected descriptor' - ); - - t.deepEqual( - ES.OrdinaryGetOwnProperty([], 'length'), - ES.ToPropertyDescriptor({ - configurable: false, - enumerable: false, - value: 0, - writable: true - }), - 'array length yields expected descriptor' - ); - - if (!Object.isFrozen || !Object.isFrozen(Object.prototype)) { - t.deepEqual( - ES.OrdinaryGetOwnProperty(Object.prototype, 'toString'), - ES.ToPropertyDescriptor({ - configurable: true, - enumerable: false, - value: Object.prototype.toString, - writable: true - }), - 'own non-enumerable data property yields expected descriptor' - ); - } - - t.test('ES5+', { skip: !defineProperty.oDP }, function (st) { - var O = {}; - defineProperty(O, 'foo', { - configurable: false, - enumerable: false, - value: O, - writable: true - }); - - st.deepEqual( - ES.OrdinaryGetOwnProperty(O, 'foo'), - ES.ToPropertyDescriptor({ - configurable: false, - enumerable: false, - value: O, - writable: true - }), - 'defined own property yields expected descriptor' - ); - - st.end(); - }); - - t.end(); - }); - - test('OrdinaryDefineOwnProperty', { skip: !getOwnPropertyDescriptor }, function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.OrdinaryDefineOwnProperty(primitive, {}, []); }, - TypeError, - 'O: ' + debug(primitive) + ' is not an Object' - ); - }); - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.OrdinaryDefineOwnProperty({}, nonPropertyKey, v.genericDescriptor()); }, - TypeError, - 'P: ' + debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.OrdinaryDefineOwnProperty(primitive, '', v.genericDescriptor()); }, - TypeError, - 'Desc: ' + debug(primitive) + ' is not a Property Descriptor' - ); - }); - - var O = {}; - var P = 'property key'; - var Desc = v.accessorDescriptor(); - t.equal( - ES.OrdinaryDefineOwnProperty(O, P, Desc), - true, - 'operation is successful' - ); - t.deepEqual( - getOwnPropertyDescriptor(O, P), - ES.FromPropertyDescriptor(ES.CompletePropertyDescriptor(Desc)), - 'expected property descriptor is defined' - ); - - t.end(); - }); - - test('OrdinaryHasInstance', function (t) { - forEach(v.nonFunctions, function (nonFunction) { - t.equal(ES.OrdinaryHasInstance(nonFunction, {}), false, debug(nonFunction) + ' is not callable'); - }); - - forEach(v.primitives, function (primitive) { - t.equal(ES.OrdinaryHasInstance(function () {}, primitive), false, debug(primitive) + ' is not an object'); - }); - - var C = function C() {}; - var D = function D() {}; - t.equal(ES.OrdinaryHasInstance(C, new C()), true, 'constructor function has an instance of itself'); - t.equal(ES.OrdinaryHasInstance(C, new D()), false, 'constructor/instance mismatch is false'); - t.equal(ES.OrdinaryHasInstance(D, new C()), false, 'instance/constructor mismatch is false'); - t.equal(ES.OrdinaryHasInstance(C, {}), false, 'plain object is not an instance of a constructor'); - t.equal(ES.OrdinaryHasInstance(Object, {}), true, 'plain object is an instance of Object'); - - t.end(); - }); - - test('OrdinaryHasProperty', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.OrdinaryHasProperty(primitive, ''); }, - TypeError, - debug(primitive) + ' is not an object' - ); - }); - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.OrdinaryHasProperty({}, nonPropertyKey); }, - TypeError, - 'P: ' + debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.OrdinaryHasProperty({ a: 1 }, 'a'), true, 'own property is true'); - t.equal(ES.OrdinaryHasProperty({}, 'toString'), true, 'inherited property is true'); - t.equal(ES.OrdinaryHasProperty({}, 'nope'), false, 'absent property is false'); - - t.end(); - }); - - test('QuoteJSONString', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.QuoteJSONString(nonString); }, - TypeError, - debug(nonString) + ' is not a String' - ); - }); - - t.equal(ES.QuoteJSONString(''), '""', '"" gets properly JSON-quoted'); - t.equal(ES.QuoteJSONString('a'), '"a"', '"a" gets properly JSON-quoted'); - t.equal(ES.QuoteJSONString('"'), '"\\""', '"\\"" gets properly JSON-quoted'); - t.equal(ES.QuoteJSONString('\b'), '"\\b"', '"\\b" gets properly JSON-quoted'); - t.equal(ES.QuoteJSONString('\t'), '"\\t"', '"\\t" gets properly JSON-quoted'); - t.equal(ES.QuoteJSONString('\n'), '"\\n"', '"\\n" gets properly JSON-quoted'); - t.equal(ES.QuoteJSONString('\f'), '"\\f"', '"\\f" gets properly JSON-quoted'); - t.equal(ES.QuoteJSONString('\r'), '"\\r"', '"\\r" gets properly JSON-quoted'); - t.equal(ES.QuoteJSONString('\\'), '"\\\\"', '"\\\\" gets properly JSON-quoted'); - t.equal(ES.QuoteJSONString('\\'), '"\\\\"', '"\\\\" gets properly JSON-quoted'); - t.equal(ES.QuoteJSONString('\u0019'), '"\\u0019"', '"\\u0019" gets properly JSON-quoted'); - - t.end(); - }); - - test('RegExpCreate', function (t) { - forEach(v.nonStrings, function (nonString) { - if (typeof nonString !== 'symbol') { - var p = typeof nonString === 'undefined' ? '' : nonString; - t.equal( - String(ES.RegExpCreate(p, 'g')), - '/' + (String(p) || '(?:)') + '/g', - debug(nonString) + ' becomes `/' + String(p) + '/g`' - ); - } - }); - - t.deepEqual(ES.RegExpCreate(), new RegExp(), 'undefined pattern and flags yields empty regex'); - - t.end(); - }); - - test('RegExpExec', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.RegExpExec(primitive); }, - TypeError, - '"R" argument must be an object; ' + debug(primitive) + ' is not' - ); - }); - - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.RegExpExec({}, nonString); }, - TypeError, - '"S" argument must be a String; ' + debug(nonString) + ' is not' - ); - }); - - t.test('gets and calls a callable "exec"', function (st) { - var str = '123'; - var o = { - exec: function (S) { - st.equal(this, o, '"exec" receiver is R'); - st.equal(S, str, '"exec" argument is S'); - - return null; - } - }; - st.plan(2); - ES.RegExpExec(o, str); - st.end(); - }); - - t.test('throws if a callable "exec" returns a non-null non-object', function (st) { - var str = '123'; - st.plan(v.nonNullPrimitives.length); - forEach(v.nonNullPrimitives, function (nonNullPrimitive) { - st['throws']( - function () { ES.RegExpExec({ exec: function () { return nonNullPrimitive; } }, str); }, - TypeError, - '"exec" method must return `null` or an Object; ' + debug(nonNullPrimitive) + ' is not' - ); - }); - st.end(); - }); - - t.test('actual regex that should match against a string', function (st) { - var S = 'aabc'; - var R = /a/g; - var match1 = ES.RegExpExec(R, S); - var expected1 = assign(['a'], kludgeMatch(R, { index: 0, input: S })); - var match2 = ES.RegExpExec(R, S); - var expected2 = assign(['a'], kludgeMatch(R, { index: 1, input: S })); - var match3 = ES.RegExpExec(R, S); - st.deepEqual(match1, expected1, 'match object 1 is as expected'); - st.deepEqual(match2, expected2, 'match object 2 is as expected'); - st.equal(match3, null, 'match 3 is null as expected'); - st.end(); - }); - - t.test('actual regex that should match against a string, with shadowed "exec"', function (st) { - var S = 'aabc'; - var R = /a/g; - defineProperty(R, 'exec', { value: undefined }); - var match1 = ES.RegExpExec(R, S); - var expected1 = assign(['a'], kludgeMatch(R, { index: 0, input: S })); - var match2 = ES.RegExpExec(R, S); - var expected2 = assign(['a'], kludgeMatch(R, { index: 1, input: S })); - var match3 = ES.RegExpExec(R, S); - st.deepEqual(match1, expected1, 'match object 1 is as expected'); - st.deepEqual(match2, expected2, 'match object 2 is as expected'); - st.equal(match3, null, 'match 3 is null as expected'); - st.end(); - }); - t.end(); - }); - - test('RequireObjectCoercible', function (t) { - t.equal(false, 'CheckObjectCoercible' in ES, 'CheckObjectCoercible -> RequireObjectCoercible in ES6'); - t['throws'](function () { return ES.RequireObjectCoercible(undefined); }, TypeError, 'undefined throws'); - t['throws'](function () { return ES.RequireObjectCoercible(null); }, TypeError, 'null throws'); - var isCoercible = function (value) { - t.doesNotThrow(function () { return ES.RequireObjectCoercible(value); }, debug(value) + ' does not throw'); - }; - forEach(v.objects.concat(v.nonNullPrimitives), isCoercible); - t.end(); - }); - - test('SameValueZero', function (t) { - t.equal(true, ES.SameValueZero(NaN, NaN), 'NaN is SameValueZero as NaN'); - t.equal(true, ES.SameValueZero(0, -0), '+0 is SameValueZero as -0'); - forEach(v.objects.concat(v.primitives), function (val) { - t.equal(val === val, ES.SameValueZero(val, val), debug(val) + ' is SameValueZero to itself'); - }); - t.end(); - }); - - test('Set', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.Set(primitive, '', null, false); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonKey) { - t['throws']( - function () { ES.Set({}, nonKey, null, false); }, - TypeError, - debug(nonKey) + ' is not a Property Key' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.Set({}, '', null, nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - var o = {}; - var value = {}; - ES.Set(o, 'key', value, true); - t.deepEqual(o, { key: value }, 'key is set'); - - t.test('nonwritable', { skip: !defineProperty.oDP }, function (st) { - var obj = { a: value }; - defineProperty(obj, 'a', { writable: false }); - - st['throws']( - function () { ES.Set(obj, 'a', {}, true); }, - TypeError, - 'can not Set nonwritable property' - ); - - st.doesNotThrow( - function () { - st.equal(ES.Set(obj, 'a', {}, false), false, 'unsuccessful Set returns false'); - }, - 'setting Throw to false prevents an exception' - ); - - st.end(); - }); - - t.test('nonconfigurable', { skip: !defineProperty.oDP }, function (st) { - var obj = { a: value }; - defineProperty(obj, 'a', { configurable: false }); - - st.equal(ES.Set(obj, 'a', value, true), true, 'successful Set returns true'); - st.deepEqual(obj, { a: value }, 'key is set'); - - st.end(); - }); - - t.test('doesn’t call [[Get]] in conforming strict mode environments', { skip: noThrowOnStrictViolation }, function (st) { - var getterCalled = false; - var setterCalls = 0; - var obj = {}; - defineProperty(obj, 'a', { - get: function () { - getterCalled = true; - }, - set: function () { - setterCalls += 1; - } - }); - - st.equal(ES.Set(obj, 'a', value, false), true, 'successful Set returns true'); - st.equal(setterCalls, 1, 'setter was called once'); - st.equal(getterCalled, false, 'getter was not called'); - - st.end(); - }); - - t.end(); - }); - - test('SetFunctionName', function (t) { - forEach(v.nonFunctions, function (nonFunction) { - t['throws']( - function () { ES.SetFunctionName(nonFunction, ''); }, - TypeError, - debug(nonFunction) + ' is not a Function' - ); - }); - - t.test('non-extensible function', { skip: !Object.preventExtensions }, function (st) { - var f = getNamelessFunction(); - Object.preventExtensions(f); - st['throws']( - function () { ES.SetFunctionName(f, ''); }, - TypeError, - 'throws on a non-extensible function' - ); - st.end(); - }); - - t.test('has an own name property', { skip: !functionsHaveNames }, function (st) { - st['throws']( - function () { ES.SetFunctionName(function g() {}, ''); }, - TypeError, - 'throws if function has an own `name` property' - ); - st.end(); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.SetFunctionName(getNamelessFunction(), nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a Symbol or String' - ); - }); - - t.test('symbols', { skip: !v.hasSymbols || has(getNamelessFunction(), 'name') }, function (st) { - var pairs = [ - [Symbol(), ''], - [Symbol(undefined), ''], - [Symbol(null), '[null]'], - [Symbol(''), getInferredName ? '[]' : ''], - [Symbol.iterator, '[Symbol.iterator]'], - [Symbol('foo'), '[foo]'] - ]; - forEach(pairs, function (pair) { - var sym = pair[0]; - var desc = pair[1]; - var f = getNamelessFunction(); - ES.SetFunctionName(f, sym); - st.equal(f.name, desc, debug(sym) + ' yields a name of ' + debug(desc)); - }); - - st.end(); - }); - - var f = getNamelessFunction(); - t.test('when names are configurable', { skip: !functionsHaveConfigurableNames || has(f, 'name') }, function (st) { - // without prefix - st.notEqual(f.name, 'foo', 'precondition'); - ES.SetFunctionName(f, 'foo'); - st.equal(f.name, 'foo', 'function name is set without a prefix'); - - // with prefix - var g = getNamelessFunction(); - st.notEqual(g.name, 'pre- foo', 'precondition'); - ES.SetFunctionName(g, 'foo', 'pre-'); - st.equal(g.name, 'pre- foo', 'function name is set with a prefix'); - - st.end(); - }); - - t.end(); - }); - - test('SetIntegrityLevel', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.SetIntegrityLevel(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - t['throws']( - function () { ES.SetIntegrityLevel({}); }, - /^TypeError: Assertion failed: `level` must be `"sealed"` or `"frozen"`$/, - '`level` must be `"sealed"` or `"frozen"`' - ); - - var O = { a: 1 }; - t.test('sealed', { skip: !Object.preventExtensions || noThrowOnStrictViolation }, function (st) { - st.equal(ES.SetIntegrityLevel(O, 'sealed'), true); - st['throws']( - function () { O.b = 2; }, - /^TypeError: (Cannot|Can't) add property b, object is not extensible$/, - 'sealing prevent new properties from being added' - ); - O.a = 2; - st.equal(O.a, 2, 'pre-frozen, existing properties are mutable'); - st.end(); - }); - - t.test('frozen', { skip: !Object.freeze || noThrowOnStrictViolation }, function (st) { - st.equal(ES.SetIntegrityLevel(O, 'frozen'), true); - st['throws']( - function () { O.a = 3; }, - /^TypeError: Cannot assign to read only property 'a' of /, - 'freezing prevents existing properties from being mutated' - ); - st.end(); - }); - - t.end(); - }); - - test('SpeciesConstructor', function (t) { - t['throws'](function () { ES.SpeciesConstructor(null); }, TypeError); - t['throws'](function () { ES.SpeciesConstructor(undefined); }, TypeError); - - var defaultConstructor = function Foo() {}; - - t.equal( - ES.SpeciesConstructor({ constructor: undefined }, defaultConstructor), - defaultConstructor, - 'undefined constructor returns defaultConstructor' - ); - - t['throws']( - function () { return ES.SpeciesConstructor({ constructor: null }, defaultConstructor); }, - TypeError, - 'non-undefined non-object constructor throws' - ); - - t.test('with Symbol.species', { skip: !hasSpecies }, function (st) { - var Bar = function Bar() {}; - Bar[Symbol.species] = null; - - st.equal( - ES.SpeciesConstructor(new Bar(), defaultConstructor), - defaultConstructor, - 'undefined/null Symbol.species returns default constructor' - ); - - var Baz = function Baz() {}; - Baz[Symbol.species] = Bar; - st.equal( - ES.SpeciesConstructor(new Baz(), defaultConstructor), - Bar, - 'returns Symbol.species constructor value' - ); - - Baz[Symbol.species] = {}; - st['throws']( - function () { ES.SpeciesConstructor(new Baz(), defaultConstructor); }, - TypeError, - 'throws when non-constructor non-null non-undefined species value found' - ); - - st.end(); - }); - - t.end(); - }); - - test('SplitMatch', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.SplitMatch(nonString, 0, ''); }, - TypeError, - 'S: ' + debug(nonString) + ' is not a String' - ); - t['throws']( - function () { ES.SplitMatch('', 0, nonString); }, - TypeError, - 'R: ' + debug(nonString) + ' is not a String' - ); - }); - - forEach(v.nonNumbers.concat(v.nonIntegerNumbers), function (nonIntegerNumber) { - t['throws']( - function () { ES.SplitMatch('', nonIntegerNumber, ''); }, - TypeError, - 'q: ' + debug(nonIntegerNumber) + ' is not an integer' - ); - }); - - t.equal(ES.SplitMatch('abc', 0, 'a'), 1, '"a" is found at index 0, before index 1, in "abc"'); - t.equal(ES.SplitMatch('abc', 1, 'a'), false, '"a" is not found at index 1 in "abc"'); - t.equal(ES.SplitMatch('abc', 2, 'a'), false, '"a" is not found at index 2 in "abc"'); - - t.equal(ES.SplitMatch('abc', 0, 'b'), false, '"a" is not found at index 0 in "abc"'); - t.equal(ES.SplitMatch('abc', 1, 'b'), 2, '"b" is found at index 1, before index 2, in "abc"'); - t.equal(ES.SplitMatch('abc', 2, 'b'), false, '"a" is not found at index 2 in "abc"'); - - t.equal(ES.SplitMatch('abc', 0, 'c'), false, '"a" is not found at index 0 in "abc"'); - t.equal(ES.SplitMatch('abc', 1, 'c'), false, '"a" is not found at index 1 in "abc"'); - t.equal(ES.SplitMatch('abc', 2, 'c'), 3, '"c" is found at index 2, before index 3, in "abc"'); - - t.equal(ES.SplitMatch('a', 0, 'ab'), false, 'R longer than S yields false'); - - var s = 'a' + wholePoo + 'c'; - t.equal(ES.SplitMatch(s, 1, wholePoo), 3, debug(wholePoo) + ' is found at index 1, before index 3, in ' + debug(s)); - - t.end(); - }); - - test('StringCreate', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.StringCreate(nonString); }, - TypeError, - debug(nonString) + ' is not a String' - ); - }); - - t.deepEqual(ES.StringCreate('foo', String.prototype), Object('foo'), '"foo" with `String.prototype` makes `Object("foo")'); - - if ($setProto) { - var proto = {}; - t.equal($getProto(ES.StringCreate('', proto)), proto, '[[Prototype]] is set as expected'); - } else { - t['throws']( - function () { ES.StringCreate('', proto); }, - SyntaxError, - 'setting [[Prototype]] is not supported in this env' - ); - } - - t.equal(ES.StringCreate('a', String.prototype).length, 'a'.length, 'length is preserved'); - - t.end(); - }); - - test('StringGetIndexProperty', function (t) { - forEach(v.nonStrings.concat(v.strings), function (nonStringObjects) { - t['throws']( - function () { ES.StringGetIndexProperty(nonStringObjects); }, - TypeError, - debug(nonStringObjects) + ' is not a boxed String Object' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.StringGetIndexProperty('', nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - forEach(v.symbols, function (symbol) { - t.equal( - ES.StringGetIndexProperty(Object('a'), symbol), - undefined, - debug(symbol) + ' is a Property Key, but not a String' - ); - }); - - // a string where CanonicalNumericIndexString returns undefined, a non-integer, or -0 - forEach(['-1', '-0', 'undefined'].concat(v.nonIntegerNumbers), function (nonIndex) { - var S = Object('abc'); - t.equal( - ES.StringGetIndexProperty(S, String(nonIndex)), - undefined, - debug(nonIndex) + ' is not an index inside ' + debug(S) - ); - }); - - forEach(v.strings, function (str) { - var S = Object(str); - for (var i = 0; i < str.length; i += 1) { - var desc = { - '[[Configurable]]': false, - '[[Enumerable]]': true, - '[[Value]]': str.charAt(i), - '[[Writable]]': false - }; - t.deepEqual( - ES.StringGetIndexProperty(S, String(i)), - desc, - 'boxed String ' + debug(S) + ' at index ' + debug(i) + ' is ' + debug(desc) - ); - } - t.equal( - ES.StringGetIndexProperty(S, String(str.length)), - undefined, - 'boxed String ' + debug(S) + ' at OOB index ' + debug(str.length) + ' is `undefined' - ); - }); - - t.end(); - }); - - test('SymbolDescriptiveString', function (t) { - forEach(v.nonSymbolPrimitives.concat(v.objects), function (nonSymbol) { - t['throws']( - function () { ES.SymbolDescriptiveString(nonSymbol); }, - TypeError, - debug(nonSymbol) + ' is not a Symbol' - ); - }); - - t.test('Symbols', { skip: !v.hasSymbols }, function (st) { - st.equal(ES.SymbolDescriptiveString(Symbol()), 'Symbol()', 'undefined description'); - st.equal(ES.SymbolDescriptiveString(Symbol('')), 'Symbol()', 'empty string description'); - st.equal(ES.SymbolDescriptiveString(Symbol.iterator), 'Symbol(Symbol.iterator)', 'well-known symbol'); - st.equal(ES.SymbolDescriptiveString(Symbol('foo')), 'Symbol(foo)', 'string description'); - - st.end(); - }); - - t.end(); - }); - - test('TestIntegrityLevel', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.TestIntegrityLevel(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - t['throws']( - function () { ES.TestIntegrityLevel({ a: 1 }); }, - /^TypeError: Assertion failed: `level` must be `"sealed"` or `"frozen"`$/, - '`level` must be `"sealed"` or `"frozen"`' - ); - - t.equal(ES.TestIntegrityLevel({ a: 1 }, 'sealed'), false, 'basic object is not sealed'); - t.equal(ES.TestIntegrityLevel({ a: 1 }, 'frozen'), false, 'basic object is not frozen'); - - t.test('preventExtensions', { skip: !Object.preventExtensions }, function (st) { - var o = Object.preventExtensions({ a: 1 }); - st.equal(ES.TestIntegrityLevel(o, 'sealed'), false, 'nonextensible object is not sealed'); - st.equal(ES.TestIntegrityLevel(o, 'frozen'), false, 'nonextensible object is not frozen'); - - var empty = Object.preventExtensions({}); - st.equal(ES.TestIntegrityLevel(empty, 'sealed'), true, 'empty nonextensible object is sealed'); - st.equal(ES.TestIntegrityLevel(empty, 'frozen'), true, 'empty nonextensible object is frozen'); - st.end(); - }); - - t.test('seal', { skip: !Object.seal }, function (st) { - var o = Object.seal({ a: 1 }); - st.equal(ES.TestIntegrityLevel(o, 'sealed'), true, 'sealed object is sealed'); - st.equal(ES.TestIntegrityLevel(o, 'frozen'), false, 'sealed object is not frozen'); - - var empty = Object.seal({}); - st.equal(ES.TestIntegrityLevel(empty, 'sealed'), true, 'empty sealed object is sealed'); - st.equal(ES.TestIntegrityLevel(empty, 'frozen'), true, 'empty sealed object is frozen'); - - st.end(); - }); - - t.test('freeze', { skip: !Object.freeze }, function (st) { - var o = Object.freeze({ a: 1 }); - st.equal(ES.TestIntegrityLevel(o, 'sealed'), true, 'frozen object is sealed'); - st.equal(ES.TestIntegrityLevel(o, 'frozen'), true, 'frozen object is frozen'); - - var empty = Object.freeze({}); - st.equal(ES.TestIntegrityLevel(empty, 'sealed'), true, 'empty frozen object is sealed'); - st.equal(ES.TestIntegrityLevel(empty, 'frozen'), true, 'empty frozen object is frozen'); - - st.end(); - }); - - t.end(); - }); - - test('thisNumberValue', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.thisNumberValue(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - forEach(v.numbers, function (number) { - t.equal(ES.thisNumberValue(number), number, debug(number) + ' is its own thisNumberValue'); - var obj = Object(number); - t.equal(ES.thisNumberValue(obj), number, debug(obj) + ' is the boxed thisNumberValue'); - }); - - t.end(); - }); - - test('thisBooleanValue', function (t) { - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { ES.thisBooleanValue(nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - forEach(v.booleans, function (boolean) { - t.equal(ES.thisBooleanValue(boolean), boolean, debug(boolean) + ' is its own thisBooleanValue'); - var obj = Object(boolean); - t.equal(ES.thisBooleanValue(obj), boolean, debug(obj) + ' is the boxed thisBooleanValue'); - }); - - t.end(); - }); - - test('thisStringValue', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.thisStringValue(nonString); }, - TypeError, - debug(nonString) + ' is not a String' - ); - }); - - forEach(v.strings, function (string) { - t.equal(ES.thisStringValue(string), string, debug(string) + ' is its own thisStringValue'); - var obj = Object(string); - t.equal(ES.thisStringValue(obj), string, debug(obj) + ' is the boxed thisStringValue'); - }); - - t.end(); - }); - - test('thisTimeValue', function (t) { - forEach(v.primitives.concat(v.objects), function (nonDate) { - t['throws']( - function () { ES.thisTimeValue(nonDate); }, - TypeError, - debug(nonDate) + ' is not a Date' - ); - }); - - forEach(v.timestamps, function (timestamp) { - var date = new Date(timestamp); - - t.equal(ES.thisTimeValue(date), timestamp, debug(date) + ' is its own thisTimeValue'); - }); - - t.end(); - }); - - test('ToDateString', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.ToDateString(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.ToDateString(NaN), 'Invalid Date', 'NaN becomes "Invalid Date"'); - var now = +new Date(); - t.equal(ES.ToDateString(now), Date(now), 'any timestamp becomes `Date(timestamp)`'); - t.end(); - }); - - test('ToInt16', function (t) { - t.equal(0, ES.ToInt16(NaN), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.equal(0, ES.ToInt16(num), num + ' returns +0'); - t.equal(0, ES.ToInt16(-num), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt16(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.equal(ES.ToInt16(0x100000000), 0, '2^32 returns +0'); - t.equal(ES.ToInt16(0x100000000 - 1), -1, '2^32 - 1 returns -1'); - t.equal(ES.ToInt16(0x80000000), 0, '2^31 returns +0'); - t.equal(ES.ToInt16(0x80000000 - 1), -1, '2^31 - 1 returns -1'); - t.equal(ES.ToInt16(0x10000), 0, '2^16 returns +0'); - t.equal(ES.ToInt16(0x10000 - 1), -1, '2^16 - 1 returns -1'); - t.end(); - }); - - test('ToInt8', function (t) { - t.equal(0, ES.ToInt8(NaN), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.equal(0, ES.ToInt8(num), num + ' returns +0'); - t.equal(0, ES.ToInt8(-num), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToInt8(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.equal(ES.ToInt8(0x100000000), 0, '2^32 returns +0'); - t.equal(ES.ToInt8(0x100000000 - 1), -1, '2^32 - 1 returns -1'); - t.equal(ES.ToInt8(0x80000000), 0, '2^31 returns +0'); - t.equal(ES.ToInt8(0x80000000 - 1), -1, '2^31 - 1 returns -1'); - t.equal(ES.ToInt8(0x10000), 0, '2^16 returns +0'); - t.equal(ES.ToInt8(0x10000 - 1), -1, '2^16 - 1 returns -1'); - t.equal(ES.ToInt8(0x100), 0, '2^8 returns +0'); - t.equal(ES.ToInt8(0x100 - 1), -1, '2^8 - 1 returns -1'); - t.equal(ES.ToInt8(0x10), 0x10, '2^4 returns 2^4'); - t.end(); - }); - - test('ToNumber', function (t) { - testToNumber(t, ES, ES.ToNumber); - - t.end(); - }); - - test('ToUint8', function (t) { - t.equal(0, ES.ToUint8(NaN), 'NaN coerces to +0'); - forEach([0, Infinity], function (num) { - t.equal(0, ES.ToUint8(num), num + ' returns +0'); - t.equal(0, ES.ToUint8(-num), '-' + num + ' returns +0'); - }); - t['throws'](function () { return ES.ToUint8(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.equal(ES.ToUint8(0x100000000), 0, '2^32 returns +0'); - t.equal(ES.ToUint8(0x100000000 - 1), 0x100 - 1, '2^32 - 1 returns 2^8 - 1'); - t.equal(ES.ToUint8(0x80000000), 0, '2^31 returns +0'); - t.equal(ES.ToUint8(0x80000000 - 1), 0x100 - 1, '2^31 - 1 returns 2^8 - 1'); - t.equal(ES.ToUint8(0x10000), 0, '2^16 returns +0'); - t.equal(ES.ToUint8(0x10000 - 1), 0x100 - 1, '2^16 - 1 returns 2^8 - 1'); - t.equal(ES.ToUint8(0x100), 0, '2^8 returns +0'); - t.equal(ES.ToUint8(0x100 - 1), 0x100 - 1, '2^8 - 1 returns 2^16 - 1'); - t.equal(ES.ToUint8(0x10), 0x10, '2^4 returns 2^4'); - t.equal(ES.ToUint8(0x10 - 1), 0x10 - 1, '2^4 - 1 returns 2^4 - 1'); - t.end(); - }); - - test('ToUint8Clamp', function (t) { - t.equal(0, ES.ToUint8Clamp(NaN), 'NaN coerces to +0'); - t.equal(0, ES.ToUint8Clamp(0), '+0 returns +0'); - t.equal(0, ES.ToUint8Clamp(-0), '-0 returns +0'); - t.equal(0, ES.ToUint8Clamp(-Infinity), '-Infinity returns +0'); - t['throws'](function () { return ES.ToUint8Clamp(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - forEach([255, 256, 0x100000, Infinity], function (number) { - t.equal(255, ES.ToUint8Clamp(number), number + ' coerces to 255'); - }); - t.equal(1, ES.ToUint8Clamp(1.49), '1.49 coerces to 1'); - t.equal(2, ES.ToUint8Clamp(1.5), '1.5 coerces to 2, because 2 is even'); - t.equal(2, ES.ToUint8Clamp(1.51), '1.51 coerces to 2'); - - t.equal(2, ES.ToUint8Clamp(2.49), '2.49 coerces to 2'); - t.equal(2, ES.ToUint8Clamp(2.5), '2.5 coerces to 2, because 2 is even'); - t.equal(3, ES.ToUint8Clamp(2.51), '2.51 coerces to 3'); - t.end(); - }); - - test('ToLength', function (t) { - t['throws'](function () { return ES.ToLength(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws a TypeError'); - t.equal(3, ES.ToLength(v.coercibleObject), 'coercibleObject coerces to 3'); - t.equal(42, ES.ToLength('42.5'), '"42.5" coerces to 42'); - t.equal(7, ES.ToLength(7.3), '7.3 coerces to 7'); - forEach([-0, -1, -42, -Infinity], function (negative) { - t.equal(0, ES.ToLength(negative), negative + ' coerces to +0'); - }); - t.equal(MAX_SAFE_INTEGER, ES.ToLength(MAX_SAFE_INTEGER + 1), '2^53 coerces to 2^53 - 1'); - t.equal(MAX_SAFE_INTEGER, ES.ToLength(MAX_SAFE_INTEGER + 3), '2^53 + 2 coerces to 2^53 - 1'); - t.end(); - }); - - test('ToPropertyKey', function (t) { - forEach(v.objects.concat(v.nonSymbolPrimitives), function (value) { - t.equal(ES.ToPropertyKey(value), String(value), 'ToPropertyKey(value) === String(value) for non-Symbols'); - }); - - forEach(v.symbols, function (symbol) { - t.equal( - ES.ToPropertyKey(symbol), - symbol, - 'ToPropertyKey(' + debug(symbol) + ') === ' + debug(symbol) - ); - t.equal( - ES.ToPropertyKey(Object(symbol)), - symbol, - 'ToPropertyKey(' + debug(Object(symbol)) + ') === ' + debug(symbol) - ); - }); - - t.end(); - }); - - test('ToString', function (t) { - forEach(v.objects.concat(v.nonSymbolPrimitives), function (item) { - t.equal(ES.ToString(item), String(item), 'ES.ToString(' + debug(item) + ') ToStrings to String(' + debug(item) + ')'); - }); - - t['throws'](function () { return ES.ToString(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - - forEach(v.symbols, function (symbol) { - t['throws'](function () { return ES.ToString(symbol); }, TypeError, debug(symbol) + ' throws'); - }); - t.end(); - }); - - test('Type', function (t) { - t.equal(ES.Type(), 'Undefined', 'Type() is Undefined'); - t.equal(ES.Type(undefined), 'Undefined', 'Type(undefined) is Undefined'); - t.equal(ES.Type(null), 'Null', 'Type(null) is Null'); - t.equal(ES.Type(true), 'Boolean', 'Type(true) is Boolean'); - t.equal(ES.Type(false), 'Boolean', 'Type(false) is Boolean'); - t.equal(ES.Type(0), 'Number', 'Type(0) is Number'); - t.equal(ES.Type(NaN), 'Number', 'Type(NaN) is Number'); - t.equal(ES.Type('abc'), 'String', 'Type("abc") is String'); - t.equal(ES.Type(function () {}), 'Object', 'Type(function () {}) is Object'); - t.equal(ES.Type({}), 'Object', 'Type({}) is Object'); - - t.test('symbols', { skip: !v.hasSymbols }, function (st) { - st.equal(ES.Type(Symbol.iterator), 'Symbol', 'Type(Symbol.iterator) is Symbol'); - st.end(); - }); - - t.end(); - }); - - test('ValidateAndApplyPropertyDescriptor', function (t) { - forEach(v.nonUndefinedPrimitives, function (nonUndefinedPrimitive) { - t['throws']( - function () { ES.ValidateAndApplyPropertyDescriptor(nonUndefinedPrimitive, '', false, v.genericDescriptor(), v.genericDescriptor()); }, - TypeError, - 'O: ' + debug(nonUndefinedPrimitive) + ' is not undefined or an Object' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { - return ES.ValidateAndApplyPropertyDescriptor( - undefined, - null, - nonBoolean, - v.genericDescriptor(), - v.genericDescriptor() - ); - }, - TypeError, - 'extensible: ' + debug(nonBoolean) + ' is not a Boolean' - ); - }); - - forEach(v.primitives, function (primitive) { - // Desc must be a Property Descriptor - t['throws']( - function () { - return ES.ValidateAndApplyPropertyDescriptor( - undefined, - null, - false, - primitive, - v.genericDescriptor() - ); - }, - TypeError, - 'Desc: ' + debug(primitive) + ' is not a Property Descriptor' - ); - }); - - forEach(v.nonUndefinedPrimitives, function (primitive) { - // current must be undefined or a Property Descriptor - t['throws']( - function () { - return ES.ValidateAndApplyPropertyDescriptor( - undefined, - null, - false, - v.genericDescriptor(), - primitive - ); - }, - TypeError, - 'current: ' + debug(primitive) + ' is not a Property Descriptor or undefined' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - // if O is an object, P must be a property key - t['throws']( - function () { - return ES.ValidateAndApplyPropertyDescriptor( - {}, - nonPropertyKey, - false, - v.genericDescriptor(), - v.genericDescriptor() - ); - }, - TypeError, - 'P: ' + debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.test('current is undefined', function (st) { - var propertyKey = 'howdy'; - - st.test('generic descriptor', function (s2t) { - var generic = v.genericDescriptor(); - generic['[[Enumerable]]'] = true; - var O = {}; - ES.ValidateAndApplyPropertyDescriptor(undefined, propertyKey, true, generic); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, false, generic), - false, - 'when extensible is false, nothing happens' - ); - s2t.deepEqual(O, {}, 'no changes applied when O is undefined or extensible is false'); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, true, generic), - true, - 'operation is successful' - ); - var expected = {}; - expected[propertyKey] = undefined; - s2t.deepEqual(O, expected, 'generic descriptor has been defined as an own data property'); - s2t.end(); - }); - - st.test('data descriptor', function (s2t) { - var data = v.dataDescriptor(); - data['[[Enumerable]]'] = true; - - var O = {}; - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(undefined, propertyKey, true, data), - true, - 'noop when O is undefined' - ); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, false, data), - false, - 'when extensible is false, nothing happens' - ); - s2t.deepEqual(O, {}, 'no changes applied when O is undefined or extensible is false'); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, true, data), - true, - 'operation is successful' - ); - var expected = {}; - expected[propertyKey] = data['[[Value]]']; - s2t.deepEqual(O, expected, 'data descriptor has been defined as an own data property'); - s2t.end(); - }); - - st.test('accessor descriptor', { skip: !defineProperty.oDP }, function (s2t) { - var count = 0; - var accessor = v.accessorDescriptor(); - accessor['[[Enumerable]]'] = true; - accessor['[[Get]]'] = function () { - count += 1; - return count; - }; - - var O = {}; - ES.ValidateAndApplyPropertyDescriptor(undefined, propertyKey, true, accessor); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, false, accessor), - false, - 'when extensible is false, nothing happens' - ); - s2t.deepEqual(O, {}, 'no changes applied when O is undefined or extensible is false'); - s2t.equal( - ES.ValidateAndApplyPropertyDescriptor(O, propertyKey, true, accessor), - true, - 'operation is successful' - ); - var expected = {}; - expected[propertyKey] = accessor['[[Get]]']() + 1; - s2t.deepEqual(O, expected, 'accessor descriptor has been defined as an own accessor property'); - s2t.end(); - }); - - st.end(); - }); - - t.test('every field in Desc is absent', { skip: 'it is unclear if having no fields qualifies Desc to be a Property Descriptor' }); - - forEach([v.dataDescriptor, v.accessorDescriptor, v.mutatorDescriptor], function (getDescriptor) { - t.equal( - ES.ValidateAndApplyPropertyDescriptor(undefined, 'property key', true, getDescriptor(), getDescriptor()), - true, - 'when Desc and current are the same, early return true' - ); - }); - - t.test('current is nonconfigurable', function (st) { - // note: these must not be generic descriptors, or else the algorithm returns an early true - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.configurable(v.dataDescriptor()), - v.descriptors.nonConfigurable(v.dataDescriptor()) - ), - false, - 'false if Desc is configurable' - ); - - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.enumerable(v.dataDescriptor()), - v.descriptors.nonEnumerable(v.dataDescriptor()) - ), - false, - 'false if Desc is Enumerable and current is not' - ); - - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.nonEnumerable(v.dataDescriptor()), - v.descriptors.enumerable(v.dataDescriptor()) - ), - false, - 'false if Desc is not Enumerable and current is' - ); - - var descLackingEnumerable = v.accessorDescriptor(); - delete descLackingEnumerable['[[Enumerable]]']; - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - descLackingEnumerable, - v.descriptors.enumerable(v.accessorDescriptor()) - ), - true, - 'not false if Desc lacks Enumerable' - ); - - st.end(); - }); - - t.test('Desc and current: one is a data descriptor, one is not', { skip: !defineProperty || !getOwnPropertyDescriptor }, function (st) { - // note: Desc must be configurable if current is nonconfigurable, to hit this branch - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.configurable(v.accessorDescriptor()), - v.descriptors.nonConfigurable(v.dataDescriptor()) - ), - false, - 'false if current (data) is nonconfigurable' - ); - - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.configurable(v.dataDescriptor()), - v.descriptors.nonConfigurable(v.accessorDescriptor()) - ), - false, - 'false if current (not data) is nonconfigurable' - ); - - // one is data and one is not, - // // if current is data, convert to accessor - // // else convert to data - - var startsWithData = { - 'property key': 42 - }; - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - startsWithData, - 'property key', - true, - v.descriptors.enumerable(v.descriptors.configurable(v.accessorDescriptor())), - v.descriptors.enumerable(v.descriptors.configurable(v.dataDescriptor())) - ), - true, - 'operation is successful: current is data, Desc is accessor' - ); - var shouldBeAccessor = getOwnPropertyDescriptor(startsWithData, 'property key'); - st.equal(typeof shouldBeAccessor.get, 'function', 'has a getter'); - - var key = 'property key'; - var startsWithAccessor = {}; - defineProperty(startsWithAccessor, key, { - configurable: true, - enumerable: true, - get: function get() { return 42; } - }); - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - startsWithAccessor, - key, - true, - v.descriptors.enumerable(v.descriptors.configurable(v.dataDescriptor())), - v.descriptors.enumerable(v.descriptors.configurable(v.accessorDescriptor(42))) - ), - true, - 'operation is successful: current is accessor, Desc is data' - ); - var shouldBeData = getOwnPropertyDescriptor(startsWithAccessor, 'property key'); - st.deepEqual(shouldBeData, { configurable: true, enumerable: true, value: 42, writable: false }, 'is a data property'); - - st.end(); - }); - - t.test('Desc and current are both data descriptors', function (st) { - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.writable(v.dataDescriptor()), - v.descriptors.nonWritable(v.descriptors.nonConfigurable(v.dataDescriptor())) - ), - false, - 'false if frozen current and writable Desc' - ); - - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.descriptors.configurable({ '[[Value]]': 42 }), - v.descriptors.nonWritable({ '[[Value]]': 7 }) - ), - false, - 'false if nonwritable current has a different value than Desc' - ); - - st.end(); - }); - - t.test('current is nonconfigurable; Desc and current are both accessor descriptors', function (st) { - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.mutatorDescriptor(), - v.descriptors.nonConfigurable(v.mutatorDescriptor()) - ), - false, - 'false if both Sets are not equal' - ); - - st.equal( - ES.ValidateAndApplyPropertyDescriptor( - undefined, - 'property key', - true, - v.accessorDescriptor(), - v.descriptors.nonConfigurable(v.accessorDescriptor()) - ), - false, - 'false if both Gets are not equal' - ); - - st.end(); - }); - - t.end(); - }); -}; - -var es2016 = function ES2016(ES, ops, expectedMissing, skips) { - es2015(ES, ops, expectedMissing, assign(assign({}, skips), { - StringGetIndexProperty: true - })); - var test = makeTest(skips); - - test('IterableToArrayLike', function (t) { - t.test('custom iterables', { skip: !v.hasSymbols }, function (st) { - var O = {}; - O[Symbol.iterator] = function () { - var i = -1; - return { - next: function () { - i += 1; - return { - done: i >= 5, - value: i - }; - } - }; - }; - st.deepEqual( - ES.IterableToArrayLike(O), - [0, 1, 2, 3, 4], - 'Symbol.iterator method is called and values collected' - ); - - st.end(); - }); - - t.deepEqual(ES.IterableToArrayLike('abc'), ['a', 'b', 'c'], 'a string of code units spreads'); - t.deepEqual(ES.IterableToArrayLike('💩'), ['💩'], 'a string of code points spreads'); - t.deepEqual(ES.IterableToArrayLike('a💩c'), ['a', '💩', 'c'], 'a string of code points and units spreads'); - - var arr = [1, 2, 3]; - t.deepEqual(ES.IterableToArrayLike(arr), arr, 'an array becomes a similar array'); - t.notEqual(ES.IterableToArrayLike(arr), arr, 'an array becomes a different, but similar, array'); - - var O = {}; - t.equal(ES.IterableToArrayLike(O), O, 'a non-iterable non-array non-string object is returned directly'); - - t.end(); - }); - - test('OrdinaryGetPrototypeOf', function (t) { - t.test('values', { skip: !$getProto }, function (st) { - st.equal(ES.OrdinaryGetPrototypeOf([]), Array.prototype, 'array [[Prototype]] is Array.prototype'); - st.equal(ES.OrdinaryGetPrototypeOf({}), Object.prototype, 'object [[Prototype]] is Object.prototype'); - st.equal(ES.OrdinaryGetPrototypeOf(/a/g), RegExp.prototype, 'regex [[Prototype]] is RegExp.prototype'); - st.equal(ES.OrdinaryGetPrototypeOf(Object('')), String.prototype, 'boxed string [[Prototype]] is String.prototype'); - st.equal(ES.OrdinaryGetPrototypeOf(Object(42)), Number.prototype, 'boxed number [[Prototype]] is Number.prototype'); - st.equal(ES.OrdinaryGetPrototypeOf(Object(true)), Boolean.prototype, 'boxed boolean [[Prototype]] is Boolean.prototype'); - if (v.hasSymbols) { - st.equal(ES.OrdinaryGetPrototypeOf(Object(Symbol.iterator)), Symbol.prototype, 'boxed symbol [[Prototype]] is Symbol.prototype'); - } - st.end(); - }); - - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.OrdinaryGetPrototypeOf(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - t.end(); - }); - - test('OrdinarySetPrototypeOf', { skip: !$getProto || !$setProto }, function (t) { - var a = []; - var proto = {}; - - t.equal(ES.OrdinaryGetPrototypeOf(a), Array.prototype, 'precondition'); - t.equal(ES.OrdinarySetPrototypeOf(a, proto), true, 'setting prototype is successful'); - t.equal(ES.OrdinaryGetPrototypeOf(a), proto, 'postcondition'); - - t.end(); - }); - - test('SameValueNonNumber', function (t) { - var willThrow = [ - [3, 4], - [NaN, 4], - [4, ''], - ['abc', true], - [{}, false] - ]; - forEach(willThrow, function (nums) { - t['throws'](function () { return ES.SameValueNonNumber.apply(ES, nums); }, TypeError, 'value must be same type and non-number'); - }); - - forEach(v.objects.concat(v.nonNumberPrimitives), function (val) { - t.equal(val === val, ES.SameValueNonNumber(val, val), debug(val) + ' is SameValueNonNumber to itself'); - }); - - t.end(); - }); - - test('UTF16Encoding', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.UTF16Encoding(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - t['throws']( - function () { ES.UTF16Encoding(-1); }, - TypeError, - '-1 is < 0' - ); - - t['throws']( - function () { ES.UTF16Encoding(0x10FFFF + 1); }, - TypeError, - '0x10FFFF + 1 is > 0x10FFFF' - ); - - t.equal(ES.UTF16Encoding(0xD83D), leadingPoo, '0xD83D is the first half of ' + wholePoo); - t.equal(ES.UTF16Encoding(0xDCA9), trailingPoo, '0xDCA9 is the last half of ' + wholePoo); - t.equal(ES.UTF16Encoding(0x1F4A9), wholePoo, '0xDCA9 is the last half of ' + wholePoo); - - t.end(); - }); - - test('UTF16Decode', function (t) { - t['throws']( - function () { ES.UTF16Decode('a'.charCodeAt(0), trailingPoo.charCodeAt(0)); }, - TypeError, - '"a" is not a leading surrogate' - ); - t['throws']( - function () { ES.UTF16Decode(leadingPoo.charCodeAt(0), 'b'.charCodeAt(0)); }, - TypeError, - '"b" is not a trailing surrogate' - ); - - t.equal(ES.UTF16Decode(leadingPoo.charCodeAt(0), trailingPoo.charCodeAt(0)), wholePoo); - - t.end(); - }); -}; - -var es2017 = function ES2017(ES, ops, expectedMissing, skips) { - es2016(ES, ops, expectedMissing, assign({}, skips, { - EnumerableOwnNames: true, - IterableToArrayLike: true - })); - var test = makeTest(skips); - - test('EnumerableOwnProperties', function (t) { - var obj = testEnumerableOwnNames(t, function (O) { - return ES.EnumerableOwnProperties(O, 'key'); - }); - - t.deepEqual( - ES.EnumerableOwnProperties(obj, 'value'), - [obj.own], - 'returns enumerable own values' - ); - - t.deepEqual( - ES.EnumerableOwnProperties(obj, 'key+value'), - [['own', obj.own]], - 'returns enumerable own entries' - ); - - t.end(); - }); - - test('IterableToList', function (t) { - var customIterator = function () { - var i = -1; - return { - next: function () { - i += 1; - return { - done: i >= 5, - value: i - }; - } - }; - }; - - t.deepEqual( - ES.IterableToList({}, customIterator), - [0, 1, 2, 3, 4], - 'iterator method is called and values collected' - ); - - t.test('Symbol support', { skip: !v.hasSymbols }, function (st) { - st.deepEqual(ES.IterableToList('abc', String.prototype[Symbol.iterator]), ['a', 'b', 'c'], 'a string of code units spreads'); - st.deepEqual(ES.IterableToList('☃', String.prototype[Symbol.iterator]), ['☃'], 'a string of code points spreads'); - - var arr = [1, 2, 3]; - st.deepEqual(ES.IterableToList(arr, arr[Symbol.iterator]), arr, 'an array becomes a similar array'); - st.notEqual(ES.IterableToList(arr, arr[Symbol.iterator]), arr, 'an array becomes a different, but similar, array'); - - st.end(); - }); - - t['throws']( - function () { ES.IterableToList({}, void 0); }, - TypeError, - 'non-function iterator method' - ); - - t.end(); - }); - - test('StringGetOwnProperty', function (t) { - forEach(v.nonStrings.concat(v.strings), function (nonBoxedString) { - t['throws']( - function () { ES.StringGetOwnProperty(nonBoxedString, '0'); }, - TypeError, - debug(nonBoxedString) + ' is not a boxed String' - ); - }); - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - t['throws']( - function () { ES.StringGetOwnProperty(Object(''), nonPropertyKey); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - t.equal(ES.StringGetOwnProperty(Object(''), '0'), undefined, 'empty boxed string yields undefined'); - - forEach(v.strings, function (string) { - if (string) { - var S = Object(string); - for (var i = 0; i < string.length; i += 1) { - var descriptor = ES.StringGetOwnProperty(S, String(i)); - t.deepEqual( - descriptor, - { - '[[Configurable]]': false, - '[[Enumerable]]': true, - '[[Value]]': string.charAt(i), - '[[Writable]]': false - }, - debug(string) + ': property ' + debug(String(i)) + ': returns expected descriptor' - ); - } - } - }); - - t.end(); - }); - - test('ToIndex', function (t) { - t.equal(ES.ToIndex(), 0, 'no value gives +0'); - t.equal(ES.ToIndex(undefined), 0, 'undefined value gives +0'); - t.equal(ES.ToIndex(-0), 0, '-0 gives +0'); - - t['throws'](function () { ES.ToIndex(-1); }, RangeError, 'negative numbers throw'); - - t['throws'](function () { ES.ToIndex(MAX_SAFE_INTEGER + 1); }, RangeError, 'too large numbers throw'); - - t.equal(ES.ToIndex(3), 3, 'numbers work'); - t.equal(ES.ToIndex(v.valueOfOnlyObject), 4, 'coercible objects are coerced'); - - t.end(); - }); -}; - -var es2018 = function ES2018(ES, ops, expectedMissing, skips) { - es2017(ES, ops, expectedMissing, assign({}, skips, { - EnumerableOwnProperties: true, - GetSubstitution: true, - IsPropertyDescriptor: true - })); - var test = makeTest(skips); - - test('CopyDataProperties', function (t) { - t.test('first argument: target', function (st) { - forEach(v.primitives, function (primitive) { - st['throws']( - function () { ES.CopyDataProperties(primitive, {}, []); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - st.end(); - }); - - t.test('second argument: source', function (st) { - var frozenTarget = Object.freeze ? Object.freeze({}) : {}; - forEach(v.nullPrimitives, function (nullish) { - st.equal( - ES.CopyDataProperties(frozenTarget, nullish, []), - frozenTarget, - debug(nullish) + ' "source" yields identical, unmodified target' - ); - }); - - forEach(v.nonNullPrimitives, function (objectCoercible) { - var target = {}; - var result = ES.CopyDataProperties(target, objectCoercible, []); - st.equal(result, target, 'result === target'); - st.deepEqual(keys(result), keys(Object(objectCoercible)), 'target ends up with keys of ' + debug(objectCoercible)); - }); - - st.test('enumerable accessor property', { skip: !defineProperty.oDP }, function (s2t) { - var target = {}; - var source = {}; - defineProperty(source, 'a', { - enumerable: true, - get: function () { return 42; } - }); - var result = ES.CopyDataProperties(target, source, []); - s2t.equal(result, target, 'result === target'); - s2t.deepEqual(result, { a: 42 }, 'target ends up with enumerable accessor of source'); - s2t.end(); - }); - - st.end(); - }); - - t.test('third argument: excludedItems', function (st) { - forEach(v.objects.concat(v.primitives), function (nonArray) { - st['throws']( - function () { ES.CopyDataProperties({}, {}, nonArray); }, - TypeError, - debug(nonArray) + ' is not an Array' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - st['throws']( - function () { ES.CopyDataProperties({}, {}, [nonPropertyKey]); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - var result = ES.CopyDataProperties({}, { a: 1, b: 2, c: 3 }, ['b']); - st.deepEqual(keys(result).sort(), ['a', 'c'].sort(), 'excluded string keys are excluded'); - - st.test('excluding symbols', { skip: !v.hasSymbols }, function (s2t) { - var source = {}; - forEach(v.symbols, function (symbol) { - source[symbol] = true; - }); - - var includedSymbols = v.symbols.slice(1); - var excludedSymbols = v.symbols.slice(0, 1); - var target = ES.CopyDataProperties({}, source, excludedSymbols); - - forEach(includedSymbols, function (symbol) { - s2t.equal(has(target, symbol), true, debug(symbol) + ' is included'); - }); - - forEach(excludedSymbols, function (symbol) { - s2t.equal(has(target, symbol), false, debug(symbol) + ' is excluded'); - }); - - s2t.end(); - }); - - st.end(); - }); - - // TODO: CopyDataProperties does not throw when copying fails - - t.end(); - }); - - test('DateString', function (t) { - forEach(v.nonNumbers.concat(NaN), function (nonNumberOrNaN) { - t['throws']( - function () { ES.DateString(nonNumberOrNaN); }, - TypeError, - debug(nonNumberOrNaN) + ' is not a non-NaN Number' - ); - }); - - t.equal(ES.DateString(Date.UTC(2019, 8, 10, 7, 8, 9)), 'Tue Sep 10 2019'); - t.equal(ES.DateString(Date.UTC(2016, 1, 29, 7, 8, 9)), 'Mon Feb 29 2016'); // leap day - t.end(); - }); - - test('EnumerableOwnPropertyNames', function (t) { - var obj = testEnumerableOwnNames(t, function (O) { - return ES.EnumerableOwnPropertyNames(O, 'key'); - }); - - t.deepEqual( - ES.EnumerableOwnPropertyNames(obj, 'value'), - [obj.own], - 'returns enumerable own values' - ); - - t.deepEqual( - ES.EnumerableOwnPropertyNames(obj, 'key+value'), - [['own', obj.own]], - 'returns enumerable own entries' - ); - - t.end(); - }); - - test('GetSubstitution', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.GetSubstitution(nonString, '', 0, [], undefined, ''); }, - TypeError, - '`matched`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', nonString, 0, [], undefined, ''); }, - TypeError, - '`str`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', '', 0, [], undefined, nonString); }, - TypeError, - '`replacement`: ' + debug(nonString) + ' is not a String' - ); - - t['throws']( - function () { ES.GetSubstitution('', '', 0, [nonString], undefined, ''); }, - TypeError, - '`captures`: ' + debug([nonString]) + ' is not an Array of strings' - ); - }); - - forEach(v.notNonNegativeIntegers, function (nonNonNegativeInteger) { - t['throws']( - function () { ES.GetSubstitution('', '', nonNonNegativeInteger, [], undefined, ''); }, - TypeError, - '`position`: ' + debug(nonNonNegativeInteger) + ' is not a non-negative integer' - ); - }); - - forEach(v.nonArrays, function (nonArray) { - t['throws']( - function () { ES.GetSubstitution('', '', 0, nonArray, undefined, ''); }, - TypeError, - '`captures`: ' + debug(nonArray) + ' is not an Array' - ); - }); - - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], undefined, '123'), - '123', - 'returns the substitution' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '$$2$'), - '$2$', - 'supports $$, and trailing $' - ); - - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$&<'), - '>abcdef<', - 'supports $&' - ); - - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$`<'), - '><', - 'supports $` at position 0' - ); - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], undefined, '>$`<'), - '>ab<', - 'supports $` at position > 0' - ); - - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 7, [], undefined, ">$'<"), - '><', - "supports $' at a position where there's less than `matched.length` chars left" - ); - t.equal( - ES.GetSubstitution('def', 'abcdefghi', 3, [], undefined, ">$'<"), - '>ghi<', - "supports $' at a position where there's more than `matched.length` chars left" - ); - - for (var i = 0; i < 100; i += 1) { - var captures = []; - captures[i] = 'test'; - if (i > 0) { - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$' + i + '<'), - '>undefined<', - 'supports $' + i + ' with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$' + i), - '>undefined', - 'supports $' + i + ' at the end of the replacement, with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, undefined, '>$' + i + '<'), - '><', - 'supports $' + i + ' with a capture at that index' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, undefined, '>$' + i), - '>', - 'supports $' + i + ' at the end of the replacement, with a capture at that index' - ); - } - if (i < 10) { - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$0' + i + '<'), - i === 0 ? '><' : '>undefined<', - 'supports $0' + i + ' with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, [], undefined, '>$0' + i), - i === 0 ? '>' : '>undefined', - 'supports $0' + i + ' at the end of the replacement, with no captures' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, undefined, '>$0' + i + '<'), - '><', - 'supports $0' + i + ' with a capture at that index' - ); - t.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, undefined, '>$0' + i), - '>', - 'supports $0' + i + ' at the end of the replacement, with a capture at that index' - ); - } - } - - t.test('named captures', function (st) { - var namedCaptures = { - foo: 'foo!' - }; - - st.equal( - ES.GetSubstitution('abcdef', 'abcdefghi', 0, captures, namedCaptures, 'a>$foo!> bitsN, - debug(bigInt32) + ' >> ' + debug(bitsN) + ' is ' + debug(bigInt32 >> bitsN) - ); - }); - }); - - t.end(); - }); - - test('BigInt::subtract', { skip: !hasBigInts }, function (t) { - forEach(v.nonBigInts, function (nonBigInt) { - t['throws']( - function () { ES.BigInt.subtract(nonBigInt, $BigInt(0)); }, - TypeError, - 'x: ' + debug(nonBigInt) + ' is not a BigInt' - ); - t['throws']( - function () { ES.BigInt.subtract($BigInt(0), nonBigInt); }, - TypeError, - 'y: ' + debug(nonBigInt) + ' is not a BigInt' - ); - }); - - t.equal(ES.BigInt.subtract($BigInt(0), $BigInt(0)), $BigInt(0), '0n - 0n is 0n'); - - forEach(v.bigints, function (bigint) { - t.equal(ES.BigInt.subtract(bigint, $BigInt(0)), bigint, debug(bigint) + ' - 0n produces ' + bigint); - t.equal(ES.BigInt.subtract(bigint, $BigInt(1)), bigint - $BigInt(1), debug(bigint) + ' - 1n produces ' + (bigint + $BigInt(1))); - t.equal(ES.BigInt.subtract(bigint, $BigInt(42)), bigint - $BigInt(42), debug(bigint) + ' - 42n produces ' + (bigint - $BigInt(42))); - }); - - t.end(); - }); - - test('BigInt::toString', function (t) { - forEach(v.nonBigInts, function (nonBigInt) { - t['throws']( - function () { ES.BigInt.toString(nonBigInt); }, - TypeError, - debug(nonBigInt) + ' is not a BigInt' - ); - }); - - forEach(v.bigints, function (bigint) { - t.equal(ES.BigInt.toString(bigint), String(bigint), debug(bigint) + ' stringifies to ' + bigint); - }); - - t.end(); - }); - - test('BigInt::unaryMinus', function (t) { - forEach(v.nonBigInts, function (nonBigInt) { - t['throws']( - function () { ES.BigInt.unaryMinus(nonBigInt); }, - TypeError, - debug(nonBigInt) + ' is not a BigInt' - ); - }); - - t.test('actual BigInts', { skip: !hasBigInts }, function (st) { - forEach(v.bigints, function (bigint) { - st.equal(ES.BigInt.unaryMinus(bigint), -bigint, debug(bigint) + ' produces -' + debug(bigint)); - }); - st.end(); - }); - - t.end(); - }); - - test('BigInt::unsignedRightShift', { skip: !hasBigInts }, function (t) { - forEach(v.nonBigInts, function (nonBigInt) { - t['throws']( - function () { ES.BigInt.unsignedRightShift(nonBigInt, $BigInt(0)); }, - TypeError, - 'x: ' + debug(nonBigInt) + ' is not a BigInt' - ); - t['throws']( - function () { ES.BigInt.unsignedRightShift($BigInt(0), nonBigInt); }, - TypeError, - 'y: ' + debug(nonBigInt) + ' is not a BigInt' - ); - }); - - forEach([0].concat(v.int32s), function (int32) { - var bigInt32 = $BigInt(int32); - forEach([1, 3, 5, 31, 32, 33], function (bits) { - var bitsN = $BigInt(bits); - t['throws']( - function () { ES.BigInt.unsignedRightShift(bigInt32, bitsN); }, - TypeError, - debug(bigInt32) + ' >>> ' + debug(bitsN) + ' throws' - ); - }); - }); - - t.end(); - }); - - test('BigIntBitwiseOp', { skip: !hasBigInts }, function (t) { - t['throws']( - function () { ES.BigIntBitwiseOp('invalid', BigInt(0), BigInt(0)); }, - TypeError, - 'throws with an invalid op' - ); - - t.equal(ES.BigIntBitwiseOp('&', BigInt(1), BigInt(2)), BigInt(1) & BigInt(2)); - t.equal(ES.BigIntBitwiseOp('|', BigInt(1), BigInt(2)), BigInt(1) | BigInt(2)); - t.equal(ES.BigIntBitwiseOp('^', BigInt(1), BigInt(2)), BigInt(1) ^ BigInt(2)); - - t.end(); - }); - - test('BinaryAnd', function (t) { - t.equal(ES.BinaryAnd(0, 0), 0); - t.equal(ES.BinaryAnd(0, 1), 0); - t.equal(ES.BinaryAnd(1, 0), 0); - t.equal(ES.BinaryAnd(1, 1), 1); - - forEach(v.nonIntegerNumbers.concat(v.nonNumberPrimitives, v.objects), function (nonBit) { - t['throws']( - function () { ES.BinaryAnd(0, nonBit); }, - TypeError - ); - t['throws']( - function () { ES.BinaryAnd(nonBit, 1); }, - TypeError - ); - }); - t.end(); - }); - - test('BinaryOr', function (t) { - t.equal(ES.BinaryOr(0, 0), 0); - t.equal(ES.BinaryOr(0, 1), 1); - t.equal(ES.BinaryOr(1, 0), 1); - t.equal(ES.BinaryOr(1, 1), 1); - - forEach(v.nonIntegerNumbers.concat(v.nonNumberPrimitives, v.objects), function (nonBit) { - t['throws']( - function () { ES.BinaryOr(0, nonBit); }, - TypeError - ); - t['throws']( - function () { ES.BinaryOr(nonBit, 1); }, - TypeError - ); - }); - t.end(); - }); - - test('BinaryXor', function (t) { - t.equal(ES.BinaryXor(0, 0), 0); - t.equal(ES.BinaryXor(0, 1), 1); - t.equal(ES.BinaryXor(1, 0), 1); - t.equal(ES.BinaryXor(1, 1), 0); - - forEach(v.nonIntegerNumbers.concat(v.nonNumberPrimitives, v.objects), function (nonBit) { - t['throws']( - function () { ES.BinaryXor(0, nonBit); }, - TypeError - ); - t['throws']( - function () { ES.BinaryXor(nonBit, 1); }, - TypeError - ); - }); - t.end(); - }); - - test('CodePointAt', function (t) { - t['throws']( - function () { ES.CodePointAt('abc', -1); }, - TypeError, - 'requires an index >= 0' - ); - t['throws']( - function () { ES.CodePointAt('abc', 3); }, - TypeError, - 'requires an index < string length' - ); - - t.deepEqual(ES.CodePointAt('abc', 0), { - '[[CodePoint]]': 'a', - '[[CodeUnitCount]]': 1, - '[[IsUnpairedSurrogate]]': false - }); - t.deepEqual(ES.CodePointAt('abc', 1), { - '[[CodePoint]]': 'b', - '[[CodeUnitCount]]': 1, - '[[IsUnpairedSurrogate]]': false - }); - t.deepEqual(ES.CodePointAt('abc', 2), { - '[[CodePoint]]': 'c', - '[[CodeUnitCount]]': 1, - '[[IsUnpairedSurrogate]]': false - }); - - var strWithHalfPoo = 'a' + leadingPoo + 'c'; - var strWithWholePoo = 'a' + wholePoo + 'd'; - - t.deepEqual(ES.CodePointAt(strWithHalfPoo, 0), { - '[[CodePoint]]': 'a', - '[[CodeUnitCount]]': 1, - '[[IsUnpairedSurrogate]]': false - }); - t.deepEqual(ES.CodePointAt(strWithHalfPoo, 1), { - '[[CodePoint]]': leadingPoo, - '[[CodeUnitCount]]': 1, - '[[IsUnpairedSurrogate]]': true - }); - t.deepEqual(ES.CodePointAt(strWithHalfPoo, 2), { - '[[CodePoint]]': 'c', - '[[CodeUnitCount]]': 1, - '[[IsUnpairedSurrogate]]': false - }); - - t.deepEqual(ES.CodePointAt(strWithWholePoo, 0), { - '[[CodePoint]]': 'a', - '[[CodeUnitCount]]': 1, - '[[IsUnpairedSurrogate]]': false - }); - t.deepEqual(ES.CodePointAt(strWithWholePoo, 1), { - '[[CodePoint]]': wholePoo, - '[[CodeUnitCount]]': 2, - '[[IsUnpairedSurrogate]]': false - }); - t.deepEqual(ES.CodePointAt(strWithWholePoo, 2), { - '[[CodePoint]]': trailingPoo, - '[[CodeUnitCount]]': 1, - '[[IsUnpairedSurrogate]]': true - }); - t.deepEqual(ES.CodePointAt(strWithWholePoo, 3), { - '[[CodePoint]]': 'd', - '[[CodeUnitCount]]': 1, - '[[IsUnpairedSurrogate]]': false - }); - - t.end(); - }); - - test('CopyDataProperties', function (t) { - t.test('first argument: target', function (st) { - forEach(v.primitives, function (primitive) { - st['throws']( - function () { ES.CopyDataProperties(primitive, {}, []); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - st.end(); - }); - - t.test('second argument: source', function (st) { - var frozenTarget = Object.freeze ? Object.freeze({}) : {}; - forEach(v.nullPrimitives, function (nullish) { - st.equal( - ES.CopyDataProperties(frozenTarget, nullish, []), - frozenTarget, - debug(nullish) + ' "source" yields identical, unmodified target' - ); - }); - - forEach(v.nonNullPrimitives, function (objectCoercible) { - var target = {}; - var result = ES.CopyDataProperties(target, objectCoercible, []); - st.equal(result, target, 'result === target'); - st.deepEqual(keys(result), keys(Object(objectCoercible)), 'target ends up with keys of ' + debug(objectCoercible)); - }); - - st.test('enumerable accessor property', { skip: !defineProperty.oDP }, function (s2t) { - var target = {}; - var source = {}; - defineProperty(source, 'a', { - enumerable: true, - get: function () { return 42; } - }); - var result = ES.CopyDataProperties(target, source, []); - s2t.equal(result, target, 'result === target'); - s2t.deepEqual(result, { a: 42 }, 'target ends up with enumerable accessor of source'); - s2t.end(); - }); - - st.end(); - }); - - t.test('third argument: excludedItems', function (st) { - forEach(v.objects.concat(v.primitives), function (nonArray) { - st['throws']( - function () { ES.CopyDataProperties({}, {}, nonArray); }, - TypeError, - debug(nonArray) + ' is not an Array' - ); - }); - - forEach(v.nonPropertyKeys, function (nonPropertyKey) { - st['throws']( - function () { ES.CopyDataProperties({}, {}, [nonPropertyKey]); }, - TypeError, - debug(nonPropertyKey) + ' is not a Property Key' - ); - }); - - var result = ES.CopyDataProperties({}, { a: 1, b: 2, c: 3 }, ['b']); - st.deepEqual(keys(result).sort(), ['a', 'c'].sort(), 'excluded string keys are excluded'); - - st.test('excluding symbols', { skip: !v.hasSymbols }, function (s2t) { - var source = {}; - forEach(v.symbols, function (symbol) { - source[symbol] = true; - }); - - var includedSymbols = v.symbols.slice(1); - var excludedSymbols = v.symbols.slice(0, 1); - var target = ES.CopyDataProperties({}, source, excludedSymbols); - - forEach(includedSymbols, function (symbol) { - s2t.equal(has(target, symbol), true, debug(symbol) + ' is included'); - }); - - forEach(excludedSymbols, function (symbol) { - s2t.equal(has(target, symbol), false, debug(symbol) + ' is excluded'); - }); - - s2t.end(); - }); - - st.end(); - }); - - // TODO: CopyDataProperties throws when copying fails - - t.end(); - }); - - test('GetIterator', function (t) { - try { - ES.GetIterator({}, null); - } catch (e) { - t.ok(e.message.indexOf('Assertion failed: `hint` must be one of \'sync\' or \'async\'' >= 0)); - } - - var arr = [1, 2]; - testIterator(t, ES.GetIterator(arr), arr); - - testIterator(t, ES.GetIterator('abc'), 'abc'.split('')); - - t.test('Symbol.iterator', { skip: !v.hasSymbols }, function (st) { - var m = new Map(); - m.set(1, 'a'); - m.set(2, 'b'); - - testIterator(st, ES.GetIterator(m), [[1, 'a'], [2, 'b']]); - - st.end(); - }); - - t.test('Symbol.asyncIterator', { skip: !v.hasSymbols || !Symbol.asyncIterator }, function (st) { - try { - ES.GetIterator(arr, 'async'); - } catch (e) { - st.ok(e.message.indexOf("async from sync iterators aren't currently supported") >= 0); - } - - var it = { - next: function () { - return Promise.resolve({ - done: true - }); - } - }; - var obj = {}; - obj[Symbol.asyncIterator] = function () { - return it; - }; - - st.equal(ES.GetIterator(obj, 'async'), it); - - st.end(); - }); - - t.end(); - }); - - var unclampedUnsignedIntegerTypes = [ - 'Int8', - 'Int16', - 'Int32' - ]; - var clampedTypes = [ - 'Uint8C' - ]; - var unclampedSignedIntegerTypes = [ - 'Uint8', - 'Uint16', - 'Uint32' - ]; - var unclampedIntegerTypes = unclampedUnsignedIntegerTypes.concat(unclampedSignedIntegerTypes); - var floatTypes = [ - 'Float32', - 'Float64' - ]; - var integerTypes = unclampedIntegerTypes.concat(clampedTypes, floatTypes); - var bigIntTypes = [ - 'BigInt64', - 'BigUint64' - ]; - var numberTypes = floatTypes.concat(integerTypes); - var nonIntegerTypes = floatTypes.concat(bigIntTypes); - var unsignedElementTypes = unclampedSignedIntegerTypes.concat([ - 'BigUint64' - ]); - var signedElementTypes = unclampedUnsignedIntegerTypes; - - test('IsBigIntElementType', function (t) { - forEach(bigIntTypes, function (type) { - t.equal( - ES.IsBigIntElementType(type), - true, - debug(type) + ' is a BigInt element type' - ); - }); - - forEach(numberTypes, function (type) { - t.equal( - ES.IsBigIntElementType(type), - false, - debug(type) + ' is not a BigInt element type' - ); - }); - - t.end(); - }); - - test('IsUnsignedElementType', function (t) { - forEach(unsignedElementTypes, function (type) { - t.equal( - ES.IsUnsignedElementType(type), - true, - debug(type) + ' is an unsigned element type' - ); - }); - - forEach(signedElementTypes, function (type) { - t.equal( - ES.IsUnsignedElementType(type), - false, - debug(type) + ' is not an unsigned element type' - ); - }); - - t.end(); - }); - - test('IsUnclampedIntegerElementType', function (t) { - forEach(unclampedIntegerTypes, function (type) { - t.equal( - ES.IsUnclampedIntegerElementType(type), - true, - debug(type) + ' is an unclamped integer element type' - ); - }); - - forEach(clampedTypes.concat(nonIntegerTypes), function (type) { - t.equal( - ES.IsUnclampedIntegerElementType(type), - false, - debug(type) + ' is not an unclamped integer element type' - ); - }); - - t.end(); - }); - - test('IsNonNegativeInteger', function (t) { - forEach(v.notNonNegativeIntegers, function (nonIntegerNumber) { - t.equal( - ES.IsNonNegativeInteger(nonIntegerNumber), - false, - debug(nonIntegerNumber) + ' is not a non-negative integer' - ); - }); - - forEach(v.zeroes.concat(v.integerNumbers), function (nonNegativeInteger) { - t.equal( - ES.IsNonNegativeInteger(nonNegativeInteger), - true, - debug(nonNegativeInteger) + ' is a non-negative integer' - ); - }); - - t.end(); - }); - - test('IsNoTearConfiguration', function (t) { - forEach(unclampedIntegerTypes, function (type) { - t.equal( - ES.IsNoTearConfiguration(type), - true, - debug(type) + ' with any order is a no-tear configuration' - ); - }); - - forEach(bigIntTypes, function (type) { - t.equal( - ES.IsNoTearConfiguration(type, 'Init'), - false, - debug(type) + ' with ' + debug('Init') + ' is not a no-tear configuration' - ); - - t.equal( - ES.IsNoTearConfiguration(type, 'Unordered'), - false, - debug(type) + ' with ' + debug('Unordered') + ' is not a no-tear configuration' - ); - - t.equal( - ES.IsNoTearConfiguration(type), - true, - debug(type) + ' with any other order is a no-tear configuration' - ); - }); - - forEach(clampedTypes, function (type) { - t.equal( - ES.IsNoTearConfiguration(type), - false, - debug(type) + ' with any order is not a no-tear configuration' - ); - }); - - t.end(); - }); - - test('LengthOfArrayLike', function (t) { - forEach(v.primitives, function (primitive) { - t['throws']( - function () { ES.LengthOfArrayLike(primitive); }, - TypeError, - debug(primitive) + ' is not an Object' - ); - }); - - t.equal(ES.LengthOfArrayLike([]), 0); - t.equal(ES.LengthOfArrayLike([1]), 1); - t.equal(ES.LengthOfArrayLike({ length: 42 }), 42); - - t.end(); - }); - - test('Number::add', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.add(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.add(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.add(+Infinity, +Infinity), +Infinity, '+∞ + +∞ is +∞'); - t.equal(ES.Number.add(-Infinity, -Infinity), -Infinity, '-∞ + -∞ is -∞'); - t.equal(ES.Number.add(+Infinity, -Infinity), NaN, '+∞ + -∞ is NaN'); - t.equal(ES.Number.add(-Infinity, +Infinity), NaN, '-∞ + +∞ is NaN'); - - t.equal(ES.Number.add(+0, +0), +0, '0 + 0 is +0'); - t.equal(ES.Number.add(+0, -0), +0, '0 + -0 is +0'); - t.equal(ES.Number.add(-0, +0), +0, '-0 + 0 is +0'); - t.equal(ES.Number.add(-0, -0), -0, '-0 + -0 is -0'); - - forEach(v.numbers, function (number) { - if (number !== 0) { - t.equal(ES.Number.add(number, 0), number, debug(number) + ' + 0 adds to ' + number); - } - t.equal(ES.Number.add(number, 1), number + 1, debug(number) + ' + 1 adds to ' + (number + 1)); - t.equal(ES.Number.add(1, number), number + 1, '1 + ' + debug(number) + ' adds to ' + (number + 1)); - t.equal(ES.Number.add(number, -42), number - 42, debug(number) + ' + -42 adds to ' + (number - 42)); - t.equal(ES.Number.add(-42, number), number - 42, '-42 + ' + debug(number) + ' adds to ' + (number - 42)); - }); - - t.end(); - }); - - test('Number::bitwiseAND', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.bitwiseAND(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.bitwiseAND(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.bitwiseAND(1, 2), 1 & 2); - - t.end(); - }); - - test('Number::bitwiseNOT', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.bitwiseNOT(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - forEach(v.int32s, function (int32) { - t.equal(ES.Number.bitwiseNOT(int32), ~int32, debug(int32) + ' becomes ~' + debug(int32)); - }); - - t.end(); - }); - - test('Number::bitwiseOR', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.bitwiseOR(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.bitwiseOR(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.bitwiseOR(1, 2), 1 | 2); - - t.end(); - }); - - test('Number::bitwiseXOR', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.bitwiseXOR(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.bitwiseXOR(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.bitwiseXOR(1, 2), 1 ^ 2); - - t.end(); - }); - - test('Number::divide', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.divide(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.divide(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.divide(Infinity, Infinity), NaN, '∞ / ∞ is NaN'); - t.equal(ES.Number.divide(-Infinity, Infinity), NaN, '-∞ / ∞ is NaN'); - t.equal(ES.Number.divide(Infinity, -Infinity), NaN, '∞ / -∞ is NaN'); - t.equal(ES.Number.divide(-Infinity, -Infinity), NaN, '-∞ / -∞ is NaN'); - - t.equal(ES.Number.divide(NaN, NaN), NaN, 'NaN / NaN is NaN'); - - t.equal(ES.Number.divide(+Infinity, +0), +Infinity, '+∞ / +0 is +∞'); - t.equal(ES.Number.divide(-Infinity, -0), +Infinity, '-∞ / -0 is +∞'); - t.equal(ES.Number.divide(+Infinity, -0), -Infinity, '+∞ / -0 is -∞'); - t.equal(ES.Number.divide(-Infinity, +0), -Infinity, '-∞ / +0 is -∞'); - - t.equal(ES.Number.divide(+0, +Infinity), +0, '+0 / +∞ is +0'); - t.equal(ES.Number.divide(-0, -Infinity), +0, '-0 / -∞ is +0'); - t.equal(ES.Number.divide(-0, +Infinity), -0, '-0 / +∞ is -0'); - t.equal(ES.Number.divide(+0, -Infinity), -0, '+0 / -∞ is -0'); - - forEach(v.numbers, function (number) { - if (number !== 0 && isFinite(number)) { - t.equal(ES.Number.divide(number, number), 1, debug(number) + ' divided by itself is 1'); - t.equal(ES.Number.divide(number, 2), number / 2, debug(number) + ' divided by 2 is half itself'); - } - }); - - t.end(); - }); - - test('Number::equal', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.equal(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.equal(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.equal(Infinity, Infinity), true, '∞ === ∞'); - t.equal(ES.Number.equal(-Infinity, Infinity), false, '-∞ !== ∞'); - t.equal(ES.Number.equal(Infinity, -Infinity), false, '∞ !== -∞'); - t.equal(ES.Number.equal(-Infinity, -Infinity), true, '-∞ === -∞'); - - t.equal(ES.Number.equal(NaN, NaN), false, 'NaN !== NaN'); - - t.equal(ES.Number.equal(Infinity, 0), false, '∞ !== 0'); - t.equal(ES.Number.equal(-Infinity, -0), false, '-∞ !== -0'); - t.equal(ES.Number.equal(Infinity, -0), false, '∞ !== -0'); - t.equal(ES.Number.equal(-Infinity, 0), false, '-∞ !== 0'); - - t.equal(ES.Number.equal(+0, +0), true, '+0 === +0'); - t.equal(ES.Number.equal(+0, -0), true, '+0 === -0'); - t.equal(ES.Number.equal(-0, +0), true, '-0 === +0'); - t.equal(ES.Number.equal(-0, -0), true, '-0 === -0'); - - forEach(v.numbers, function (number) { - if (isFinite(number)) { - t.equal(ES.Number.equal(number, number), true, debug(number) + ' is equal to itself'); - t.equal(ES.Number.equal(number, number + 1), false, debug(number) + ' is not equal to itself plus 1'); - } - }); - - t.end(); - }); - - test('Number::exponentiate', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.exponentiate(nonNumber, 0); }, - TypeError, - 'base: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.exponentiate(0, nonNumber); }, - TypeError, - 'exponent: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.exponentiate(0, 42), 0, '+0 ** 42 is +0'); - t.equal(ES.Number.exponentiate(0, -42), Infinity, '+0 ** 42 is +∞'); - t.equal(ES.Number.exponentiate(-0, 42), 0, '-0 ** 42 is +0'); - t.equal(ES.Number.exponentiate(-0, 41), -0, '-0 ** 41 is -0'); - t.equal(ES.Number.exponentiate(-0, -42), Infinity, '-0 ** 42 is +∞'); - t.equal(ES.Number.exponentiate(-0, -41), -Infinity, '-0 ** 41 is -∞'); - - t.equal(ES.Number.exponentiate(Infinity, 0), 1, '+∞ ** 0 is 1'); - t.equal(ES.Number.exponentiate(Infinity, -0), 1, '+∞ ** -0 is 1'); - t.equal(ES.Number.exponentiate(-Infinity, 0), 1, '-∞ ** 0 is 1'); - t.equal(ES.Number.exponentiate(-Infinity, -0), 1, '-∞ ** -0 is 1'); - - t.equal(ES.Number.exponentiate(Infinity, 1), Infinity, '+∞ ** 1 is +∞'); - t.equal(ES.Number.exponentiate(Infinity, 2), Infinity, '+∞ ** 2 is +∞'); - t.equal(ES.Number.exponentiate(Infinity, -1), +0, '+∞ ** -1 is +0'); - t.equal(ES.Number.exponentiate(Infinity, -2), +0, '+∞ ** -2 is +0'); - - t.equal(ES.Number.exponentiate(-Infinity, 1), -Infinity, '-∞ ** 1 is -∞'); - t.equal(ES.Number.exponentiate(-Infinity, 2), Infinity, '-∞ ** 2 is +∞'); - t.equal(ES.Number.exponentiate(-Infinity, -1), -0, '-∞ ** --1 is -0'); - t.equal(ES.Number.exponentiate(-Infinity, -2), +0, '-∞ ** --2 is +0'); - - t.equal(ES.Number.exponentiate(1.1, Infinity), Infinity, '1.1 ** +∞ is +∞'); - t.equal(ES.Number.exponentiate(1.1, -Infinity), 0, '1.1 ** -∞ is +0'); - t.equal(ES.Number.exponentiate(-1.1, Infinity), Infinity, '-1.1 ** +∞ is +∞'); - t.equal(ES.Number.exponentiate(-1.1, -Infinity), 0, '-1.1 ** -∞ is +0'); - - t.equal(ES.Number.exponentiate(1, Infinity), NaN, '1 ** +∞ is NaN'); - t.equal(ES.Number.exponentiate(1, -Infinity), NaN, '1 ** -∞ is NaN'); - t.equal(ES.Number.exponentiate(-1, Infinity), NaN, '-1 ** +∞ is NaN'); - t.equal(ES.Number.exponentiate(-1, -Infinity), NaN, '-1 ** -∞ is NaN'); - - t.equal(ES.Number.exponentiate(0.9, Infinity), 0, '0.9 ** +∞ is +0'); - t.equal(ES.Number.exponentiate(0.9, -Infinity), Infinity, '0.9 ** -∞ is ∞'); - t.equal(ES.Number.exponentiate(-0.9, Infinity), 0, '-0.9 ** +∞ is +0'); - t.equal(ES.Number.exponentiate(-0.9, -Infinity), Infinity, '-0.9 ** -∞ is +∞'); - - forEach(v.numbers.concat(NaN), function (number) { - t.equal(ES.Number.exponentiate(number, NaN), NaN, debug(number) + ' ** NaN is NaN'); - - if (number !== 0) { - t.equal(ES.Number.exponentiate(number, 0), 1, debug(number) + ' ** +0 is 1'); - t.equal(ES.Number.exponentiate(number, -0), 1, debug(number) + ' ** -0 is 1'); - t.equal(ES.Number.exponentiate(NaN, number), NaN, 'NaN ** ' + debug(number) + ' is NaN'); - } - - if (number !== 0 && isFinite(number)) { - t.equal(ES.Number.equal(number, number), true, debug(number) + ' is equal to itself'); - t.equal(ES.Number.equal(number, number + 1), false, debug(number) + ' is not equal to itself plus 1'); - } - }); - - t.end(); - }); - - test('Number::leftShift', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.leftShift(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.leftShift(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - forEach([0].concat(v.int32s), function (int32) { - forEach([1, 3, 5, 31, 32, 33], function (bits) { - t.equal(ES.Number.leftShift(int32, bits), int32 << bits, debug(int32) + ' << ' + bits + ' is ' + debug(int32 << bits)); - }); - }); - - t.end(); - }); - - test('Number::lessThan', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.lessThan(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.lessThan(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.lessThan(+0, -0), false, '+0 < -0 is false'); - t.equal(ES.Number.lessThan(+0, +0), false, '+0 < +0 is false'); - t.equal(ES.Number.lessThan(-0, +0), false, '-0 < +0 is false'); - t.equal(ES.Number.lessThan(-0, -0), false, '-0 < -0 is false'); - - t.equal(ES.Number.lessThan(NaN, NaN), undefined, 'NaN < NaN is undefined'); - - t.equal(ES.Number.lessThan(+Infinity, +Infinity), false, '+∞ < +∞ is false'); - t.equal(ES.Number.lessThan(+Infinity, -Infinity), false, '+∞ < -∞ is false'); - t.equal(ES.Number.lessThan(-Infinity, +Infinity), true, '-∞ < +∞ is true'); - t.equal(ES.Number.lessThan(-Infinity, -Infinity), false, '-∞ < -∞ is false'); - - forEach(v.numbers.concat(v.infinities), function (number) { - t.equal(ES.Number.lessThan(NaN, number), undefined, 'NaN < ' + debug(number) + ' is undefined'); - t.equal(ES.Number.lessThan(number, NaN), undefined, debug(number) + ' < NaN is undefined'); - - t.equal(ES.Number.lessThan(number, number), false, debug(number) + ' is not less than itself'); - - if (isFinite(number)) { - t.equal(ES.Number.lessThan(number, number + 1), true, debug(number) + ' < ' + debug(number + 1) + ' is true'); - t.equal(ES.Number.lessThan(number + 1, number), false, debug(number + 1) + ' < ' + debug(number) + ' is false'); - - t.equal(ES.Number.lessThan(Infinity, number), false, '+∞ < ' + debug(number) + ' is false'); - t.equal(ES.Number.lessThan(number, Infinity), true, debug(number) + ' < +∞ is true'); - t.equal(ES.Number.lessThan(-Infinity, number), true, '-∞ < ' + debug(number) + ' is true'); - t.equal(ES.Number.lessThan(number, -Infinity), false, debug(number) + ' < -∞ is false'); - } - }); - - t.end(); - }); - - test('Number::multiply', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.multiply(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.multiply(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - forEach([+0, -0, 1, -1], function (x) { - var expected = x === 0 ? NaN : Infinity; - t.equal(ES.Number.multiply(Infinity, x), expected, '+∞ * ' + debug(x) + ' is ' + debug(expected)); - t.equal(ES.Number.multiply(x, Infinity), expected, debug(x) + ' * +∞ is ' + debug(expected)); - t.equal(ES.Number.multiply(-Infinity, x), -expected, '-∞ * ' + debug(x) + ' is ' + debug(expected)); - t.equal(ES.Number.multiply(x, -Infinity), -expected, debug(x) + ' * -∞ is ' + debug(expected)); - }); - - t.equal(ES.Number.multiply(Infinity, Infinity), Infinity, '+∞ * +∞ is +∞'); - t.equal(ES.Number.multiply(Infinity, -Infinity), -Infinity, '+∞ * -∞ is -∞'); - t.equal(ES.Number.multiply(-Infinity, Infinity), -Infinity, '-∞ * +∞ is -∞'); - t.equal(ES.Number.multiply(-Infinity, -Infinity), Infinity, '-∞ * -∞ is +∞'); - - t.equal(ES.Number.multiply(+0, +0), +0, '0 * 0 is +0'); - t.equal(ES.Number.multiply(+0, -0), -0, '0 * -0 is -0'); - t.equal(ES.Number.multiply(-0, +0), -0, '-0 * 0 is -0'); - t.equal(ES.Number.multiply(-0, -0), +0, '-0 * -0 is +0'); - - forEach(v.numbers.concat(NaN), function (number) { - t.equal(ES.Number.multiply(NaN, number), NaN, 'NaN * ' + debug(number) + ' is NaN'); - t.equal(ES.Number.multiply(number, NaN), NaN, debug(number) + ' * NaN is NaN'); - - if (number !== 0 && isFinite(number)) { - t.equal(ES.Number.multiply(number, 0), number > 0 ? 0 : -0, debug(number) + ' * +0 produces ' + (number > 0 ? '+0' : '-0')); - t.equal(ES.Number.multiply(0, number), number > 0 ? 0 : -0, '+0 * ' + debug(number) + ' produces ' + (number > 0 ? '+0' : '-0')); - t.equal(ES.Number.multiply(number, -0), number > 0 ? -0 : 0, debug(number) + ' * -0 produces ' + (number > 0 ? '-0' : '+0')); - t.equal(ES.Number.multiply(-0, number), number > 0 ? -0 : 0, '-0 * ' + debug(number) + ' produces ' + (number > 0 ? '-0' : '+0')); - t.equal(ES.Number.multiply(number, 1), number, debug(number) + ' * 1 produces itself'); - t.equal(ES.Number.multiply(number, -42), number * -42, debug(number) + ' * -42 produces ' + (number - 42)); - } - }); - - t.end(); - }); - - test('Number::remainder', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.remainder(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.remainder(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.remainder(NaN, NaN), NaN, 'NaN % NaN is NaN'); - - t.equal(ES.Number.remainder(+0, +0), NaN, '+0 % +0 is NaN'); - t.equal(ES.Number.remainder(+0, -0), NaN, '+0 % -0 is NaN'); - t.equal(ES.Number.remainder(-0, +0), NaN, '-0 % +0 is NaN'); - t.equal(ES.Number.remainder(-0, -0), NaN, '-0 % -0 is NaN'); - - forEach(v.numbers, function (number) { - t.equal(ES.Number.remainder(number, NaN), NaN, debug(number) + ' % NaN is NaN'); - t.equal(ES.Number.remainder(NaN, number), NaN, 'NaN % ' + debug(number) + ' is NaN'); - - t.equal(ES.Number.remainder(Infinity, number), NaN, '+∞ % ' + debug(number) + ' is NaN'); - t.equal(ES.Number.remainder(-Infinity, number), NaN, '-∞ % ' + debug(number) + ' is NaN'); - t.equal(ES.Number.remainder(number, 0), NaN, debug(number) + ' % +0 is NaN'); - t.equal(ES.Number.remainder(number, -0), NaN, debug(number) + ' % -0 is NaN'); - - if (isFinite(number)) { - t.equal(ES.Number.remainder(number, Infinity), number, debug(number) + ' % +∞ is ' + debug(number)); - t.equal(ES.Number.remainder(number, -Infinity), number, debug(number) + ' % -∞ is ' + debug(number)); - if (number !== 0) { - t.equal(ES.Number.remainder(0, number), 0, '+0 % ' + debug(number) + ' is ' + debug(number)); - t.equal(ES.Number.remainder(-0, number), -0, '-0 % ' + debug(number) + ' is ' + debug(number)); - t.looseEqual(ES.Number.remainder(number * 2, number), 0, debug(number) + ' % ' + debug(number * 2) + ' is 0'); - } - } - }); - - t.end(); - }); - - test('Number::sameValue', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.sameValue(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.sameValue(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.ok(ES.Number.sameValue(NaN, NaN), true, 'NaN is the sameValue as NaN'); - - t.equal(ES.Number.sameValue(+0, +0), true, '+0 is sameValue as +0'); - t.equal(ES.Number.sameValue(+0, -0), false, '+0 is not sameValue as -0'); - t.equal(ES.Number.sameValue(-0, +0), false, '-0 is not sameValue as +0'); - t.equal(ES.Number.sameValue(-0, -0), true, '-0 is sameValue as -0'); - - forEach(v.numbers, function (number) { - t.ok(ES.Number.sameValue(number, number), debug(number) + ' is the sameValue as itself'); - }); - - t.end(); - }); - - test('Number::sameValueZero', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.sameValueZero(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.sameValueZero(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.ok(ES.Number.sameValueZero(NaN, NaN), true, 'NaN is the sameValueZero as NaN'); - - t.equal(ES.Number.sameValueZero(+0, +0), true, '+0 is sameValueZero as +0'); - t.equal(ES.Number.sameValueZero(+0, -0), true, '+0 is sameValueZero as -0'); - t.equal(ES.Number.sameValueZero(-0, +0), true, '-0 is sameValueZero as +0'); - t.equal(ES.Number.sameValueZero(-0, -0), true, '-0 is sameValueZero as -0'); - - forEach(v.numbers, function (number) { - t.ok(ES.Number.sameValueZero(number, number), debug(number) + ' is the sameValueZero as itself'); - }); - - t.end(); - }); - - test('Number::signedRightShift', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.signedRightShift(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.signedRightShift(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - forEach([0].concat(v.int32s), function (int32) { - forEach([1, 3, 5, 31, 32, 33], function (bits) { - t.equal(ES.Number.signedRightShift(int32, bits), int32 >> bits, debug(int32) + ' >> ' + bits + ' is ' + debug(int32 >> bits)); - }); - }); - - t.end(); - }); - - test('Number::subtract', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.subtract(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.subtract(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.subtract(+0, +0), +0, '0 - 0 is +0'); - t.equal(ES.Number.subtract(+0, -0), +0, '0 - -0 is +0'); - t.equal(ES.Number.subtract(-0, +0), -0, '-0 - 0 is -0'); - t.equal(ES.Number.subtract(-0, -0), +0, '-0 - -0 is +0'); - - forEach(v.numbers, function (number) { - if (number !== 0) { - t.equal(ES.Number.subtract(number, 0), number, debug(number) + ' - 0 produces ' + number); - } - t.equal(ES.Number.subtract(number, 1), number - 1, debug(number) + ' - 1 produces ' + (number + 1)); - t.equal(ES.Number.subtract(number, 42), number - 42, debug(number) + ' - 42 produces ' + (number - 42)); - }); - - t.end(); - }); - - test('Number::toString', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.toString(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - forEach(v.numbers, function (number) { - t.equal(ES.Number.toString(number), String(number), debug(number) + ' stringifies to ' + number); - }); - - t.end(); - }); - - test('Number::unaryMinus', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.unaryMinus(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.Number.unaryMinus(NaN), NaN, 'NaN produces NaN'); - - forEach(v.numbers, function (number) { - t.equal(ES.Number.unaryMinus(number), -number, debug(number) + ' produces -' + debug(number)); - }); - - t.end(); - }); - - test('Number::unsignedRightShift', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.Number.unsignedRightShift(nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.Number.unsignedRightShift(0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - forEach([0].concat(v.int32s), function (int32) { - forEach([1, 3, 5, 31, 32, 33], function (bits) { - t.equal(ES.Number.unsignedRightShift(int32, bits), int32 >>> bits, debug(int32) + ' >>> ' + bits + ' is ' + debug(int32 >>> bits)); - }); - }); - - t.end(); - }); - - test('NumberToBigInt', function (t) { - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.NumberToBigInt(nonNumber); }, - TypeError, - debug(nonNumber) + ' is not a Number' - ); - }); - - forEach(v.nonIntegerNumbers, function (nonIntegerNumber) { - t['throws']( - function () { ES.NumberToBigInt(nonIntegerNumber); }, - RangeError, - debug(nonIntegerNumber) + ' is not an integer' - ); - }); - - t.test('actual BigInts', { skip: !hasBigInts }, function (st) { - forEach(v.integerNumbers, function (int) { - if (int >= 1e17) { - // BigInt(1e17) throws on node v10.4 - v10.8 - try { - st.equal(ES.NumberToBigInt(int), $BigInt(int), debug(int) + ' becomes ' + debug($BigInt(int))); - } catch (e) { - st['throws']( - function () { $BigInt(int); }, - RangeError, - debug(int) + ' is too large on this engine to convert into a BigInt' - ); - } - } else { - st.equal(ES.NumberToBigInt(int), $BigInt(int), debug(int) + ' becomes ' + debug($BigInt(int))); - } - }); - st.end(); - }); - - t.end(); - }); - - test('OrdinaryObjectCreate', function (t) { - forEach(v.nonNullPrimitives, function (value) { - t['throws']( - function () { ES.OrdinaryObjectCreate(value); }, - TypeError, - debug(value) + ' is not null, or an object' - ); - }); - - t.test('proto arg', function (st) { - var Parent = function Parent() {}; - Parent.prototype.foo = {}; - var child = ES.OrdinaryObjectCreate(Parent.prototype); - st.equal(child instanceof Parent, true, 'child is instanceof Parent'); - st.equal(child.foo, Parent.prototype.foo, 'child inherits properties from Parent.prototype'); - - st.end(); - }); - - t.test('internal slots arg', function (st) { - st.doesNotThrow(function () { ES.OrdinaryObjectCreate({}, []); }, 'an empty slot list is valid'); - - st['throws']( - function () { ES.OrdinaryObjectCreate({}, ['a']); }, - SyntaxError, - 'internal slots are not supported' - ); - - st.end(); - }); - - t.test('null proto', { skip: !$setProto }, function (st) { - st.equal('toString' in {}, true, 'normal objects have toString'); - st.equal('toString' in ES.OrdinaryObjectCreate(null), false, 'makes a null object'); - - st.end(); - }); - - t.test('null proto when no native Object.create', { skip: $setProto }, function (st) { - st['throws']( - function () { ES.OrdinaryObjectCreate(null); }, - SyntaxError, - 'without a native Object.create, can not create null objects' - ); - - st.end(); - }); - - t.end(); - }); - - test('SameValueNonNumeric', function (t) { - var willThrow = [ - [3, 4], - [NaN, 4], - [4, ''], - ['abc', true], - [{}, false] - ]; - forEach(willThrow, function (nums) { - t['throws'](function () { return ES.SameValueNonNumeric.apply(ES, nums); }, TypeError, 'value must be same type and non-number'); - }); - - forEach(v.objects.concat(v.nonNumberPrimitives), function (val) { - t.equal(val === val, ES.SameValueNonNumeric(val, val), debug(val) + ' is SameValueNonNumeric to itself'); - }); - - t.end(); - }); - - test('StringPad', function (t) { - t.equal(ES.StringPad('a', 3, undefined, 'start'), ' a'); - t.equal(ES.StringPad('a', 3, undefined, 'end'), 'a '); - t.equal(ES.StringPad('a', 3, '0', 'start'), '00a'); - t.equal(ES.StringPad('a', 3, '0', 'end'), 'a00'); - t.equal(ES.StringPad('a', 3, '012', 'start'), '01a'); - t.equal(ES.StringPad('a', 3, '012', 'end'), 'a01'); - t.equal(ES.StringPad('a', 7, '012', 'start'), '012012a'); - t.equal(ES.StringPad('a', 7, '012', 'end'), 'a012012'); - - t.end(); - }); - - test('thisBigIntValue', { skip: !hasBigInts }, function (t) { - t.equal(ES.thisBigIntValue(BigInt(42)), BigInt(42)); - t.equal(ES.thisBigIntValue(Object(BigInt(42))), BigInt(42)); - - forEach(v.nonBigInts, function (nonBigInt) { - t['throws']( - function () { ES.thisBigIntValue(nonBigInt); }, - TypeError, - debug(nonBigInt) + ' is not a BigInt' - ); - }); - - t.end(); - }); - - test('ToInteger', function (t) { - forEach([0, -0, NaN], function (num) { - t.equal(0, ES.ToInteger(num), debug(num) + ' returns +0'); - }); - forEach([Infinity, 42], function (num) { - t.equal(num, ES.ToInteger(num), debug(num) + ' returns itself'); - t.equal(-num, ES.ToInteger(-num), '-' + debug(num) + ' returns itself'); - }); - t.equal(3, ES.ToInteger(Math.PI), 'pi returns 3'); - t['throws'](function () { return ES.ToInteger(v.uncoercibleObject); }, TypeError, 'uncoercibleObject throws'); - t.end(); - }); - - test('ToNumber', function (t) { - testToNumber(t, ES, ES.ToNumber); - - forEach(v.bigints, function (bigInt) { - t['throws']( - function () { ES.ToNumber(bigInt); }, - TypeError, - 'ToNumber of ' + debug(bigInt) + ' throws' - ); - - var boxed = Object(bigInt); - t['throws']( - function () { ES.ToNumber(boxed); }, - TypeError, - 'ToNumber of ' + debug(boxed) + ' throws' - ); - }); - - t.end(); - }); - - test('UTF16DecodeSurrogatePair', function (t) { - t['throws']( - function () { ES.UTF16DecodeSurrogatePair('a'.charCodeAt(0), trailingPoo.charCodeAt(0)); }, - TypeError, - '"a" is not a leading surrogate' - ); - t['throws']( - function () { ES.UTF16DecodeSurrogatePair(leadingPoo.charCodeAt(0), 'b'.charCodeAt(0)); }, - TypeError, - '"b" is not a trailing surrogate' - ); - - t.equal(ES.UTF16DecodeSurrogatePair(leadingPoo.charCodeAt(0), trailingPoo.charCodeAt(0)), wholePoo); - - t.end(); - }); - - test('NumberBitwiseOp', function (t) { - t['throws']( - function () { ES.NumberBitwiseOp('invalid', 0, 0); }, - TypeError, - 'throws with an invalid op' - ); - - forEach(v.nonNumbers, function (nonNumber) { - t['throws']( - function () { ES.NumberBitwiseOp('&', nonNumber, 0); }, - TypeError, - 'x: ' + debug(nonNumber) + ' is not a Number' - ); - t['throws']( - function () { ES.NumberBitwiseOp('&', 0, nonNumber); }, - TypeError, - 'y: ' + debug(nonNumber) + ' is not a Number' - ); - }); - - t.equal(ES.NumberBitwiseOp('&', 1, 2), 1 & 2); - t.equal(ES.NumberBitwiseOp('|', 1, 2), 1 | 2); - t.equal(ES.NumberBitwiseOp('^', 1, 2), 1 ^ 2); - - t.end(); - }); - - test('ToNumeric', function (t) { - testToNumber(t, ES, ES.ToNumeric); - - t.test('BigInts', { skip: !hasBigInts }, function (st) { - st.equal(ES.ToNumeric(BigInt(42)), BigInt(42), debug(BigInt(42)) + ' is ' + debug(BigInt(42))); - st.equal(ES.ToNumeric(Object(BigInt(42))), BigInt(42), debug(Object(BigInt(42))) + ' is ' + debug(BigInt(42))); - - var valueOf = { valueOf: function () { return BigInt(7); } }; - st.equal(ES.ToNumeric(valueOf), valueOf.valueOf(), debug(valueOf) + ' is ' + debug(valueOf.valueOf())); - - var toPrimitive = {}; - var value = BigInt(-2); - toPrimitive[Symbol.toPrimitive] = function () { return value; }; - st.equal(ES.ToNumeric(toPrimitive), value, debug(toPrimitive) + ' is ' + debug(value)); - - st.end(); - }); - - t.end(); - }); - - test('UTF16DecodeString', function (t) { - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { ES.UTF16DecodeString(nonString); }, - TypeError, - debug(nonString) + ' is not a String' - ); - }); - - t.deepEqual(ES.UTF16DecodeString('abc'), ['a', 'b', 'c'], 'code units get split'); - t.deepEqual(ES.UTF16DecodeString('a' + wholePoo + 'c'), ['a', wholePoo, 'c'], 'code points get split too'); - - t.end(); - }); -}; - -module.exports = { - es5: es5, - es2015: es2015, - es2016: es2016, - es2017: es2017, - es2018: es2018, - es2019: es2019, - es2020: es2020 -}; diff --git a/node_modules/es-set-tostringtag/.eslintrc b/node_modules/es-set-tostringtag/.eslintrc new file mode 100644 index 000000000..2612ed8fe --- /dev/null +++ b/node_modules/es-set-tostringtag/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/es-set-tostringtag/CHANGELOG.md b/node_modules/es-set-tostringtag/CHANGELOG.md new file mode 100644 index 000000000..fe54f321e --- /dev/null +++ b/node_modules/es-set-tostringtag/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.1](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.0...v2.0.1) - 2023-01-05 + +### Fixed + +- [Fix] move `has` to prod deps [`#2`](https://github.com/es-shims/es-set-tostringtag/issues/2) + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config` [`b9eecd2`](https://github.com/es-shims/es-set-tostringtag/commit/b9eecd23c10b7b43ba75089ac8ff8cc6b295798b) + +## [v2.0.0](https://github.com/es-shims/es-set-tostringtag/compare/v1.0.0...v2.0.0) - 2022-12-21 + +### Commits + +- [Tests] refactor tests [`168dcfb`](https://github.com/es-shims/es-set-tostringtag/commit/168dcfbb535c279dc48ccdc89419155125aaec18) +- [Breaking] do not set toStringTag if it is already set [`226ab87`](https://github.com/es-shims/es-set-tostringtag/commit/226ab874192c625d9e5f0e599d3f60d2b2aa83b5) +- [New] add `force` option to set even if already set [`1abd4ec`](https://github.com/es-shims/es-set-tostringtag/commit/1abd4ecb282f19718c4518284b0293a343564505) + +## v1.0.0 - 2022-12-21 + +### Commits + +- Initial implementation, tests, readme [`a0e1147`](https://github.com/es-shims/es-set-tostringtag/commit/a0e11473f79a233b46374525c962ea1b4d42418a) +- Initial commit [`ffd4aff`](https://github.com/es-shims/es-set-tostringtag/commit/ffd4afffbeebf29aff0d87a7cfc3f7844e09fe68) +- npm init [`fffe5bd`](https://github.com/es-shims/es-set-tostringtag/commit/fffe5bd1d1146d084730a387a9c672371f4a8fff) +- Only apps should have lockfiles [`d363871`](https://github.com/es-shims/es-set-tostringtag/commit/d36387139465623e161a15dbd39120537f150c62) diff --git a/node_modules/es-set-tostringtag/LICENSE b/node_modules/es-set-tostringtag/LICENSE new file mode 100644 index 000000000..c2a8460a3 --- /dev/null +++ b/node_modules/es-set-tostringtag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 ECMAScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/es-set-tostringtag/README.md b/node_modules/es-set-tostringtag/README.md new file mode 100644 index 000000000..d2887e1a5 --- /dev/null +++ b/node_modules/es-set-tostringtag/README.md @@ -0,0 +1,43 @@ +# es-set-tostringtag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A helper to optimistically set Symbol.toStringTag, when possible. + +Most common usage: +```js +var assert = require('assert'); +var setToStringTag = require('es-set-tostringtag'); + +var obj = {}; + +assert.equal(Object.prototype.toString.call(obj), '[object Object]'); + +setToStringTag(obj, 'tagged!'); + +assert.equal(Object.prototype.toString.call(obj), '[object tagged!]'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/es-set-tostringtag +[npm-version-svg]: https://versionbadg.es/es-shims/es-set-tostringtag.svg +[deps-svg]: https://david-dm.org/es-shims/es-set-tostringtag.svg +[deps-url]: https://david-dm.org/es-shims/es-set-tostringtag +[dev-deps-svg]: https://david-dm.org/es-shims/es-set-tostringtag/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/es-set-tostringtag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-set-tostringtag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-set-tostringtag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-set-tostringtag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-set-tostringtag +[codecov-image]: https://codecov.io/gh/es-shims/es-set-tostringtag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/es-set-tostringtag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/es-set-tostringtag +[actions-url]: https://github.com/es-shims/es-set-tostringtag/actions diff --git a/node_modules/es-set-tostringtag/index.js b/node_modules/es-set-tostringtag/index.js new file mode 100644 index 000000000..7a7cb7797 --- /dev/null +++ b/node_modules/es-set-tostringtag/index.js @@ -0,0 +1,26 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasToStringTag = require('has-tostringtag/shams')(); +var has = require('has'); + +var toStringTag = hasToStringTag ? Symbol.toStringTag : null; + +module.exports = function setToStringTag(object, value) { + var overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force; + if (toStringTag && (overrideIfSet || !has(object, toStringTag))) { + if ($defineProperty) { + $defineProperty(object, toStringTag, { + configurable: true, + enumerable: false, + value: value, + writable: false + }); + } else { + object[toStringTag] = value; // eslint-disable-line no-param-reassign + } + } +}; diff --git a/node_modules/es-set-tostringtag/package.json b/node_modules/es-set-tostringtag/package.json new file mode 100644 index 000000000..3e32aafea --- /dev/null +++ b/node_modules/es-set-tostringtag/package.json @@ -0,0 +1,69 @@ +{ + "name": "es-set-tostringtag", + "version": "2.0.1", + "description": "A helper to optimistically set Symbol.toStringTag, when possible.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/es-shims/es-set-tostringtag.git" + }, + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/es-shims/es-set-tostringtag/issues" + }, + "homepage": "https://github.com/es-shims/es-set-tostringtag#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.1", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "./test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/es-set-tostringtag/test/index.js b/node_modules/es-set-tostringtag/test/index.js new file mode 100644 index 000000000..4728372a9 --- /dev/null +++ b/node_modules/es-set-tostringtag/test/index.js @@ -0,0 +1,53 @@ +'use strict'; + +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); +var has = require('has'); + +var setToStringTag = require('../'); + +test('setToStringTag', function (t) { + t.equal(typeof setToStringTag, 'function', 'is a function'); + + var obj = {}; + var sentinel = {}; + + setToStringTag(obj, sentinel); + + t.test('has Symbol.toStringTag', { skip: !hasToStringTag }, function (st) { + st.ok(has(obj, Symbol.toStringTag), 'has toStringTag property'); + + st.equal(obj[Symbol.toStringTag], sentinel, 'toStringTag property is as expected'); + + st.equal(String(obj), '[object Object]', 'toStringTag works'); + + var tagged = {}; + tagged[Symbol.toStringTag] = 'already tagged'; + st.equal(String(tagged), '[object already tagged]', 'toStringTag works'); + + setToStringTag(tagged, 'new tag'); + st.equal(String(tagged), '[object already tagged]', 'toStringTag is unchanged'); + + setToStringTag(tagged, 'new tag', { force: true }); + st.equal(String(tagged), '[object new tag]', 'toStringTag is changed with force: true'); + + st.end(); + }); + + t.test('does not have Symbol.toStringTag', { skip: hasToStringTag }, function (st) { + var passed = true; + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (has(obj, key)) { + st.fail('object has own key ' + key); + passed = false; + } + } + if (passed) { + st.ok(true, 'object has no enumerable own keys'); + } + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/es-shim-unscopables/.eslintrc b/node_modules/es-shim-unscopables/.eslintrc new file mode 100644 index 000000000..705aaa57b --- /dev/null +++ b/node_modules/es-shim-unscopables/.eslintrc @@ -0,0 +1,37 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "es6": true, + "es2017": true, + "es2020": true, + "es2021": true, + "es2022": true, + }, + + "rules": { + "array-bracket-newline": 0, + "complexity": 0, + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "id-length": 0, + "max-lines-per-function": [2, 80], + "max-params": [2, 4], + "max-statements": 0, + "max-statements-per-line": [2, { "max": 2 }], + "multiline-comment-style": 0, + "no-magic-numbers": 0, + "sort-keys": 0, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "new-cap": 0, + }, + }, + ], +} diff --git a/node_modules/es-shim-unscopables/.github/FUNDING.yml b/node_modules/es-shim-unscopables/.github/FUNDING.yml new file mode 100644 index 000000000..af711298c --- /dev/null +++ b/node_modules/es-shim-unscopables/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/es-shim-unscopables +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/es-shim-unscopables/.nycrc b/node_modules/es-shim-unscopables/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/es-shim-unscopables/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/es-shim-unscopables/CHANGELOG.md b/node_modules/es-shim-unscopables/CHANGELOG.md new file mode 100644 index 000000000..73293c8ab --- /dev/null +++ b/node_modules/es-shim-unscopables/CHANGELOG.md @@ -0,0 +1,13 @@ +### Changelog + +All notable changes to this project will be documented in this file. Dates are displayed in UTC. + +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). + +#### v1.0.0 + +> 11 April 2022 + +- Initial implementation, tests [`0313267`](https://github.com/ljharb/es-shim-unscopables/commit/03132672560a06df8a36685c1688793d445ea034) +- Initial commit [`5a68e27`](https://github.com/ljharb/es-shim-unscopables/commit/5a68e27e8f11d8b453c00e9239b35ec8795c850e) +- [meta] do not publish workflow files [`4e29785`](https://github.com/ljharb/es-shim-unscopables/commit/4e2978541c25ce590589d5f23f311af6ca3618a7) diff --git a/node_modules/es-shim-unscopables/LICENSE b/node_modules/es-shim-unscopables/LICENSE new file mode 100644 index 000000000..6abfe1434 --- /dev/null +++ b/node_modules/es-shim-unscopables/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/es-shim-unscopables/README.md b/node_modules/es-shim-unscopables/README.md new file mode 100644 index 000000000..4728b6308 --- /dev/null +++ b/node_modules/es-shim-unscopables/README.md @@ -0,0 +1,57 @@ +# es-shim-unscopables [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Helper package to shim a method into `Array.prototype[Symbol.unscopables]` + +## Example + +```js +const assert = require('assert'); + +const shimUnscopables = require('es-shim-unscopables'); + +let copyWithin; +let concat; +with ([]) { + assert.equal(concat, Array.prototype.concat); + assert.notEqual(copyWithin, Array.prototype.copyWithin); +} + +shimUnscopables('concat'); + +with ([]) { + assert.notEqual(concat, Array.prototype.concat); + assert.notEqual(copyWithin, Array.prototype.copyWithin); +} +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/es-shim-unscopables +[npm-version-svg]: https://versionbadg.es/ljharb/es-shim-unscopables.svg +[deps-svg]: https://david-dm.org/ljharb/es-shim-unscopables.svg +[deps-url]: https://david-dm.org/ljharb/es-shim-unscopables +[dev-deps-svg]: https://david-dm.org/ljharb/es-shim-unscopables/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-shim-unscopables#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-shim-unscopables.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-shim-unscopables.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-shim-unscopables.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-shim-unscopables +[codecov-image]: https://codecov.io/gh/ljharb/es-shim-unscopables/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/es-shim-unscopables/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-shim-unscopables +[actions-url]: https://github.com/ljharb/es-shim-unscopables/actions diff --git a/node_modules/es-shim-unscopables/index.js b/node_modules/es-shim-unscopables/index.js new file mode 100644 index 000000000..eae1a36de --- /dev/null +++ b/node_modules/es-shim-unscopables/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var has = require('has'); + +var hasUnscopables = typeof Symbol === 'function' && typeof Symbol.unscopables === 'symbol'; + +var map = hasUnscopables && Array.prototype[Symbol.unscopables]; + +var $TypeError = TypeError; + +module.exports = function shimUnscopables(method) { + if (typeof method !== 'string' || !method) { + throw new $TypeError('method must be a non-empty string'); + } + if (!has(Array.prototype, method)) { + throw new $TypeError('method must be on Array.prototype'); + } + if (hasUnscopables) { + map[method] = true; + } +}; diff --git a/node_modules/es-shim-unscopables/package.json b/node_modules/es-shim-unscopables/package.json new file mode 100644 index 000000000..9dcf5f8e7 --- /dev/null +++ b/node_modules/es-shim-unscopables/package.json @@ -0,0 +1,49 @@ +{ + "name": "es-shim-unscopables", + "version": "1.0.0", + "description": "Helper package to shim a method into `Array.prototype[Symbol.unscopables]`", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint-disabled": "evalmd README.md", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/es-shim-unscopables.git" + }, + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/es-shim-unscopables/issues" + }, + "homepage": "https://github.com/ljharb/es-shim-unscopables#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.2.1", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "nyc": "^10.3.2", + "object-inspect": "^1.12.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "dependencies": { + "has": "^1.0.3" + } +} diff --git a/node_modules/es-shim-unscopables/test/index.js b/node_modules/es-shim-unscopables/test/index.js new file mode 100644 index 000000000..d78c7a45d --- /dev/null +++ b/node_modules/es-shim-unscopables/test/index.js @@ -0,0 +1,67 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var has = require('has'); + +var shimUnscopables = require('../'); + +var sortSymbols = function (a, b) { + return inspect(a).localeCompare(inspect(b)); +}; + +test('shimUnscopables', function (t) { + t.equal(typeof shimUnscopables, 'function', 'is a function'); + + forEach(v.nonStrings, function (notNonEmptyString) { + t['throws']( + function () { shimUnscopables(notNonEmptyString); }, + TypeError, + inspect(notNonEmptyString) + ' is not a non-empty String' + ); + }); + + t['throws']( + function () { shimUnscopables('x'); }, + TypeError, + inspect('x') + ' is not on Array.prototype' + ); + + t.test('no symbols', { skip: typeof Symbol === 'function' }, function (st) { + st.doesNotThrow(function () { shimUnscopables('forEach'); }); + + st.end(); + }); + + t.test('symbols, no unscopables', { skip: typeof Symbol !== 'function' || Symbol.unscopables }, function (st) { + st.deepEqual(Object.getOwnPropertySymbols(Array.prototype), [Symbol.iterator]); + + shimUnscopables('forEach'); + + st.deepEqual(Object.getOwnPropertySymbols(Array.prototype), [Symbol.iterator]); + + st.end(); + }); + + t.test('Symbol.unscopables', { skip: typeof Symbol !== 'function' || !Symbol.unscopables }, function (st) { + st.deepEqual( + Object.getOwnPropertySymbols(Array.prototype).sort(sortSymbols), + [Symbol.iterator, Symbol.unscopables] + ); + st.notOk(has(Array.prototype[Symbol.unscopables], 'forEach'), 'unscopables map lacks forEach'); + + shimUnscopables('forEach'); + + st.deepEqual( + Object.getOwnPropertySymbols(Array.prototype).sort(sortSymbols), + [Symbol.iterator, Symbol.unscopables] + ); + st.equal(Array.prototype[Symbol.unscopables].forEach, true, 'unscopables map has forEach'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/es-shim-unscopables/test/with.js b/node_modules/es-shim-unscopables/test/with.js new file mode 100644 index 000000000..2ef2ee0db --- /dev/null +++ b/node_modules/es-shim-unscopables/test/with.js @@ -0,0 +1,35 @@ +/* eslint no-restricted-syntax: 0, no-with: 0, strict: 0 */ + +var test = require('tape'); + +var shimUnscopables = require('../'); + +test('`with` statement', { skip: typeof Symbol !== 'function' || !Symbol.unscopables }, function (t) { + var entries; + var concat; + with ([]) { + t.equal(concat, Array.prototype.concat, 'concat is dynamically bound'); + t.notEqual(entries, Array.prototype.entries, 'entries is not dynamically bound'); + } + + var obj = { + foo: 1, + bar: 2 + }; + var foo; + var bar; + obj[Symbol.unscopables] = { foo: true }; + with (obj) { + t.equal(foo, undefined); + t.equal(bar, obj.bar); + } + + shimUnscopables('concat'); + + with ([]) { + t.notEqual(concat, Array.prototype.concat, 'concat is no longer dynamically bound'); + t.notEqual(entries, Array.prototype.entries, 'entries is still not dynamically bound'); + } + + t.end(); +}); diff --git a/node_modules/eslint-import-resolver-node/index.js b/node_modules/eslint-import-resolver-node/index.js index 84fc5076b..ac478ef02 100644 --- a/node_modules/eslint-import-resolver-node/index.js +++ b/node_modules/eslint-import-resolver-node/index.js @@ -1,6 +1,7 @@ 'use strict'; const resolve = require('resolve'); +const isCoreModule = require('is-core-module'); const path = require('path'); const log = require('debug')('eslint-plugin-import:resolver:node'); @@ -11,13 +12,14 @@ exports.resolve = function (source, file, config) { log('Resolving:', source, 'from:', file); let resolvedPath; - if (resolve.isCore(source)) { + if (isCoreModule(source)) { log('resolved to core'); return { found: true, path: null }; } try { - resolvedPath = resolve.sync(source, opts(file, config)); + const cachedFilter = function (pkg, dir) { return packageFilter(pkg, dir, config); }; + resolvedPath = resolve.sync(source, opts(file, config, cachedFilter)); log('Resolved to:', resolvedPath); return { found: true, path: resolvedPath }; } catch (err) { @@ -26,7 +28,7 @@ exports.resolve = function (source, file, config) { } }; -function opts(file, config) { +function opts(file, config, packageFilter) { return Object.assign({ // more closely matches Node (#333) // plus 'mjs' for native modules! (#939) @@ -36,16 +38,32 @@ function opts(file, config) { { // path.resolve will handle paths relative to CWD basedir: path.dirname(path.resolve(file)), - packageFilter: packageFilter, - + packageFilter, }); } -function packageFilter(pkg) { +function identity(x) { return x; } + +function packageFilter(pkg, dir, config) { + let found = false; + const file = path.join(dir, 'dummy.js'); if (pkg.module) { - pkg.main = pkg.module; - } else if (pkg['jsnext:main']) { - pkg.main = pkg['jsnext:main']; + try { + resolve.sync(String(pkg.module).replace(/^(?:\.\/)?/, './'), opts(file, config, identity)); + pkg.main = pkg.module; + found = true; + } catch (err) { + log('resolve threw error trying to find pkg.module:', err); + } + } + if (!found && pkg['jsnext:main']) { + try { + resolve.sync(String(pkg['jsnext:main']).replace(/^(?:\.\/)?/, './'), opts(file, config, identity)); + pkg.main = pkg['jsnext:main']; + found = true; + } catch (err) { + log('resolve threw error trying to find pkg[\'jsnext:main\']:', err); + } } return pkg; } diff --git a/node_modules/eslint-import-resolver-node/package.json b/node_modules/eslint-import-resolver-node/package.json index 993f1b89b..d13b48635 100644 --- a/node_modules/eslint-import-resolver-node/package.json +++ b/node_modules/eslint-import-resolver-node/package.json @@ -1,6 +1,6 @@ { "name": "eslint-import-resolver-node", - "version": "0.3.5", + "version": "0.3.7", "description": "Node default behavior import resolution plugin for eslint-plugin-import.", "main": "index.js", "files": [ @@ -9,8 +9,7 @@ "scripts": { "prepublishOnly": "cp ../../{LICENSE,.npmrc} ./", "tests-only": "nyc mocha", - "test": "npm run tests-only", - "coveralls": "nyc report --reporter lcovonly && cd ../.. && coveralls < ./resolvers/node/coverage/lcov.info" + "test": "npm run tests-only" }, "repository": { "type": "git", @@ -31,11 +30,11 @@ "homepage": "https://github.com/import-js/eslint-plugin-import", "dependencies": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" }, "devDependencies": { "chai": "^3.5.0", - "coveralls": "^3.1.0", "mocha": "^3.5.3", "nyc": "^11.9.0" } diff --git a/node_modules/eslint-module-utils/.eslintrc b/node_modules/eslint-module-utils/.eslintrc deleted file mode 100644 index 3fd3f5e64..000000000 --- a/node_modules/eslint-module-utils/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "parserOptions": { - "ecmaVersion": 6, - }, -} diff --git a/node_modules/eslint-module-utils/.eslintrc.yml b/node_modules/eslint-module-utils/.eslintrc.yml deleted file mode 100644 index d30c26465..000000000 --- a/node_modules/eslint-module-utils/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -rules: - no-console: 1 diff --git a/node_modules/eslint-module-utils/.nycrc b/node_modules/eslint-module-utils/.nycrc index 8147f3871..5d75e2157 100644 --- a/node_modules/eslint-module-utils/.nycrc +++ b/node_modules/eslint-module-utils/.nycrc @@ -1,7 +1,7 @@ { "all": true, "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], + "reporter": ["text-summary", "lcov", "text", "html", "json"], "require": [ "babel-register" ], @@ -10,6 +10,10 @@ "exclude": [ "coverage", "test", - "tests" + "tests", + "resolvers/*/test", + "scripts", + "memo-parser", + "lib" ] } diff --git a/node_modules/eslint-module-utils/CHANGELOG.md b/node_modules/eslint-module-utils/CHANGELOG.md index 916005514..72fa611a1 100644 --- a/node_modules/eslint-module-utils/CHANGELOG.md +++ b/node_modules/eslint-module-utils/CHANGELOG.md @@ -1,10 +1,43 @@ # Change Log All notable changes to this module will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). -This change log adheres to standards from [Keep a CHANGELOG](http://keepachangelog.com). +This project adheres to [Semantic Versioning](https://semver.org/). +This change log adheres to standards from [Keep a CHANGELOG](https://keepachangelog.com). ## Unreleased +## v2.7.4 - 2022-08-11 + +### Fixed +- [Fix] Ignore hashbang and BOM while parsing ([#2431], thanks [@silverwind]) + +### Changed +- [patch] mark eslint as an optional peer dep ([#2523], thanks [@wmertens]) + +## v2.7.3 - 2022-01-26 + +### Fixed +- [Fix] `parse`: restore compatibility by making the return value `ast` again ([#2350], thanks [@ljharb]) + +## v2.7.2 - 2022-01-01 + +### Fixed +- [patch] Fix `@babel/eslint-parser` 8 compatibility ([#2343], thanks [@nicolo-ribaudo]) + +### Changed +- [Refactor] inline `pkgDir` implementation; remove `pkg-dir` + +## v2.7.1 - 2021-10-13 + +### Fixed +- fixed SyntaxError in node <= 6: Unexpected token ) in parse.js ([#2261], thanks [@VitusFW]) + +## v2.7.0 - 2021-10-11 + +### Added +- `fileExistsWithCaseSync`: add `strict` argument ([#1262], thanks [@sergei-startsev]) +- add `visit`, to support dynamic imports ([#1660], [#2212], thanks [@maxkomarychev], [@aladdin-add], [@Hypnosphi]) +- create internal replacement for `pkg-up` and `read-pkg-up` ([#2047], [@mgwalker]) + ## v2.6.2 - 2021-08-08 ### Fixed @@ -90,10 +123,18 @@ Yanked due to critical issue with cache key resulting from #839. ### Fixed - `unambiguous.test()` regex is now properly in multiline mode +[#2523]: https://github.com/import-js/eslint-plugin-import/pull/2523 +[#2431]: https://github.com/import-js/eslint-plugin-import/pull/2431 +[#2350]: https://github.com/import-js/eslint-plugin-import/issues/2350 +[#2343]: https://github.com/import-js/eslint-plugin-import/pull/2343 +[#2261]: https://github.com/import-js/eslint-plugin-import/pull/2261 +[#2212]: https://github.com/import-js/eslint-plugin-import/pull/2212 [#2160]: https://github.com/import-js/eslint-plugin-import/pull/2160 +[#2047]: https://github.com/import-js/eslint-plugin-import/pull/2047 [#2026]: https://github.com/import-js/eslint-plugin-import/pull/2026 [#1786]: https://github.com/import-js/eslint-plugin-import/pull/1786 [#1671]: https://github.com/import-js/eslint-plugin-import/pull/1671 +[#1660]: https://github.com/import-js/eslint-plugin-import/pull/1660 [#1606]: https://github.com/import-js/eslint-plugin-import/pull/1606 [#1602]: https://github.com/import-js/eslint-plugin-import/pull/1602 [#1591]: https://github.com/import-js/eslint-plugin-import/pull/1591 @@ -102,6 +143,7 @@ Yanked due to critical issue with cache key resulting from #839. [#1409]: https://github.com/import-js/eslint-plugin-import/pull/1409 [#1356]: https://github.com/import-js/eslint-plugin-import/pull/1356 [#1290]: https://github.com/import-js/eslint-plugin-import/pull/1290 +[#1262]: https://github.com/import-js/eslint-plugin-import/pull/1262 [#1218]: https://github.com/import-js/eslint-plugin-import/pull/1218 [#1166]: https://github.com/import-js/eslint-plugin-import/issues/1166 [#1160]: https://github.com/import-js/eslint-plugin-import/pull/1160 @@ -114,11 +156,18 @@ Yanked due to critical issue with cache key resulting from #839. [@brettz9]: https://github.com/brettz9 [@christophercurrie]: https://github.com/christophercurrie [@hulkish]: https://github.com/hulkish +[@Hypnosphi]: https://github.com/Hypnosphi [@iamnapo]: https://github.com/iamnapo [@JounQin]: https://github.com/JounQin [@kaiyoma]: https://github.com/kaiyoma [@manuth]: https://github.com/manuth +[@maxkomarychev]: https://github.com/maxkomarychev +[@mgwalker]: https://github.com/mgwalker +[@nicolo-ribaudo]: https://github.com/nicolo-ribaudo [@pmcelhaney]: https://github.com/pmcelhaney +[@sergei-startsev]: https://github.com/sergei-startsev [@sompylasar]: https://github.com/sompylasar [@timkraut]: https://github.com/timkraut -[@vikr01]: https://github.com/vikr01 \ No newline at end of file +[@vikr01]: https://github.com/vikr01 +[@VitusFW]: https://github.com/VitusFW +[@wmertens]: https://github.com/wmertens diff --git a/node_modules/eslint-module-utils/module-require.js b/node_modules/eslint-module-utils/module-require.js index 70e551062..c03671ce5 100644 --- a/node_modules/eslint-module-utils/module-require.js +++ b/node_modules/eslint-module-utils/module-require.js @@ -18,12 +18,12 @@ exports.default = function moduleRequire(p) { const eslintPath = require.resolve('eslint'); const eslintModule = createModule(eslintPath); return require(Module._resolveFilename(p, eslintModule)); - } catch(err) { /* ignore */ } + } catch (err) { /* ignore */ } try { // try relative to entry point return require.main.require(p); - } catch(err) { /* ignore */ } + } catch (err) { /* ignore */ } // finally, try from here return require(p); diff --git a/node_modules/eslint-module-utils/moduleVisitor.js b/node_modules/eslint-module-utils/moduleVisitor.js index 69269985b..4d93a0199 100644 --- a/node_modules/eslint-module-utils/moduleVisitor.js +++ b/node_modules/eslint-module-utils/moduleVisitor.js @@ -37,7 +37,7 @@ exports.default = function visitModules(visitor, options) { // for esmodule dynamic `import()` calls function checkImportCall(node) { let modulePath; - // refs https://github.com/estree/estree/blob/master/es2020.md#importexpression + // refs https://github.com/estree/estree/blob/HEAD/es2020.md#importexpression if (node.type === 'ImportExpression') { modulePath = node.source; } else if (node.type === 'CallExpression') { @@ -54,7 +54,7 @@ exports.default = function visitModules(visitor, options) { } // for CommonJS `require` calls - // adapted from @mctep: http://git.io/v4rAu + // adapted from @mctep: https://git.io/v4rAu function checkCommon(call) { if (call.callee.type !== 'Identifier') return; if (call.callee.name !== 'require') return; @@ -81,7 +81,7 @@ exports.default = function visitModules(visitor, options) { if (typeof element.value !== 'string') continue; if (element.value === 'require' || - element.value === 'exports') continue; // magic modules: http://git.io/vByan + element.value === 'exports') continue; // magic modules: https://github.com/requirejs/requirejs/wiki/Differences-between-the-simplified-CommonJS-wrapper-and-standard-AMD-define#magic-modules checkSourceValue(element, element); } @@ -131,7 +131,7 @@ function makeOptionsSchema(additionalProperties) { 'additionalProperties': false, }; - if (additionalProperties){ + if (additionalProperties) { for (const key in additionalProperties) { base.properties[key] = additionalProperties[key]; } diff --git a/node_modules/eslint-module-utils/node_modules/find-up/index.js b/node_modules/eslint-module-utils/node_modules/find-up/index.js deleted file mode 100644 index 939c9553d..000000000 --- a/node_modules/eslint-module-utils/node_modules/find-up/index.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; -const path = require('path'); -const locatePath = require('locate-path'); - -module.exports = (filename, opts) => { - opts = opts || {}; - - const startDir = path.resolve(opts.cwd || ''); - const root = path.parse(startDir).root; - - const filenames = [].concat(filename); - - return new Promise(resolve => { - (function find(dir) { - locatePath(filenames, {cwd: dir}).then(file => { - if (file) { - resolve(path.join(dir, file)); - } else if (dir === root) { - resolve(null); - } else { - find(path.dirname(dir)); - } - }); - })(startDir); - }); -}; - -module.exports.sync = (filename, opts) => { - opts = opts || {}; - - let dir = path.resolve(opts.cwd || ''); - const root = path.parse(dir).root; - - const filenames = [].concat(filename); - - // eslint-disable-next-line no-constant-condition - while (true) { - const file = locatePath.sync(filenames, {cwd: dir}); - - if (file) { - return path.join(dir, file); - } else if (dir === root) { - return null; - } - - dir = path.dirname(dir); - } -}; diff --git a/node_modules/eslint-module-utils/node_modules/find-up/license b/node_modules/eslint-module-utils/node_modules/find-up/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/eslint-module-utils/node_modules/find-up/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/eslint-module-utils/node_modules/find-up/package.json b/node_modules/eslint-module-utils/node_modules/find-up/package.json deleted file mode 100644 index 7ec85bb79..000000000 --- a/node_modules/eslint-module-utils/node_modules/find-up/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "find-up", - "version": "2.1.0", - "description": "Find a file by walking up parent directories", - "license": "MIT", - "repository": "sindresorhus/find-up", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "find", - "up", - "find-up", - "findup", - "look-up", - "look", - "file", - "search", - "match", - "package", - "resolve", - "parent", - "parents", - "folder", - "directory", - "dir", - "walk", - "walking", - "path" - ], - "dependencies": { - "locate-path": "^2.0.0" - }, - "devDependencies": { - "ava": "*", - "tempfile": "^1.1.1", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/eslint-module-utils/node_modules/find-up/readme.md b/node_modules/eslint-module-utils/node_modules/find-up/readme.md deleted file mode 100644 index b5ad69455..000000000 --- a/node_modules/eslint-module-utils/node_modules/find-up/readme.md +++ /dev/null @@ -1,85 +0,0 @@ -# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master) - -> Find a file by walking up parent directories - - -## Install - -``` -$ npm install --save find-up -``` - - -## Usage - -``` -/ -└── Users - └── sindresorhus - ├── unicorn.png - └── foo - └── bar - ├── baz - └── example.js -``` - -```js -// example.js -const findUp = require('find-up'); - -findUp('unicorn.png').then(filepath => { - console.log(filepath); - //=> '/Users/sindresorhus/unicorn.png' -}); - -findUp(['rainbow.png', 'unicorn.png']).then(filepath => { - console.log(filepath); - //=> '/Users/sindresorhus/unicorn.png' -}); -``` - - -## API - -### findUp(filename, [options]) - -Returns a `Promise` for the filepath or `null`. - -### findUp([filenameA, filenameB], [options]) - -Returns a `Promise` for the first filepath found (by respecting the order) or `null`. - -### findUp.sync(filename, [options]) - -Returns a filepath or `null`. - -### findUp.sync([filenameA, filenameB], [options]) - -Returns the first filepath found (by respecting the order) or `null`. - -#### filename - -Type: `string` - -Filename of the file to find. - -#### options - -##### cwd - -Type: `string`
-Default: `process.cwd()` - -Directory to start from. - - -## Related - -- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module -- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file -- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-module-utils/node_modules/locate-path/index.js b/node_modules/eslint-module-utils/node_modules/locate-path/index.js deleted file mode 100644 index 32b108d19..000000000 --- a/node_modules/eslint-module-utils/node_modules/locate-path/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -const path = require('path'); -const pathExists = require('path-exists'); -const pLocate = require('p-locate'); - -module.exports = (iterable, opts) => { - opts = Object.assign({ - cwd: process.cwd() - }, opts); - - return pLocate(iterable, el => pathExists(path.resolve(opts.cwd, el)), opts); -}; - -module.exports.sync = (iterable, opts) => { - opts = Object.assign({ - cwd: process.cwd() - }, opts); - - for (const el of iterable) { - if (pathExists.sync(path.resolve(opts.cwd, el))) { - return el; - } - } -}; diff --git a/node_modules/eslint-module-utils/node_modules/locate-path/license b/node_modules/eslint-module-utils/node_modules/locate-path/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/eslint-module-utils/node_modules/locate-path/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/eslint-module-utils/node_modules/locate-path/package.json b/node_modules/eslint-module-utils/node_modules/locate-path/package.json deleted file mode 100644 index 17bcd7ff6..000000000 --- a/node_modules/eslint-module-utils/node_modules/locate-path/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "locate-path", - "version": "2.0.0", - "description": "Get the first path that exists on disk of multiple paths", - "license": "MIT", - "repository": "sindresorhus/locate-path", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "locate", - "path", - "paths", - "file", - "files", - "exists", - "find", - "finder", - "search", - "searcher", - "array", - "iterable", - "iterator" - ], - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/eslint-module-utils/node_modules/locate-path/readme.md b/node_modules/eslint-module-utils/node_modules/locate-path/readme.md deleted file mode 100644 index f7b337bb2..000000000 --- a/node_modules/eslint-module-utils/node_modules/locate-path/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path) - -> Get the first path that exists on disk of multiple paths - - -## Install - -``` -$ npm install --save locate-path -``` - - -## Usage - -Here we find the first file that exists on disk, in array order. - -```js -const locatePath = require('locate-path'); - -const files = [ - 'unicorn.png', - 'rainbow.png', // only this one actually exists on disk - 'pony.png' -]; - -locatePath(files).then(foundPath => { - console.log(foundPath); - //=> 'rainbow' -}); -``` - - -## API - -### locatePath(input, [options]) - -Returns a `Promise` for the first path that exists or `undefined` if none exists. - -#### input - -Type: `Iterable` - -Paths to check. - -#### options - -Type: `Object` - -##### concurrency - -Type: `number`
-Default: `Infinity`
-Minimum: `1` - -Number of concurrently pending promises. - -##### preserveOrder - -Type: `boolean`
-Default: `true` - -Preserve `input` order when searching. - -Disable this to improve performance if you don't care about the order. - -##### cwd - -Type: `string`
-Default: `process.cwd()` - -Current working directory. - -### locatePath.sync(input, [options]) - -Returns the first path that exists or `undefined` if none exists. - -#### input - -Type: `Iterable` - -Paths to check. - -#### options - -Type: `Object` - -##### cwd - -Same as above. - - -## Related - -- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-module-utils/node_modules/p-limit/index.js b/node_modules/eslint-module-utils/node_modules/p-limit/index.js deleted file mode 100644 index 873f0e70d..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-limit/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; -const pTry = require('p-try'); - -module.exports = concurrency => { - if (concurrency < 1) { - throw new TypeError('Expected `concurrency` to be a number from 1 and up'); - } - - const queue = []; - let activeCount = 0; - - const next = () => { - activeCount--; - - if (queue.length > 0) { - queue.shift()(); - } - }; - - return fn => new Promise((resolve, reject) => { - const run = () => { - activeCount++; - - pTry(fn).then( - val => { - resolve(val); - next(); - }, - err => { - reject(err); - next(); - } - ); - }; - - if (activeCount < concurrency) { - run(); - } else { - queue.push(run); - } - }); -}; diff --git a/node_modules/eslint-module-utils/node_modules/p-limit/license b/node_modules/eslint-module-utils/node_modules/p-limit/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-limit/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/eslint-module-utils/node_modules/p-limit/package.json b/node_modules/eslint-module-utils/node_modules/p-limit/package.json deleted file mode 100644 index 90db5794d..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-limit/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "p-limit", - "version": "1.3.0", - "description": "Run multiple promise-returning & async functions with limited concurrency", - "license": "MIT", - "repository": "sindresorhus/p-limit", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "limit", - "limited", - "concurrency", - "throttle", - "throat", - "rate", - "batch", - "ratelimit", - "task", - "queue", - "async", - "await", - "promises", - "bluebird" - ], - "dependencies": { - "p-try": "^1.0.0" - }, - "devDependencies": { - "ava": "*", - "delay": "^2.0.0", - "in-range": "^1.0.0", - "random-int": "^1.0.0", - "time-span": "^2.0.0", - "xo": "*" - } -} diff --git a/node_modules/eslint-module-utils/node_modules/p-limit/readme.md b/node_modules/eslint-module-utils/node_modules/p-limit/readme.md deleted file mode 100644 index 90129925c..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-limit/readme.md +++ /dev/null @@ -1,69 +0,0 @@ -# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit) - -> Run multiple promise-returning & async functions with limited concurrency - - -## Install - -``` -$ npm install p-limit -``` - - -## Usage - -```js -const pLimit = require('p-limit'); - -const limit = pLimit(1); - -const input = [ - limit(() => fetchSomething('foo')), - limit(() => fetchSomething('bar')), - limit(() => doSomething()) -]; - -(async () => { - // Only one promise is run at once - const result = await Promise.all(input); - console.log(result); -})(); -``` - - -## API - -### pLimit(concurrency) - -Returns a `limit` function. - -#### concurrency - -Type: `number`
-Minimum: `1` - -Concurrency limit. - -### limit(fn) - -Returns the promise returned by calling `fn`. - -#### fn - -Type: `Function` - -Promise-returning/async function. - - -## Related - -- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control -- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions -- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions -- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-module-utils/node_modules/p-locate/index.js b/node_modules/eslint-module-utils/node_modules/p-locate/index.js deleted file mode 100644 index 7461d665b..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-locate/index.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; -const pLimit = require('p-limit'); - -class EndError extends Error { - constructor(value) { - super(); - this.value = value; - } -} - -// the input can also be a promise, so we `Promise.all()` them both -const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0]))); - -module.exports = (iterable, tester, opts) => { - opts = Object.assign({ - concurrency: Infinity, - preserveOrder: true - }, opts); - - const limit = pLimit(opts.concurrency); - - // start all the promises concurrently with optional limit - const items = Array.from(iterable).map(el => [el, limit(() => Promise.resolve(el).then(tester))]); - - // check the promises either serially or concurrently - const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity); - - return Promise.all(items.map(el => checkLimit(() => finder(el)))) - .then(() => {}) - .catch(err => err instanceof EndError ? err.value : Promise.reject(err)); -}; diff --git a/node_modules/eslint-module-utils/node_modules/p-locate/package.json b/node_modules/eslint-module-utils/node_modules/p-locate/package.json deleted file mode 100644 index 767002b38..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-locate/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "p-locate", - "version": "2.0.0", - "description": "Get the first fulfilled promise that satisfies the provided testing function", - "license": "MIT", - "repository": "sindresorhus/p-locate", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "locate", - "find", - "finder", - "search", - "searcher", - "test", - "array", - "collection", - "iterable", - "iterator", - "race", - "fulfilled", - "fastest", - "async", - "await", - "promises", - "bluebird" - ], - "dependencies": { - "p-limit": "^1.1.0" - }, - "devDependencies": { - "ava": "*", - "delay": "^1.3.1", - "in-range": "^1.0.0", - "time-span": "^1.0.0", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/eslint-module-utils/node_modules/p-locate/readme.md b/node_modules/eslint-module-utils/node_modules/p-locate/readme.md deleted file mode 100644 index 68b96a47e..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-locate/readme.md +++ /dev/null @@ -1,86 +0,0 @@ -# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate) - -> Get the first fulfilled promise that satisfies the provided testing function - -Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find). - - -## Install - -``` -$ npm install --save p-locate -``` - - -## Usage - -Here we find the first file that exists on disk, in array order. - -```js -const pathExists = require('path-exists'); -const pLocate = require('p-locate'); - -const files = [ - 'unicorn.png', - 'rainbow.png', // only this one actually exists on disk - 'pony.png' -]; - -pLocate(files, file => pathExists(file)).then(foundPath => { - console.log(foundPath); - //=> 'rainbow' -}); -``` - -*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.* - - -## API - -### pLocate(input, tester, [options]) - -Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. - -#### input - -Type: `Iterable` - -#### tester(element) - -Type: `Function` - -Expected to return a `Promise` or boolean. - -#### options - -Type: `Object` - -##### concurrency - -Type: `number`
-Default: `Infinity`
-Minimum: `1` - -Number of concurrently pending promises returned by `tester`. - -##### preserveOrder - -Type: `boolean`
-Default: `true` - -Preserve `input` order when searching. - -Disable this to improve performance if you don't care about the order. - - -## Related - -- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently -- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently -- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-module-utils/node_modules/p-try/index.js b/node_modules/eslint-module-utils/node_modules/p-try/index.js deleted file mode 100644 index efa2f7433..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-try/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = cb => new Promise(resolve => { - resolve(cb()); -}); diff --git a/node_modules/eslint-module-utils/node_modules/p-try/license b/node_modules/eslint-module-utils/node_modules/p-try/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-try/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/eslint-module-utils/node_modules/p-try/package.json b/node_modules/eslint-module-utils/node_modules/p-try/package.json deleted file mode 100644 index ba2513ade..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-try/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "p-try", - "version": "1.0.0", - "description": "`Promise#try()` ponyfill - Starts a promise chain", - "license": "MIT", - "repository": "sindresorhus/p-try", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "try", - "resolve", - "function", - "catch", - "async", - "await", - "promises", - "settled", - "ponyfill", - "polyfill", - "shim", - "bluebird" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/eslint-module-utils/node_modules/p-try/readme.md b/node_modules/eslint-module-utils/node_modules/p-try/readme.md deleted file mode 100644 index 8e5fdddbe..000000000 --- a/node_modules/eslint-module-utils/node_modules/p-try/readme.md +++ /dev/null @@ -1,38 +0,0 @@ -# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try) - -> [`Promise#try()`](https://github.com/ljharb/proposal-promise-try) [ponyfill](https://ponyfill.com) - Starts a promise chain - -[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/) - - -## Install - -``` -$ npm install --save p-try -``` - - -## Usage - -```js -const pTry = require('p-try'); - -pTry(() => { - return synchronousFunctionThatMightThrow(); -}).then(value => { - console.log(value); -}).catch(error => { - console.error(error); -}); -``` - - -## Related - -- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-module-utils/node_modules/path-exists/index.js b/node_modules/eslint-module-utils/node_modules/path-exists/index.js deleted file mode 100644 index 16ae60acb..000000000 --- a/node_modules/eslint-module-utils/node_modules/path-exists/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; -const fs = require('fs'); - -module.exports = fp => new Promise(resolve => { - fs.access(fp, err => { - resolve(!err); - }); -}); - -module.exports.sync = fp => { - try { - fs.accessSync(fp); - return true; - } catch (err) { - return false; - } -}; diff --git a/node_modules/eslint-module-utils/node_modules/path-exists/license b/node_modules/eslint-module-utils/node_modules/path-exists/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/eslint-module-utils/node_modules/path-exists/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/eslint-module-utils/node_modules/path-exists/package.json b/node_modules/eslint-module-utils/node_modules/path-exists/package.json deleted file mode 100644 index efd56267e..000000000 --- a/node_modules/eslint-module-utils/node_modules/path-exists/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "path-exists", - "version": "3.0.0", - "description": "Check if a path exists", - "license": "MIT", - "repository": "sindresorhus/path-exists", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "path", - "exists", - "exist", - "file", - "filepath", - "fs", - "filesystem", - "file-system", - "access", - "stat" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/eslint-module-utils/node_modules/path-exists/readme.md b/node_modules/eslint-module-utils/node_modules/path-exists/readme.md deleted file mode 100644 index 1b65fa705..000000000 --- a/node_modules/eslint-module-utils/node_modules/path-exists/readme.md +++ /dev/null @@ -1,50 +0,0 @@ -# path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists) - -> Check if a path exists - -Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it. - -Never use this before handling a file though: - -> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there. - - -## Install - -``` -$ npm install --save path-exists -``` - - -## Usage - -```js -// foo.js -const pathExists = require('path-exists'); - -pathExists('foo.js').then(exists => { - console.log(exists); - //=> true -}); -``` - - -## API - -### pathExists(path) - -Returns a promise for a boolean of whether the path exists. - -### pathExists.sync(path) - -Returns a boolean of whether the path exists. - - -## Related - -- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-module-utils/node_modules/pkg-dir/index.js b/node_modules/eslint-module-utils/node_modules/pkg-dir/index.js deleted file mode 100644 index f2fa20110..000000000 --- a/node_modules/eslint-module-utils/node_modules/pkg-dir/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; -const path = require('path'); -const findUp = require('find-up'); - -module.exports = cwd => findUp('package.json', {cwd}).then(fp => fp ? path.dirname(fp) : null); - -module.exports.sync = cwd => { - const fp = findUp.sync('package.json', {cwd}); - return fp ? path.dirname(fp) : null; -}; diff --git a/node_modules/eslint-module-utils/node_modules/pkg-dir/license b/node_modules/eslint-module-utils/node_modules/pkg-dir/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/eslint-module-utils/node_modules/pkg-dir/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/eslint-module-utils/node_modules/pkg-dir/package.json b/node_modules/eslint-module-utils/node_modules/pkg-dir/package.json deleted file mode 100644 index 2bb7277c6..000000000 --- a/node_modules/eslint-module-utils/node_modules/pkg-dir/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "pkg-dir", - "version": "2.0.0", - "description": "Find the root directory of a Node.js project or npm package", - "license": "MIT", - "repository": "sindresorhus/pkg-dir", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "package", - "json", - "root", - "npm", - "entry", - "find", - "up", - "find-up", - "findup", - "look-up", - "look", - "file", - "search", - "match", - "resolve", - "parent", - "parents", - "folder", - "directory", - "dir", - "walk", - "walking", - "path" - ], - "dependencies": { - "find-up": "^2.1.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/node_modules/eslint-module-utils/node_modules/pkg-dir/readme.md b/node_modules/eslint-module-utils/node_modules/pkg-dir/readme.md deleted file mode 100644 index 3cab12ef0..000000000 --- a/node_modules/eslint-module-utils/node_modules/pkg-dir/readme.md +++ /dev/null @@ -1,64 +0,0 @@ -# pkg-dir [![Build Status](https://travis-ci.org/sindresorhus/pkg-dir.svg?branch=master)](https://travis-ci.org/sindresorhus/pkg-dir) - -> Find the root directory of a Node.js project or npm package - - -## Install - -``` -$ npm install --save pkg-dir -``` - - -## Usage - -``` -/ -└── Users - └── sindresorhus - └── foo - ├── package.json - └── bar - ├── baz - └── example.js -``` - -```js -// example.js -const pkgDir = require('pkg-dir'); - -pkgDir(__dirname).then(rootDir => { - console.log(rootDir); - //=> '/Users/sindresorhus/foo' -}); -``` - - -## API - -### pkgDir([cwd]) - -Returns a `Promise` for either the project root path or `null` if it couldn't be found. - -### pkgDir.sync([cwd]) - -Returns the project root path or `null`. - -#### cwd - -Type: `string`
-Default: `process.cwd()` - -Directory to start from. - - -## Related - -- [pkg-dir-cli](https://github.com/sindresorhus/pkg-dir-cli) - CLI for this module -- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file -- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-module-utils/package.json b/node_modules/eslint-module-utils/package.json index f726b7958..0c0678a5e 100644 --- a/node_modules/eslint-module-utils/package.json +++ b/node_modules/eslint-module-utils/package.json @@ -1,6 +1,6 @@ { "name": "eslint-module-utils", - "version": "2.6.2", + "version": "2.7.4", "description": "Core utilities to support eslint-plugin-import and other module-related plugins.", "engines": { "node": ">=4" @@ -26,7 +26,11 @@ }, "homepage": "https://github.com/import-js/eslint-plugin-import#readme", "dependencies": { - "debug": "^3.2.7", - "pkg-dir": "^2.0.0" + "debug": "^3.2.7" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } } diff --git a/node_modules/eslint-module-utils/parse.js b/node_modules/eslint-module-utils/parse.js index 3b2ac028f..ac728ec5b 100644 --- a/node_modules/eslint-module-utils/parse.js +++ b/node_modules/eslint-module-utils/parse.js @@ -3,9 +3,53 @@ exports.__esModule = true; const moduleRequire = require('./module-require').default; const extname = require('path').extname; +const fs = require('fs'); const log = require('debug')('eslint-plugin-import:parse'); +function getBabelEslintVisitorKeys(parserPath) { + if (parserPath.endsWith('index.js')) { + const hypotheticalLocation = parserPath.replace('index.js', 'visitor-keys.js'); + if (fs.existsSync(hypotheticalLocation)) { + const keys = moduleRequire(hypotheticalLocation); + return keys.default || keys; + } + } + return null; +} + +function keysFromParser(parserPath, parserInstance, parsedResult) { + // Exposed by @typescript-eslint/parser and @babel/eslint-parser + if (parsedResult && parsedResult.visitorKeys) { + return parsedResult.visitorKeys; + } + if (/.*espree.*/.test(parserPath)) { + return parserInstance.VisitorKeys; + } + if (/.*babel-eslint.*/.test(parserPath)) { + return getBabelEslintVisitorKeys(parserPath); + } + return null; +} + +// this exists to smooth over the unintentional breaking change in v2.7. +// TODO, semver-major: avoid mutating `ast` and return a plain object instead. +function makeParseReturn(ast, visitorKeys) { + if (ast) { + ast.visitorKeys = visitorKeys; + ast.ast = ast; + } + return ast; +} + +function stripUnicodeBOM(text) { + return text.charCodeAt(0) === 0xFEFF ? text.slice(1) : text; +} + +function transformHashbang(text) { + return text.replace(/^#!([^\r\n]+)/u, (_, captured) => `//${captured}`); +} + exports.default = function parse(path, content, context) { if (context == null) throw new Error('need context to parse properly'); @@ -42,23 +86,34 @@ exports.default = function parse(path, content, context) { // require the parser relative to the main module (i.e., ESLint) const parser = moduleRequire(parserPath); + // replicate bom strip and hashbang transform of ESLint + // https://github.com/eslint/eslint/blob/b93af98b3c417225a027cabc964c38e779adb945/lib/linter/linter.js#L779 + content = transformHashbang(stripUnicodeBOM(String(content))); + if (typeof parser.parseForESLint === 'function') { let ast; try { - ast = parser.parseForESLint(content, parserOptions).ast; + const parserRaw = parser.parseForESLint(content, parserOptions); + ast = parserRaw.ast; + return makeParseReturn(ast, keysFromParser(parserPath, parser, parserRaw)); } catch (e) { console.warn(); console.warn('Error while parsing ' + parserOptions.filePath); console.warn('Line ' + e.lineNumber + ', column ' + e.column + ': ' + e.message); } if (!ast || typeof ast !== 'object') { - console.warn('`parseForESLint` from parser `' + parserPath + '` is invalid and will just be ignored'); + console.warn( + '`parseForESLint` from parser `' + + parserPath + + '` is invalid and will just be ignored' + ); } else { - return ast; + return makeParseReturn(ast, keysFromParser(parserPath, parser, undefined)); } } - return parser.parse(content, parserOptions); + const ast = parser.parse(content, parserOptions); + return makeParseReturn(ast, keysFromParser(parserPath, parser, undefined)); }; function getParserPath(path, context) { diff --git a/node_modules/eslint-module-utils/pkgDir.js b/node_modules/eslint-module-utils/pkgDir.js new file mode 100644 index 000000000..34412202f --- /dev/null +++ b/node_modules/eslint-module-utils/pkgDir.js @@ -0,0 +1,11 @@ +'use strict'; + +const path = require('path'); +const pkgUp = require('./pkgUp').default; + +exports.__esModule = true; + +exports.default = function (cwd) { + const fp = pkgUp({ cwd }); + return fp ? path.dirname(fp) : null; +}; diff --git a/node_modules/eslint-module-utils/pkgUp.js b/node_modules/eslint-module-utils/pkgUp.js new file mode 100644 index 000000000..049869719 --- /dev/null +++ b/node_modules/eslint-module-utils/pkgUp.js @@ -0,0 +1,56 @@ +'use strict'; +exports.__esModule = true; + +const fs = require('fs'); +const path = require('path'); + +/** + * Derived significantly from package find-up@2.0.0. See license below. + * + * @copyright Sindre Sorhus + * MIT License + * + * Copyright (c) Sindre Sorhus (https://sindresorhus.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +function findUp(filename, cwd) { + let dir = path.resolve(cwd || ''); + const root = path.parse(dir).root; + + const filenames = [].concat(filename); + + // eslint-disable-next-line no-constant-condition + while (true) { + const file = filenames.find((el) => fs.existsSync(path.resolve(dir, el))); + + if (file) { + return path.join(dir, file); + } + if (dir === root) { + return null; + } + + dir = path.dirname(dir); + } +} + +exports.default = function pkgUp(opts) { + return findUp('package.json', opts && opts.cwd); +}; diff --git a/node_modules/eslint-module-utils/readPkgUp.js b/node_modules/eslint-module-utils/readPkgUp.js new file mode 100644 index 000000000..6a6a1eea3 --- /dev/null +++ b/node_modules/eslint-module-utils/readPkgUp.js @@ -0,0 +1,52 @@ +'use strict'; +exports.__esModule = true; + +const fs = require('fs'); +const pkgUp = require('./pkgUp').default; + +function stripBOM(str) { + return str.replace(/^\uFEFF/, ''); +} + +/** + * Derived significantly from read-pkg-up@2.0.0. See license below. + * + * @copyright Sindre Sorhus + * MIT License + * + * Copyright (c) Sindre Sorhus (https://sindresorhus.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +exports.default = function readPkgUp(opts) { + const fp = pkgUp(opts); + + if (!fp) { + return {}; + } + + try { + return { + pkg: JSON.parse(stripBOM(fs.readFileSync(fp, { encoding: 'utf-8' }))), + path: fp, + }; + } catch (e) { + return {}; + } +}; diff --git a/node_modules/eslint-module-utils/resolve.js b/node_modules/eslint-module-utils/resolve.js index f488ea798..4a35c6a47 100644 --- a/node_modules/eslint-module-utils/resolve.js +++ b/node_modules/eslint-module-utils/resolve.js @@ -1,14 +1,13 @@ 'use strict'; exports.__esModule = true; -const pkgDir = require('pkg-dir'); - const fs = require('fs'); const Module = require('module'); const path = require('path'); const hashObject = require('./hash').hashObject; const ModuleCache = require('./ModuleCache').default; +const pkgDir = require('./pkgDir').default; const CASE_SENSITIVE_FS = !fs.existsSync(path.join(__dirname.toUpperCase(), 'reSOLVE.js')); exports.CASE_SENSITIVE_FS = CASE_SENSITIVE_FS; @@ -42,7 +41,7 @@ function tryRequire(target, sourceFile) { } else { resolved = require.resolve(target); } - } catch(e) { + } catch (e) { // If the target does not exist then just return undefined return undefined; } @@ -51,14 +50,14 @@ function tryRequire(target, sourceFile) { return require(resolved); } -// http://stackoverflow.com/a/27382838 -exports.fileExistsWithCaseSync = function fileExistsWithCaseSync(filepath, cacheSettings) { +// https://stackoverflow.com/a/27382838 +exports.fileExistsWithCaseSync = function fileExistsWithCaseSync(filepath, cacheSettings, strict) { // don't care if the FS is case-sensitive if (CASE_SENSITIVE_FS) return true; // null means it resolved to a builtin if (filepath === null) return true; - if (filepath.toLowerCase() === process.cwd().toLowerCase()) return true; + if (filepath.toLowerCase() === process.cwd().toLowerCase() && !strict) return true; const parsedPath = path.parse(filepath); const dir = parsedPath.dir; @@ -73,7 +72,7 @@ exports.fileExistsWithCaseSync = function fileExistsWithCaseSync(filepath, cache if (filenames.indexOf(parsedPath.base) === -1) { result = false; } else { - result = fileExistsWithCaseSync(dir, cacheSettings); + result = fileExistsWithCaseSync(dir, cacheSettings, strict); } } fileExistsCache.set(filepath, result); @@ -175,7 +174,7 @@ function resolverReducer(resolvers, map) { } function getBaseDir(sourceFile) { - return pkgDir.sync(sourceFile) || process.cwd(); + return pkgDir(sourceFile) || process.cwd(); } function requireResolver(name, sourceFile) { // Try to resolve package with conventional name diff --git a/node_modules/eslint-module-utils/unambiguous.js b/node_modules/eslint-module-utils/unambiguous.js index 1446632f3..75f21693b 100644 --- a/node_modules/eslint-module-utils/unambiguous.js +++ b/node_modules/eslint-module-utils/unambiguous.js @@ -1,8 +1,7 @@ 'use strict'; exports.__esModule = true; - -const pattern = /(^|;)\s*(export|import)((\s+\w)|(\s*[{*=]))/m; +const pattern = /(^|;)\s*(export|import)((\s+\w)|(\s*[{*=]))|import\(/m; /** * detect possible imports/exports without a full parse. * @@ -26,5 +25,5 @@ const unambiguousNodeType = /^(?:(?:Exp|Imp)ort.*Declaration|TSExportAssignment) * @return {Boolean} */ exports.isModule = function isUnambiguousModule(ast) { - return ast.body.some(node => unambiguousNodeType.test(node.type)); + return ast.body && ast.body.some(node => unambiguousNodeType.test(node.type)); }; diff --git a/node_modules/eslint-module-utils/visit.js b/node_modules/eslint-module-utils/visit.js new file mode 100644 index 000000000..77b09850a --- /dev/null +++ b/node_modules/eslint-module-utils/visit.js @@ -0,0 +1,24 @@ +'use strict'; +exports.__esModule = true; + +exports.default = function visit(node, keys, visitorSpec) { + if (!node || !keys) { + return; + } + const type = node.type; + if (typeof visitorSpec[type] === 'function') { + visitorSpec[type](node); + } + const childFields = keys[type]; + if (!childFields) { + return; + } + childFields.forEach((fieldName) => { + [].concat(node[fieldName]).forEach((item) => { + visit(item, keys, visitorSpec); + }); + }); + if (typeof visitorSpec[`${type}:Exit`] === 'function') { + visitorSpec[`${type}:Exit`](node); + } +}; diff --git a/node_modules/eslint-plugin-import/CHANGELOG.md b/node_modules/eslint-plugin-import/CHANGELOG.md index 998055e61..9d63f0555 100644 --- a/node_modules/eslint-plugin-import/CHANGELOG.md +++ b/node_modules/eslint-plugin-import/CHANGELOG.md @@ -1,11 +1,182 @@ # Change Log All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). -This change log adheres to standards from [Keep a CHANGELOG](http://keepachangelog.com). +This project adheres to [Semantic Versioning](https://semver.org/). +This change log adheres to standards from [Keep a CHANGELOG](https://keepachangelog.com). ## [Unreleased] +## [2.27.5] - 2023-01-16 + +### Fixed +- [`order]`: Fix group ranks order when alphabetizing ([#2674], thanks [@Pearce-Ropion]) + +## [2.27.4] - 2023-01-11 + +### Fixed +- `semver` should be a prod dep ([#2668]) + +## [2.27.3] - 2023-01-11 + +### Fixed +- [`no-empty-named-blocks`]: rewrite rule to only check import declarations ([#2666]) + +## [2.27.2] - 2023-01-11 + +### Fixed +- [`no-duplicates`]: do not unconditionally require `typescript` ([#2665]) + +## [2.27.1] - 2023-01-11 + +### Fixed +- `array.prototype.flatmap` should be a prod dep ([#2664], thanks [@cristobal]) + +## [2.27.0] - 2023-01-11 + +### Added +- [`newline-after-import`]: add `considerComments` option ([#2399], thanks [@pri1311]) +- [`no-cycle`]: add `allowUnsafeDynamicCyclicDependency` option ([#2387], thanks [@GerkinDev]) +- [`no-restricted-paths`]: support arrays for `from` and `target` options ([#2466], thanks [@AdriAt360]) +- [`no-anonymous-default-export`]: add `allowNew` option ([#2505], thanks [@DamienCassou]) +- [`order`]: Add `distinctGroup` option ([#2395], thanks [@hyperupcall]) +- [`no-extraneous-dependencies`]: Add `includeInternal` option ([#2541], thanks [@bdwain]) +- [`no-extraneous-dependencies`]: Add `includeTypes` option ([#2543], thanks [@bdwain]) +- [`order`]: new `alphabetize.orderImportKind` option to sort imports with same path based on their kind (`type`, `typeof`) ([#2544], thanks [@stropho]) +- [`consistent-type-specifier-style`]: add rule ([#2473], thanks [@bradzacher]) +- Add [`no-empty-named-blocks`] rule ([#2568], thanks [@guilhermelimak]) +- [`prefer-default-export`]: add "target" option ([#2602], thanks [@azyzz228]) +- [`no-absolute-path`]: add fixer ([#2613], thanks [@adipascu]) +- [`no-duplicates`]: support inline type import with `inlineTypeImport` option ([#2475], thanks [@snewcomer]) + +### Fixed +- [`order`]: move nested imports closer to main import entry ([#2396], thanks [@pri1311]) +- [`no-restricted-paths`]: fix an error message ([#2466], thanks [@AdriAt360]) +- [`no-restricted-paths`]: use `Minimatch.match` instead of `minimatch` to comply with Windows Native paths ([#2466], thanks [@AdriAt360]) +- [`order`]: require with member expression could not be fixed if alphabetize.order was used ([#2490], thanks [@msvab]) +- [`order`]: leave more space in rankings for consecutive path groups ([#2506], thanks [@Pearce-Ropion]) +- [`no-cycle`]: add ExportNamedDeclaration statements to dependencies ([#2511], thanks [@BenoitZugmeyer]) +- [`dynamic-import-chunkname`]: prevent false report on a valid webpack magic comment ([#2330], thanks [@mhmadhamster]) +- [`export`]: do not error on TS export overloads ([#1590], thanks [@ljharb]) +- [`no-unresolved`], [`extensions`]: ignore type only exports ([#2436], thanks [@Lukas-Kullmann]) +- `ExportMap`: add missing param to function ([#2589], thanks [@Fdawgs]) +- [`no-unused-modules`]: `checkPkgFieldObject` filters boolean fields from checks ([#2598], thanks [@mpint]) +- [`no-cycle`]: accept Flow `typeof` imports, just like `type` ([#2608], thanks [@gnprice]) +- [`no-import-module-exports`]: avoid a false positive for import variables ([#2315], thanks [@BarryThePenguin]) + +### Changed +- [Tests] [`named`]: Run all TypeScript test ([#2427], thanks [@ProdigySim]) +- [readme] note use of typescript in readme `import/extensions` section ([#2440], thanks [@OutdatedVersion]) +- [Docs] [`order`]: use correct default value ([#2392], thanks [@hyperupcall]) +- [meta] replace git.io link in comments with the original URL ([#2444], thanks [@liby]) +- [Docs] remove global install in readme ([#2412], thanks [@aladdin-add]) +- [readme] clarify `eslint-import-resolver-typescript` usage ([#2503], thanks [@JounQin]) +- [Refactor] [`no-cycle`]: Add per-run caching of traversed paths ([#2419], thanks [@nokel81]) +- [Performance] `ExportMap`: add caching after parsing for an ambiguous module ([#2531], thanks [@stenin-nikita]) +- [Docs] [`no-useless-path-segments`]: fix paths ([#2424], thanks [@s-h-a-d-o-w]) +- [Tests] [`no-cycle`]: add passing test cases ([#2438], thanks [@georeith]) +- [Refactor] [`no-extraneous-dependencies`] improve performance using cache ([#2374], thanks [@meowtec]) +- [meta] `CONTRIBUTING.md`: mention inactive PRs ([#2546], thanks [@stropho]) +- [readme] make json for setting groups multiline ([#2570], thanks [@bertyhell]) +- [Tests] [`no-restricted-paths`]: Tests for `import type` statements ([#2459], thanks [@golergka]) +- [Tests] [`no-restricted-paths`]: fix one failing `import type` test case, submitted by [@golergka], thanks [@azyzz228] +- [Docs] automate docs with eslint-doc-generator ([#2582], thanks [@bmish]) +- [readme] Increase clarity around typescript configuration ([#2588], thanks [@Nfinished]) +- [Docs] update `eslint-doc-generator` to v1.0.0 ([#2605], thanks [@bmish]) +- [Perf] [`no-cycle`], [`no-internal-modules`], [`no-restricted-paths`]: use `anyOf` instead of `oneOf` (thanks [@ljharb], [@remcohaszing]) + +## [2.26.0] - 2022-04-05 + +### Added +- [`no-named-default`], [`no-default-export`], [`prefer-default-export`], [`no-named-export`], [`export`], [`named`], [`namespace`], [`no-unused-modules`]: support arbitrary module namespace names ([#2358], thanks [@sosukesuzuki]) +- [`no-dynamic-require`]: support dynamic import with espree ([#2371], thanks [@sosukesuzuki]) +- [`no-relative-packages`]: add fixer ([#2381], thanks [@forivall]) + +### Fixed +- [`default`]: `typescript-eslint-parser`: avoid a crash on exporting as namespace (thanks [@ljharb]) +- [`export`]/TypeScript: false positive for typescript namespace merging ([#1964], thanks [@magarcia]) +- [`no-duplicates`]: ignore duplicate modules in different TypeScript module declarations ([#2378], thanks [@remcohaszing]) +- [`no-unused-modules`]: avoid a crash when processing re-exports ([#2388], thanks [@ljharb]) + +### Changed +- [Tests] [`no-nodejs-modules`]: add tests for node protocol URL ([#2367], thanks [@sosukesuzuki]) +- [Tests] [`default`], [`no-anonymous-default-export`], [`no-mutable-exports`], [`no-named-as-default-member`], [`no-named-as-default`]: add tests for arbitrary module namespace names ([#2358], thanks [@sosukesuzuki]) +- [Docs] [`no-unresolved`]: Fix RegExp escaping in readme ([#2332], thanks [@stephtr]) +- [Refactor] [`namespace`]: try to improve performance ([#2340], thanks [@ljharb]) +- [Docs] make rule doc titles consistent ([#2393], thanks [@TheJaredWilcurt]) +- [Docs] [`order`]: TS code examples should use TS code blocks ([#2411], thanks [@MM25Zamanian]) +- [Docs] [`no-unresolved`]: fix link ([#2417], thanks [@kylemh]) + +## [2.25.4] - 2022-01-02 + +### Fixed +- `importType`: avoid crashing on a non-string' ([#2305], thanks [@ljharb]) +- [`first`]: prevent crash when parsing angular templates ([#2210], thanks [@ljharb]) +- `importType`: properly resolve `@/*`-aliased imports as internal ([#2334], thanks [@ombene]) +- [`named`]/`ExportMap`: handle named imports from CJS modules that use dynamic import ([#2341], thanks [@ludofischer]) + +### Changed +- [`no-default-import`]: report on the token "default" instead of the entire node ([#2299], thanks [@pmcelhaney]) +- [Docs] [`order`]: Remove duplicate mention of default ([#2280], thanks [@johnthagen]) +- [Deps] update `eslint-module-utils` + +## [2.25.3] - 2021-11-09 + +### Fixed +- [`extensions`]: ignore unresolveable type-only imports ([#2270], [#2271], thanks [@jablko]) +- `importType`: fix `isExternalModule` calculation ([#2282], thanks [@mx-bernhard]) +- [`no-import-module-exports`]: avoid false positives with a shadowed `module` or `exports` ([#2297], thanks [@ljharb]) + +### Changed +- [Docs] [`order`]: add type to the default groups ([#2272], thanks [@charpeni]) +- [readme] Add note to TypeScript docs to install appropriate resolver ([#2279], thanks [@johnthagen]) +- [Refactor] `importType`: combine redundant `isScoped` and `isScopedModule` (thanks [@ljharb]) +- [Docs] HTTP => HTTPS ([#2287], thanks [@Schweinepriester]) + +## [2.25.2] - 2021-10-12 + +### Fixed +- [Deps] update `eslint-module-utils` for real this time ([#2255], thanks [@ljharb]) + +## [2.25.1] - 2021-10-11 + +### Fixed +- [Deps] update `eslint-module-utils` + +## [2.25.0] - 2021-10-11 + +### Added +- Support `eslint` v8 ([#2191], thanks [@ota-meshi]) +- [`no-unresolved`]: add `caseSensitiveStrict` option ([#1262], thanks [@sergei-startsev]) +- [`no-unused-modules`]: add eslint v8 support ([#2194], thanks [@coderaiser]) +- [`no-restricted-paths`]: add/restore glob pattern support ([#2219], thanks [@stropho]) +- [`no-unused-modules`]: support dynamic imports ([#1660], [#2212], thanks [@maxkomarychev], [@aladdin-add], [@Hypnosphi]) + +### Fixed +- [`no-unresolved`]: ignore type-only imports ([#2220], thanks [@jablko]) +- [`order`]: fix sorting imports inside TypeScript module declarations ([#2226], thanks [@remcohaszing]) +- [`default`], `ExportMap`: Resolve extended TypeScript configuration files ([#2240], thanks [@mrmckeb]) + +### Changed +- [Refactor] switch to an internal replacement for `pkg-up` and `read-pkg-up` ([#2047], thanks [@mgwalker]) +- [patch] TypeScript config: remove `.d.ts` from [`import/parsers` setting] and [`import/extensions` setting] ([#2220], thanks [@jablko]) +- [Refactor] [`no-unresolved`], [`no-extraneous-dependencies`]: moduleVisitor usage ([#2233], thanks [@jablko]) + +## [2.24.2] - 2021-08-24 + +### Fixed +- [`named`], [`namespace`]: properly handle ExportAllDeclarations ([#2199], thanks [@ljharb]) + +## [2.24.1] - 2021-08-19 + +### Fixed +- `ExportMap`: Add default export when esModuleInterop is true and anything is exported ([#2184], thanks [@Maxim-Mazurok]) +- [`named`], [`namespace`]: properly set reexports on `export * as … from` ([#1998], [#2161], thanks [@ljharb]) +- [`no-duplicates`]: correctly handle case of mixed default/named type imports ([#2149], thanks [@GoodForOneFare], [@nwalters512]) +- [`no-duplicates`]: avoid crash with empty `import type {}` ([#2201], thanks [@ljharb]) + +### Changed +- [Docs] `max-dependencies`: 📖 Document `ignoreTypeImports` option ([#2196], thanks [@himynameisdave]) + ## [2.24.0] - 2021-08-08 ### Added @@ -17,11 +188,12 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel ### Fixed - [`no-duplicates`]: ensure autofix avoids excessive newlines ([#2028], thanks [@ertrzyiks]) - [`extensions`]: avoid crashing on partially typed import/export statements ([#2118], thanks [@ljharb]) -- [`no-extraneous-dependencies`]: add ESM intermediate package.json support] ([#2121], thanks [@paztis]) +- [`no-extraneous-dependencies`]: add ESM intermediate package.json support ([#2121], thanks [@paztis]) - Use `context.getPhysicalFilename()` when available (ESLint 7.28+) ([#2160], thanks [@pmcelhaney]) - [`extensions`]/`importType`: fix isScoped treating @/abc as scoped module ([#2146], thanks [@rperello]) ### Changed +- [Docs] [`extensions`]: improved cases for using `@/...` ([#2140], thanks [@wenfangdu]) - [Docs] [`extensions`]: removed incorrect cases ([#2138], thanks [@wenfangdu]) - [Tests] [`order`]: add tests for `pathGroupsExcludedImportTypes: ['type']` ([#2158], thanks [@atav32]) - [Docs] [`order`]: improve the documentation for the `pathGroupsExcludedImportTypes` option ([#2156], thanks [@liby]) @@ -43,7 +215,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - [`order`]: restore default behavior unless `type` is in groups ([#2087], thanks [@grit96]) ### Changed -- [Docs] Add `no-relative-packages` to list of to the list of rules ([#2075], thanks [@arvigeus]) +- [Docs] Add [`no-relative-packages`] to list of to the list of rules ([#2075], thanks [@arvigeus]) ## [2.23.2] - 2021-05-15 @@ -88,12 +260,13 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel ### Changed - [Generic Import Callback] Make callback for all imports once in rules ([#1237], thanks [@ljqx]) - [Docs] [`no-named-as-default`]: add semicolon ([#1897], thanks [@bicstone]) -- [Docs] `no-extraneous-dependencies`: correct peerDependencies option default to `true` ([#1993], thanks [@dwardu]) -- [Docs] `order`: Document options required to match ordering example ([#1992], thanks [@silviogutierrez]) -- [Tests] `no-unresolved`: add tests for `import()` ([#2012], thanks [@davidbonnet]) +- [Docs] [`no-extraneous-dependencies`]: correct peerDependencies option default to `true` ([#1993], thanks [@dwardu]) +- [Docs] [`order`]: Document options required to match ordering example ([#1992], thanks [@silviogutierrez]) +- [Tests] [`no-unresolved`]: add tests for `import()` ([#2012], thanks [@davidbonnet]) - [Docs] Add import/recommended ruleset to README ([#2034], thanks [@edemaine]) ## [2.22.1] - 2020-09-27 + ### Fixed - [`default`]/TypeScript: avoid crash on `export =` with a MemberExpression ([#1841], thanks [@ljharb]) - [`extensions`]/importType: Fix @/abc being treated as scoped module ([#1854], thanks [@3nuc]) @@ -104,6 +277,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - [`export`]: add tests for a name collision with `export * from` ([#1704], thanks @tomprats) ## [2.22.0] - 2020-06-26 + ### Added - [`no-unused-modules`]: consider exported TypeScript interfaces, types and enums ([#1819], thanks [@nicolashenry]) - [`no-cycle`]: allow `maxDepth` option to be `"∞"` (thanks [@ljharb]) @@ -124,16 +298,19 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - [docs] [`imports-first`]: deprecation info and link to `first` docs ([#1835], thanks [@beatrizrezener]) ## [2.21.2] - 2020-06-09 + ### Fixed - [`order`]: avoid a crash on TypeScript’s `export import` syntax ([#1808], thanks [@ljharb]) - [`newline-after-import`]: consider TypeScript `import =` syntax' ([#1811], thanks [@ljharb]) - [`no-internal-modules`]: avoid a crash on a named export declaration ([#1814], thanks [@ljharb]) ## [2.21.1] - 2020-06-07 + ### Fixed - TypeScript: [`import/named`]: avoid requiring `typescript` when not using TS ([#1805], thanks [@ljharb]) ## [2.21.0] - 2020-06-07 + ### Added - [`import/default`]: support default export in TSExportAssignment ([#1528], thanks [@joaovieira]) - [`no-cycle`]: add `ignoreExternal` option ([#1681], thanks [@sveyret]) @@ -155,24 +332,26 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - TypeScript: [`export`]: avoid a crash with `export =` ([#1801], thanks [@ljharb]) ### Changed -- [Refactor] `no-extraneous-dependencies`: use moduleVisitor ([#1735], thanks [@adamborowski]) +- [Refactor] [`no-extraneous-dependencies`]: use moduleVisitor ([#1735], thanks [@adamborowski]) - TypeScript config: Disable [`named`][] ([#1726], thanks [@astorije]) - [readme] Remove duplicate [`no-unused-modules`] from docs ([#1690], thanks [@arvigeus]) -- [Docs] `order`: fix bad inline config ([#1788], thanks [@nickofthyme]) +- [Docs] [`order`]: fix bad inline config ([#1788], thanks [@nickofthyme]) - [Tests] Add fix for Windows Subsystem for Linux ([#1786], thanks [@manuth]) -- [Docs] `no-unused-rules`: Fix docs for unused exports ([#1776], thanks [@barbogast]) +- [Docs] [`no-unused-rules`]: Fix docs for unused exports ([#1776], thanks [@barbogast]) - [eslint] bump minimum v7 version to v7.2.0 ## [2.20.2] - 2020-03-28 + ### Fixed - [`order`]: fix `isExternalModule` detect on windows ([#1651], thanks [@fisker]) - [`order`]: recognize ".." as a "parent" path ([#1658], thanks [@golopot]) - [`no-duplicates`]: fix fixer on cases with default import ([#1666], thanks [@golopot]) - [`no-unused-modules`]: Handle `export { default } from` syntax ([#1631], thanks [@richardxia]) - [`first`]: Add a way to disable `absolute-first` explicitly ([#1664], thanks [@TheCrueltySage]) -- [Docs] `no-webpack-loader-syntax`: Updates webpack URLs ([#1751], thanks [@MikeyBeLike]) +- [Docs] [`no-webpack-loader-syntax`]: Updates webpack URLs ([#1751], thanks [@MikeyBeLike]) ## [2.20.1] - 2020-02-01 + ### Fixed - [`export`]: Handle function overloading in `*.d.ts` ([#1619], thanks [@IvanGoncharov]) - [`no-absolute-path`]: fix a crash with invalid import syntax ([#1616], thanks [@ljharb]) @@ -187,16 +366,17 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel ### Changed - [`import/external-module-folders` setting] behavior is more strict now: it will only match complete path segments ([#1605], thanks [@skozin]) - [meta] fix "files" field to include/exclude the proper files ([#1635], thanks [@ljharb]) -- [Tests] `order`: Add TS import type tests ([#1736], thanks [@kmui2]) +- [Tests] [`order`]: Add TS import type tests ([#1736], thanks [@kmui2]) ## [2.20.0] - 2020-01-10 + ### Added - [`order`]: added `caseInsensitive` as an additional option to `alphabetize` ([#1586], thanks [@dbrewer5]) - [`no-restricted-paths`]: New `except` option per `zone`, allowing exceptions to be defined for a restricted zone ([#1238], thanks [@rsolomon]) - [`order`]: add option pathGroupsExcludedImportTypes to allow ordering of external import types ([#1565], thanks [@Mairu]) ### Fixed -- [`no-unused-modules`]: fix usage of `import/extensions` settings ([#1560], thanks [@stekycz]) +- [`no-unused-modules`]: fix usage of [`import/extensions` setting] ([#1560], thanks [@stekycz]) - [`extensions`]: ignore non-main modules ([#1563], thanks [@saschanaz]) - TypeScript config: lookup for external modules in @types folder ([#1526], thanks [@joaovieira]) - [`no-extraneous-dependencies`]: ensure `node.source` is truthy ([#1589], thanks [@ljharb]) @@ -206,10 +386,12 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - [`extensions`]: improve `ignorePackages` docs ([#1248], thanks [@ivo-stefchev]) ## [2.19.1] - 2019-12-08 + ### Fixed - [`no-extraneous-dependencies`]: ensure `node.source` exists ## [2.19.0] - 2019-12-08 + ### Added - [`internal-regex` setting]: regex pattern for marking packages "internal" ([#1491], thanks [@Librazy]) - [`group-exports`]: make aggregate module exports valid ([#1472], thanks [@atikenny]) @@ -241,10 +423,12 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - [`no-unused-modules`]/`eslint-module-utils`: Avoid superfluous calls and code ([#1551], thanks [@brettz9]) ## [2.18.2] - 2019-07-19 + ### Fixed - Skip warning on type interfaces ([#1425], thanks [@lencioni]) ## [2.18.1] - 2019-07-18 + ### Fixed - Improve parse perf when using `@typescript-eslint/parser` ([#1409], thanks [@bradzacher]) - [`prefer-default-export`]: don't warn on TypeAlias & TSTypeAliasDeclaration ([#1377], thanks [@sharmilajesupaul]) @@ -255,6 +439,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - [`no-extraneous-dependencies`], `importType`: remove lodash ([#1419], thanks [@ljharb]) ## [2.18.0] - 2019-06-24 + ### Added - Support eslint v6 ([#1393], thanks [@sheepsteak]) - [`order`]: Adds support for correctly sorting unknown types into a single group ([#1375], thanks [@swernerx]) @@ -269,6 +454,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - [`no-named-as-default-member`]: update broken link ([#1389], thanks [@fooloomanzoo]) ## [2.17.3] - 2019-05-23 + ### Fixed - [`no-common-js`]: Also throw an error when assigning ([#1354], thanks [@charlessuh]) - [`no-unused-modules`]: don't crash when lint file outside src-folder ([#1347], thanks [@rfermann]) @@ -279,20 +465,23 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - Improve support for TypeScript declare structures ([#1356], thanks [@christophercurrie]) ### Docs -- add missing `no-unused-modules` in README ([#1358], thanks [@golopot]) +- add missing [`no-unused-modules`] in README ([#1358], thanks [@golopot]) - [`no-unused-modules`]: Indicates usage, plugin defaults to no-op, and add description to main README.md ([#1352], thanks [@johndevedu]) - Document `env` option for `eslint-import-resolver-webpack` ([#1363], thanks [@kgregory]) ## [2.17.2] - 2019-04-16 + ### Fixed - [`no-unused-modules`]: avoid crash when using `ignoreExports`-option ([#1331], [#1323], thanks [@rfermann]) - [`no-unused-modules`]: make sure that rule with no options will not fail ([#1330], [#1334], thanks [@kiwka]) ## [2.17.1] - 2019-04-13 + ### Fixed - require v2.4 of `eslint-module-utils` ([#1322]) ## [2.17.0] - 2019-04-13 + ### Added - [`no-useless-path-segments`]: Add `noUselessIndex` option ([#1290], thanks [@timkraut]) - [`no-duplicates`]: Add autofix ([#1312], thanks [@lydell]) @@ -318,6 +507,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - [`no-commonjs`]: add tests that show corner cases ([#1308], thanks [@TakeScoop]) ## [2.16.0] - 2019-01-29 + ### Added - `typescript` config ([#1257], thanks [@kirill-konshin]) @@ -325,6 +515,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - Memory leak of `SourceCode` objects for all parsed dependencies, resolved. (issue [#1266], thanks [@asapach] and [@sergei-startsev] for digging in) ## [2.15.0] - 2019-01-22 + ### Added - new rule: [`no-named-export`] ([#1157], thanks [@fsmaia]) @@ -334,6 +525,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - [`named`]: fix destructuring assignment ([#1232], thanks [@ljqx]) ## [2.14.0] - 2018-08-13 + ### Added - [`no-useless-path-segments`]: add commonJS (CJS) support ([#1128], thanks [@1pete]) - [`namespace`]: add JSX check ([#1151], thanks [@jf248]) @@ -349,6 +541,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - add explicit support for RestElement alongside ExperimentalRestProperty (thanks [@ljharb]) ## [2.13.0] - 2018-06-24 + ### Added - Add ESLint 5 support ([#1122], thanks [@ai] and [@ljharb]) - Add [`no-relative-parent-imports`] rule: disallow relative imports from parent directories ([#1093], thanks [@chrislloyd]) @@ -357,12 +550,14 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - `namespace` rule: ensure it works in eslint 5/ecmaVersion 2018 (thanks [@ljharb]) ## [2.12.0] - 2018-05-17 + ### Added - Ignore type imports for [`named`] rule ([#931], thanks [@mattijsbliek]) - Add documentation for [`no-useless-path-segments`] rule ([#1068], thanks [@manovotny]) - `packageDir` option for [`no-extraneous-dependencies`] can be array-valued ([#1085], thanks [@hulkish]) ## [2.11.0] - 2018-04-09 + ### Added - Fixer for [`first`] ([#1046], thanks [@fengkfengk]) - `allow-require` option for [`no-commonjs`] rule ([#880], thanks [@futpib]) @@ -371,11 +566,13 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - memory/CPU regression where ASTs were held in memory ([#1058], thanks [@klimashkin]/[@lukeapage]) ## [2.10.0] - 2018-03-29 + ### Added - Autofixer for [`order`] rule ([#908], thanks [@tihonove]) - Add [`no-cycle`] rule: reports import cycles. ## [2.9.0] - 2018-02-21 + ### Added - Add [`group-exports`] rule: style-guide rule to report use of multiple named exports ([#721], thanks [@robertrossmann]) - Add [`no-self-import`] rule: forbids a module from importing itself. ([#727], [#449], [#447], thanks [@giodamelio]). @@ -396,14 +593,17 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - TypeError for missing AST fields from TypeScript ([#842] / [#944], thanks [@alexgorbatchev]) ## [2.7.0] - 2017-07-06 + ### Changed - [`no-absolute-path`] picks up speed boost, optional AMD support ([#843], thanks [@jseminck]) ## [2.6.1] - 2017-06-29 + ### Fixed - update bundled node resolver dependency to latest version ## [2.6.0] - 2017-06-23 + ### Changed - update tests / peerDeps for ESLint 4.0 compatibility ([#871], thanks [@mastilver]) - [`memo-parser`] updated to require `filePath` on parser options as it melts @@ -426,6 +626,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - Add `allow` option to [`no-unassigned-import`] to allow for files that match the globs ([#671], [#737], thanks [@kevin940726]). ## [2.3.0] - 2017-05-18 + ### Added - [`no-anonymous-default-export`] rule: report anonymous default exports ([#712], thanks [@duncanbeevers]). - Add new value to [`order`]'s `newlines-between` option to allow newlines inside import groups ([#627], [#628], thanks [@giodamelio]) @@ -440,8 +641,8 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - "default is a reserved keyword" in no-maned-default tests by locking down babylon to 6.15.0 (#756, thanks @gmathieu) - support scoped modules containing non word characters - ## [2.2.0] - 2016-11-07 + ### Fixed - Corrected a few gaffs in the auto-ignore logic to fix major performance issues with projects that did not explicitly ignore `node_modules`. ([#654]) @@ -450,6 +651,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - [`prefer-default-export`]: fixed crash on export extensions ([#653]) ## [2.1.0] - 2016-11-02 + ### Added - Add [`no-named-default`] rule: style-guide rule to report use of unnecessarily named default imports ([#596], thanks [@ntdb]) - [`no-extraneous-dependencies`]: check globs against CWD + absolute path ([#602] + [#630], thanks [@ljharb]) @@ -462,10 +664,12 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - Fixed documentation for the default values for the [`order`] rule ([#601]) ## [2.0.1] - 2016-10-06 + ### Fixed - Fixed code that relied on removed dependencies. ([#604]) ## [2.0.0]! - 2016-09-30 + ### Added - [`unambiguous`] rule: report modules that are not unambiguously ES modules. - `recommended` shared config. Roughly `errors` and `warnings` mixed together, @@ -491,6 +695,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - [`no-internal-modules`]: support `@`-scoped packages ([#577]+[#578], thanks [@spalger]) ## [1.16.0] - 2016-09-22 + ### Added - Added [`no-dynamic-require`] rule: forbid `require()` calls with expressions. ([#567], [#568]) - Added [`no-internal-modules`] rule: restrict deep package imports to specific folders. ([#485], thanks [@spalger]!) @@ -501,6 +706,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - [`default`]: allow re-export of values from ignored files as default ([#545], thanks [@skyrpex]) ## [1.15.0] - 2016-09-12 + ### Added - Added an `allow` option to [`no-nodejs-modules`] to allow exceptions ([#452], [#509]). - Added [`no-absolute-path`] rule ([#530], [#538]) @@ -511,6 +717,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - [`no-named-as-default-member`] Allow default import to have a property named "default" ([#507], [#508], thanks [@jquense] for both!) ## [1.14.0] - 2016-08-22 + ### Added - [`import/parsers` setting]: parse some dependencies (i.e. TypeScript!) with a different parser than the ESLint-configured parser. ([#503]) @@ -518,6 +725,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - [`namespace`] exception for get property from `namespace` import, which are re-export from commonjs module ([#499] fixes [#416], thanks [@wKich]) ## [1.13.0] - 2016-08-11 + ### Added - `allowComputed` option for [`namespace`] rule. If set to `true`, won't report computed member references to namespaces. (see [#456]) @@ -530,15 +738,18 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro in an imported file. (fixes [#478], thanks [@rhys-vdw]) ## [1.12.0] - 2016-07-26 + ### Added - [`import/external-module-folders` setting]: a possibility to configure folders for "external" modules ([#444], thanks [@zloirock]) ## [1.11.1] - 2016-07-20 + ### Fixed - [`newline-after-import`] exception for `switch` branches with `require`s iff parsed as `sourceType:'module'`. (still [#441], thanks again [@ljharb]) ## [1.11.0] - 2016-07-17 + ### Added - Added an `peerDependencies` option to [`no-extraneous-dependencies`] to allow/forbid peer dependencies ([#423], [#428], thanks [@jfmengels]!). @@ -547,20 +758,24 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro function expression (e.g. `() => require('a') || require('b')`). ([#441], thanks [@ljharb]) ## [1.10.3] - 2016-07-08 + ### Fixed - removing `Symbol` dependencies (i.e. `for-of` loops) due to Node 0.10 polyfill issue (see [#415]). Should not make any discernible semantic difference. ## [1.10.2] - 2016-07-04 + ### Fixed - Something horrible happened during `npm prepublish` of 1.10.1. Several `rm -rf node_modules && npm i` and `gulp clean && npm prepublish`s later, it is rebuilt and republished as 1.10.2. Thanks [@rhettlivingston] for noticing and reporting! ## [1.10.1] - 2016-07-02 [YANKED] + ### Added - Officially support ESLint 3.x. (peerDependencies updated to `2.x - 3.x`) ## [1.10.0] - 2016-06-30 + ### Added - Added new rule [`no-restricted-paths`]. ([#155]/[#371], thanks [@lo1tuma]) - [`import/core-modules` setting]: allow configuration of additional module names, @@ -571,14 +786,17 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - Fixed crash with `newline-after-import` related to the use of switch cases. (fixes [#386], thanks [@ljharb] for reporting) ([#395]) ## [1.9.2] - 2016-06-21 + ### Fixed - Issues with ignored/CJS files in [`export`] and [`no-deprecated`] rules. ([#348], [#370]) ## [1.9.1] - 2016-06-16 + ### Fixed - Reordered precedence for loading resolvers. ([#373]) ## [1.9.0] - 2016-06-10 + ### Added - Added support TomDoc comments to [`no-deprecated`]. ([#321], thanks [@josh]) - Added support for loading custom resolvers ([#314], thanks [@le0nik]) @@ -587,6 +805,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - [`prefer-default-export`] handles `export function` and `export const` in same file ([#359], thanks [@scottnonnenberg]) ## [1.8.1] - 2016-05-23 + ### Fixed - `export * from 'foo'` now properly ignores a `default` export from `foo`, if any. ([#328]/[#332], thanks [@jkimbo]) This impacts all static analysis of imported names. ([`default`], [`named`], [`namespace`], [`export`]) @@ -596,6 +815,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - [`prefer-default-export`] properly handles deep destructuring, `export * from ...`, and files with no exports. ([#342]+[#343], thanks [@scottnonnenberg]) ## [1.8.0] - 2016-05-11 + ### Added - [`prefer-default-export`], new rule. ([#308], thanks [@gavriguy]) @@ -604,6 +824,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - Make [`no-extraneous-dependencies`] handle scoped packages ([#316], thanks [@jfmengels]) ## [1.7.0] - 2016-05-06 + ### Added - [`newline-after-import`], new rule. ([#245], thanks [@singles]) - Added an `optionalDependencies` option to [`no-extraneous-dependencies`] to allow/forbid optional dependencies ([#266], thanks [@jfmengels]). @@ -618,6 +839,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro module is not resolved. Also, never report for builtins (i.e. `path`). ([#296]) ## [1.6.1] - 2016-04-28 + ### Fixed - [`no-named-as-default-member`]: don't crash on rest props. ([#281], thanks [@SimenB]) - support for Node 6: don't pass `null` to `path` functions. @@ -625,6 +847,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro config ([#288]). ## [1.6.0] - 2016-04-25 + ### Added - add [`no-named-as-default-member`] to `warnings` canned config - add [`no-extraneous-dependencies`] rule ([#241], thanks [@jfmengels]) @@ -643,6 +866,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - [`no-named-as-default-member`] had a crash on destructuring in loops (thanks for heads up from [@lemonmade]) ## [1.5.0] - 2016-04-18 + ### Added - report resolver errors at the top of the linted file - add [`no-namespace`] rule ([#239], thanks [@singles]) @@ -655,6 +879,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - support for Node 0.10, via `es6-*` ponyfills. Using native Map/Set/Symbol. ## [1.4.0] - 2016-03-25 + ### Added - Resolver plugin interface v2: more explicit response format that more clearly covers the found-but-core-module case, where there is no path. Still backwards-compatible with the original version of the resolver spec. @@ -665,6 +890,7 @@ Yanked due to critical issue in eslint-module-utils with cache key resulting fro - using `es6-*` ponyfills instead of `babel-runtime` ## [1.3.0] - 2016-03-20 + Major perf improvements. Between parsing only once and ignoring gigantic, non-module `node_modules`, there is very little added time. @@ -680,6 +906,7 @@ memoizing parser, and takes only 27s with naked `babel-eslint` (thus, reparsing something that looks like an `export` is detected in the module content. ## [1.2.0] - 2016-03-19 + Thanks [@lencioni] for identifying a huge amount of rework in resolve and kicking off a bunch of memoization. @@ -690,6 +917,7 @@ I'm seeing 62% improvement over my normal test codebase when executing only - added caching to core/resolve via [#214], configured via [`import/cache` setting] ## [1.1.0] - 2016-03-15 + ### Added - Added an [`ignore`](./docs/rules/no-unresolved.md#ignore) option to [`no-unresolved`] for those pesky files that no resolver can find. (still prefer enhancing the Webpack and Node resolvers to using it, though). See [#89] for details. @@ -741,6 +969,7 @@ I'm seeing 62% improvement over my normal test codebase when executing only - `babylon` as default import parser (see Breaking) ## [0.13.0] - 2016-02-08 + ### Added - [`no-commonjs`] rule - [`no-amd`] rule @@ -749,17 +978,21 @@ I'm seeing 62% improvement over my normal test codebase when executing only - Removed vestigial `no-require` rule. [`no-commonjs`] is more complete. ## [0.12.2] - 2016-02-06 [YANKED] + Unpublished from npm and re-released as 0.13.0. See [#170]. ## [0.12.1] - 2015-12-17 + ### Changed - Broke docs for rules out into individual files. ## [0.12.0] - 2015-12-14 + ### Changed - Ignore [`import/ignore` setting] if exports are actually found in the parsed module. Does this to support use of `jsnext:main` in `node_modules` without the pain of managing an allow list or a nuanced deny list. ## [0.11.0] - 2015-11-27 + ### Added - Resolver plugins. Now the linter can read Webpack config, properly follow aliases and ignore externals, dismisses inline loaders, etc. etc.! @@ -776,6 +1009,7 @@ for info on changes for earlier releases. [`import/external-module-folders` setting]: ./README.md#importexternal-module-folders [`internal-regex` setting]: ./README.md#importinternal-regex +[`consistent-type-specifier-style`]: ./docs/rules/consistent-type-specifier-style.md [`default`]: ./docs/rules/default.md [`dynamic-import-chunkname`]: ./docs/rules/dynamic-import-chunkname.md [`export`]: ./docs/rules/export.md @@ -797,6 +1031,7 @@ for info on changes for earlier releases. [`no-deprecated`]: ./docs/rules/no-deprecated.md [`no-duplicates`]: ./docs/rules/no-duplicates.md [`no-dynamic-require`]: ./docs/rules/no-dynamic-require.md +[`no-empty-named-blocks`]: ./docs/rules/no-empty-named-blocks.md [`no-extraneous-dependencies`]: ./docs/rules/no-extraneous-dependencies.md [`no-import-module-exports`]: ./docs/rules/no-import-module-exports.md [`no-internal-modules`]: ./docs/rules/no-internal-modules.md @@ -822,11 +1057,80 @@ for info on changes for earlier releases. [`memo-parser`]: ./memo-parser/README.md +[#2664]: https://github.com/import-js/eslint-plugin-import/pull/2664 +[#2613]: https://github.com/import-js/eslint-plugin-import/pull/2613 +[#2608]: https://github.com/import-js/eslint-plugin-import/pull/2608 +[#2605]: https://github.com/import-js/eslint-plugin-import/pull/2605 +[#2602]: https://github.com/import-js/eslint-plugin-import/pull/2602 +[#2598]: https://github.com/import-js/eslint-plugin-import/pull/2598 +[#2589]: https://github.com/import-js/eslint-plugin-import/pull/2589 +[#2588]: https://github.com/import-js/eslint-plugin-import/pull/2588 +[#2582]: https://github.com/import-js/eslint-plugin-import/pull/2582 +[#2570]: https://github.com/import-js/eslint-plugin-import/pull/2570 +[#2568]: https://github.com/import-js/eslint-plugin-import/pull/2568 +[#2546]: https://github.com/import-js/eslint-plugin-import/pull/2546 +[#2541]: https://github.com/import-js/eslint-plugin-import/pull/2541 +[#2531]: https://github.com/import-js/eslint-plugin-import/pull/2531 +[#2511]: https://github.com/import-js/eslint-plugin-import/pull/2511 +[#2506]: https://github.com/import-js/eslint-plugin-import/pull/2506 +[#2503]: https://github.com/import-js/eslint-plugin-import/pull/2503 +[#2490]: https://github.com/import-js/eslint-plugin-import/pull/2490 +[#2475]: https://github.com/import-js/eslint-plugin-import/pull/2475 +[#2473]: https://github.com/import-js/eslint-plugin-import/pull/2473 +[#2466]: https://github.com/import-js/eslint-plugin-import/pull/2466 +[#2459]: https://github.com/import-js/eslint-plugin-import/pull/2459 +[#2440]: https://github.com/import-js/eslint-plugin-import/pull/2440 +[#2438]: https://github.com/import-js/eslint-plugin-import/pull/2438 +[#2436]: https://github.com/import-js/eslint-plugin-import/pull/2436 +[#2427]: https://github.com/import-js/eslint-plugin-import/pull/2427 +[#2424]: https://github.com/import-js/eslint-plugin-import/pull/2424 +[#2419]: https://github.com/import-js/eslint-plugin-import/pull/2419 +[#2417]: https://github.com/import-js/eslint-plugin-import/pull/2417 +[#2411]: https://github.com/import-js/eslint-plugin-import/pull/2411 +[#2399]: https://github.com/import-js/eslint-plugin-import/pull/2399 +[#2396]: https://github.com/import-js/eslint-plugin-import/pull/2396 +[#2395]: https://github.com/import-js/eslint-plugin-import/pull/2395 +[#2393]: https://github.com/import-js/eslint-plugin-import/pull/2393 +[#2388]: https://github.com/import-js/eslint-plugin-import/pull/2388 +[#2387]: https://github.com/import-js/eslint-plugin-import/pull/2387 +[#2381]: https://github.com/import-js/eslint-plugin-import/pull/2381 +[#2378]: https://github.com/import-js/eslint-plugin-import/pull/2378 +[#2374]: https://github.com/import-js/eslint-plugin-import/pull/2374 +[#2371]: https://github.com/import-js/eslint-plugin-import/pull/2371 +[#2367]: https://github.com/import-js/eslint-plugin-import/pull/2367 +[#2358]: https://github.com/import-js/eslint-plugin-import/pull/2358 +[#2341]: https://github.com/import-js/eslint-plugin-import/pull/2341 +[#2332]: https://github.com/import-js/eslint-plugin-import/pull/2332 +[#2334]: https://github.com/import-js/eslint-plugin-import/pull/2334 +[#2330]: https://github.com/import-js/eslint-plugin-import/pull/2330 +[#2315]: https://github.com/import-js/eslint-plugin-import/pull/2315 +[#2305]: https://github.com/import-js/eslint-plugin-import/pull/2305 +[#2299]: https://github.com/import-js/eslint-plugin-import/pull/2299 +[#2297]: https://github.com/import-js/eslint-plugin-import/pull/2297 +[#2287]: https://github.com/import-js/eslint-plugin-import/pull/2287 +[#2282]: https://github.com/import-js/eslint-plugin-import/pull/2282 +[#2280]: https://github.com/import-js/eslint-plugin-import/pull/2280 +[#2279]: https://github.com/import-js/eslint-plugin-import/pull/2279 +[#2272]: https://github.com/import-js/eslint-plugin-import/pull/2272 +[#2271]: https://github.com/import-js/eslint-plugin-import/pull/2271 +[#2270]: https://github.com/import-js/eslint-plugin-import/pull/2270 +[#2240]: https://github.com/import-js/eslint-plugin-import/pull/2240 +[#2233]: https://github.com/import-js/eslint-plugin-import/pull/2233 +[#2226]: https://github.com/import-js/eslint-plugin-import/pull/2226 +[#2220]: https://github.com/import-js/eslint-plugin-import/pull/2220 +[#2219]: https://github.com/import-js/eslint-plugin-import/pull/2219 +[#2212]: https://github.com/import-js/eslint-plugin-import/pull/2212 +[#2196]: https://github.com/import-js/eslint-plugin-import/pull/2196 +[#2194]: https://github.com/import-js/eslint-plugin-import/pull/2194 +[#2191]: https://github.com/import-js/eslint-plugin-import/pull/2191 +[#2184]: https://github.com/import-js/eslint-plugin-import/pull/2184 [#2179]: https://github.com/import-js/eslint-plugin-import/pull/2179 [#2160]: https://github.com/import-js/eslint-plugin-import/pull/2160 [#2158]: https://github.com/import-js/eslint-plugin-import/pull/2158 [#2156]: https://github.com/import-js/eslint-plugin-import/pull/2156 +[#2149]: https://github.com/import-js/eslint-plugin-import/pull/2149 [#2146]: https://github.com/import-js/eslint-plugin-import/pull/2146 +[#2140]: https://github.com/import-js/eslint-plugin-import/pull/2140 [#2138]: https://github.com/import-js/eslint-plugin-import/pull/2138 [#2121]: https://github.com/import-js/eslint-plugin-import/pull/2121 [#2112]: https://github.com/import-js/eslint-plugin-import/pull/2112 @@ -837,6 +1141,7 @@ for info on changes for earlier releases. [#2083]: https://github.com/import-js/eslint-plugin-import/pull/2083 [#2075]: https://github.com/import-js/eslint-plugin-import/pull/2075 [#2071]: https://github.com/import-js/eslint-plugin-import/pull/2071 +[#2047]: https://github.com/import-js/eslint-plugin-import/pull/2047 [#2034]: https://github.com/import-js/eslint-plugin-import/pull/2034 [#2028]: https://github.com/import-js/eslint-plugin-import/pull/2028 [#2026]: https://github.com/import-js/eslint-plugin-import/pull/2026 @@ -894,6 +1199,7 @@ for info on changes for earlier releases. [#1676]: https://github.com/import-js/eslint-plugin-import/pull/1676 [#1666]: https://github.com/import-js/eslint-plugin-import/pull/1666 [#1664]: https://github.com/import-js/eslint-plugin-import/pull/1664 +[#1660]: https://github.com/import-js/eslint-plugin-import/pull/1660 [#1658]: https://github.com/import-js/eslint-plugin-import/pull/1658 [#1651]: https://github.com/import-js/eslint-plugin-import/pull/1651 [#1626]: https://github.com/import-js/eslint-plugin-import/pull/1626 @@ -965,6 +1271,7 @@ for info on changes for earlier releases. [#1294]: https://github.com/import-js/eslint-plugin-import/pull/1294 [#1290]: https://github.com/import-js/eslint-plugin-import/pull/1290 [#1277]: https://github.com/import-js/eslint-plugin-import/pull/1277 +[#1262]: https://github.com/import-js/eslint-plugin-import/pull/1262 [#1257]: https://github.com/import-js/eslint-plugin-import/pull/1257 [#1253]: https://github.com/import-js/eslint-plugin-import/pull/1253 [#1248]: https://github.com/import-js/eslint-plugin-import/pull/1248 @@ -1074,10 +1381,24 @@ for info on changes for earlier releases. [#211]: https://github.com/import-js/eslint-plugin-import/pull/211 [#164]: https://github.com/import-js/eslint-plugin-import/pull/164 [#157]: https://github.com/import-js/eslint-plugin-import/pull/157 +[#2674]: https://github.com/import-js/eslint-plugin-import/issues/2674 +[#2668]: https://github.com/import-js/eslint-plugin-import/issues/2668 +[#2666]: https://github.com/import-js/eslint-plugin-import/issues/2666 +[#2665]: https://github.com/import-js/eslint-plugin-import/issues/2665 +[#2444]: https://github.com/import-js/eslint-plugin-import/issues/2444 +[#2412]: https://github.com/import-js/eslint-plugin-import/issues/2412 +[#2392]: https://github.com/import-js/eslint-plugin-import/issues/2392 +[#2340]: https://github.com/import-js/eslint-plugin-import/issues/2340 +[#2255]: https://github.com/import-js/eslint-plugin-import/issues/2255 +[#2210]: https://github.com/import-js/eslint-plugin-import/issues/2210 +[#2201]: https://github.com/import-js/eslint-plugin-import/issues/2201 +[#2199]: https://github.com/import-js/eslint-plugin-import/issues/2199 +[#2161]: https://github.com/import-js/eslint-plugin-import/issues/2161 [#2118]: https://github.com/import-js/eslint-plugin-import/issues/2118 [#2067]: https://github.com/import-js/eslint-plugin-import/issues/2067 -[#2056]: https://github.com/import-js/eslint-plugin-import/issues/2056 [#2063]: https://github.com/import-js/eslint-plugin-import/issues/2063 +[#2056]: https://github.com/import-js/eslint-plugin-import/issues/2056 +[#1998]: https://github.com/import-js/eslint-plugin-import/issues/1998 [#1965]: https://github.com/import-js/eslint-plugin-import/issues/1965 [#1924]: https://github.com/import-js/eslint-plugin-import/issues/1924 [#1854]: https://github.com/import-js/eslint-plugin-import/issues/1854 @@ -1095,6 +1416,7 @@ for info on changes for earlier releases. [#1631]: https://github.com/import-js/eslint-plugin-import/issues/1631 [#1616]: https://github.com/import-js/eslint-plugin-import/issues/1616 [#1613]: https://github.com/import-js/eslint-plugin-import/issues/1613 +[#1590]: https://github.com/import-js/eslint-plugin-import/issues/1590 [#1589]: https://github.com/import-js/eslint-plugin-import/issues/1589 [#1565]: https://github.com/import-js/eslint-plugin-import/issues/1565 [#1366]: https://github.com/import-js/eslint-plugin-import/issues/1366 @@ -1181,7 +1503,21 @@ for info on changes for earlier releases. [#119]: https://github.com/import-js/eslint-plugin-import/issues/119 [#89]: https://github.com/import-js/eslint-plugin-import/issues/89 -[Unreleased]: https://github.com/import-js/eslint-plugin-import/compare/v2.24.0...HEAD +[Unreleased]: https://github.com/import-js/eslint-plugin-import/compare/v2.27.5...HEAD +[2.27.5]: https://github.com/import-js/eslint-plugin-import/compare/v2.27.4...v2.27.5 +[2.27.4]: https://github.com/import-js/eslint-plugin-import/compare/v2.27.3...v2.27.4 +[2.27.3]: https://github.com/import-js/eslint-plugin-import/compare/v2.27.2...v2.27.3 +[2.27.2]: https://github.com/import-js/eslint-plugin-import/compare/v2.27.1...v2.27.2 +[2.27.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.27.0...v2.27.1 +[2.27.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.26.0...v2.27.0 +[2.26.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.25.4...v2.26.0 +[2.25.4]: https://github.com/import-js/eslint-plugin-import/compare/v2.25.3...v2.25.4 +[2.25.3]: https://github.com/import-js/eslint-plugin-import/compare/v2.25.2...v2.25.3 +[2.25.2]: https://github.com/import-js/eslint-plugin-import/compare/v2.25.1...v2.25.2 +[2.25.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.25.0...v2.25.1 +[2.25.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.24.2...v2.25.0 +[2.24.2]: https://github.com/import-js/eslint-plugin-import/compare/v2.24.1...v2.24.2 +[2.24.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.24.0...v2.24.1 [2.24.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.23.4...v2.24.0 [2.23.4]: https://github.com/import-js/eslint-plugin-import/compare/v2.23.3...v2.23.4 [2.23.3]: https://github.com/import-js/eslint-plugin-import/compare/v2.23.2...v2.23.3 @@ -1266,6 +1602,7 @@ for info on changes for earlier releases. [@aberezkin]: https://github.com/aberezkin [@adamborowski]: https://github.com/adamborowski [@adjerbetian]: https://github.com/adjerbetian +[@AdriAt360]: https://github.com/AdriAt360 [@ai]: https://github.com/ai [@aladdin-add]: https://github.com/aladdin-add [@alex-page]: https://github.com/alex-page @@ -1279,11 +1616,15 @@ for info on changes for earlier releases. [@atav32]: https://github.com/atav32 [@atikenny]: https://github.com/atikenny [@atos1990]: https://github.com/atos1990 +[@azyzz228]: https://github.com/azyzz228 [@barbogast]: https://github.com/barbogast +[@BarryThePenguin]: https://github.com/BarryThePenguin [@be5invis]: https://github.com/be5invis [@beatrizrezener]: https://github.com/beatrizrezener [@benmosher]: https://github.com/benmosher [@benmunro]: https://github.com/benmunro +[@BenoitZugmeyer]: https://github.com/BenoitZugmeyer +[@bertyhell]: https://github.com/bertyhell [@bicstone]: https://github.com/bicstone [@Blasz]: https://github.com/Blasz [@bmish]: https://github.com/bmish @@ -1293,10 +1634,13 @@ for info on changes for earlier releases. [@brendo]: https://github.com/brendo [@brettz9]: https://github.com/brettz9 [@charlessuh]: https://github.com/charlessuh +[@charpeni]: https://github.com/charpeni [@cherryblossom000]: https://github.com/cherryblossom000 [@chrislloyd]: https://github.com/chrislloyd [@christianvuerings]: https://github.com/christianvuerings [@christophercurrie]: https://github.com/christophercurrie +[@cristobal]: https://github.com/cristobal +[@DamienCassou]: https://github.com/DamienCassou [@danny-andrews]: https://github.com/dany-andrews [@darkartur]: https://github.com/darkartur [@davidbonnet]: https://github.com/davidbonnet @@ -1314,6 +1658,7 @@ for info on changes for earlier releases. [@ernestostifano]: https://github.com/ernestostifano [@ertrzyiks]: https://github.com/ertrzyiks [@fa93hws]: https://github.com/fa93hws +[@Fdawgs]: https://github.com/Fdawgs [@fengkfengk]: https://github.com/fengkfengk [@fernandopasik]: https://github.com/fernandopasik [@feychenie]: https://github.com/feychenie @@ -1328,17 +1673,25 @@ for info on changes for earlier releases. [@gajus]: https://github.com/gajus [@gausie]: https://github.com/gausie [@gavriguy]: https://github.com/gavriguy +[@georeith]: https://github.com/georeith [@giodamelio]: https://github.com/giodamelio +[@gnprice]: https://github.com/gnprice +[@golergka]: https://github.com/golergka [@golopot]: https://github.com/golopot +[@GoodForOneFare]: https://github.com/GoodForOneFare [@graingert]: https://github.com/graingert [@grit96]: https://github.com/grit96 +[@guilhermelimak]: https://github.com/guilhermelimak [@guillaumewuip]: https://github.com/guillaumewuip [@hayes]: https://github.com/hayes +[@himynameisdave]: https://github.com/himynameisdave [@hulkish]: https://github.com/hulkish +[@hyperupcall]: https://github.com/hyperupcall [@Hypnosphi]: https://github.com/Hypnosphi [@isiahmeadows]: https://github.com/isiahmeadows [@IvanGoncharov]: https://github.com/IvanGoncharov [@ivo-stefchev]: https://github.com/ivo-stefchev +[@jablko]: https://github.com/jablko [@jakubsta]: https://github.com/jakubsta [@jeffshaver]: https://github.com/jeffshaver [@jf248]: https://github.com/jf248 @@ -1347,6 +1700,7 @@ for info on changes for earlier releases. [@jkimbo]: https://github.com/jkimbo [@joaovieira]: https://github.com/joaovieira [@johndevedu]: https://github.com/johndevedu +[@johnthagen]: https://github.com/johnthagen [@jonboiser]: https://github.com/jonboiser [@josh]: https://github.com/josh [@JounQin]: https://github.com/JounQin @@ -1362,8 +1716,9 @@ for info on changes for earlier releases. [@kiwka]: https://github.com/kiwka [@klimashkin]: https://github.com/klimashkin [@kmui2]: https://github.com/kmui2 -[@KostyaZgara]: https://github.com/KostyaZgara [@knpwrs]: https://github.com/knpwrs +[@KostyaZgara]: https://github.com/KostyaZgara +[@kylemh]: https://github.com/kylemh [@laysent]: https://github.com/laysent [@le0nik]: https://github.com/le0nik [@lemonmade]: https://github.com/lemonmade @@ -1377,8 +1732,11 @@ for info on changes for earlier releases. [@lo1tuma]: https://github.com/lo1tuma [@loganfsmyth]: https://github.com/loganfsmyth [@luczsoma]: https://github.com/luczsoma +[@ludofischer]: https://github.com/ludofischer +[@Lukas-Kullmann]: https://github.com/Lukas-Kullmann [@lukeapage]: https://github.com/lukeapage [@lydell]: https://github.com/lydell +[@magarcia]: https://github.com/magarcia [@Mairu]: https://github.com/Mairu [@malykhinvi]: https://github.com/malykhinvi [@manovotny]: https://github.com/manovotny @@ -1389,23 +1747,40 @@ for info on changes for earlier releases. [@MatthiasKunnen]: https://github.com/MatthiasKunnen [@mattijsbliek]: https://github.com/mattijsbliek [@Maxim-Mazurok]: https://github.com/Maxim-Mazurok +[@maxkomarychev]: https://github.com/maxkomarychev [@maxmalov]: https://github.com/maxmalov +[@meowtec]: https://github.com/meowtec +[@mgwalker]: https://github.com/mgwalker +[@mhmadhamster]: https://github.com/MhMadHamster [@MikeyBeLike]: https://github.com/MikeyBeLike +[@mpint]: https://github.com/mpint [@mplewis]: https://github.com/mplewis +[@mrmckeb]: https://github.com/mrmckeb +[@msvab]: https://github.com/msvab +[@mx-bernhard]: https://github.com/mx-bernhard +[@Nfinished]: https://github.com/Nfinished [@nickofthyme]: https://github.com/nickofthyme [@nicolashenry]: https://github.com/nicolashenry [@noelebrun]: https://github.com/noelebrun [@ntdb]: https://github.com/ntdb +[@nwalters512]: https://github.com/nwalters512 +[@ombene]: https://github.com/ombene +[@ota-meshi]: https://github.com/ota-meshi +[@OutdatedVersion]: https://github.com/OutdatedVersion [@panrafal]: https://github.com/panrafal [@paztis]: https://github.com/paztis [@pcorpet]: https://github.com/pcorpet +[@Pearce-Ropion]: https://github.com/Pearce-Ropion [@Pessimistress]: https://github.com/Pessimistress [@pmcelhaney]: https://github.com/pmcelhaney [@preco21]: https://github.com/preco21 +[@pri1311]: https://github.com/pri1311 +[@ProdigySim]: https://github.com/ProdigySim [@pzhine]: https://github.com/pzhine [@ramasilveyra]: https://github.com/ramasilveyra [@randallreedjr]: https://github.com/randallreedjr [@redbugz]: https://github.com/redbugz +[@remcohaszing]: https://github.com/remcohaszing [@rfermann]: https://github.com/rfermann [@rhettlivingston]: https://github.com/rhettlivingston [@rhys-vdw]: https://github.com/rhys-vdw @@ -1418,6 +1793,7 @@ for info on changes for earlier releases. [@saschanaz]: https://github.com/saschanaz [@schmidsi]: https://github.com/schmidsi [@schmod]: https://github.com/schmod +[@Schweinepriester]: https://github.com/Schweinepriester [@scottnonnenberg]: https://github.com/scottnonnenberg [@sergei-startsev]: https://github.com/sergei-startsev [@sharmilajesupaul]: https://github.com/sharmilajesupaul @@ -1428,11 +1804,15 @@ for info on changes for earlier releases. [@singles]: https://github.com/singles [@skozin]: https://github.com/skozin [@skyrpex]: https://github.com/skyrpex +[@snewcomer]: https://github.com/snewcomer [@sompylasar]: https://github.com/sompylasar [@soryy708]: https://github.com/soryy708 +[@sosukesuzuki]: https://github.com/sosukesuzuki [@spalger]: https://github.com/spalger [@st-sloth]: https://github.com/st-sloth [@stekycz]: https://github.com/stekycz +[@stenin-nikita]: https://github.com/stenin-nikita +[@stephtr]: https://github.com/stephtr [@straub]: https://github.com/straub [@strawbrary]: https://github.com/strawbrary [@stropho]: https://github.com/stropho @@ -1445,6 +1825,7 @@ for info on changes for earlier releases. [@Taranys]: https://github.com/Taranys [@taye]: https://github.com/taye [@TheCrueltySage]: https://github.com/TheCrueltySage +[@TheJaredWilcurt]: https://github.com/TheJaredWilcurt [@tihonove]: https://github.com/tihonove [@timkraut]: https://github.com/timkraut [@tizmagik]: https://github.com/tizmagik @@ -1458,4 +1839,4 @@ for info on changes for earlier releases. [@wtgtybhertgeghgtwtg]: https://github.com/wtgtybhertgeghgtwtg [@xpl]: https://github.com/xpl [@yordis]: https://github.com/yordis -[@zloirock]: https://github.com/zloirock \ No newline at end of file +[@zloirock]: https://github.com/zloirock diff --git a/node_modules/eslint-plugin-import/CONTRIBUTING.md b/node_modules/eslint-plugin-import/CONTRIBUTING.md index 35a6b14b5..2a79e7139 100644 --- a/node_modules/eslint-plugin-import/CONTRIBUTING.md +++ b/node_modules/eslint-plugin-import/CONTRIBUTING.md @@ -1,15 +1,16 @@ # Contributing -Thanks for your interest in helping out! Here are a **few** _weird_ tricks to -~~cut your mortgage in half~~ maximize the global net efficiency of your efforts! +Thanks for your interest in helping out! Here are a **few** _weird_ tricks to ~~cut your mortgage in half~~ maximize the global net efficiency of your efforts! ## TL;DR: Checklist When opening an [issue](#issues): + - [ ] search open/closed issues - [ ] discuss bug/enhancement in new or old issue [PR](#prs) time: + - [ ] write tests - [ ] implement feature/fix bug - [ ] update docs @@ -17,27 +18,29 @@ When opening an [issue](#issues): Remember, you don't need to do it all yourself; any of these are helpful! 😎 +## How to get started + +If you are new to `eslint`, below are a few resources that will help you to familiarize yourself with the project. + +- Watch [this presentation](https://www.youtube.com/watch?v=2W9tUnALrLg) to learn the fundamental concept of Abstract Syntax Trees (AST) and the way `eslint` works under the hood. +- Familiarize yourself with the [AST explorer](https://astexplorer.net/) tool. Look into rules in `docs/rules`, create patterns in the rules, then analyze its AST. +- Explore the blog posts on how to create a custom rule. [One blog post](https://blog.yonatan.dev/writing-a-custom-eslint-rule-to-spot-undeclared-props/). [Second blog post](https://betterprogramming.pub/creating-custom-eslint-rules-cdc579694608). +- Read the official `eslint` [developer guide](https://eslint.org/docs/latest/developer-guide/architecture/). + ## Issues -### Search open + closed issues for similar cases. +### Search open + closed issues for similar cases - You may find an open issue that closely matches what you are thinking. You - may also find a closed issue with discussion that either solves your problem - or explains why we are unlikely to solve it in the near future. + You may find an open issue that closely matches what you are thinking. You may also find a closed issue with discussion that either solves your problem or explains why we are unlikely to solve it in the near future. - If you find a matching issue that is open, and marked `accepted` and/or `help - wanted`, you might want to [open a PR](#prs). + If you find a matching issue that is open, and marked `accepted` and/or `help wanted`, you might want to [open a PR](#prs). -### Open an issue. +### Open an issue - Let's discuss your issue. Could be as simple as unclear documentation or a - wonky config file. - If you're suggesting a feature, it might exist and need better - documentation, or it might be in process. Even given those, some discussion might - be warranted to ensure the enhancement is clear. + Let's discuss your issue. Could be as simple as unclear documentation or a wonky config file. + If you're suggesting a feature, it might exist and need better documentation, or it might be in process. Even given those, some discussion might be warranted to ensure the enhancement is clear. - You're welcome to jump right to a PR, but without a discussion, can't make any - guarantees about merging. + You're welcome to jump right to a PR, but without a discussion, can't make any guarantees about merging. That said: sometimes seeing the code makes the discussion clearer.😄 @@ -45,72 +48,37 @@ This is a helpful contribution all by itself. Thanks! ## PRs -If you would like to implement something, firstly: thanks! Community contributions -are a magical thing. Like Redux or [the flux capacitor](https://youtu.be/SR5BfQ4rEqQ?t=2m25s), -they make open source possible. +If you would like to implement something, firstly: thanks! Community contributions are a magical thing. Like Redux or [the flux capacitor](https://youtu.be/SR5BfQ4rEqQ?t=2m25s), they make open source possible. **Working on your first Pull Request?** You can learn how from this _free_ series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). Here are some things to keep in mind when working on a PR: -#### Tests +**Trying to update an inactive Pull Request?** +If a PR is open, but unfortunately the author is, for any reason, not available to apply code review fixes or rebase the source branch, then please **do not open a new PR**. +Instead, paste a link to your own branch in the PR, and the maintainers can pull in your changes and update the existing PR in-place. -A PR that is just failing test cases for an existing issue is very helpful, as this -can take as much time (if not more) as it takes to implement a new feature or fix -a bug. +### Tests -If you only have enough time to write tests, fantastic! Submit away. This is a great -jumping-off point for a core contributor or even another PR to continue what you've started. +A PR that is just failing test cases for an existing issue is very helpful, as this can take as much time (if not more) as it takes to implement a new feature or fix a bug. -#### Docs +If you only have enough time to write tests, fantastic! Submit away. This is a great jumping-off point for a core contributor or even another PR to continue what you've started. -For enhancements to rules, please update the docs in `docs/rules` matching the rule -filename from `src/rules`. +### Docs -Also, take a quick look at the rule summary in [README.md] in case it could use tweaking, -or add a line if you've implemented a new rule. +For enhancements to rules, please update the docs in `docs/rules` matching the rule filename from `src/rules` or the rule description in `meta.docs.description`. Running `npm run update:eslint-docs` will update the [README.md] and rule doc header. -Bugfixes may not warrant docs changes, though it's worth skimming the existing -docs to see if there are any relevant caveats that need to be removed. +Bugfixes may not warrant docs changes, though it's worth skimming the existing docs to see if there are any relevant caveats that need to be removed. -#### Changelog +### Changelog -Please add a quick blurb to the [**Unreleased**](./CHANGELOG.md#unreleased) section of the change log. Give yourself -some credit, and please link back to the PR for future reference. This is especially -helpful for resolver changes, as the resolvers are less frequently modified and published. +Please add a quick blurb to the [**Unreleased**](./CHANGELOG.md#unreleased) section of the change log. Give yourself some credit, and please link back to the PR for future reference. This is especially helpful for resolver changes, as the resolvers are less frequently modified and published. -Note also that the change log can't magically link back to Github entities (i.e. PRs, -issues, users) or rules; there are a handful of footnote URL definitions at the bottom. -You may need to add one or more URL if you've square-bracketed any such items. +Note also that the change log can't magically link back to Github entities (i.e. PRs, issues, users) or rules; there are a handful of footnote URL definitions at the bottom. You may need to add one or more URL if you've square-bracketed any such items. ## Code of Conduct -This is not so much a set of guidelines as a reference for what I hope may become -a shared perspective on the project. I hope to write a longer essay to this end -in the future. Comments are welcome, I'd like this to be as clear as possible. - -### Empathy - -People have feelings and perspectives, and people say and believe things for good reasons. - -If you find that you summarily disagree with a perspective stated by someone else, -you likely each have histories that have moved you in opposite directions on a continuum -that probably does not have a "wrong" or "right" end. It may be that you simply -are working toward different goals that require different strategies. Every decision -has pros and cons, and could result in some winners and some losers. It's great to -discuss this so that both are well-known, and realize that even with infinite discussion, -cons and losers will likely never go to zero. - -Also note that we're not doing brain surgery here, so while it's fine if we spend some time -understanding each other, cordial disagreement should not be expensive in the -long run, and we can accept that we will get some things wrong before we get them right (if ever!). - -If we can all get together behind the common goal of embracing empathy, everything else should be able to work itself out. - -#### Attribution - -Thanks for help from http://mozillascience.github.io/working-open-workshop/contributing/ -for inspiration before I wrote this. --ben +Please familiarize yourself with the [Code of Conduct](https://github.com/import-js/.github/blob/main/CODE_OF_CONDUCT.md). [README.md]: ./README.md diff --git a/node_modules/eslint-plugin-import/README.md b/node_modules/eslint-plugin-import/README.md index 964c123a7..5c6f1a321 100644 --- a/node_modules/eslint-plugin-import/README.md +++ b/node_modules/eslint-plugin-import/README.md @@ -1,10 +1,11 @@ # eslint-plugin-import -[![build status](https://travis-ci.org/import-js/eslint-plugin-import.svg?branch=master)](https://travis-ci.org/import-js/eslint-plugin-import) -[![Coverage Status](https://coveralls.io/repos/github/import-js/eslint-plugin-import/badge.svg?branch=master)](https://coveralls.io/github/import-js/eslint-plugin-import?branch=master) -[![win32 build status](https://ci.appveyor.com/api/projects/status/3mw2fifalmjlqf56/branch/master?svg=true)](https://ci.appveyor.com/project/import-js/eslint-plugin-import/branch/master) +[![github actions][actions-image]][actions-url] +[![travis-ci](https://travis-ci.org/import-js/eslint-plugin-import.svg?branch=main)](https://travis-ci.org/import-js/eslint-plugin-import) +[![coverage][codecov-image]][codecov-url] +[![win32 build status](https://ci.appveyor.com/api/projects/status/3mw2fifalmjlqf56/branch/main?svg=true)](https://ci.appveyor.com/project/import-js/eslint-plugin-import/branch/main) [![npm](https://img.shields.io/npm/v/eslint-plugin-import.svg)](https://www.npmjs.com/package/eslint-plugin-import) -[![npm downloads](https://img.shields.io/npm/dt/eslint-plugin-import.svg?maxAge=2592000)](http://www.npmtrends.com/eslint-plugin-import) +[![npm downloads](https://img.shields.io/npm/dt/eslint-plugin-import.svg?maxAge=2592000)](https://www.npmtrends.com/eslint-plugin-import) This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All the goodness that the ES2015+ static module syntax intends to provide, marked up in your editor. @@ -12,107 +13,85 @@ This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, a ## Rules -### Static analysis + -* Ensure imports point to a file/module that can be resolved. ([`no-unresolved`]) -* Ensure named imports correspond to a named export in the remote file. ([`named`]) -* Ensure a default export is present, given a default import. ([`default`]) -* Ensure imported namespaces contain dereferenced properties as they are dereferenced. ([`namespace`]) -* Restrict which files can be imported in a given folder ([`no-restricted-paths`]) -* Forbid import of modules using absolute paths ([`no-absolute-path`]) -* Forbid `require()` calls with expressions ([`no-dynamic-require`]) -* Prevent importing the submodules of other modules ([`no-internal-modules`]) -* Forbid webpack loader syntax in imports ([`no-webpack-loader-syntax`]) -* Forbid a module from importing itself ([`no-self-import`]) -* Forbid a module from importing a module with a dependency path back to itself ([`no-cycle`]) -* Prevent unnecessary path segments in import and require statements ([`no-useless-path-segments`]) -* Forbid importing modules from parent directories ([`no-relative-parent-imports`]) -* Prevent importing packages through relative paths ([`no-relative-packages`]) - -[`no-unresolved`]: ./docs/rules/no-unresolved.md -[`named`]: ./docs/rules/named.md -[`default`]: ./docs/rules/default.md -[`namespace`]: ./docs/rules/namespace.md -[`no-restricted-paths`]: ./docs/rules/no-restricted-paths.md -[`no-absolute-path`]: ./docs/rules/no-absolute-path.md -[`no-dynamic-require`]: ./docs/rules/no-dynamic-require.md -[`no-internal-modules`]: ./docs/rules/no-internal-modules.md -[`no-webpack-loader-syntax`]: ./docs/rules/no-webpack-loader-syntax.md -[`no-self-import`]: ./docs/rules/no-self-import.md -[`no-cycle`]: ./docs/rules/no-cycle.md -[`no-useless-path-segments`]: ./docs/rules/no-useless-path-segments.md -[`no-relative-parent-imports`]: ./docs/rules/no-relative-parent-imports.md -[`no-relative-packages`]: ./docs/rules/no-relative-packages.md +💼 Configurations enabled in.\ +⚠️ Configurations set to warn in.\ +🚫 Configurations disabled in.\ +❗ Set in the `errors` configuration.\ +☑️ Set in the `recommended` configuration.\ +⌨️ Set in the `typescript` configuration.\ +🚸 Set in the `warnings` configuration.\ +🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\ +💡 Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).\ +❌ Deprecated. ### Helpful warnings - -* Report any invalid exports, i.e. re-export of the same name ([`export`]) -* Report use of exported name as identifier of default export ([`no-named-as-default`]) -* Report use of exported name as property of default export ([`no-named-as-default-member`]) -* Report imported names marked with `@deprecated` documentation tag ([`no-deprecated`]) -* Forbid the use of extraneous packages ([`no-extraneous-dependencies`]) -* Forbid the use of mutable exports with `var` or `let`. ([`no-mutable-exports`]) -* Report modules without exports, or exports without matching import in another module ([`no-unused-modules`]) - -[`export`]: ./docs/rules/export.md -[`no-named-as-default`]: ./docs/rules/no-named-as-default.md -[`no-named-as-default-member`]: ./docs/rules/no-named-as-default-member.md -[`no-deprecated`]: ./docs/rules/no-deprecated.md -[`no-extraneous-dependencies`]: ./docs/rules/no-extraneous-dependencies.md -[`no-mutable-exports`]: ./docs/rules/no-mutable-exports.md -[`no-unused-modules`]: ./docs/rules/no-unused-modules.md +| Name                       | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ | +| :--------------------------------------------------------------------- | :------------------------------------------------------------------------------------ | :--- | :---- | :- | :- | :- | :- | +| [export](docs/rules/export.md) | Forbid any invalid exports, i.e. re-export of the same name. | ❗ ☑️ | | | | | | +| [no-deprecated](docs/rules/no-deprecated.md) | Forbid imported names marked with `@deprecated` documentation tag. | | | | | | | +| [no-empty-named-blocks](docs/rules/no-empty-named-blocks.md) | Forbid empty named import blocks. | | | | 🔧 | 💡 | | +| [no-extraneous-dependencies](docs/rules/no-extraneous-dependencies.md) | Forbid the use of extraneous packages. | | | | | | | +| [no-mutable-exports](docs/rules/no-mutable-exports.md) | Forbid the use of mutable exports with `var` or `let`. | | | | | | | +| [no-named-as-default](docs/rules/no-named-as-default.md) | Forbid use of exported name as identifier of default export. | | ☑️ 🚸 | | | | | +| [no-named-as-default-member](docs/rules/no-named-as-default-member.md) | Forbid use of exported name as property of default export. | | ☑️ 🚸 | | | | | +| [no-unused-modules](docs/rules/no-unused-modules.md) | Forbid modules without exports, or exports without matching import in another module. | | | | | | | ### Module systems -* Report potentially ambiguous parse goal (`script` vs. `module`) ([`unambiguous`]) -* Report CommonJS `require` calls and `module.exports` or `exports.*`. ([`no-commonjs`]) -* Report AMD `require` and `define` calls. ([`no-amd`]) -* No Node.js builtin modules. ([`no-nodejs-modules`]) -* Forbid imports with CommonJS exports ([`no-import-module-exports`]) +| Name                     | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ | +| :----------------------------------------------------------------- | :------------------------------------------------------------------- | :- | :- | :- | :- | :- | :- | +| [no-amd](docs/rules/no-amd.md) | Forbid AMD `require` and `define` calls. | | | | | | | +| [no-commonjs](docs/rules/no-commonjs.md) | Forbid CommonJS `require` calls and `module.exports` or `exports.*`. | | | | | | | +| [no-import-module-exports](docs/rules/no-import-module-exports.md) | Forbid import statements with CommonJS module.exports. | | | | 🔧 | | | +| [no-nodejs-modules](docs/rules/no-nodejs-modules.md) | Forbid Node.js builtin modules. | | | | | | | +| [unambiguous](docs/rules/unambiguous.md) | Forbid potentially ambiguous parse goal (`script` vs. `module`). | | | | | | | -[`unambiguous`]: ./docs/rules/unambiguous.md -[`no-commonjs`]: ./docs/rules/no-commonjs.md -[`no-amd`]: ./docs/rules/no-amd.md -[`no-nodejs-modules`]: ./docs/rules/no-nodejs-modules.md -[`no-import-module-exports`]: ./docs/rules/no-import-module-exports.md +### Static analysis +| Name                       | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ | +| :--------------------------------------------------------------------- | :----------------------------------------------------------------------------------- | :--- | :- | :- | :- | :- | :- | +| [default](docs/rules/default.md) | Ensure a default export is present, given a default import. | ❗ ☑️ | | | | | | +| [named](docs/rules/named.md) | Ensure named imports correspond to a named export in the remote file. | ❗ ☑️ | | ⌨️ | | | | +| [namespace](docs/rules/namespace.md) | Ensure imported namespaces contain dereferenced properties as they are dereferenced. | ❗ ☑️ | | | | | | +| [no-absolute-path](docs/rules/no-absolute-path.md) | Forbid import of modules using absolute paths. | | | | 🔧 | | | +| [no-cycle](docs/rules/no-cycle.md) | Forbid a module from importing a module with a dependency path back to itself. | | | | | | | +| [no-dynamic-require](docs/rules/no-dynamic-require.md) | Forbid `require()` calls with expressions. | | | | | | | +| [no-internal-modules](docs/rules/no-internal-modules.md) | Forbid importing the submodules of other modules. | | | | | | | +| [no-relative-packages](docs/rules/no-relative-packages.md) | Forbid importing packages through relative paths. | | | | 🔧 | | | +| [no-relative-parent-imports](docs/rules/no-relative-parent-imports.md) | Forbid importing modules from parent directories. | | | | | | | +| [no-restricted-paths](docs/rules/no-restricted-paths.md) | Enforce which files can be imported in a given folder. | | | | | | | +| [no-self-import](docs/rules/no-self-import.md) | Forbid a module from importing itself. | | | | | | | +| [no-unresolved](docs/rules/no-unresolved.md) | Ensure imports point to a file/module that can be resolved. | ❗ ☑️ | | | | | | +| [no-useless-path-segments](docs/rules/no-useless-path-segments.md) | Forbid unnecessary path segments in import and require statements. | | | | 🔧 | | | +| [no-webpack-loader-syntax](docs/rules/no-webpack-loader-syntax.md) | Forbid webpack loader syntax in imports. | | | | | | | ### Style guide -* Ensure all imports appear before other statements ([`first`]) -* Ensure all exports appear after other statements ([`exports-last`]) -* Report repeated import of the same module in multiple places ([`no-duplicates`]) -* Forbid namespace (a.k.a. "wildcard" `*`) imports ([`no-namespace`]) -* Ensure consistent use of file extension within the import path ([`extensions`]) -* Enforce a convention in module import order ([`order`]) -* Enforce a newline after import statements ([`newline-after-import`]) -* Prefer a default export if module exports a single name ([`prefer-default-export`]) -* Limit the maximum number of dependencies a module can have ([`max-dependencies`]) -* Forbid unassigned imports ([`no-unassigned-import`]) -* Forbid named default exports ([`no-named-default`]) -* Forbid default exports ([`no-default-export`]) -* Forbid named exports ([`no-named-export`]) -* Forbid anonymous values as default exports ([`no-anonymous-default-export`]) -* Prefer named exports to be grouped together in a single export declaration ([`group-exports`]) -* Enforce a leading comment with the webpackChunkName for dynamic imports ([`dynamic-import-chunkname`]) - -[`first`]: ./docs/rules/first.md -[`exports-last`]: ./docs/rules/exports-last.md -[`no-duplicates`]: ./docs/rules/no-duplicates.md -[`no-namespace`]: ./docs/rules/no-namespace.md -[`extensions`]: ./docs/rules/extensions.md -[`order`]: ./docs/rules/order.md -[`newline-after-import`]: ./docs/rules/newline-after-import.md -[`prefer-default-export`]: ./docs/rules/prefer-default-export.md -[`max-dependencies`]: ./docs/rules/max-dependencies.md -[`no-unassigned-import`]: ./docs/rules/no-unassigned-import.md -[`no-named-default`]: ./docs/rules/no-named-default.md -[`no-anonymous-default-export`]: ./docs/rules/no-anonymous-default-export.md -[`group-exports`]: ./docs/rules/group-exports.md -[`no-default-export`]: ./docs/rules/no-default-export.md -[`no-named-export`]: ./docs/rules/no-named-export.md -[`dynamic-import-chunkname`]: ./docs/rules/dynamic-import-chunkname.md +| Name                            | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ | +| :------------------------------------------------------------------------------- | :------------------------------------------------------------------------- | :- | :---- | :- | :- | :- | :- | +| [consistent-type-specifier-style](docs/rules/consistent-type-specifier-style.md) | Enforce or ban the use of inline type-only markers for named imports. | | | | 🔧 | | | +| [dynamic-import-chunkname](docs/rules/dynamic-import-chunkname.md) | Enforce a leading comment with the webpackChunkName for dynamic imports. | | | | | | | +| [exports-last](docs/rules/exports-last.md) | Ensure all exports appear after other statements. | | | | | | | +| [extensions](docs/rules/extensions.md) | Ensure consistent use of file extension within the import path. | | | | | | | +| [first](docs/rules/first.md) | Ensure all imports appear before other statements. | | | | 🔧 | | | +| [group-exports](docs/rules/group-exports.md) | Prefer named exports to be grouped together in a single export declaration | | | | | | | +| [imports-first](docs/rules/imports-first.md) | Replaced by `import/first`. | | | | 🔧 | | ❌ | +| [max-dependencies](docs/rules/max-dependencies.md) | Enforce the maximum number of dependencies a module can have. | | | | | | | +| [newline-after-import](docs/rules/newline-after-import.md) | Enforce a newline after import statements. | | | | 🔧 | | | +| [no-anonymous-default-export](docs/rules/no-anonymous-default-export.md) | Forbid anonymous values as default exports. | | | | | | | +| [no-default-export](docs/rules/no-default-export.md) | Forbid default exports. | | | | | | | +| [no-duplicates](docs/rules/no-duplicates.md) | Forbid repeated import of the same module in multiple places. | | ☑️ 🚸 | | 🔧 | | | +| [no-named-default](docs/rules/no-named-default.md) | Forbid named default exports. | | | | | | | +| [no-named-export](docs/rules/no-named-export.md) | Forbid named exports. | | | | | | | +| [no-namespace](docs/rules/no-namespace.md) | Forbid namespace (a.k.a. "wildcard" `*`) imports. | | | | 🔧 | | | +| [no-unassigned-import](docs/rules/no-unassigned-import.md) | Forbid unassigned imports | | | | | | | +| [order](docs/rules/order.md) | Enforce a convention in module import order. | | | | 🔧 | | | +| [prefer-default-export](docs/rules/prefer-default-export.md) | Prefer a default export if module exports a single name or multiple names. | | | | | | | + + ## `eslint-plugin-import` for enterprise @@ -122,12 +101,6 @@ The maintainers of `eslint-plugin-import` and thousands of other packages are wo ## Installation -```sh -npm install eslint-plugin-import -g -``` - -or if you manage ESLint as a dev dependency: - ```sh # inside your project's working tree npm install eslint-plugin-import --save-dev @@ -160,18 +133,26 @@ rules: # TypeScript -You may use the following shortcut or assemble your own config using the granular settings described below. +You may use the following snippet or assemble your own config using the granular settings described below it. -Make sure you have installed [`@typescript-eslint/parser`] which is used in the following configuration. Unfortunately NPM does not allow to list optional peer dependencies. +Make sure you have installed [`@typescript-eslint/parser`] and [`eslint-import-resolver-typescript`] which are used in the following configuration. ```yaml extends: - eslint:recommended - plugin:import/recommended - - plugin:import/typescript # this line does the trick +# the following lines do the trick + - plugin:import/typescript +settings: + import/resolver: + # You will also need to install and configure the TypeScript resolver + # See also https://github.com/import-js/eslint-import-resolver-typescript#configuration + typescript: true + node: true ``` -[`@typescript-eslint/parser`]: https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser +[`@typescript-eslint/parser`]: https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser +[`eslint-import-resolver-typescript`]: https://github.com/import-js/eslint-import-resolver-typescript # Resolvers @@ -202,6 +183,7 @@ settings: # uses 'eslint-import-resolver-foo': import/resolver: foo ``` + ```js // .eslintrc.js module.exports = { @@ -220,6 +202,7 @@ module.exports = { settings: import/resolver: 'my-awesome-npm-module' ``` + ```js // .eslintrc.js module.exports = { @@ -247,27 +230,28 @@ module.exports = { Relative paths will be resolved relative to the source's nearest `package.json` or the process's current working directory if no `package.json` is found. - - If you are interesting in writing a resolver, see the [spec](./resolvers/README.md) for more details. [`resolve`]: https://www.npmjs.com/package/resolve -[`externals`]: http://webpack.github.io/docs/library-and-externals.html +[`externals`]: https://webpack.github.io/docs/library-and-externals.html [Node]: https://www.npmjs.com/package/eslint-import-resolver-node [webpack]: https://www.npmjs.com/package/eslint-import-resolver-webpack -# Settings +## Settings You may set the following settings in your `.eslintrc`: -#### `import/extensions` +### `import/extensions` A list of file extensions that will be parsed as modules and inspected for `export`s. This defaults to `['.js']`, unless you are using the `react` shared config, -in which case it is specified as `['.js', '.jsx']`. +in which case it is specified as `['.js', '.jsx']`. Despite the default, +if you are using TypeScript (without the `plugin:import/typescript` config +described above) you must specify the new extensions (`.ts`, and also `.tsx` +if using React). ```js "settings": { @@ -299,7 +283,7 @@ factor into the `no-unresolved` rule. Also, the following `import/ignore` patterns will overrule this list. -#### `import/ignore` +### `import/ignore` A list of regex strings that, if matched by a path, will not report the matching module if no `export`s are found. @@ -315,7 +299,7 @@ settings: - \.(scss|less|css)$ # can't parse unprocessed CSS modules, either ``` -#### `import/core-modules` +### `import/core-modules` An array of additional modules to consider as "core" modules--modules that should be considered resolved but have no path on the filesystem. Your resolver may @@ -342,7 +326,7 @@ that specifies this for you. Contribution of more such shared configs for other platforms are welcome! -#### `import/external-module-folders` +### `import/external-module-folders` An array of folders. Resolved modules only from those folders will be considered as "external". By default - `["node_modules"]`. Makes sense if you have configured your path or webpack to handle your internal paths differently and want to consider modules from some folders, for example `bower_components` or `jspm_modules`, as "external". @@ -360,7 +344,7 @@ Each item in this array is either a folder's name, its subpath, or its absolute Please note that incomplete names are not allowed here so `components` won't match `bower_components` and `packages/ui` won't match `packages/ui-utils` (but will match `packages/ui/utils`). -#### `import/parsers` +### `import/parsers` A map from parsers to file extension arrays. If a file extension is matched, the dependency parser will require and use the map key as the parser instead of the @@ -387,12 +371,11 @@ depending on how far down the rabbit hole goes. Submit an issue if you find stra behavior beyond here, but steel your heart against the likely outcome of closing with `wontfix`. - -#### `import/resolver` +### `import/resolver` See [resolvers](#resolvers). -#### `import/cache` +### `import/cache` Settings for cache behavior. Memoization is used at various levels to avoid the copious amount of `fs.statSync`/module parse calls required to correctly report errors. @@ -421,7 +404,7 @@ settings: [`eslint_d`]: https://www.npmjs.com/package/eslint_d [`eslint-loader`]: https://www.npmjs.com/package/eslint-loader -#### `import/internal-regex` +### `import/internal-regex` A regex for packages should be treated as internal. Useful when you are utilizing a monorepo setup or developing a set of packages that depend on each other. @@ -435,7 +418,6 @@ settings: import/internal-regex: ^@scope/ ``` - ## SublimeLinter-eslint SublimeLinter-eslint introduced a change to support `.eslintignore` files @@ -479,7 +461,7 @@ The purpose of the `chdir` setting, in this case, is to set the working director from which ESLint is executed to be the same as the directory on which SublimeLinter-eslint bases the relative path it provides. -See the SublimeLinter docs on [`chdir`](http://www.sublimelinter.com/en/latest/linter_settings.html#chdir) +See the SublimeLinter docs on [`chdir`](https://www.sublimelinter.com/en/latest/linter_settings.html#chdir) for more information, in case this does not work with your project. If you are not using `.eslintignore`, or don't have a Sublime project file, you can also @@ -500,6 +482,7 @@ I also found that I needed to set `rc_search_limit` to `null`, which removes the hierarchy search limit when looking up the directory tree for `.sublimelinterrc`: In Package Settings / SublimeLinter / User Settings: + ```json { "user": { @@ -510,3 +493,8 @@ In Package Settings / SublimeLinter / User Settings: I believe this defaults to `3`, so you may not need to alter it depending on your project folder max depth. + +[codecov-image]: https://codecov.io/gh/import-js/eslint-plugin-import/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/import-js/eslint-plugin-import/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/import-js/eslint-plugin-import +[actions-url]: https://github.com/import-js/eslint-plugin-import diff --git a/node_modules/eslint-plugin-import/RELEASE.md b/node_modules/eslint-plugin-import/RELEASE.md index 34ef1aadc..6c048dc09 100644 --- a/node_modules/eslint-plugin-import/RELEASE.md +++ b/node_modules/eslint-plugin-import/RELEASE.md @@ -1,9 +1,9 @@ # Release steps -1. create a `release-[x.y.z]` branch from tip of `master` (or whatever release commit) +1. create a `release-[x.y.z]` branch from tip of `main` (or whatever release commit) ```bash - git checkout master && git pull && git checkout -b release-2.1.0 + git checkout main && git pull && git checkout -b release-2.1.0 ``` 2. bump `package.json` + update CHANGELOG version links for all releasing packages (i.e., root + any resolvers) @@ -49,6 +49,6 @@ 7. merge `release-[x.y.z]` into `release` ( - ideally fast-forward, probably with Git CLI instead of Github -8. merge `release` into `master` +8. merge `release` into `main` Done! diff --git a/node_modules/eslint-plugin-import/config/typescript.js b/node_modules/eslint-plugin-import/config/typescript.js index 01b59f06b..ed03fb3f6 100644 --- a/node_modules/eslint-plugin-import/config/typescript.js +++ b/node_modules/eslint-plugin-import/config/typescript.js @@ -2,7 +2,10 @@ * Adds `.jsx`, `.ts` and `.tsx` as an extension, and enables JSX/TSX parsing. */ -const allExtensions = ['.ts', '.tsx', '.d.ts', '.js', '.jsx']; +// Omit `.d.ts` because 1) TypeScript compilation already confirms that +// types are resolved, and 2) it would mask an unresolved +// `.ts`/`.tsx`/`.js`/`.jsx` implementation. +const allExtensions = ['.ts', '.tsx', '.js', '.jsx']; module.exports = { @@ -10,7 +13,7 @@ module.exports = { 'import/extensions': allExtensions, 'import/external-module-folders': ['node_modules', 'node_modules/@types'], 'import/parsers': { - '@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts'], + '@typescript-eslint/parser': ['.ts', '.tsx'], }, 'import/resolver': { 'node': { diff --git a/node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md b/node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md new file mode 100644 index 000000000..54c09049e --- /dev/null +++ b/node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md @@ -0,0 +1,91 @@ +# import/consistent-type-specifier-style + +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +In both Flow and TypeScript you can mark an import as a type-only import by adding a "kind" marker to the import. Both languages support two positions for marker. + +**At the top-level** which marks all names in the import as type-only and applies to named, default, and namespace (for TypeScript) specifiers: + +```ts +import type Foo from 'Foo'; +import type {Bar} from 'Bar'; +// ts only +import type * as Bam from 'Bam'; +// flow only +import typeof Baz from 'Baz'; +``` + +**Inline** with to the named import, which marks just the specific name in the import as type-only. An inline specifier is only valid for named specifiers, and not for default or namespace specifiers: + +```ts +import {type Foo} from 'Foo'; +// flow only +import {typeof Bar} from 'Bar'; +``` + +## Rule Details + +This rule either enforces or bans the use of inline type-only markers for named imports. + +This rule includes a fixer that will automatically convert your specifiers to the correct form - however the fixer will not respect your preferences around de-duplicating imports. If this is important to you, consider using the [`import/no-duplicates`] rule. + +[`import/no-duplicates`]: ./no-duplicates.md + +## Options + +The rule accepts a single string option which may be one of: + +- `'prefer-inline'` - enforces that named type-only specifiers are only ever written with an inline marker; and never as part of a top-level, type-only import. +- `'prefer-top-level'` - enforces that named type-only specifiers only ever written as part of a top-level, type-only import; and never with an inline marker. + +By default the rule will use the `prefer-inline` option. + +## Examples + +### `prefer-top-level` + +❌ Invalid with `["error", "prefer-top-level"]` + +```ts +import {type Foo} from 'Foo'; +import Foo, {type Bar} from 'Foo'; +// flow only +import {typeof Foo} from 'Foo'; +``` + +✅ Valid with `["error", "prefer-top-level"]` + +```ts +import type {Foo} from 'Foo'; +import type Foo, {Bar} from 'Foo'; +// flow only +import typeof {Foo} from 'Foo'; +``` + +### `prefer-inline` + +❌ Invalid with `["error", "prefer-inline"]` + +```ts +import type {Foo} from 'Foo'; +import type Foo, {Bar} from 'Foo'; +// flow only +import typeof {Foo} from 'Foo'; +``` + +✅ Valid with `["error", "prefer-inline"]` + +```ts +import {type Foo} from 'Foo'; +import Foo, {type Bar} from 'Foo'; +// flow only +import {typeof Foo} from 'Foo'; +``` + +## When Not To Use It + +If you aren't using Flow or TypeScript 4.5+, then this rule does not apply and need not be used. + +If you don't care about, and don't want to standardize how named specifiers are imported then you should not use this rule. diff --git a/node_modules/eslint-plugin-import/docs/rules/default.md b/node_modules/eslint-plugin-import/docs/rules/default.md index f69934468..ffbbdc166 100644 --- a/node_modules/eslint-plugin-import/docs/rules/default.md +++ b/node_modules/eslint-plugin-import/docs/rules/default.md @@ -1,5 +1,9 @@ # import/default +💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`. + + + If a default import is requested, this rule will report if there is no default export in the imported module. diff --git a/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md b/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md index d29c06bba..472a36648 100644 --- a/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md +++ b/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md @@ -1,4 +1,6 @@ -# dynamic imports require a leading comment with a webpackChunkName (dynamic-import-chunkname) +# import/dynamic-import-chunkname + + This rule reports any dynamic imports without a webpackChunkName specified in a leading block comment in the proper format. diff --git a/node_modules/eslint-plugin-import/docs/rules/export.md b/node_modules/eslint-plugin-import/docs/rules/export.md index e99882be8..115d2d8b2 100644 --- a/node_modules/eslint-plugin-import/docs/rules/export.md +++ b/node_modules/eslint-plugin-import/docs/rules/export.md @@ -1,5 +1,9 @@ # import/export +💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`. + + + Reports funny business with exports, like repeated exports of names or defaults. ## Rule Details diff --git a/node_modules/eslint-plugin-import/docs/rules/exports-last.md b/node_modules/eslint-plugin-import/docs/rules/exports-last.md index 291daee48..6b3e4bac4 100644 --- a/node_modules/eslint-plugin-import/docs/rules/exports-last.md +++ b/node_modules/eslint-plugin-import/docs/rules/exports-last.md @@ -1,5 +1,7 @@ # import/exports-last + + This rule enforces that all exports are declared at the bottom of the file. This rule will report any export declarations that comes before any non-export statements. diff --git a/node_modules/eslint-plugin-import/docs/rules/extensions.md b/node_modules/eslint-plugin-import/docs/rules/extensions.md index bf29dbe5f..9e78b8c70 100644 --- a/node_modules/eslint-plugin-import/docs/rules/extensions.md +++ b/node_modules/eslint-plugin-import/docs/rules/extensions.md @@ -1,4 +1,6 @@ -# import/extensions - Ensure consistent use of file extension within the import path +# import/extensions + + Some file resolve algorithms allow you to omit the file extension within the import source path. For example the `node` resolver can resolve `./foo/bar` to the absolute path `/User/someone/foo/bar.js` because the `.js` extension is resolved automatically by default. Depending on the resolver you can configure more extensions to get resolved automatically. @@ -37,6 +39,7 @@ By providing both a string and an object, the string will set the default settin For example, `["error", "never", { "svg": "always" }]` would require that all extensions are omitted, except for "svg". `ignorePackages` can be set as a separate boolean option like this: + ``` "import/extensions": [ , @@ -49,10 +52,10 @@ For example, `["error", "never", { "svg": "always" }]` would require that all ex } ] ``` + In that case, if you still want to specify extensions, you can do so inside the **pattern** property. Default value of `ignorePackages` is `false`. - ### Exception When disallowing the use of certain extensions this rule makes an exception and allows the use of extension when the file would not be resolvable without extension. @@ -109,6 +112,8 @@ import foo from './foo'; import bar from './bar'; import Component from './Component'; + +import foo from '@/foo'; ``` The following patterns are not considered problems when configuration set to "always": @@ -121,6 +126,8 @@ import bar from './bar.json'; import Component from './Component.jsx'; import * as path from 'path'; + +import foo from '@/foo.js'; ``` The following patterns are considered problems when configuration set to "ignorePackages": @@ -145,6 +152,7 @@ import Component from './Component.jsx'; import express from 'express'; +import foo from '@/foo' ``` The following patterns are not considered problems when configuration set to `['error', 'always', {ignorePackages: true} ]`: @@ -156,6 +164,7 @@ import baz from 'foo/baz.js'; import express from 'express'; +import foo from '@/foo'; ``` ## When Not To Use It diff --git a/node_modules/eslint-plugin-import/docs/rules/first.md b/node_modules/eslint-plugin-import/docs/rules/first.md index cc19003be..21904e2fa 100644 --- a/node_modules/eslint-plugin-import/docs/rules/first.md +++ b/node_modules/eslint-plugin-import/docs/rules/first.md @@ -1,5 +1,9 @@ # import/first +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + This rule reports any imports that come after non-import statements. @@ -45,7 +49,7 @@ A directive in this case is assumed to be a single statement that contains only a literal string-valued expression. `'use strict'` would be a good example, except that [modules are always in strict -mode](http://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code) so it would be surprising to see a `'use strict'` sharing a file with `import`s and +mode](https://262.ecma-international.org/6.0/#sec-strict-mode-code) so it would be surprising to see a `'use strict'` sharing a file with `import`s and `export`s. Given that, see [#255] for the reasoning. diff --git a/node_modules/eslint-plugin-import/docs/rules/group-exports.md b/node_modules/eslint-plugin-import/docs/rules/group-exports.md index e6b9887b2..c5a23cd21 100644 --- a/node_modules/eslint-plugin-import/docs/rules/group-exports.md +++ b/node_modules/eslint-plugin-import/docs/rules/group-exports.md @@ -1,5 +1,7 @@ # import/group-exports + + Reports when named exports are not grouped together in a single `export` declaration or when multiple assignments to CommonJS `module.exports` or `exports` object are present in a single file. **Rationale:** An `export` declaration or `module.exports` assignment can appear anywhere in the code. By requiring a single export declaration all your exports will remain at one place, making it easier to see what exports a module provides. diff --git a/node_modules/eslint-plugin-import/docs/rules/imports-first.md b/node_modules/eslint-plugin-import/docs/rules/imports-first.md index e4cdda115..278e4c472 100644 --- a/node_modules/eslint-plugin-import/docs/rules/imports-first.md +++ b/node_modules/eslint-plugin-import/docs/rules/imports-first.md @@ -1,3 +1,9 @@ -# imports-first +# import/imports-first -This rule was **deprecated** in eslint-plugin-import v2.0.0. Please use the corresponding rule [`first`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/first.md). +❌ This rule is deprecated. + +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + +This rule was **deprecated** in eslint-plugin-import v2.0.0. Please use the corresponding rule [`first`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/first.md). diff --git a/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md b/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md index 20d29cf0e..1da74f681 100644 --- a/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md +++ b/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md @@ -1,25 +1,27 @@ # import/max-dependencies + + Forbid modules to have too many dependencies (`import` or `require` statements). This is a useful rule because a module with too many dependencies is a code smell, and usually indicates the module is doing too much and/or should be broken up into smaller modules. Importing multiple named exports from a single module will only count once (e.g. `import {x, y, z} from './foo'` will only count as a single dependency). -### Options - -This rule takes the following option: +## Options -`max`: The maximum number of dependencies allowed. Anything over will trigger the rule. **Default is 10** if the rule is enabled and no `max` is specified. - -You can set the option like this: +This rule has the following options, with these defaults: ```js -"import/max-dependencies": ["error", {"max": 10}] +"import/max-dependencies": ["error", { + "max": 10, + "ignoreTypeImports": false, +}] ``` +### `max` -## Example +This option sets the maximum number of dependencies allowed. Anything over will trigger the rule. **Default is 10** if the rule is enabled and no `max` is specified. Given a max value of `{"max": 2}`: @@ -39,6 +41,28 @@ const anotherA = require('./a'); // still 1 import {x, y, z} from './foo'; // 2 ``` +### `ignoreTypeImports` + +Ignores `type` imports. Type imports are a feature released in TypeScript 3.8, you can [read more here](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export). Defaults to `false`. + +Given `{"max": 2, "ignoreTypeImports": true}`: + +### Fail + +```ts +import a from './a'; +import b from './b'; +import c from './c'; +``` + +### Pass + +```ts +import a from './a'; +import b from './b'; +import type c from './c'; // Doesn't count against max +``` + ## When Not To Use It If you don't care how many dependencies a module has. diff --git a/node_modules/eslint-plugin-import/docs/rules/named.md b/node_modules/eslint-plugin-import/docs/rules/named.md index 0f697cc25..6d376defa 100644 --- a/node_modules/eslint-plugin-import/docs/rules/named.md +++ b/node_modules/eslint-plugin-import/docs/rules/named.md @@ -1,5 +1,9 @@ # import/named +💼🚫 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`. This rule is _disabled_ in the ⌨️ `typescript` config. + + + Verifies that all named imports are part of the set of named exports in the referenced module. For `export`, verifies that all named exports exist in the referenced module. diff --git a/node_modules/eslint-plugin-import/docs/rules/namespace.md b/node_modules/eslint-plugin-import/docs/rules/namespace.md index 4bbbd378e..5ac25b750 100644 --- a/node_modules/eslint-plugin-import/docs/rules/namespace.md +++ b/node_modules/eslint-plugin-import/docs/rules/namespace.md @@ -1,5 +1,9 @@ # import/namespace +💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`. + + + Enforces names exist at the time they are dereferenced, when imported as a full namespace (i.e. `import * as foo from './foo'; foo.bar();` will report if `bar` is not exported by `./foo`.). Will report at the import declaration if there are _no_ exported names found. diff --git a/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md b/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md index 4883776c9..ed0a5b678 100644 --- a/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md +++ b/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md @@ -1,11 +1,18 @@ # import/newline-after-import +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + Enforces having one or more empty lines after the last top-level import statement or require call. +(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule. ## Rule Details -This rule has one option, `count` which sets the number of newlines that are enforced after the last top-level import statement or require call. This option defaults to `1`. +This rule supports the following options: +- `count` which sets the number of newlines that are enforced after the last top-level import statement or require call. This option defaults to `1`. + +- `considerComments` which enforces the rule on comments after the last import-statement as well when set to true. This option defaults to `false`. Valid: @@ -71,6 +78,30 @@ import defaultExport from './foo' const FOO = 'BAR' ``` +With `considerComments` set to `false` this will be considered valid: + +```js +import defaultExport from './foo' +// some comment here. +const FOO = 'BAR' +``` + +With `considerComments` set to `true` this will be considered valid: + +```js +import defaultExport from './foo' + +// some comment here. +const FOO = 'BAR' +``` + +With `considerComments` set to `true` this will be considered invalid: + +```js +import defaultExport from './foo' +// some comment here. +const FOO = 'BAR' +``` ## Example options usage ```json diff --git a/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md b/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md index 305e8e605..a796f9d57 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md @@ -1,7 +1,13 @@ -# import/no-absolute-path: Forbid import of modules using absolute paths +# import/no-absolute-path + +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + Node.js allows the import of modules using an absolute path such as `/home/xyz/file.js`. That is a bad practice as it ties the code using it to your computer, and therefore makes it unusable in packages distributed on `npm` for instance. +This rule forbids the import of modules using absolute paths. + ## Rule Details ### Fail diff --git a/node_modules/eslint-plugin-import/docs/rules/no-amd.md b/node_modules/eslint-plugin-import/docs/rules/no-amd.md index f7146c134..155c19b3c 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-amd.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-amd.md @@ -1,5 +1,7 @@ # import/no-amd + + Reports `require([array], ...)` and `define([array], ...)` function calls at the module scope. Will not report if !=2 arguments, or first argument is not a literal array. diff --git a/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md b/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md index c8db89790..d3c88f94e 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md @@ -1,5 +1,7 @@ # import/no-anonymous-default-export + + Reports if a module's default export is unnamed. This includes several types of unnamed data types; literals, object expressions, arrays, anonymous functions, arrow functions, and anonymous class declarations. Ensuring that default exports are named helps improve the grepability of the codebase by encouraging the re-use of the same identifier for the module's default export at its declaration site and at its import sites. @@ -17,6 +19,7 @@ The complete default configuration looks like this. "allowAnonymousClass": false, "allowAnonymousFunction": false, "allowCallExpression": true, // The true value here is for backward compatibility + "allowNew": false, "allowLiteral": false, "allowObject": false }] @@ -40,6 +43,8 @@ export default foo(bar) export default 123 export default {} + +export default new Foo() ``` ### Pass @@ -70,4 +75,7 @@ export default 123 /* eslint import/no-anonymous-default-export: [2, {"allowObject": true}] */ export default {} + +/* eslint import/no-anonymous-default-export: [2, {"allowNew": true}] */ +export default new Foo() ``` diff --git a/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md b/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md index 7be4bb399..09a6b4401 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md @@ -1,5 +1,7 @@ # import/no-commonjs + + Reports `require([string])` function calls. Will not report if >1 argument, or single argument is not a literal string. diff --git a/node_modules/eslint-plugin-import/docs/rules/no-cycle.md b/node_modules/eslint-plugin-import/docs/rules/no-cycle.md index 7f1b4255a..6635ba73f 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-cycle.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-cycle.md @@ -1,5 +1,7 @@ # import/no-cycle + + Ensures that there is no resolvable path back to this module via its dependencies. This includes cycles of depth 1 (imported module imports me) to `"∞"` (or `Infinity`), if the @@ -20,6 +22,8 @@ import { b } from './dep-b.js' // reported: Dependency cycle detected. This rule does _not_ detect imports that resolve directly to the linted module; for that, see [`no-self-import`]. +This rule ignores type-only imports in Flow and TypeScript syntax (`import type` and `import typeof`), which have no runtime effect. + ## Rule Details @@ -75,6 +79,22 @@ import { a } from './dep-a.js' // not reported as this module is external Its value is `false` by default, but can be set to `true` for reducing total project lint time, if needed. +#### `allowUnsafeDynamicCyclicDependency` + +This option disable reporting of errors if a cycle is detected with at least one dynamic import. + +```js +// bar.js +import { foo } from './foo'; +export const bar = foo; + +// foo.js +export const foo = 'Foo'; +export function getBar() { return import('./bar'); } +``` + +> Cyclic dependency are **always** a dangerous anti-pattern as discussed extensively in [#2265](https://github.com/import-js/eslint-plugin-import/issues/2265). Please be extra careful about using this option. + ## When Not To Use It This rule is comparatively computationally expensive. If you are pressed for lint diff --git a/node_modules/eslint-plugin-import/docs/rules/no-default-export.md b/node_modules/eslint-plugin-import/docs/rules/no-default-export.md index 4f1a300a2..586d5e745 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-default-export.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-default-export.md @@ -1,4 +1,6 @@ -# `import/no-default-export` +# import/no-default-export + + Prohibit default exports. Mostly an inverse of [`prefer-default-export`]. diff --git a/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md b/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md index c948b5178..641fc1a8f 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md @@ -1,4 +1,6 @@ -# `import/no-deprecated` +# import/no-deprecated + + Reports use of a deprecated name, as indicated by a JSDoc block with a `@deprecated` tag or TomDoc `Deprecated: ` comment. diff --git a/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md b/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md index c37510325..553fbbcc3 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md @@ -1,9 +1,15 @@ # import/no-duplicates +⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`. + +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + Reports if a resolved path is imported more than once. +(fixable) The `--fix` option on the [command line] automatically fixes some problems reported by this rule. -ESLint core has a similar rule ([`no-duplicate-imports`](http://eslint.org/docs/rules/no-duplicate-imports)), but this version +ESLint core has a similar rule ([`no-duplicate-imports`](https://eslint.org/docs/rules/no-duplicate-imports)), but this version is different in two key ways: 1. the paths in the source code don't have to exactly match, they just have to point to the same module on the filesystem. (i.e. `./foo` and `./foo.js`) @@ -61,6 +67,33 @@ import SomeDefaultClass from './mod?minify' import * from './mod.js?minify' ``` +### Inline Type imports + +TypeScript 4.5 introduced a new [feature](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5/#type-on-import-names) that allows mixing of named value and type imports. In order to support fixing to an inline type import when duplicate imports are detected, `prefer-inline` can be set to true. + +Config: + +```json +"import/no-duplicates": ["error", {"prefer-inline": true}] +``` + + + +❌ Invalid `["error", "prefer-inline"]` + +```js +import { AValue, type AType } from './mama-mia' +import type { BType } from './mama-mia' +``` + +✅ Valid with `["error", "prefer-inline"]` + +```js +import { AValue, type AType, type BType } from './mama-mia' +``` + + + ## When Not To Use It If the core ESLint version is good enough (i.e. you're _not_ using Flow and you _are_ using [`import/extensions`](./extensions.md)), keep it and don't use this. diff --git a/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md b/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md index 0f7bb6d37..292055fcd 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md @@ -1,8 +1,10 @@ -# import/no-dynamic-require: Forbid `require()` calls with expressions +# import/no-dynamic-require + + The `require` method from CommonJS is used to import modules from different files. Unlike the ES6 `import` syntax, it can be given expressions that will be resolved at runtime. While this is sometimes necessary and useful, in most cases it isn't. Using expressions (for instance, concatenating a path and variable) as the argument makes it harder for tools to do static code analysis, or to find where in the codebase a module is used. -This rule checks every call to `require()` that uses expressions for the module name argument. +This rule forbids every call to `require()` that uses expressions for the module name argument. ## Rule Details diff --git a/node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md b/node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md new file mode 100644 index 000000000..7bf4d695c --- /dev/null +++ b/node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md @@ -0,0 +1,43 @@ +# import/no-empty-named-blocks + +🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions). + + + +Reports the use of empty named import blocks. + +## Rule Details + +### Valid +```js +import { mod } from 'mod' +import Default, { mod } from 'mod' +``` + +When using typescript +```js +import type { mod } from 'mod' +``` + +When using flow +```js +import typeof { mod } from 'mod' +``` + +### Invalid +```js +import {} from 'mod' +import Default, {} from 'mod' +``` + +When using typescript +```js +import type Default, {} from 'mod' +import type {} from 'mod' +``` + +When using flow +```js +import typeof {} from 'mod' +import typeof Default, {} from 'mod' +``` \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md b/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md index cdc0a913f..68cd4b154 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md @@ -1,7 +1,9 @@ -# import/no-extraneous-dependencies: Forbid the use of extraneous packages +# import/no-extraneous-dependencies + + Forbid the import of external modules that are not declared in the `package.json`'s `dependencies`, `devDependencies`, `optionalDependencies`, `peerDependencies`, or `bundledDependencies`. -The closest parent `package.json` will be used. If no `package.json` is found, the rule will not lint anything. This behavior can be changed with the rule option `packageDir`. +The closest parent `package.json` will be used. If no `package.json` is found, the rule will not lint anything. This behavior can be changed with the rule option `packageDir`. Normally ignores imports of modules marked internal, but this can be changed with the rule option `includeInternal`. Type imports can be verified by specifying `includeTypes`. Modules have to be installed for this rule to work. @@ -31,6 +33,12 @@ You can also use an array of globs instead of literal booleans: When using an array of globs, the setting will be set to `true` (no errors reported) if the name of the file being linted matches a single glob in the array, and `false` otherwise. +There are 2 boolean options to opt into checking extra imports that are normally ignored: `includeInternal`, which enables the checking of internal modules, and `includeTypes`, which enables checking of type imports in TypeScript. + +```js +"import/no-extraneous-dependencies": ["error", {"includeInternal": true, "includeTypes": true}] +``` + Also there is one more option called `packageDir`, this option is to specify the path to the folder containing package.json. If provided as a relative path string, will be computed relative to the current working directory at linter execution time. If this is not ideal (does not work with some editor integrations), consider using `__dirname` to provide a path relative to your configuration. @@ -99,6 +107,13 @@ var isArray = require('lodash.isarray'); /* eslint import/no-extraneous-dependencies: ["error", {"bundledDependencies": false}] */ import foo from '"@generated/foo"'; var foo = require('"@generated/foo"'); + +/* eslint import/no-extraneous-dependencies: ["error", {"includeInternal": true}] */ +import foo from './foo'; +var foo = require('./foo'); + +/* eslint import/no-extraneous-dependencies: ["error", {"includeTypes": true}] */ +import type { MyType } from 'foo'; ``` @@ -113,6 +128,7 @@ import test from 'ava'; import find from 'lodash.find'; import isArray from 'lodash.isarray'; import foo from '"@generated/foo"'; +import type { MyType } from 'foo'; /* eslint import/no-extraneous-dependencies: ["error", {"peerDependencies": true}] */ import react from 'react'; diff --git a/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md b/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md index 8131fd5f7..08aacfcc3 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md @@ -1,4 +1,8 @@ -# no-import-module-exports +# import/no-import-module-exports + +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + Reports the use of import declarations with CommonJS exports in any module except for the [main module](https://docs.npmjs.com/files/package.json#main). diff --git a/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md b/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md index d957e26f3..47f7490da 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md @@ -1,5 +1,7 @@ # import/no-internal-modules + + Use this rule to prevent importing the submodules of other modules. ## Rule Details diff --git a/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md b/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md index e161e87b1..f0a6251c1 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md @@ -1,5 +1,7 @@ # import/no-mutable-exports + + Forbids the use of mutable exports with `var` or `let`. ## Rule Details @@ -44,8 +46,8 @@ want to enable the following core ESLint rules: - [no-func-assign] - [no-class-assign] -[no-func-assign]: http://eslint.org/docs/rules/no-func-assign -[no-class-assign]: http://eslint.org/docs/rules/no-class-assign +[no-func-assign]: https://eslint.org/docs/rules/no-func-assign +[no-class-assign]: https://eslint.org/docs/rules/no-class-assign ## When Not To Use It diff --git a/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md b/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md index da6ae3f1d..5e0f5069e 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md @@ -1,5 +1,9 @@ # import/no-named-as-default-member +⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`. + + + Reports use of an exported name as a property on the default export. Rationale: Accessing a property that has a name that is shared by an exported diff --git a/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md b/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md index 042141383..b3715e6c4 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md @@ -1,5 +1,9 @@ # import/no-named-as-default +⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`. + + + Reports use of an exported name as the locally imported name of a default export. Rationale: using an exported name as the name of the default export is likely... diff --git a/node_modules/eslint-plugin-import/docs/rules/no-named-default.md b/node_modules/eslint-plugin-import/docs/rules/no-named-default.md index bb8b13bca..2f3d54b80 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-named-default.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-named-default.md @@ -1,5 +1,7 @@ # import/no-named-default + + Reports use of a default export as a locally named import. Rationale: the syntax exists to import default exports expressively, let's use it. diff --git a/node_modules/eslint-plugin-import/docs/rules/no-named-export.md b/node_modules/eslint-plugin-import/docs/rules/no-named-export.md index 0ff881e34..13ea63ad7 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-named-export.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-named-export.md @@ -1,4 +1,6 @@ -# `import/no-named-export` +# import/no-named-export + + Prohibit named exports. Mostly an inverse of [`no-default-export`]. diff --git a/node_modules/eslint-plugin-import/docs/rules/no-namespace.md b/node_modules/eslint-plugin-import/docs/rules/no-namespace.md index e98726051..5545bce22 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-namespace.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-namespace.md @@ -1,5 +1,9 @@ # import/no-namespace +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + Enforce a convention of not using namespace (a.k.a. "wildcard" `*`) imports. +(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule, provided that the namespace object is only used for direct member access, e.g. `namespace.a`. @@ -22,7 +26,7 @@ import defaultExport, { a, b } from './foobar' ``` ```js -/* eslint import/no-namespace: ["error", {ignore: ['*.ext']] */ +/* eslint import/no-namespace: ["error", {ignore: ['*.ext']}] */ import * as bar from './ignored-module.ext'; ``` diff --git a/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md b/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md index 225adab22..624c27e05 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md @@ -1,4 +1,6 @@ -# import/no-nodejs-modules: No Node.js builtin modules +# import/no-nodejs-modules + + Forbid the use of Node.js builtin modules. Can be useful for client-side web projects that do not have access to those modules. diff --git a/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md b/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md index d5a068493..4919de94e 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md @@ -1,10 +1,15 @@ # import/no-relative-packages +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + Use this rule to prevent importing packages through relative paths. It's useful in Yarn/Lerna workspaces, were it's possible to import a sibling package using `../package` relative path, while direct `package` is the correct one. ++(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule. ### Examples diff --git a/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md b/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md index 7d6e883cf..e5684eb1c 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md @@ -1,5 +1,7 @@ # import/no-relative-parent-imports + + Use this rule to prevent imports to folders in relative parent paths. This rule is useful for enforcing tree-like folder structures instead of complex graph-like folder structures. While this restriction might be a departure from Node's default resolution style, it can lead large, complex codebases to be easier to maintain. If you've ever had debates over "where to put files" this rule is for you. diff --git a/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md b/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md index bfcb9af23..344c33bb6 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md @@ -1,4 +1,6 @@ -# import/no-restricted-paths: Restrict which files can be imported in a given folder +# import/no-restricted-paths + + Some projects contain files which are not always meant to be executed in the same environment. For example consider a web application that contains specific code for the server and some specific code for the browser/client. In this case you don’t want to import server-only files in your client code. @@ -9,8 +11,21 @@ In order to prevent such scenarios this rule allows you to define restricted zon This rule has one option. The option is an object containing the definition of all restricted `zones` and the optional `basePath` which is used to resolve relative paths within. The default value for `basePath` is the current working directory. -Each zone consists of the `target` path and a `from` path. The `target` is the path where the restricted imports should be applied. The `from` path defines the folder that is not allowed to be used in an import. An optional `except` may be defined for a zone, allowing exception paths that would otherwise violate the related `from`. Note that `except` is relative to `from` and cannot backtrack to a parent directory. -You may also specify an optional `message` for a zone, which will be displayed in case of the rule violation. + +Each zone consists of the `target` paths, a `from` paths, and an optional `except` and `message` attribute. +- `target` contains the paths where the restricted imports should be applied. It can be expressed by + - directory string path that matches all its containing files + - glob pattern matching all the targeted files + - an array of multiple of the two types above +- `from` paths define the folders that are not allowed to be used in an import. It can be expressed by + - directory string path that matches all its containing files + - glob pattern matching all the files restricted to be imported + - an array of multiple directory string path + - an array of multiple glob patterns +- `except` may be defined for a zone, allowing exception paths that would otherwise violate the related `from`. Note that it does not alter the behaviour of `target` in any way. + - in case `from` contains only glob patterns, `except` must be an array of glob patterns as well + - in case `from` contains only directory path, `except` is relative to `from` and cannot backtrack to a parent directory +- `message` - will be displayed in case of the rule violation. ### Examples @@ -77,4 +92,107 @@ The following pattern is not considered a problem: ```js import b from './b' + +``` + +--------------- + +Given the following folder structure: + +``` +my-project +├── client + └── foo.js + └── sub-module + └── bar.js + └── baz.js + +``` + +and the current configuration is set to: + +``` +{ "zones": [ { + "target": "./tests/files/restricted-paths/client/!(sub-module)/**/*", + "from": "./tests/files/restricted-paths/client/sub-module/**/*", +} ] } +``` + +The following import is considered a problem in `my-project/client/foo.js`: + +```js +import a from './sub-module/baz' +``` + +The following import is not considered a problem in `my-project/client/sub-module/bar.js`: + +```js +import b from './baz' +``` + +--------------- + +Given the following folder structure: + ``` +my-project +└── one + └── a.js + └── b.js +└── two + └── a.js + └── b.js +└── three + └── a.js + └── b.js +``` + +and the current configuration is set to: + +``` +{ + "zones": [ + { + "target": ["./tests/files/restricted-paths/two/*", "./tests/files/restricted-paths/three/*"], + "from": ["./tests/files/restricted-paths/one", "./tests/files/restricted-paths/three"], + } + ] +} +``` + +The following patterns are not considered a problem in `my-project/one/b.js`: + +```js +import a from '../three/a' +``` + +```js +import a from './a' +``` + +The following pattern is not considered a problem in `my-project/two/b.js`: + +```js +import a from './a' +``` + +The following patterns are considered a problem in `my-project/two/a.js`: + +```js +import a from '../one/a' +``` + +```js +import a from '../three/a' +``` + +The following patterns are considered a problem in `my-project/three/b.js`: + +```js +import a from '../one/a' +``` + +```js +import a from './a' +``` + diff --git a/node_modules/eslint-plugin-import/docs/rules/no-self-import.md b/node_modules/eslint-plugin-import/docs/rules/no-self-import.md index bde063f5d..8d8491c50 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-self-import.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-self-import.md @@ -1,4 +1,6 @@ -# Forbid a module from importing itself (`import/no-self-import`) +# import/no-self-import + + Forbid a module from importing itself. This can sometimes happen during refactoring. diff --git a/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md b/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md index fb3065c48..6f763e973 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md @@ -1,4 +1,6 @@ -# import/no-unassigned-import: Forbid unassigned imports +# import/no-unassigned-import + + With both CommonJS' `require` and the ES6 modules' `import` syntax, it is possible to import a module but not to use its result. This can be done explicitly by not assigning the module to as variable. Doing so can mean either of the following things: - The module is imported but not used diff --git a/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md b/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md index 30cd8cb2b..13f792887 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md @@ -1,12 +1,16 @@ # import/no-unresolved +💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`. + + + Ensures an imported module can be resolved to a module on the local filesystem, as defined by standard Node `require.resolve` behavior. See [settings](../../README.md#settings) for customization options for the resolution (i.e. additional filetypes, `NODE_PATH`, etc.) -This rule can also optionally report on unresolved modules in CommonJS `require('./foo')` calls and AMD `require(['./foo'], function (foo){...})` and `define(['./foo'], function (foo){...})`. +This rule can also optionally report on unresolved modules in CommonJS `require('./foo')` calls and AMD `require(['./foo'], function (foo) {...})` and `define(['./foo'], function (foo) {...})`. To enable this, send `{ commonjs: true/false, amd: true/false }` as a rule option. Both are disabled by default. @@ -60,7 +64,7 @@ This rule has its own ignore list, separate from [`import/ignore`]. This is beca To suppress errors from files that may not be properly resolved by your [resolver settings](../../README.md#resolver-plugins), you may add an `ignore` key with an array of `RegExp` pattern strings: ```js -/*eslint import/no-unresolved: [2, { ignore: ['\.img$'] }]*/ +/*eslint import/no-unresolved: [2, { ignore: ['\\.img$'] }]*/ import { x } from './mod' // may be reported, if not resolved to a module @@ -76,14 +80,29 @@ By default, this rule will report paths whose case do not match the underlying f const { default: x } = require('./foo') // reported if './foo' is actually './Foo' and caseSensitive: true ``` +#### `caseSensitiveStrict` + +The `caseSensitive` option does not detect case for the current working directory. The `caseSensitiveStrict` option allows checking `cwd` in resolved path. By default, the option is disabled. + + +```js +/*eslint import/no-unresolved: [2, { caseSensitiveStrict: true }]*/ + +// Absolute paths +import Foo from `/Users/fOo/bar/file.js` // reported, /Users/foo/bar/file.js +import Foo from `d:/fOo/bar/file.js` // reported, d:/foo/bar/file.js + +// Relative paths, cwd is Users/foo/ +import Foo from `./../fOo/bar/file.js` // reported +``` + ## When Not To Use It -If you're using a module bundler other than Node or Webpack, you may end up with -a lot of false positive reports of missing dependencies. +If you're using a module bundler other than Node or Webpack, you may end up with a lot of false positive reports of missing dependencies. ## Further Reading -- [Resolver plugins](../../README.md#resolver-plugins) +- [Resolver plugins](../../README.md#resolvers) - [Node resolver](https://npmjs.com/package/eslint-import-resolver-node) (default) - [Webpack resolver](https://npmjs.com/package/eslint-import-resolver-webpack) - [`import/ignore`] global setting diff --git a/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md b/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md index 01c13557c..5cd24bef4 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md @@ -1,10 +1,12 @@ # import/no-unused-modules + + Reports: - modules without any exports - individual exports not being statically `import`ed or `require`ed from other modules in the same project + - dynamic imports are supported if argument is a literal string -Note: dynamic imports are currently not supported. ## Rule Details diff --git a/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md b/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md index 81b56579c..c8dc67727 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md @@ -1,5 +1,9 @@ # import/no-useless-path-segments +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + Use this rule to prevent unnecessary path segments in import and require statements. ## Rule Details @@ -14,6 +18,7 @@ my-project └── helpers.js └── helpers └── index.js +├── index.js └── pages ├── about.js ├── contact.js @@ -27,10 +32,10 @@ The following patterns are considered problems: * in my-project/app.js */ -import "./../pages/about.js"; // should be "./pages/about.js" -import "./../pages/about"; // should be "./pages/about" -import "../pages/about.js"; // should be "./pages/about.js" -import "../pages/about"; // should be "./pages/about" +import "./../my-project/pages/about.js"; // should be "./pages/about.js" +import "./../my-project/pages/about"; // should be "./pages/about" +import "../my-project/pages/about.js"; // should be "./pages/about.js" +import "../my-project/pages/about"; // should be "./pages/about" import "./pages//about"; // should be "./pages/about" import "./pages/"; // should be "./pages" import "./pages/index"; // should be "./pages" (except if there is a ./pages.js file) diff --git a/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md b/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md index 271c76ca8..e1b7a4bd9 100644 --- a/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md +++ b/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md @@ -1,5 +1,7 @@ # import/no-webpack-loader-syntax + + Forbid Webpack loader syntax in imports. [Webpack](https://webpack.js.org) allows specifying the [loaders](https://webpack.js.org/concepts/loaders/) to use in the import source string using a special syntax like this: diff --git a/node_modules/eslint-plugin-import/docs/rules/order.md b/node_modules/eslint-plugin-import/docs/rules/order.md index e320ee0c8..e3deacaf2 100644 --- a/node_modules/eslint-plugin-import/docs/rules/order.md +++ b/node_modules/eslint-plugin-import/docs/rules/order.md @@ -1,11 +1,15 @@ -# import/order: Enforce a convention in module import order +# import/order + +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + Enforce a convention in the order of `require()` / `import` statements. +(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule. -With the [`groups`](#groups-array) option set to `["builtin", "external", "internal", "parent", "sibling", "index", "object"]` the order is as shown in the following example: +With the [`groups`](#groups-array) option set to `["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"]` the order is as shown in the following example: -```js +```ts // 1. node "builtin" modules import fs from 'fs'; import path from 'path'; @@ -36,7 +40,7 @@ Statements using the ES6 `import` syntax must appear before any `require()` stat ## Fail -```js +```ts import _ from 'lodash'; import path from 'path'; // `path` import should occur before import of `lodash` @@ -54,7 +58,7 @@ import foo from './foo'; // `import` statements must be before `require` stateme ## Pass -```js +```ts import path from 'path'; import _ from 'lodash'; @@ -85,7 +89,7 @@ This rule supports the following options: How groups are defined, and the order to respect. `groups` must be an array of `string` or [`string`]. The only allowed `string`s are: `"builtin"`, `"external"`, `"internal"`, `"unknown"`, `"parent"`, `"sibling"`, `"index"`, `"object"`, `"type"`. The enforced order is the same as the order of each element in a group. Omitted types are implicitly grouped together as the last element. Example: -```js +```ts [ 'builtin', // Built-in types are first ['sibling', 'parent'], // Then sibling and parent types. They can be mingled together @@ -98,8 +102,22 @@ The default value is `["builtin", "external", "parent", "sibling", "index"]`. You can set the options like this: -```js -"import/order": ["error", {"groups": ["index", "sibling", "parent", "internal", "external", "builtin", "object", "type"]}] +```ts +"import/order": [ + "error", + { + "groups": [ + "index", + "sibling", + "parent", + "internal", + "external", + "builtin", + "object", + "type" + ] + } +] ``` ### `pathGroups: [array of objects]`: @@ -128,6 +146,31 @@ Properties of the objects } ``` +### `distinctGroup: [boolean]`: + +This changes how `pathGroups[].position` affects grouping. The property is most useful when `newlines-between` is set to `always` and at least 1 `pathGroups` entry has a `position` property set. + +By default, in the context of a particular `pathGroup` entry, when setting `position`, a new "group" will silently be created. That is, even if the `group` is specified, a newline will still separate imports that match that `pattern` with the rest of the group (assuming `newlines-between` is `always`). This is undesirable if your intentions are to use `position` to position _within_ the group (and not create a new one). Override this behavior by setting `distinctGroup` to `false`; this will keep imports within the same group as intended. + +Note that currently, `distinctGroup` defaults to `true`. However, in a later update, the default will change to `false` + +Example: +```json +{ + "import/order": ["error", { + "newlines-between": "always", + "pathGroups": [ + { + "pattern": "@app/**", + "group": "external", + "position": "after" + } + ], + "distinctGroup": false + }] +} +``` + ### `pathGroupsExcludedImportTypes: [array]`: This defines import types that are not handled by configured pathGroups. @@ -169,20 +212,22 @@ Example: ] } ``` -The default value is `["builtin", "external"]`. +The default value is `["builtin", "external", "object"]`. ### `newlines-between: [ignore|always|always-and-inside-groups|never]`: Enforces or forbids new lines between import groups: -- If set to `ignore`, no errors related to new lines between import groups will be reported (default). +- If set to `ignore`, no errors related to new lines between import groups will be reported. - If set to `always`, at least one new line between each group will be enforced, and new lines inside a group will be forbidden. To prevent multiple lines between imports, core `no-multiple-empty-lines` rule can be used. - If set to `always-and-inside-groups`, it will act like `always` except newlines are allowed inside import groups. - If set to `never`, no new lines are allowed in the entire import section. +The default value is `"ignore"`. + With the default group setting, the following will be invalid: -```js +```ts /* eslint import/order: ["error", {"newlines-between": "always"}] */ import fs from 'fs'; import path from 'path'; @@ -190,7 +235,7 @@ import index from './'; import sibling from './foo'; ``` -```js +```ts /* eslint import/order: ["error", {"newlines-between": "always-and-inside-groups"}] */ import fs from 'fs'; @@ -199,7 +244,7 @@ import index from './'; import sibling from './foo'; ``` -```js +```ts /* eslint import/order: ["error", {"newlines-between": "never"}] */ import fs from 'fs'; import path from 'path'; @@ -211,7 +256,7 @@ import sibling from './foo'; while those will be valid: -```js +```ts /* eslint import/order: ["error", {"newlines-between": "always"}] */ import fs from 'fs'; import path from 'path'; @@ -221,7 +266,7 @@ import index from './'; import sibling from './foo'; ``` -```js +```ts /* eslint import/order: ["error", {"newlines-between": "always-and-inside-groups"}] */ import fs from 'fs'; @@ -232,7 +277,7 @@ import index from './'; import sibling from './foo'; ``` -```js +```ts /* eslint import/order: ["error", {"newlines-between": "never"}] */ import fs from 'fs'; import path from 'path'; @@ -240,15 +285,16 @@ import index from './'; import sibling from './foo'; ``` -### `alphabetize: {order: asc|desc|ignore, caseInsensitive: true|false}`: +### `alphabetize: {order: asc|desc|ignore, orderImportKind: asc|desc|ignore, caseInsensitive: true|false}`: Sort the order within each group in alphabetical manner based on **import path**: - `order`: use `asc` to sort in ascending order, and `desc` to sort in descending order (default: `ignore`). +- `orderImportKind`: use `asc` to sort in ascending order various import kinds, e.g. imports prefixed with `type` or `typeof`, with same import path. Use `desc` to sort in descending order (default: `ignore`). - `caseInsensitive`: use `true` to ignore case, and `false` to consider case (default: `false`). Example setting: -```js +```ts alphabetize: { order: 'asc', /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */ caseInsensitive: true /* ignore case. Options: [true, false] */ @@ -257,7 +303,7 @@ alphabetize: { This will fail the rule check: -```js +```ts /* eslint import/order: ["error", {"alphabetize": {"order": "asc", "caseInsensitive": true}}] */ import React, { PureComponent } from 'react'; import aTypes from 'prop-types'; @@ -268,7 +314,7 @@ import blist from 'BList'; While this will pass: -```js +```ts /* eslint import/order: ["error", {"alphabetize": {"order": "asc", "caseInsensitive": true}}] */ import blist from 'BList'; import * as classnames from 'classnames'; @@ -288,7 +334,7 @@ way that is safe. This will fail the rule check: -```js +```ts /* eslint import/order: ["error", {"warnOnUnassignedImports": true}] */ import fs from 'fs'; import './styles.css'; @@ -297,7 +343,7 @@ import path from 'path'; While this will pass: -```js +```ts /* eslint import/order: ["error", {"warnOnUnassignedImports": true}] */ import fs from 'fs'; import path from 'path'; diff --git a/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md b/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md index 23e584bcc..5d335f4c1 100644 --- a/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md +++ b/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md @@ -1,9 +1,45 @@ # import/prefer-default-export -When there is only a single export from a module, prefer using default export over named export. + + +In exporting files, this rule checks if there is default export or not. ## Rule Details +##### rule schema: + +```javascript +"import/prefer-default-export": [ + ( "off" | "warn" | "error" ), + { "target": "single" | "any" } // default is "single" +] +``` + +### Config Options + +There are two options available: `single` and `any`. By default, if you do not specify the option, rule will assume it is `single`. + +#### single + +**Definition**: When there is only a single export from a module, prefer using default export over named export. + +How to setup config file for this rule: + +```javascript +// you can manually specify it +"rules": { + "import/prefer-default-export": [ + ( "off" | "warn" | "error" ), + { "target": "single" } + ] +} + +// config setup below will also work +"rules": { + "import/prefer-default-export": "off" | "warn" | "error" +} +``` + The following patterns are considered warnings: ```javascript @@ -22,7 +58,7 @@ The following patterns are not warnings: // There is a default export. export const foo = 'foo'; const bar = 'bar'; -export default 'bar'; +export default bar; ``` ```javascript @@ -56,3 +92,95 @@ export { foo as default } // Any batch export will disable this rule. The remote module is not inspected. export * from './other-module' ``` + +#### any + +**Definition**: any exporting file must contain a default export. + +How to setup config file for this rule: + +```javascript +// you have to manually specify it +"rules": { + "import/prefer-default-export": [ + ( "off" | "warn" | "error" ), + { "target": "any" } + ] +} +``` + + +The following patterns are *not* considered warnings: + +```javascript +// good1.js + +//has default export +export default function bar() {}; +``` + +```javascript +// good2.js + +// has default export +let foo; +export { foo as default } +``` + +```javascript +// good3.js + +//contains multiple exports AND default export +export const a = 5; +export function bar(){}; +let foo; +export { foo as default } +``` + +```javascript +// good4.js + +// does not contain any exports => file is not checked by the rule +import * as foo from './foo'; +``` + +```javascript +// export-star.js + +// Any batch export will disable this rule. The remote module is not inspected. +export * from './other-module' +``` + +The following patterns are considered warnings: + +```javascript +// bad1.js + +//has 2 named exports, but no default export +export const foo = 'foo'; +export const bar = 'bar'; +``` + +```javascript +// bad2.js + +// does not have default export +let foo, bar; +export { foo, bar } +``` + +```javascript +// bad3.js + +// does not have default export +export { a, b } from "foo.js" +``` + +```javascript +// bad4.js + +// does not have default export +let item; +export const foo = item; +export { item }; +``` diff --git a/node_modules/eslint-plugin-import/docs/rules/unambiguous.md b/node_modules/eslint-plugin-import/docs/rules/unambiguous.md index 7955c3fbc..da77a7453 100644 --- a/node_modules/eslint-plugin-import/docs/rules/unambiguous.md +++ b/node_modules/eslint-plugin-import/docs/rules/unambiguous.md @@ -1,5 +1,7 @@ # import/unambiguous + + Warn if a `module` could be mistakenly parsed as a `script` by a consumer leveraging [Unambiguous JavaScript Grammar] to determine correct parsing goal. @@ -50,5 +52,5 @@ a `module`. - [`parserOptions.sourceType`] - [node-eps#13](https://github.com/nodejs/node-eps/issues/13) -[`parserOptions.sourceType`]: http://eslint.org/docs/user-guide/configuring#specifying-parser-options -[Unambiguous JavaScript Grammar]: https://github.com/nodejs/node-eps/blob/master/002-es-modules.md#32-determining-if-source-is-an-es-module +[`parserOptions.sourceType`]: https://eslint.org/docs/user-guide/configuring#specifying-parser-options +[Unambiguous JavaScript Grammar]: https://github.com/nodejs/node-eps/blob/HEAD/002-es-modules.md#32-determining-if-source-is-an-es-module diff --git a/node_modules/eslint-plugin-import/lib/ExportMap.js b/node_modules/eslint-plugin-import/lib/ExportMap.js index 23cb07524..31ff19221 100644 --- a/node_modules/eslint-plugin-import/lib/ExportMap.js +++ b/node_modules/eslint-plugin-import/lib/ExportMap.js @@ -665,20 +665,105 @@ -recursivePatternCapture = recursivePatternCapture;var _fs = require('fs');var _fs2 = _interopRequireDefault(_fs);var _doctrine = require('doctrine');var _doctrine2 = _interopRequireDefault(_doctrine);var _debug = require('debug');var _debug2 = _interopRequireDefault(_debug);var _eslint = require('eslint');var _parse = require('eslint-module-utils/parse');var _parse2 = _interopRequireDefault(_parse);var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve);var _ignore = require('eslint-module-utils/ignore');var _ignore2 = _interopRequireDefault(_ignore);var _hash = require('eslint-module-utils/hash');var _unambiguous = require('eslint-module-utils/unambiguous');var unambiguous = _interopRequireWildcard(_unambiguous);var _tsconfigLoader = require('tsconfig-paths/lib/tsconfig-loader');var _arrayIncludes = require('array-includes');var _arrayIncludes2 = _interopRequireDefault(_arrayIncludes);function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;} else {var newObj = {};if (obj != null) {for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];}}newObj['default'] = obj;return newObj;}}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}var parseConfigFileTextToJson = void 0;var log = (0, _debug2['default'])('eslint-plugin-import:ExportMap');var exportCache = new Map();var tsConfigCache = new Map();var ExportMap = function () {function ExportMap(path) {_classCallCheck(this, ExportMap);this.path = path;this.namespace = new Map(); // todo: restructure to key on path, value is resolver + map of names + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +recursivePatternCapture = recursivePatternCapture;var _fs = require('fs');var _fs2 = _interopRequireDefault(_fs);var _path = require('path');var _doctrine = require('doctrine');var _doctrine2 = _interopRequireDefault(_doctrine);var _debug = require('debug');var _debug2 = _interopRequireDefault(_debug);var _eslint = require('eslint');var _parse = require('eslint-module-utils/parse');var _parse2 = _interopRequireDefault(_parse);var _visit = require('eslint-module-utils/visit');var _visit2 = _interopRequireDefault(_visit);var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve);var _ignore = require('eslint-module-utils/ignore');var _ignore2 = _interopRequireDefault(_ignore);var _hash = require('eslint-module-utils/hash');var _unambiguous = require('eslint-module-utils/unambiguous');var unambiguous = _interopRequireWildcard(_unambiguous);var _tsconfigLoader = require('tsconfig-paths/lib/tsconfig-loader');var _arrayIncludes = require('array-includes');var _arrayIncludes2 = _interopRequireDefault(_arrayIncludes);function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;} else {var newObj = {};if (obj != null) {for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];}}newObj['default'] = obj;return newObj;}}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}var ts = void 0;var log = (0, _debug2['default'])('eslint-plugin-import:ExportMap');var exportCache = new Map();var tsConfigCache = new Map();var ExportMap = function () {function ExportMap(path) {_classCallCheck(this, ExportMap);this.path = path;this.namespace = new Map(); // todo: restructure to key on path, value is resolver + map of names this.reexports = new Map(); /** * star-exports * @type {Set} of () => ExportMap */this.dependencies = new Set(); /** * dependencies of this module that are not explicitly re-exported * @type {Map} from path = () => ExportMap - */this.imports = new Map();this.errors = [];}_createClass(ExportMap, [{ key: 'has', /** - * Note that this does not check explicitly re-exported names for existence - * in the base namespace, but it will expand all `export * from '...'` exports - * if not found in the explicit namespace. - * @param {string} name - * @return {Boolean} true if `name` is exported by this module. - */value: function () {function has(name) {if (this.namespace.has(name)) return true;if (this.reexports.has(name)) return true; // default exports must be explicitly re-exported (#328) + */this.imports = new Map();this.errors = []; /** + * type {'ambiguous' | 'Module' | 'Script'} + */this.parseGoal = 'ambiguous';}_createClass(ExportMap, [{ key: 'has', /** + * Note that this does not check explicitly re-exported names for existence + * in the base namespace, but it will expand all `export * from '...'` exports + * if not found in the explicit namespace. + * @param {string} name + * @return {Boolean} true if `name` is exported by this module. + */value: function () {function has(name) {if (this.namespace.has(name)) return true;if (this.reexports.has(name)) return true; // default exports must be explicitly re-exported (#328) if (name !== 'default') {var _iteratorNormalCompletion = true;var _didIteratorError = false;var _iteratorError = undefined;try {for (var _iterator = this.dependencies[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {var dep = _step.value;var innerMap = dep(); // todo: report as unresolved? if (!innerMap) continue;if (innerMap.has(name)) return true;}} catch (err) {_didIteratorError = true;_iteratorError = err;} finally {try {if (!_iteratorNormalCompletion && _iterator['return']) {_iterator['return']();}} finally {if (_didIteratorError) {throw _iteratorError;}}}}return false;}return has;}() /** * ensure that imported name fully resolves. @@ -720,37 +805,46 @@ recursivePatternCapture = recursivePatternCapture;var _fs = require('fs');var _f if (!(0, _ignore.hasValidExtension)(path, context)) {exportCache.set(cacheKey, null);return null;} // check for and cache ignore if ((0, _ignore2['default'])(path, context)) {log('ignored path due to ignore settings:', path);exportCache.set(cacheKey, null);return null;}var content = _fs2['default'].readFileSync(path, { encoding: 'utf8' }); // check for and cache unambiguous modules if (!unambiguous.test(content)) {log('ignored path due to unambiguous regex:', path);exportCache.set(cacheKey, null);return null;}log('cache miss', cacheKey, 'for path', path);exportMap = ExportMap.parse(path, content, context); // ambiguous modules return null - if (exportMap == null) return null;exportMap.mtime = stats.mtime;exportCache.set(cacheKey, exportMap);return exportMap;};ExportMap.parse = function (path, content, context) {var m = new ExportMap(path);var ast = void 0;try {ast = (0, _parse2['default'])(path, content, context);} catch (err) {log('parse error:', path, err);m.errors.push(err);return m; // can't continue - }if (!unambiguous.isModule(ast)) return null;var docstyle = context.settings && context.settings['import/docstyle'] || ['jsdoc'];var docStyleParsers = {};docstyle.forEach(function (style) {docStyleParsers[style] = availableDocStyleParsers[style];}); // attempt to collect module doc - if (ast.comments) {ast.comments.some(function (c) {if (c.type !== 'Block') return false;try {var doc = _doctrine2['default'].parse(c.value, { unwrap: true });if (doc.tags.some(function (t) {return t.title === 'module';})) {m.doc = doc;return true;}} catch (err) {/* ignore */}return false;});}var namespaces = new Map();function remotePath(value) {return _resolve2['default'].relative(value, path, context.settings);}function resolveImport(value) {var rp = remotePath(value);if (rp == null) return null;return ExportMap['for'](childContext(rp, context));}function getNamespace(identifier) {if (!namespaces.has(identifier.name)) return;return function () {return resolveImport(namespaces.get(identifier.name));};}function addNamespace(object, identifier) {var nsfn = getNamespace(identifier);if (nsfn) {Object.defineProperty(object, 'namespace', { get: nsfn });}return object;}function captureDependency(_ref, isOnlyImportingTypes) {var source = _ref.source;var importedSpecifiers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Set();if (source == null) return null;var p = remotePath(source.value);if (p == null) return null;var declarationMetadata = { // capturing actual node reference holds full AST in memory! - source: { value: source.value, loc: source.loc }, isOnlyImportingTypes: isOnlyImportingTypes, importedSpecifiers: importedSpecifiers };var existing = m.imports.get(p);if (existing != null) {existing.declarations.add(declarationMetadata);return existing.getter;}var getter = thunkFor(p, context);m.imports.set(p, { getter: getter, declarations: new Set([declarationMetadata]) });return getter;}var source = makeSourceCode(content, ast);function readTsConfig() {var tsConfigInfo = (0, _tsconfigLoader.tsConfigLoader)({ cwd: context.parserOptions && context.parserOptions.tsconfigRootDir || process.cwd(), getEnv: function () {function getEnv(key) {return process.env[key];}return getEnv;}() });try {if (tsConfigInfo.tsConfigPath !== undefined) {var jsonText = _fs2['default'].readFileSync(tsConfigInfo.tsConfigPath).toString();if (!parseConfigFileTextToJson) {var _require = require('typescript'); // this is because projects not using TypeScript won't have typescript installed - parseConfigFileTextToJson = _require.parseConfigFileTextToJson;}return parseConfigFileTextToJson(tsConfigInfo.tsConfigPath, jsonText).config;}} catch (e) {// Catch any errors - }return null;}function isEsModuleInterop() {var cacheKey = (0, _hash.hashObject)({ tsconfigRootDir: context.parserOptions && context.parserOptions.tsconfigRootDir }).digest('hex');var tsConfig = tsConfigCache.get(cacheKey);if (typeof tsConfig === 'undefined') {tsConfig = readTsConfig();tsConfigCache.set(cacheKey, tsConfig);}return tsConfig && tsConfig.compilerOptions ? tsConfig.compilerOptions.esModuleInterop : false;}ast.body.forEach(function (n) {if (n.type === 'ExportDefaultDeclaration') {var exportMeta = captureDoc(source, docStyleParsers, n);if (n.declaration.type === 'Identifier') {addNamespace(exportMeta, n.declaration);}m.namespace.set('default', exportMeta);return;}if (n.type === 'ExportAllDeclaration') {var getter = captureDependency(n, n.exportKind === 'type');if (getter) m.dependencies.add(getter);return;} // capture namespaces in case of later export - if (n.type === 'ImportDeclaration') {// import type { Foo } (TS and Flow) - var declarationIsType = n.importKind === 'type'; // import './foo' or import {} from './foo' (both 0 specifiers) is a side effect and - // shouldn't be considered to be just importing types - var specifiersOnlyImportingTypes = n.specifiers.length;var importedSpecifiers = new Set();n.specifiers.forEach(function (specifier) {if (supportedImportTypes.has(specifier.type)) {importedSpecifiers.add(specifier.type);}if (specifier.type === 'ImportSpecifier') {importedSpecifiers.add(specifier.imported.name);} // import { type Foo } (Flow) - specifiersOnlyImportingTypes = specifiersOnlyImportingTypes && specifier.importKind === 'type';});captureDependency(n, declarationIsType || specifiersOnlyImportingTypes, importedSpecifiers);var ns = n.specifiers.find(function (s) {return s.type === 'ImportNamespaceSpecifier';});if (ns) {namespaces.set(ns.local.name, n.source.value);}return;}if (n.type === 'ExportNamedDeclaration') {// capture declaration + if (exportMap == null) {log('ignored path due to ambiguous parse:', path);exportCache.set(cacheKey, null);return null;}exportMap.mtime = stats.mtime;exportCache.set(cacheKey, exportMap);return exportMap;};ExportMap.parse = function (path, content, context) {var m = new ExportMap(path);var isEsModuleInteropTrue = isEsModuleInterop();var ast = void 0;var visitorKeys = void 0;try {var result = (0, _parse2['default'])(path, content, context);ast = result.ast;visitorKeys = result.visitorKeys;} catch (err) {m.errors.push(err);return m; // can't continue + }m.visitorKeys = visitorKeys;var hasDynamicImports = false;function processDynamicImport(source) {hasDynamicImports = true;if (source.type !== 'Literal') {return null;}var p = remotePath(source.value);if (p == null) {return null;}var importedSpecifiers = new Set();importedSpecifiers.add('ImportNamespaceSpecifier');var getter = thunkFor(p, context);m.imports.set(p, { getter: getter, declarations: new Set([{ source: { // capturing actual node reference holds full AST in memory! + value: source.value, loc: source.loc }, importedSpecifiers: importedSpecifiers, dynamic: true }]) });}(0, _visit2['default'])(ast, visitorKeys, { ImportExpression: function () {function ImportExpression(node) {processDynamicImport(node.source);}return ImportExpression;}(), CallExpression: function () {function CallExpression(node) {if (node.callee.type === 'Import') {processDynamicImport(node.arguments[0]);}}return CallExpression;}() });var unambiguouslyESM = unambiguous.isModule(ast);if (!unambiguouslyESM && !hasDynamicImports) return null;var docstyle = context.settings && context.settings['import/docstyle'] || ['jsdoc'];var docStyleParsers = {};docstyle.forEach(function (style) {docStyleParsers[style] = availableDocStyleParsers[style];}); // attempt to collect module doc + if (ast.comments) {ast.comments.some(function (c) {if (c.type !== 'Block') return false;try {var doc = _doctrine2['default'].parse(c.value, { unwrap: true });if (doc.tags.some(function (t) {return t.title === 'module';})) {m.doc = doc;return true;}} catch (err) {/* ignore */}return false;});}var namespaces = new Map();function remotePath(value) {return _resolve2['default'].relative(value, path, context.settings);}function resolveImport(value) {var rp = remotePath(value);if (rp == null) return null;return ExportMap['for'](childContext(rp, context));}function getNamespace(identifier) {if (!namespaces.has(identifier.name)) return;return function () {return resolveImport(namespaces.get(identifier.name));};}function addNamespace(object, identifier) {var nsfn = getNamespace(identifier);if (nsfn) {Object.defineProperty(object, 'namespace', { get: nsfn });}return object;}function processSpecifier(s, n, m) {var nsource = n.source && n.source.value;var exportMeta = {};var local = void 0;switch (s.type) {case 'ExportDefaultSpecifier':if (!nsource) return;local = 'default';break;case 'ExportNamespaceSpecifier':m.namespace.set(s.exported.name, Object.defineProperty(exportMeta, 'namespace', { get: function () {function get() {return resolveImport(nsource);}return get;}() }));return;case 'ExportAllDeclaration':m.namespace.set(s.exported.name || s.exported.value, addNamespace(exportMeta, s.source.value));return;case 'ExportSpecifier':if (!n.source) {m.namespace.set(s.exported.name || s.exported.value, addNamespace(exportMeta, s.local));return;} // else falls through + default:local = s.local.name;break;} // todo: JSDoc + m.reexports.set(s.exported.name, { local: local, getImport: function () {function getImport() {return resolveImport(nsource);}return getImport;}() });}function captureDependencyWithSpecifiers(n) {// import type { Foo } (TS and Flow); import typeof { Foo } (Flow) + var declarationIsType = n.importKind === 'type' || n.importKind === 'typeof'; // import './foo' or import {} from './foo' (both 0 specifiers) is a side effect and + // shouldn't be considered to be just importing types + var specifiersOnlyImportingTypes = n.specifiers.length > 0;var importedSpecifiers = new Set();n.specifiers.forEach(function (specifier) {if (specifier.type === 'ImportSpecifier') {importedSpecifiers.add(specifier.imported.name || specifier.imported.value);} else if (supportedImportTypes.has(specifier.type)) {importedSpecifiers.add(specifier.type);} // import { type Foo } (Flow); import { typeof Foo } (Flow) + specifiersOnlyImportingTypes = specifiersOnlyImportingTypes && (specifier.importKind === 'type' || specifier.importKind === 'typeof');});captureDependency(n, declarationIsType || specifiersOnlyImportingTypes, importedSpecifiers);}function captureDependency(_ref, isOnlyImportingTypes) {var source = _ref.source;var importedSpecifiers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Set();if (source == null) return null;var p = remotePath(source.value);if (p == null) return null;var declarationMetadata = { // capturing actual node reference holds full AST in memory! + source: { value: source.value, loc: source.loc }, isOnlyImportingTypes: isOnlyImportingTypes, importedSpecifiers: importedSpecifiers };var existing = m.imports.get(p);if (existing != null) {existing.declarations.add(declarationMetadata);return existing.getter;}var getter = thunkFor(p, context);m.imports.set(p, { getter: getter, declarations: new Set([declarationMetadata]) });return getter;}var source = makeSourceCode(content, ast);function readTsConfig(context) {var tsConfigInfo = (0, _tsconfigLoader.tsConfigLoader)({ cwd: context.parserOptions && context.parserOptions.tsconfigRootDir || process.cwd(), getEnv: function () {function getEnv(key) {return process.env[key];}return getEnv;}() });try {if (tsConfigInfo.tsConfigPath !== undefined) {// Projects not using TypeScript won't have `typescript` installed. + if (!ts) {ts = require('typescript');} // eslint-disable-line import/no-extraneous-dependencies + var configFile = ts.readConfigFile(tsConfigInfo.tsConfigPath, ts.sys.readFile);return ts.parseJsonConfigFileContent(configFile.config, ts.sys, (0, _path.dirname)(tsConfigInfo.tsConfigPath));}} catch (e) {// Catch any errors + }return null;}function isEsModuleInterop() {var cacheKey = (0, _hash.hashObject)({ tsconfigRootDir: context.parserOptions && context.parserOptions.tsconfigRootDir }).digest('hex');var tsConfig = tsConfigCache.get(cacheKey);if (typeof tsConfig === 'undefined') {tsConfig = readTsConfig(context);tsConfigCache.set(cacheKey, tsConfig);}return tsConfig && tsConfig.options ? tsConfig.options.esModuleInterop : false;}ast.body.forEach(function (n) {if (n.type === 'ExportDefaultDeclaration') {var exportMeta = captureDoc(source, docStyleParsers, n);if (n.declaration.type === 'Identifier') {addNamespace(exportMeta, n.declaration);}m.namespace.set('default', exportMeta);return;}if (n.type === 'ExportAllDeclaration') {var getter = captureDependency(n, n.exportKind === 'type');if (getter) m.dependencies.add(getter);if (n.exported) {processSpecifier(n, n.exported, m);}return;} // capture namespaces in case of later export + if (n.type === 'ImportDeclaration') {captureDependencyWithSpecifiers(n);var ns = n.specifiers.find(function (s) {return s.type === 'ImportNamespaceSpecifier';});if (ns) {namespaces.set(ns.local.name, n.source.value);}return;}if (n.type === 'ExportNamedDeclaration') {captureDependencyWithSpecifiers(n); // capture declaration if (n.declaration != null) {switch (n.declaration.type) {case 'FunctionDeclaration':case 'ClassDeclaration':case 'TypeAlias': // flowtype with babel-eslint parser - case 'InterfaceDeclaration':case 'DeclareFunction':case 'TSDeclareFunction':case 'TSEnumDeclaration':case 'TSTypeAliasDeclaration':case 'TSInterfaceDeclaration':case 'TSAbstractClassDeclaration':case 'TSModuleDeclaration':m.namespace.set(n.declaration.id.name, captureDoc(source, docStyleParsers, n));break;case 'VariableDeclaration':n.declaration.declarations.forEach(function (d) {return recursivePatternCapture(d.id, function (id) {return m.namespace.set(id.name, captureDoc(source, docStyleParsers, d, n));});});break;}}var nsource = n.source && n.source.value;n.specifiers.forEach(function (s) {var exportMeta = {};var local = void 0;switch (s.type) {case 'ExportDefaultSpecifier':if (!n.source) return;local = 'default';break;case 'ExportNamespaceSpecifier':m.namespace.set(s.exported.name, Object.defineProperty(exportMeta, 'namespace', { get: function () {function get() {return resolveImport(nsource);}return get;}() }));return;case 'ExportSpecifier':if (!n.source) {m.namespace.set(s.exported.name, addNamespace(exportMeta, s.local));return;} // else falls through - default:local = s.local.name;break;} // todo: JSDoc - m.reexports.set(s.exported.name, { local: local, getImport: function () {function getImport() {return resolveImport(nsource);}return getImport;}() });});}var isEsModuleInteropTrue = isEsModuleInterop();var exports = ['TSExportAssignment'];if (isEsModuleInteropTrue) {exports.push('TSNamespaceExportDeclaration');} // This doesn't declare anything, but changes what's being exported. - if ((0, _arrayIncludes2['default'])(exports, n.type)) {var exportedName = n.type === 'TSNamespaceExportDeclaration' ? n.id.name : n.expression && n.expression.name || n.expression.id && n.expression.id.name || null;var declTypes = ['VariableDeclaration', 'ClassDeclaration', 'TSDeclareFunction', 'TSEnumDeclaration', 'TSTypeAliasDeclaration', 'TSInterfaceDeclaration', 'TSAbstractClassDeclaration', 'TSModuleDeclaration'];var exportedDecls = ast.body.filter(function (_ref2) {var type = _ref2.type,id = _ref2.id,declarations = _ref2.declarations;return (0, _arrayIncludes2['default'])(declTypes, type) && (id && id.name === exportedName || declarations && declarations.find(function (d) {return d.id.name === exportedName;}));});if (exportedDecls.length === 0) {// Export is not referencing any local declaration, must be re-exporting - m.namespace.set('default', captureDoc(source, docStyleParsers, n));return;}if (isEsModuleInteropTrue) {m.namespace.set('default', {});}exportedDecls.forEach(function (decl) {if (decl.type === 'TSModuleDeclaration') {if (decl.body && decl.body.type === 'TSModuleDeclaration') {m.namespace.set(decl.body.id.name, captureDoc(source, docStyleParsers, decl.body));} else if (decl.body && decl.body.body) {decl.body.body.forEach(function (moduleBlockNode) {// Export-assignment exports all members in the namespace, + case 'InterfaceDeclaration':case 'DeclareFunction':case 'TSDeclareFunction':case 'TSEnumDeclaration':case 'TSTypeAliasDeclaration':case 'TSInterfaceDeclaration':case 'TSAbstractClassDeclaration':case 'TSModuleDeclaration':m.namespace.set(n.declaration.id.name, captureDoc(source, docStyleParsers, n));break;case 'VariableDeclaration':n.declaration.declarations.forEach(function (d) {return recursivePatternCapture(d.id, function (id) {return m.namespace.set(id.name, captureDoc(source, docStyleParsers, d, n));});});break;}}n.specifiers.forEach(function (s) {return processSpecifier(s, n, m);});}var exports = ['TSExportAssignment'];if (isEsModuleInteropTrue) {exports.push('TSNamespaceExportDeclaration');} // This doesn't declare anything, but changes what's being exported. + if ((0, _arrayIncludes2['default'])(exports, n.type)) {var exportedName = n.type === 'TSNamespaceExportDeclaration' ? (n.id || n.name).name : n.expression && n.expression.name || n.expression.id && n.expression.id.name || null;var declTypes = ['VariableDeclaration', 'ClassDeclaration', 'TSDeclareFunction', 'TSEnumDeclaration', 'TSTypeAliasDeclaration', 'TSInterfaceDeclaration', 'TSAbstractClassDeclaration', 'TSModuleDeclaration'];var exportedDecls = ast.body.filter(function (_ref2) {var type = _ref2.type,id = _ref2.id,declarations = _ref2.declarations;return (0, _arrayIncludes2['default'])(declTypes, type) && (id && id.name === exportedName || declarations && declarations.find(function (d) {return d.id.name === exportedName;}));});if (exportedDecls.length === 0) {// Export is not referencing any local declaration, must be re-exporting + m.namespace.set('default', captureDoc(source, docStyleParsers, n));return;}if (isEsModuleInteropTrue // esModuleInterop is on in tsconfig + && !m.namespace.has('default') // and default isn't added already + ) {m.namespace.set('default', {}); // add default export + }exportedDecls.forEach(function (decl) {if (decl.type === 'TSModuleDeclaration') {if (decl.body && decl.body.type === 'TSModuleDeclaration') {m.namespace.set(decl.body.id.name, captureDoc(source, docStyleParsers, decl.body));} else if (decl.body && decl.body.body) {decl.body.body.forEach(function (moduleBlockNode) {// Export-assignment exports all members in the namespace, // explicitly exported or not. var namespaceDecl = moduleBlockNode.type === 'ExportNamedDeclaration' ? moduleBlockNode.declaration : moduleBlockNode;if (!namespaceDecl) {// TypeScript can check this for us; we needn't } else if (namespaceDecl.type === 'VariableDeclaration') {namespaceDecl.declarations.forEach(function (d) {return recursivePatternCapture(d.id, function (id) {return m.namespace.set(id.name, captureDoc(source, docStyleParsers, decl, namespaceDecl, moduleBlockNode));});});} else {m.namespace.set(namespaceDecl.id.name, captureDoc(source, docStyleParsers, moduleBlockNode));}});}} else {// Export as default - m.namespace.set('default', captureDoc(source, docStyleParsers, decl));}});}});return m;}; /** - * The creation of this closure is isolated from other scopes - * to avoid over-retention of unrelated variables, which has - * caused memory leaks. See #1266. - */function thunkFor(p, context) {return function () {return ExportMap['for'](childContext(p, context));};} /** - * Traverse a pattern/identifier node, calling 'callback' - * for each leaf identifier. - * @param {node} pattern - * @param {Function} callback - * @return {void} - */function recursivePatternCapture(pattern, callback) {switch (pattern.type) {case 'Identifier': // base case + m.namespace.set('default', captureDoc(source, docStyleParsers, decl));}});}});if (isEsModuleInteropTrue // esModuleInterop is on in tsconfig + && m.namespace.size > 0 // anything is exported + && !m.namespace.has('default') // and default isn't added already + ) {m.namespace.set('default', {}); // add default export + }if (unambiguouslyESM) {m.parseGoal = 'Module';}return m;}; /** + * The creation of this closure is isolated from other scopes + * to avoid over-retention of unrelated variables, which has + * caused memory leaks. See #1266. + */function thunkFor(p, context) {return function () {return ExportMap['for'](childContext(p, context));};} /** + * Traverse a pattern/identifier node, calling 'callback' + * for each leaf identifier. + * @param {node} pattern + * @param {Function} callback + * @return {void} + */function recursivePatternCapture(pattern, callback) {switch (pattern.type) {case 'Identifier': // base case callback(pattern);break;case 'ObjectPattern':pattern.properties.forEach(function (p) {if (p.type === 'ExperimentalRestProperty' || p.type === 'RestElement') {callback(p.argument);return;}recursivePatternCapture(p.value, callback);});break;case 'ArrayPattern':pattern.elements.forEach(function (element) {if (element == null) return;if (element.type === 'ExperimentalRestProperty' || element.type === 'RestElement') {callback(element.argument);return;}recursivePatternCapture(element, callback);});break;case 'AssignmentPattern':callback(pattern.left);break;}} /** * don't hold full context object in memory, just grab what we need. */function childContext(path, context) {var settings = context.settings,parserOptions = context.parserOptions,parserPath = context.parserPath;return { settings: settings, parserOptions: parserOptions, parserPath: parserPath, path: path };} /** @@ -758,4 +852,4 @@ recursivePatternCapture = recursivePatternCapture;var _fs = require('fs');var _f */function makeSourceCode(text, ast) {if (_eslint.SourceCode.length > 1) {// ESLint 3 return new _eslint.SourceCode(text, ast);} else {// ESLint 4, 5 return new _eslint.SourceCode({ text: text, ast: ast });}} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9FeHBvcnRNYXAuanMiXSwibmFtZXMiOlsicmVjdXJzaXZlUGF0dGVybkNhcHR1cmUiLCJ1bmFtYmlndW91cyIsInBhcnNlQ29uZmlnRmlsZVRleHRUb0pzb24iLCJsb2ciLCJleHBvcnRDYWNoZSIsIk1hcCIsInRzQ29uZmlnQ2FjaGUiLCJFeHBvcnRNYXAiLCJwYXRoIiwibmFtZXNwYWNlIiwicmVleHBvcnRzIiwiZGVwZW5kZW5jaWVzIiwiU2V0IiwiaW1wb3J0cyIsImVycm9ycyIsIm5hbWUiLCJoYXMiLCJkZXAiLCJpbm5lck1hcCIs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AgICAgIGlmICghbmFtZXNwYWNlRGVjbCkge1xuICAgICAgICAgICAgICAgIC8vIFR5cGVTY3JpcHQgY2FuIGNoZWNrIHRoaXMgZm9yIHVzOyB3ZSBuZWVkbid0XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAobmFtZXNwYWNlRGVjbC50eXBlID09PSAnVmFyaWFibGVEZWNsYXJhdGlvbicpIHtcbiAgICAgICAgICAgICAgICBuYW1lc3BhY2VEZWNsLmRlY2xhcmF0aW9ucy5mb3JFYWNoKChkKSA9PlxuICAgICAgICAgICAgICAgICAgcmVjdXJzaXZlUGF0dGVybkNhcHR1cmUoZC5pZCwgKGlkKSA9PiBtLm5hbWVzcGFjZS5zZXQoXG4gICAgICAgICAgICAgICAgICAgIGlkLm5hbWUsXG4gICAgICAgICAgICAgICAgICAgIGNhcHR1cmVEb2Moc291cmNlLCBkb2NTdHlsZVBhcnNlcnMsIGRlY2wsIG5hbWVzcGFjZURlY2wsIG1vZHVsZUJsb2NrTm9kZSlcbiAgICAgICAgICAgICAgICAgICkpXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBtLm5hbWVzcGFjZS5zZXQoXG4gICAgICAgICAgICAgICAgICBuYW1lc3BhY2VEZWNsLmlkLm5hbWUsXG4gICAgICAgICAgICAgICAgICBjYXB0dXJlRG9jKHNvdXJjZSwgZG9jU3R5bGVQYXJzZXJzLCBtb2R1bGVCbG9ja05vZGUpKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIEV4cG9ydCBhcyBkZWZhdWx0XG4gICAgICAgICAgbS5uYW1lc3BhY2Uuc2V0KCdkZWZhdWx0JywgY2FwdHVyZURvYyhzb3VyY2UsIGRvY1N0eWxlUGFyc2VycywgZGVjbCkpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9XG4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TtcbiAgfSBlbHNlIHtcbiAgICAvLyBFU0xpbnQgNCwgNVxuICAgIHJldHVybiBuZXcgU291cmNlQ29kZSh7IHRleHQsIGFzdCB9KTtcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/core/importType.js b/node_modules/eslint-plugin-import/lib/core/importType.js index f77825795..6851c914e 100644 --- a/node_modules/eslint-plugin-import/lib/core/importType.js +++ b/node_modules/eslint-plugin-import/lib/core/importType.js @@ -13,6 +13,11 @@ + + + + + isAbsolute = isAbsolute;exports. @@ -50,6 +55,22 @@ isExternalModuleMain = isExternalModuleMain;exports. +isScoped = isScoped;exports. + + + + +isScopedMain = isScopedMain;exports['default'] = + + + + + + + + + + @@ -65,12 +86,10 @@ isExternalModuleMain = isExternalModuleMain;exports. -isScoped = isScoped;exports. -isScopedMain = isScopedMain;exports. @@ -101,11 +120,10 @@ isScopedMain = isScopedMain;exports. -isScopedModule = isScopedModule;exports['default'] = -resolveImportType;var _path = require('path');var _isCoreModule = require('is-core-module');var _isCoreModule2 = _interopRequireDefault(_isCoreModule);var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve);var _packagePath = require('./packagePath');function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function baseModule(name) {if (isScoped(name)) {var _name$split = name.split('/'),_name$split2 = _slicedToArray(_name$split, 2),scope = _name$split2[0],_pkg = _name$split2[1];return String(scope) + '/' + String(_pkg);}var _name$split3 = name.split('/'),_name$split4 = _slicedToArray(_name$split3, 1),pkg = _name$split4[0];return pkg;}function isAbsolute(name) {return (0, _path.isAbsolute)(name);} // path is defined only when a resolver resolves to a non-standard path -function isBuiltIn(name, settings, path) {if (path || !name) return false;var base = baseModule(name);var extras = settings && settings['import/core-modules'] || [];return (0, _isCoreModule2['default'])(base) || extras.indexOf(base) > -1;}function isExternalModule(name, settings, path, context) {if (arguments.length < 4) {throw new TypeError('isExternalModule: name, settings, path, and context are all required');}return isModule(name) && isExternalPath(name, settings, path, (0, _packagePath.getContextPackagePath)(context));}function isExternalModuleMain(name, settings, path, context) {return isModuleMain(name) && isExternalPath(name, settings, path, (0, _packagePath.getContextPackagePath)(context));}function isExternalPath(name, settings, path, packagePath) {var internalScope = settings && settings['import/internal-regex'];if (internalScope && new RegExp(internalScope).test(name)) {return false;}if (!path || (0, _path.relative)(packagePath, path).startsWith('..')) {return true;}var folders = settings && settings['import/external-module-folders'] || ['node_modules'];return folders.some(function (folder) {var folderPath = (0, _path.resolve)(packagePath, folder);var relativePath = (0, _path.relative)(folderPath, path);return !relativePath.startsWith('..');});}var moduleRegExp = /^\w/;function isModule(name) {return name && moduleRegExp.test(name);}var moduleMainRegExp = /^[\w]((?!\/).)*$/;function isModuleMain(name) {return name && moduleMainRegExp.test(name);}var scopedRegExp = /^@[^/]+\/?[^/]+/;function isScoped(name) {return name && scopedRegExp.test(name);}var scopedMainRegExp = /^@[^/]+\/?[^/]+$/;function isScopedMain(name) {return name && scopedMainRegExp.test(name);}function isRelativeToParent(name) {return (/^\.\.$|^\.\.[\\/]/.test(name));}var indexFiles = ['.', './', './index', './index.js'];function isIndex(name) {return indexFiles.indexOf(name) !== -1;}function isRelativeToSibling(name) {return (/^\.[\\/]/.test(name));}function typeTest(name, context, path) {var settings = context.settings;if (isAbsolute(name, settings, path)) {return 'absolute';}if (isBuiltIn(name, settings, path)) {return 'builtin';}if (isModule(name, settings, path) || isScoped(name, settings, path)) {var packagePath = (0, _packagePath.getContextPackagePath)(context);return isExternalPath(name, settings, path, packagePath) ? 'external' : 'internal';}if (isRelativeToParent(name, settings, path)) {return 'parent';}if (isIndex(name, settings, path)) {return 'index';}if (isRelativeToSibling(name, settings, path)) {return 'sibling';}return 'unknown';}function isScopedModule(name) {return name.indexOf('@') === 0 && !name.startsWith('@/');}function resolveImportType(name, context) {return typeTest(name, context, (0, _resolve2['default'])(name, context)); +resolveImportType;var _path = require('path');var _isCoreModule = require('is-core-module');var _isCoreModule2 = _interopRequireDefault(_isCoreModule);var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve);var _packagePath = require('./packagePath');function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function baseModule(name) {if (isScoped(name)) {var _name$split = name.split('/'),_name$split2 = _slicedToArray(_name$split, 2),scope = _name$split2[0],_pkg = _name$split2[1];return String(scope) + '/' + String(_pkg);}var _name$split3 = name.split('/'),_name$split4 = _slicedToArray(_name$split3, 1),pkg = _name$split4[0];return pkg;}function isInternalRegexMatch(name, settings) {var internalScope = settings && settings['import/internal-regex'];return internalScope && new RegExp(internalScope).test(name);}function isAbsolute(name) {return typeof name === 'string' && (0, _path.isAbsolute)(name);} // path is defined only when a resolver resolves to a non-standard path +function isBuiltIn(name, settings, path) {if (path || !name) return false;var base = baseModule(name);var extras = settings && settings['import/core-modules'] || [];return (0, _isCoreModule2['default'])(base) || extras.indexOf(base) > -1;}function isExternalModule(name, path, context) {if (arguments.length < 3) {throw new TypeError('isExternalModule: name, path, and context are all required');}return (isModule(name) || isScoped(name)) && typeTest(name, context, path) === 'external';}function isExternalModuleMain(name, path, context) {if (arguments.length < 3) {throw new TypeError('isExternalModule: name, path, and context are all required');}return isModuleMain(name) && typeTest(name, context, path) === 'external';}var moduleRegExp = /^\w/;function isModule(name) {return name && moduleRegExp.test(name);}var moduleMainRegExp = /^[\w]((?!\/).)*$/;function isModuleMain(name) {return name && moduleMainRegExp.test(name);}var scopedRegExp = /^@[^/]+\/?[^/]+/;function isScoped(name) {return name && scopedRegExp.test(name);}var scopedMainRegExp = /^@[^/]+\/?[^/]+$/;function isScopedMain(name) {return name && scopedMainRegExp.test(name);}function isRelativeToParent(name) {return (/^\.\.$|^\.\.[\\/]/.test(name));}var indexFiles = ['.', './', './index', './index.js'];function isIndex(name) {return indexFiles.indexOf(name) !== -1;}function isRelativeToSibling(name) {return (/^\.[\\/]/.test(name));}function isExternalPath(path, context) {if (!path) {return false;}var settings = context.settings;var packagePath = (0, _packagePath.getContextPackagePath)(context);if ((0, _path.relative)(packagePath, path).startsWith('..')) {return true;}var folders = settings && settings['import/external-module-folders'] || ['node_modules'];return folders.some(function (folder) {var folderPath = (0, _path.resolve)(packagePath, folder);var relativePath = (0, _path.relative)(folderPath, path);return !relativePath.startsWith('..');});}function isInternalPath(path, context) {if (!path) {return false;}var packagePath = (0, _packagePath.getContextPackagePath)(context);return !(0, _path.relative)(packagePath, path).startsWith('../');}function isExternalLookingName(name) {return isModule(name) || isScoped(name);}function typeTest(name, context, path) {var settings = context.settings;if (isInternalRegexMatch(name, settings)) {return 'internal';}if (isAbsolute(name, settings, path)) {return 'absolute';}if (isBuiltIn(name, settings, path)) {return 'builtin';}if (isRelativeToParent(name, settings, path)) {return 'parent';}if (isIndex(name, settings, path)) {return 'index';}if (isRelativeToSibling(name, settings, path)) {return 'sibling';}if (isExternalPath(path, context)) {return 'external';}if (isInternalPath(path, context)) {return 'internal';}if (isExternalLookingName(name)) {return 'external';}return 'unknown';}function resolveImportType(name, context) {return typeTest(name, context, (0, _resolve2['default'])(name, context)); } -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL2ltcG9ydFR5cGUuanMiXSwibmFtZXMiOlsiaXNBYnNvbHV0ZSIsImlzQnVpbHRJbiIsImlzRXh0ZXJuYWxNb2R1bGUiLCJpc0V4dGVybmFsTW9kdWxlTWFpbiIsImlzU2NvcGVkIiwiaXNTY29wZWRNYWluIiwiaXNTY29wZWRNb2R1bGUiLCJyZXNvbHZlSW1wb3J0VHlwZSIsImJhc2VNb2R1bGUiLCJuYW1lIiwic3BsaXQiLCJzY29wZSIsInBrZyIsInNldHRpbmdzIiwicGF0aCIsImJhc2UiLCJleHRyYXMiLCJpbmRleE9mIiwiY29udGV4dCIsImFyZ3VtZW50cyIsImxlbmd0aCIsIlR5cGVFcnJvciIsImlzTW9kdWxlIiwiaXNFeHRlcm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VsYXRpdmVUb1BhcmVudChuYW1lLCBzZXR0aW5ncywgcGF0aCkpIHsgcmV0dXJuICdwYXJlbnQnOyB9XG4gIGlmIChpc0luZGV4KG5hbWUsIHNldHRpbmdzLCBwYXRoKSkgeyByZXR1cm4gJ2luZGV4JzsgfVxuICBpZiAoaXNSZWxhdGl2ZVRvU2libGluZyhuYW1lLCBzZXR0aW5ncywgcGF0aCkpIHsgcmV0dXJuICdzaWJsaW5nJzsgfVxuICByZXR1cm4gJ3Vua25vd24nO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNTY29wZWRNb2R1bGUobmFtZSkge1xuICByZXR1cm4gbmFtZS5pbmRleE9mKCdAJykgPT09IDAgJiYgIW5hbWUuc3RhcnRzV2l0aCgnQC8nKTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gcmVzb2x2ZUltcG9ydFR5cGUobmFtZSwgY29udGV4dCkge1xuICByZXR1cm4gdHlwZVRlc3QobmFtZSwgY29udGV4dCwgcmVzb2x2ZShuYW1lLCBjb250ZXh0KSk7XG59XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL2ltcG9ydFR5cGUuanMiXSwibmFtZXMiOlsiaXNBYnNvbHV0ZSIsImlzQnVpbHRJbiIsImlzRXh0ZXJuYWxNb2R1bGUiLCJpc0V4dGVybmFsTW9kdWxlTWFpbiIsImlzU2NvcGVkIiwiaXNTY29wZWRNYWluIiwicmVzb2x2ZUltcG9ydFR5cGUiLCJiYXNlTW9kdWxlIiwibmFtZSIsInNwbGl0Iiwic2NvcGUiLCJwa2ciLCJpc0ludGVybmFsUmVnZXhNYXRjaCIsInNldHRpbmdzIiwiaW50ZXJuYWxTY29wZSIsIlJlZ0V4cCIsInRlc3QiLCJwYXRoIiwiYmFzZSIsImV4dHJhcyIsImluZGV4T2YiLCJjb250ZXh0IiwiYXJ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0xO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNFeHRlcm5hbE1vZHVsZShuYW1lLCBwYXRoLCBjb250ZXh0KSB7XG4gIGlmIChhcmd1bWVudHMubGVuZ3RoIDwgMykgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ2lzRXh0ZXJuYWxNb2R1bGU6IG5hbWUsIHBhdGgsIGFuZCBjb250ZXh0IGFyZSBhbGwgcmVxdWlyZWQnKTtcbiAgfVxuICByZXR1cm4gKGlzTW9kdWxlKG5hbWUpIHx8IGlzU2NvcGVkKG5hbWUpKSAmJiB0eXBlVGVzdChuYW1lLCBjb250ZXh0LCBwYXRoKSA9PT0gJ2V4dGVybmFsJztcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzRXh0ZXJuYWxNb2R1bGVNYWluKG5hbWUsIHBhdGgsIGNvbnRleHQpIHtcbiAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPCAzKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcignaXNFeHRlcm5hbE1vZHVsZTogbmFtZSwgcGF0aCwgYW5kIGNvbnRleHQgYXJlIGFsbCByZXF1aXJlZCcpO1xuICB9XG4gIHJldHVybiBpc01vZHVsZU1haW4obmFtZSkgJiYgdHlwZVRlc3QobmFtZSwgY29udGV4dCw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W1lLCBjb250ZXh0LCByZXNvbHZlKG5hbWUsIGNvbnRleHQpKTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/core/packagePath.js b/node_modules/eslint-plugin-import/lib/core/packagePath.js index 85236c7a2..e92577297 100644 --- a/node_modules/eslint-plugin-import/lib/core/packagePath.js +++ b/node_modules/eslint-plugin-import/lib/core/packagePath.js @@ -12,12 +12,12 @@ getFilePackagePath = getFilePackagePath;exports. -getFilePackageName = getFilePackageName;var _path = require('path');var _findUp = require('find-up');var _findUp2 = _interopRequireDefault(_findUp);var _readPkgUp = require('read-pkg-up');var _readPkgUp2 = _interopRequireDefault(_readPkgUp);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function getContextPackagePath(context) {return getFilePackagePath(context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename());}function getFilePackagePath(filePath) {var fp = _findUp2['default'].sync('package.json', { cwd: filePath });return (0, _path.dirname)(fp);}function getFilePackageName(filePath) {var _readPkgUp$sync = - _readPkgUp2['default'].sync({ cwd: filePath, normalize: false }),pkg = _readPkgUp$sync.pkg,path = _readPkgUp$sync.path; +getFilePackageName = getFilePackageName;var _path = require('path');var _pkgUp = require('eslint-module-utils/pkgUp');var _pkgUp2 = _interopRequireDefault(_pkgUp);var _readPkgUp2 = require('eslint-module-utils/readPkgUp');var _readPkgUp3 = _interopRequireDefault(_readPkgUp2);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function getContextPackagePath(context) {return getFilePackagePath(context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename());}function getFilePackagePath(filePath) {var fp = (0, _pkgUp2['default'])({ cwd: filePath });return (0, _path.dirname)(fp);}function getFilePackageName(filePath) {var _readPkgUp = + (0, _readPkgUp3['default'])({ cwd: filePath, normalize: false }),pkg = _readPkgUp.pkg,path = _readPkgUp.path; if (pkg) { // recursion in case of intermediate esm package.json without name found return pkg.name || getFilePackageName((0, _path.d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IG5vcm1hbGl6ZTogZmFsc2UgfSk7XG4gIGlmIChwa2cpIHtcbiAgICAvLyByZWN1cnNpb24gaW4gY2FzZSBvZiBpbnRlcm1lZGlhdGUgZXNtIHBhY2thZ2UuanNvbiB3aXRob3V0IG5hbWUgZm91bmRcbiAgICByZXR1cm4gcGtnLm5hbWUgfHwgZ2V0RmlsZVBhY2thZ2VOYW1lKGRpcm5hbWUoZGlybmFtZShwYXRoKSkpO1xuICB9XG4gIHJldHVybiBudWxsO1xufVxuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/index.js b/node_modules/eslint-plugin-import/lib/index.js index 247818e0a..927dd54ec 100644 --- a/node_modules/eslint-plugin-import/lib/index.js +++ b/node_modules/eslint-plugin-import/lib/index.js @@ -12,6 +12,7 @@ 'group-exports': require('./rules/group-exports'), 'no-relative-packages': require('./rules/no-relative-packages'), 'no-relative-parent-imports': require('./rules/no-relative-parent-imports'), + 'consistent-type-specifier-style': require('./rules/consistent-type-specifier-style'), 'no-self-import': require('./rules/no-self-import'), 'no-cycle': require('./rules/no-cycle'), @@ -41,6 +42,7 @@ 'no-useless-path-segments': require('./rules/no-useless-path-segments'), 'dynamic-import-chunkname': require('./rules/dynamic-import-chunkname'), 'no-import-module-exports': require('./rules/no-import-module-exports'), + 'no-empty-named-blocks': require('./rules/no-empty-named-blocks'), // export 'exports-last': require('./rules/exports-last'), @@ -66,4 +68,4 @@ var configs = exports.configs = { 'react-native': require('../config/react-native'), 'electron': require('../config/electron'), 'typescript': require('../config/typescript') }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJydWxlcyIsInJlcXVpcmUiLCJjb25maWdzIl0sIm1hcHBpbmdzIjoiMkVBQU8sSUFBTUEsd0JBQVE7QUFDbkIsbUJBQWlCQyxRQUFRLHVCQUFSLENBREU7QUFFbkIsV0FBU0EsUUFBU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cmVxdWlyZSgnLi4vY29uZmlnL2Vycm9ycycpLFxuICAnd2FybmluZ3MnOiByZXF1aXJlKCcuLi9jb25maWcvd2FybmluZ3MnKSxcblxuICAvLyBzaGhoaC4uLiB3b3JrIGluIHByb2dyZXNzIFwic2VjcmV0XCIgcnVsZXNcbiAgJ3N0YWdlLTAnOiByZXF1aXJlKCcuLi9jb25maWcvc3RhZ2UtMCcpLFxuXG4gIC8vIHVzZWZ1bCBzdHVmZiBmb3IgZm9sa3MgdXNpbmcgdmFyaW91cyBlbnZpcm9ubWVudHNcbiAgJ3JlYWN0JzogcmVxdWlyZSgnLi4vY29uZmlnL3JlYWN0JyksXG4gICdyZWFjdC1uYXRpdmUnOiByZXF1aXJlKCcuLi9jb25maWcvcmVhY3QtbmF0aXZlJyksXG4gICdlbGVjdHJvbic6IHJlcXVpcmUoJy4uL2NvbmZpZy9lbGVjdHJvbicpLFxuICAndHlwZXNjcmlwdCc6IHJlcXVpcmUoJy4uL2NvbmZpZy90eXBlc2NyaXB0JyksXG59O1xuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js b/node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js new file mode 100644 index 000000000..676f80781 --- /dev/null +++ b/node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js @@ -0,0 +1,217 @@ +'use strict';var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} + +function isComma(token) { + return token.type === 'Punctuator' && token.value === ','; +} + +function removeSpecifiers(fixes, fixer, sourceCode, specifiers) {var _iteratorNormalCompletion = true;var _didIteratorError = false;var _iteratorError = undefined;try { + for (var _iterator = specifiers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {var specifier = _step.value; + // remove the trailing comma + var comma = sourceCode.getTokenAfter(specifier, isComma); + if (comma) { + fixes.push(fixer.remove(comma)); + } + fixes.push(fixer.remove(specifier)); + }} catch (err) {_didIteratorError = true;_iteratorError = err;} finally {try {if (!_iteratorNormalCompletion && _iterator['return']) {_iterator['return']();}} finally {if (_didIteratorError) {throw _iteratorError;}}} +} + +function getImportText( +node, +sourceCode, +specifiers, +kind) +{ + var sourceString = sourceCode.getText(node.source); + if (specifiers.length === 0) { + return ''; + } + + var names = specifiers.map(function (s) { + if (s.imported.name === s.local.name) { + return s.imported.name; + } + return String(s.imported.name) + ' as ' + String(s.local.name); + }); + // insert a fresh top-level import + return 'import ' + String(kind) + ' {' + String(names.join(', ')) + '} from ' + String(sourceString) + ';'; +} + +module.exports = { + meta: { + type: 'suggestion', + docs: { + category: 'Style guide', + description: 'Enforce or ban the use of inline type-only markers for named imports.', + url: (0, _docsUrl2['default'])('consistent-type-specifier-style') }, + + fixable: 'code', + schema: [ + { + type: 'string', + 'enum': ['prefer-inline', 'prefer-top-level'], + 'default': 'prefer-inline' }] }, + + + + + create: function () {function create(context) { + var sourceCode = context.getSourceCode(); + + if (context.options[0] === 'prefer-inline') { + return { + ImportDeclaration: function () {function ImportDeclaration(node) { + if (node.importKind === 'value' || node.importKind == null) { + // top-level value / unknown is valid + return; + } + + if ( + // no specifiers (import type {} from '') have no specifiers to mark as inline + node.specifiers.length === 0 || + node.specifiers.length === 1 && ( + // default imports are both "inline" and "top-level" + node.specifiers[0].type === 'ImportDefaultSpecifier' || + // namespace imports are both "inline" and "top-level" + node.specifiers[0].type === 'ImportNamespaceSpecifier')) + { + return; + } + + context.report({ + node: node, + message: 'Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.', + data: { + kind: node.importKind }, + + fix: function () {function fix(fixer) { + var kindToken = sourceCode.getFirstToken(node, { skip: 1 }); + + return [].concat( + kindToken ? fixer.remove(kindToken) : [], + node.specifiers.map(function (specifier) {return fixer.insertTextBefore(specifier, String(node.importKind) + ' ');})); + + }return fix;}() }); + + }return ImportDeclaration;}() }; + + } + + // prefer-top-level + return { + ImportDeclaration: function () {function ImportDeclaration(node) { + if ( + // already top-level is valid + node.importKind === 'type' || + node.importKind === 'typeof' || + // no specifiers (import {} from '') cannot have inline - so is valid + node.specifiers.length === 0 || + node.specifiers.length === 1 && ( + // default imports are both "inline" and "top-level" + node.specifiers[0].type === 'ImportDefaultSpecifier' || + // namespace imports are both "inline" and "top-level" + node.specifiers[0].type === 'ImportNamespaceSpecifier')) + { + return; + } + + var typeSpecifiers = []; + var typeofSpecifiers = []; + var valueSpecifiers = []; + var defaultSpecifier = null;var _iteratorNormalCompletion2 = true;var _didIteratorError2 = false;var _iteratorError2 = undefined;try { + for (var _iterator2 = node.specifiers[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {var specifier = _step2.value; + if (specifier.type === 'ImportDefaultSpecifier') { + defaultSpecifier = specifier; + continue; + } + + if (specifier.importKind === 'type') { + typeSpecifiers.push(specifier); + } else if (specifier.importKind === 'typeof') { + typeofSpecifiers.push(specifier); + } else if (specifier.importKind === 'value' || specifier.importKind == null) { + valueSpecifiers.push(specifier); + } + }} catch (err) {_didIteratorError2 = true;_iteratorError2 = err;} finally {try {if (!_iteratorNormalCompletion2 && _iterator2['return']) {_iterator2['return']();}} finally {if (_didIteratorError2) {throw _iteratorError2;}}} + + var typeImport = getImportText(node, sourceCode, typeSpecifiers, 'type'); + var typeofImport = getImportText(node, sourceCode, typeofSpecifiers, 'typeof'); + var newImports = (String(typeImport) + '\n' + String(typeofImport)).trim(); + + if (typeSpecifiers.length + typeofSpecifiers.length === node.specifiers.length) { + // all specifiers have inline specifiers - so we replace the entire import + var kind = [].concat( + typeSpecifiers.length > 0 ? 'type' : [], + typeofSpecifiers.length > 0 ? 'typeof' : []); + + + context.report({ + node: node, + message: 'Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.', + data: { + kind: kind.join('/') }, + + fix: function () {function fix(fixer) { + return fixer.replaceText(node, newImports); + }return fix;}() }); + + } else { + // remove specific specifiers and insert new imports for them + var _iteratorNormalCompletion3 = true;var _didIteratorError3 = false;var _iteratorError3 = undefined;try {for (var _iterator3 = typeSpecifiers.concat(typeofSpecifiers)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {var _specifier = _step3.value; + context.report({ + node: _specifier, + message: 'Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.', + data: { + kind: _specifier.importKind }, + + fix: function () {function fix(fixer) { + var fixes = []; + + // if there are no value specifiers, then the other report fixer will be called, not this one + + if (valueSpecifiers.length > 0) { + // import { Value, type Type } from 'mod'; + + // we can just remove the type specifiers + removeSpecifiers(fixes, fixer, sourceCode, typeSpecifiers); + removeSpecifiers(fixes, fixer, sourceCode, typeofSpecifiers); + + // make the import nicely formatted by also removing the trailing comma after the last value import + // eg + // import { Value, type Type } from 'mod'; + // to + // import { Value } from 'mod'; + // not + // import { Value, } from 'mod'; + var maybeComma = sourceCode.getTokenAfter(valueSpecifiers[valueSpecifiers.length - 1]); + if (isComma(maybeComma)) { + fixes.push(fixer.remove(maybeComma)); + } + } else if (defaultSpecifier) { + // import Default, { type Type } from 'mod'; + + // remove the entire curly block so we don't leave an empty one behind + // NOTE - the default specifier *must* be the first specifier always! + // so a comma exists that we also have to clean up or else it's bad syntax + var comma = sourceCode.getTokenAfter(defaultSpecifier, isComma); + var closingBrace = sourceCode.getTokenAfter( + node.specifiers[node.specifiers.length - 1], + function (token) {return token.type === 'Punctuator' && token.value === '}';}); + + fixes.push(fixer.removeRange([ + comma.range[0], + closingBrace.range[1]])); + + } + + return fixes.concat( + // insert the new imports after the old declaration + fixer.insertTextAfter(node, '\n' + String(newImports))); + + }return fix;}() }); + + }} catch (err) {_didIteratorError3 = true;_iteratorError3 = err;} finally {try {if (!_iteratorNormalCompletion3 && _iterator3['return']) {_iterator3['return']();}} finally {if (_didIteratorError3) {throw _iteratorError3;}}} + } + }return ImportDeclaration;}() }; + + }return create;}() }; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9jb25zaXN0ZW50LXR5cGUtc3BlY2lmaWVyLXN0eWxlLmpzIl0sIm5hbWVzIjpbImlzQ29tbWEiLCJ0b2tlbiIsInR5cGUiLCJ2YWx1ZSIsInJlbW92ZVNwZWNpZmllcnMiLCJmaXhlcyIsImZpeGVyIiwic291cmNlQ29kZSIsInNwZWNpZmllcnMiLCJzcGVjaWZpZXIiLCJjb21tYSIsImdldFRva2VuQWZ0ZXIiLCJwdXNoIiwicmVtb3ZlIiwiZ2V0SW1wb3J0VGV4dCIsIm5vZGUiLCJraW5kIiwic291cmNlU3RyaW5nIiwiZ2V0VGV4dCIsInNvdXJjZSIsImxlbmd0aCIsIm5hbWVzIiwibWFwIiwicyIsImltcG9ydGVkIiwibmFtZSIsImxvY2FsIiwiam9pbiIsIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsImNhdGVnb3J5IiwiZGVzY3JpcHRpb24iLCJ1cmwiLCJmaXhhYmxlIiwic2NoZW1hIiwiY3JlYXRlIiwiY29udGV4dCIsImdldFNvdXJjZUNvZGUiLCJvcHRpb25zIiwiSW1wb3J0RGVjbGFyYXRpb24iLCJpbXBvcnRLaW5kIiwicmVwb3J0IiwibWVzc2FnZSIsImRhdGEiLCJmaXgiLCJraW5kVG9rZW4iLCJnZXRGaXJzdFRva2VuIiwic2tpcCIsImNvbmNhdCIsImluc2VydFRleHRCZWZvcmUiLCJ0eXBlU3BlY2lmaWVycyIsInR5cGVvZlNwZWNpZmllcnMiLCJ2YWx1ZVNwZWNpZmllcnMiLCJkZWZhdWx0U3BlY2lmaWVyIiwidHlwZUltcG9ydCIsInR5cGVvZkltcG9ydCIsIm5ld0ltcG9ydHMiLCJ0cmltIiwicmVwbGFjZVRleHQiLCJtYXliZUNvbW1hIiw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4gICAgICAgIHR5cGU6ICdzdHJpbmcnLFxuICAgICAgICBlbnVtOiBbJ3ByZWZlci1pbmxpbmUnLCAncHJlZmVyLXRvcC1sZXZlbCddLFxuICAgICAgICBkZWZhdWx0OiAncHJlZmVyLWlubGluZScsXG4gICAgICB9LFxuICAgIF0sXG4gIH0sXG5cbiAgY3JlYXRlKGNvbnRleHQpIHtcbiAgICBjb25zdCBzb3VyY2VDb2RlID0gY29udGV4dC5nZXRTb3VyY2VDb2RlKCk7XG5cbiAgICBpZiAoY29udGV4dC5vcHRpb25zWzBdID09PSAncHJlZmVyLWlubGluZScpIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIEltcG9ydERlY2xhcmF0aW9uKG5vZGUpIHtcbiAgICAgICAgICBpZiAobm9kZS5pbXBvcnRLaW5kID09PSAndmFsdWUnIHx8IG5vZGUuaW1wb3J0S2luZCA9PSBudWxsKSB7XG4gICAgICAgICAgICAvLyB0b3AtbGV2ZWwgdmFsdWUgLyB1bmtub3duIGlzIHZhbGlkXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKFxuICAgICAgICAgICAgLy8gbm8gc3BlY2lmaWVycyAoaW1wb3J0IHR5cGUge30gZnJvbSAnJykgaGF2ZSBubyBzcGVjaWZpZXJzIHRvIG1hcmsgYXMgaW5saW5lXG4gICAgICAgICAgICBub2RlLnNwZWNpZmllcnMubGVuZ3RoID09PSAwIHx8XG4gICAgICAgICAgICAobm9kZS5zcGVjaWZpZXJzLmxlbmd0aCA9PT0gMSAmJlxuICAgICAgICAgICAgICAvLyBkZWZhdWx0IGltcG9ydHMgYXJlIGJvdGggXCJpbmxpbmVcIiBhbmQgXCJ0b3AtbGV2ZWxcIlxuICAgICAgICAgICAgICAobm9kZS5zcGVjaWZpZXJzWzBdLnR5cGUgPT09ICdJbXBvcnREZWZhdWx0U3BlY2lmaWVyJyB8fFxuICAgICAgICAgICAgICAgIC8vIG5hbWVzcGFjZSBpbXBvcnRzIGFyZSBib3RoIFwiaW5saW5lXCIgYW5kIFwidG9wLWxldmVsXCJcbiAgICAgICAgICAgICAgICBub2RlLnNwZWNpZmllcnNbMF0udHlwZSA9PT0gJ0ltcG9ydE5hbWVzcGFjZVNwZWNpZmllcicpKVxuICAgICAgICAgICkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICBtZXNzYWdlOiAnUHJlZmVyIHVzaW5nIGlubGluZSB7e2tpbmR9fSBzcGVjaWZpZXJzIGluc3RlYWQgb2YgYSB0b3AtbGV2ZWwge3traW5kfX0tb25seSBpbXBvcnQuJyxcbiAgICAgICAgICAgIGRhdGE6IHtcbiAgICAgICAgICAgICAga2luZDogbm9kZS5pbXBvcnRLaW5kLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZpeChmaXhlcikge1xuICAgICAgICAgICAgICBjb25zdCBraW5kVG9rZW4gPSBzb3VyY2VDb2RlLmdldEZpcnN0VG9rZW4obm9kZSwgeyBza2lwOiAxIH0pO1xuXG4gICAgICAgICAgICAgIHJldHVybiBbXS5jb25jYXQoXG4gICAgICAgICAgICAgICAga2luZFRva2VuID8gZml4ZXIucmVtb3ZlKGtpbmRUb2tlbikgOiBbXSxcbiAgICAgICAgICAgICAgICBub2RlLnNwZWNpZmllcnMubWFwKChzcGVjaWZpZXIpID0+IGZpeGVyLmluc2VydFRleHRCZWZvcmUoc3BlY2lmaWVyLCBgJHtub2RlLmltcG9ydEtpbmR9IGApKSxcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICB9O1xuICAgIH1cblxuICAgIC8vIHByZWZlci10b3AtbGV2ZWxcbiAgICByZXR1cm4ge1xuICAgICAgSW1wb3J0RGVjbGFyYXRpb24obm9kZSkge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgLy8gYWxyZWFkeSB0b3AtbGV2ZWwgaXMgdmFsaWRcbiAgICAgICAgICBub2RlLmltcG9ydEtpbmQgPT09ICd0eXBlJyB8fFxuICAgICAgICAgIG5vZGUuaW1wb3J0S2luZCA9PT0gJ3R5cGVvZicgfHxcbiAgICAgICAgICAvLyBubyBzcGVjaWZpZXJzIChpbXBvcnQge30gZnJvbSAnJykgY2Fubm90IGhhdmUgaW5saW5lIC0gc28gaXMgdmFsaWRcbiAgICAgICAgICBub2RlLnNwZWNpZmllcnMubGVuZ3RoID09PSAwIHx8XG4gICAgICAgICAgKG5vZGUuc3BlY2lmaWVycy5sZW5ndGggPT09IDEgJiZcbiAgICAgICAgICAgIC8vIGRlZmF1bHQgaW1wb3J0cyBhcmUgYm90aCBcImlubGluZVwiIGFuZCBcInRvcC1sZXZlbFwiXG4gICAgICAgICAgICAobm9kZS5zcGVjaWZpZXJzWzBdLnR5cGUgPT09ICdJbXBvcnREZWZhdWx0U3BlY2lmaWVyJyB8fFxuICAgICAgICAgICAgICAvLyBuYW1lc3BhY2UgaW1wb3J0cyBhcmUgYm90aCBcImlubGluZVwiIGFuZCBcInRvcC1sZXZlbFwiXG4gICAgICAgICAgICAgIG5vZGUuc3BlY2lmaWVyc1swXS50eXBlID09PSAnSW1wb3J0TmFtZXNwYWNlU3BlY2lmaWVyJykpXG4gICAgICAgICkge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHR5cGVTcGVjaWZpZXJzID0gW107XG4gICAgICAgIGNvbnN0IHR5cGVvZlNwZWNpZmllcnMgPSBbXTtcbiAgICAgICAgY29uc3QgdmFsdWVTcGVjaWZpZXJzID0gW107XG4gICAgICAgIGxldCBkZWZhdWx0U3BlY2lmaWVyID0gbnVsbDtcbiAgICAgICAgZm9yIChjb25zdCBzcGVjaWZpZXIgb2Ygbm9kZS5zcGVjaWZpZXJzKSB7XG4gICAgICAgICAgaWYgKHNwZWNpZmllci50eXBlID09PSAnSW1wb3J0RGVmYXVsdFNwZWNpZmllcicpIHtcbiAgICAgICAgICAgIGRlZmF1bHRTcGVjaWZpZXIgPSBzcGVjaWZpZXI7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoc3BlY2lmaWVyLmltcG9ydEtpbmQgPT09ICd0eXBlJykge1xuICAgICAgICAgICAgdHlwZVNwZWNpZmllcnMucHVzaChzcGVjaWZpZXIpO1xuICAgICAgICAgIH0gZWxzZSBpZiAoc3BlY2lmaWVyLmltcG9ydEtpbmQgPT09ICd0eXBlb2YnKSB7XG4gICAgICAgICAgICB0eXBlb2ZTcGVjaWZpZXJzLnB1c2goc3BlY2lmaWVyKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKHNwZWNpZmllci5pbXBvcnRLaW5kID09PSAndmFsdWUnIHx8IHNwZWNpZmllci5pbXBvcnRLaW5kID09IG51bGwpIHtcbiAgICAgICAgICAgIHZhbHVlU3BlY2lmaWVycy5wdXNoKHNwZWNpZmllcik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHlwZUltcG9ydCA9IGdldEltcG9ydFRleHQobm9kZSwgc291cmNlQ29kZSwgdHlwZVNwZWNpZmllcnMsICd0eXBlJyk7XG4gICAgICAgIGNvbnN0IHR5cGVvZkltcG9ydCA9IGdldEltcG9ydFRleHQobm9kZSwgc291cmNlQ29kZSwgdHlwZW9mU3BlY2lmaWVycywgJ3R5cGVvZicpO1xuICAgICAgICBjb25zdCBuZXdJbXBvcnRzID0gYCR7dHlwZUltcG9ydH1cXG4ke3R5cGVvZkltcG9ydH1gLnRyaW0oKTtcblxuICAgICAgICBpZiAodHlwZVNwZWNpZmllcnMubGVuZ3RoICsgdHlwZW9mU3BlY2lmaWVycy5sZW5ndGggPT09IG5vZGUuc3BlY2lmaWVycy5sZW5ndGgpIHtcbiAgICAgICAgICAvLyBhbGwgc3BlY2lmaWVycyBoYXZlIGlubGluZSBzcGVjaWZpZXJzIC0gc28gd2UgcmVwbGFjZSB0aGUgZW50aXJlIGltcG9ydFxuICAgICAgICAgIGNvbnN0IGtpbmQgPSBbXS5jb25jYXQoXG4gICAgICAgICAgICB0eXBlU3BlY2lmaWVycy5sZW5ndGggPiAwID8gJ3R5cGUnIDogW10sXG4gICAgICAgICAgICB0eXBlb2ZTcGVjaWZpZXJzLmxlbmd0aCA+IDAgPyAndHlwZW9mJyA6IFtdLFxuICAgICAgICAgICk7XG5cbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZTogJ1ByZWZlciB1c2luZyBhIHRvcC1sZXZlbCB7e2tpbmR9fS1vbmx5IGltcG9ydCBpbnN0ZWFkIG9mIGlubGluZSB7e2tpbmR9fSBzcGVjaWZpZXJzLicsXG4gICAgICAgICAgICBkYXRhOiB7XG4gICAgICAgICAgICAgIGtpbmQ6IGtpbmQuam9pbignLycpLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZpeChmaXhlcikge1xuICAgICAgICAgICAgICByZXR1cm4gZml4ZXIucmVwbGFjZVRleHQobm9kZSwgbmV3SW1wb3J0cyk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIHJlbW92ZSBzcGVjaWZpYyBzcGVjaWZpZXJzIGFuZCBpbnNlcnQgbmV3IGltcG9ydHMgZm9yIHRoZW1cbiAgICAgICAgICBmb3IgKGNvbnN0IHNwZWNpZmllciBvZiB0eXBlU3BlY2lmaWVycy5jb25jYXQodHlwZW9mU3BlY2lmaWVycykpIHtcbiAgICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgICAgbm9kZTogc3BlY2lmaWVyLFxuICAgICAgICAgICAgICBtZXNzYWdlOiAnUHJlZmVyIHVzaW5nIGEgdG9wLWxldmV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VmFsdWUsIHR5cGUgVHlwZSB9IGZyb20gJ21vZCc7XG4gICAgICAgICAgICAgICAgICAvLyB0b1xuICAgICAgICAgICAgICAgICAgLy8gaW1wb3J0IHsgVmFsdWUgIH0gZnJvbSAnbW9kJztcbiAgICAgICAgICAgICAgICAgIC8vIG5vdFxuICAgICAgICAgICAgICAgICAgLy8gaW1wb3J0IHsgVmFsdWUsICB9IGZyb20gJ21vZCc7XG4gICAgICAgICAgICAgICAgICBjb25zdCBtYXliZUNvbW1hID0gc291cmNlQ29kZS5nZXRUb2tlbkFmdGVyKHZhbHVlU3BlY2lmaWVyc1t2YWx1ZVNwZWNpZmllcnMubGVuZ3RoIC0gMV0pO1xuICAgICAgICAgICAgICAgICAgaWYgKGlzQ29tbWEobWF5YmVDb21tYSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZml4ZXMucHVzaChmaXhlci5yZW1vdmUobWF5YmVDb21tYSkpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZGVmYXVsdFNwZWNpZmllcikge1xuICAgICAgICAgICAgICAgICAgLy8gaW1wb3J0IERlZmF1bHQsIHsgdHlwZSBUeXBlIH0gZnJvbSAnbW9kJztcblxuICAgICAgICAgICAgICAgICAgLy8gcmVtb3ZlIHRoZSBlbnRpcmUgY3VybHkgYmxvY2sgc28gd2UgZG9uJ3QgbGVhdmUgYW4gZW1wdHkgb25lIGJlaGluZFxuICAgICAgICAgICAgICAgICAgLy8gTk9URSAtIHRoZSBkZWZhdWx0IHNwZWNpZmllciAqbXVzdCogYmUgdGhlIGZpcnN0IHNwZWNpZmllciBhbHdheXMhXG4gICAgICAgICAgICAgICAgICAvLyAgICAgICAgc28gYSBjb21tYSBleGlzdHMgdGhhdCB3ZSBhbHNvIGhhdmUgdG8gY2xlYW4gdXAgb3IgZWxzZSBpdCdzIGJhZCBzeW50YXhcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbW1hID0gc291cmNlQ29kZS5nZXRUb2tlbkFmdGVyKGRlZmF1bHRTcGVjaWZpZXIsIGlzQ29tbWEpO1xuICAgICAgICAgICAgICAgICAgY29uc3QgY2xvc2luZ0JyYWNlID0gc291cmNlQ29kZS5nZXRUb2tlbkFmdGVyKFxuICAgICAgICAgICAgICAgICAgICBub2RlLnNwZWNpZmllcnNbbm9kZS5zcGVjaWZpZXJzLmxlbmd0aCAtIDFdLFxuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9PiB0b2tlbi50eXBlID09PSAnUHVuY3R1YXRvcicgJiYgdG9rZW4udmFsdWUgPT09ICd9JyxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBmaXhlcy5wdXNoKGZpeGVyLnJlbW92ZVJhbmdlKFtcbiAgICAgICAgICAgICAgICAgICAgY29tbWEucmFuZ2VbMF0sXG4gICAgICAgICAgICAgICAgICAgIGNsb3NpbmdCcmFjZS5yYW5nZVsxXSxcbiAgICAgICAgICAgICAgICAgIF0pKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gZml4ZXMuY29uY2F0KFxuICAgICAgICAgICAgICAgICAgLy8gaW5zZXJ0IHRoZSBuZXcgaW1wb3J0cyBhZnRlciB0aGUgb2xkIGRlY2xhcmF0aW9uXG4gICAgICAgICAgICAgICAgICBmaXhlci5pbnNlcnRUZXh0QWZ0ZXIobm9kZSwgYFxcbiR7bmV3SW1wb3J0c31gKSxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9LFxuICAgIH07XG4gIH0sXG59O1xuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/default.js b/node_modules/eslint-plugin-import/lib/rules/default.js index 588ebaf03..65e4f4753 100644 --- a/node_modules/eslint-plugin-import/lib/rules/default.js +++ b/node_modules/eslint-plugin-import/lib/rules/default.js @@ -5,6 +5,8 @@ module.exports = { meta: { type: 'problem', docs: { + category: 'Static analysis', + description: 'Ensure a default export is present, given a default import.', url: (0, _docsUrl2['default'])('default') }, schema: [] }, @@ -37,4 +39,4 @@ module.exports = { 'ExportNamedDeclaration': checkDefault.bind(null, 'ExportDefaultSpecifier') }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9kZWZhdWx0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJ1cmwiLCJzY2hlbWEiLCJjcmVhdGUiLCJjb250ZXh0IiwiY2hlY2tEZWZhdWx0Iiwic3BlY2lmaWVyVHlwZSIsIm5vZGUiLCJkZWZhdWx0U3BlY2lmaWVyIiwic3BlY2lmaWVycyIsImZpbmQiLCJzcGVjaWZpZXIiLCJpbXBvcnRzIiwiRXhwb3J0cyIsImdldCIsInNvdXJjZSIsInZhbHVlIiwiZXJyb3JzIiwibGVuZ3RoIiwicmVwb3J0RXJyb3JzIiwidW5kZWZpbmVkIiwicmVwb3J0IiwibWVzc2FnZSIsImJpbmQiXSwibWFwcGluZ3MiOiJhQUFBLHlDO0FBQ0EscUM7O0FBRUFBLE9BQU9DLE9BQVAsR0FBaUI7QUFDZkMsUUFBTTtBQUNKQyxVQUFNLFNBREY7QUFFSkMsVUFBTTtBQUNKQyxXQUFLLDBCQUFRLFNBQVIsQ0FERCxFQUZGOztBQUtKQyxZQUFRLEVBTEosRUFEUzs7O0FBU2ZDLHVCQUFRLGdCQUFVQyxPQUFWLEVBQW1COztBQUV6QixlQUFTQyxZQUFULENBQXNCQyxhQUF0QixFQUFxQ0MsSUFBckMsRUFBMkM7O0FBRXpDLFlBQU1DLG1CQUFtQkQsS0FBS0UsVUFBTCxDQUFnQkMsSUFBaEI7QUFDdkIscUNBQWFDLFVBQVVaLElBQVYsS0FBbUJ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ltcG9ydERlZmF1bHRTcGVjaWZpZXInKSxcbiAgICAgICdFeHBvcnROYW1lZERlY2xhcmF0aW9uJzogY2hlY2tEZWZhdWx0LmJpbmQobnVsbCwgJ0V4cG9ydERlZmF1bHRTcGVjaWZpZXInKSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js b/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js index 75950c237..858d38cb7 100644 --- a/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js +++ b/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js @@ -5,6 +5,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Enforce a leading comment with the webpackChunkName for dynamic imports.', url: (0, _docsUrl2['default'])('dynamic-import-chunkname') }, schema: [{ @@ -27,10 +29,10 @@ module.exports = { create: function () {function create(context) { var config = context.options[0];var _ref = config || {},_ref$importFunctions = _ref.importFunctions,importFunctions = _ref$importFunctions === undefined ? [] : _ref$importFunctions;var _ref2 = - config || {},_ref2$webpackChunknam = _ref2.webpackChunknameFormat,webpackChunknameFormat = _ref2$webpackChunknam === undefined ? '[0-9a-zA-Z-_/.]+' : _ref2$webpackChunknam; + config || {},_ref2$webpackChunknam = _ref2.webpackChunknameFormat,webpackChunknameFormat = _ref2$webpackChunknam === undefined ? '([0-9a-zA-Z-_/.]|\\[(request|index)\\])+' : _ref2$webpackChunknam; var paddedCommentRegex = /^ (\S[\s\S]+\S) $/; - var commentStyleRegex = /^( \w+: (["'][^"']*["']|\d+|false|true),?)+ $/; + var commentStyleRegex = /^( ((webpackChunkName: .+)|((webpackPrefetch|webpackPreload): (true|false|-?[0-9]+))|(webpackIgnore: (true|false))|((webpackInclude|webpackExclude): \/.*\/)|(webpackMode: ["'](lazy|lazy-once|eager|weak)["'])|(webpackExports: (['"]\w+['"]|\[(['"]\w+['"], *)+(['"]\w+['"]*)\]))),?)+ $/; var chunkSubstrFormat = ' webpackChunkName: ["\']' + String(webpackChunknameFormat) + '["\'],? '; var chunkSubstrRegex = new RegExp(chunkSubstrFormat); @@ -69,7 +71,7 @@ module.exports = { try { // just like webpack itself does - _vm2['default'].runInNewContext('(function(){return {' + String(comment.value) + '}})()'); + _vm2['default'].runInNewContext('(function() {return {' + String(comment.value) + '}})()'); } catch (error) { context.report({ @@ -82,8 +84,8 @@ module.exports = { if (!commentStyleRegex.test(comment.value)) { context.report({ node: node, - message: 'dynamic imports require a leading comment in the form /*' + - chunkSubstrFormat + '*/' }); + message: 'dynamic imports require a "webpack" comment with valid syntax' }); + return; } @@ -116,4 +118,4 @@ module.exports = { }return CallExpression;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9keW5hbWljLWltcG9ydC1jaHVua25hbWUuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsInNjaGVtYSIsInByb3BlcnRpZXMiLCJpbXBvcnRGdW5jdGlvbnMiLCJ1bmlxdWVJdGVtcyIsIml0ZW1zIiwid2VicGFja0NodW5rbmFtZUZvcm1hdCIsImNyZWF0ZSIsImNvbnRleHQiLCJjb25maWciLCJvcHRpb25zIiwicGFkZGVkQ29tbWVudFJlZ2V4IiwiY29tbWVudFN0eWxlUmVnZXgiLCJjaHVua1N1YnN0ckZvcm1hdCIsImNodW5rU3Vic3RyUmVnZXgiLCJSZWdFeHAiLCJydW4iLCJub2RlIiwiYXJnIiwic291cmNlQ29kZSIsImdldFNvdXJjZUNvZGUiLCJsZWFkaW5nQ29tbWVudHMiLCJnZXRDb21tZW50c0JlZm9yZSIsImdldENvbW1lbnRzIiwibGVhZGluZyIsImxlbmd0aCIsInJlcG9ydCIsIm1lc3NhZ2UiLCJpc0NodW5rbmFtZVByZ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lmIChjb21tZW50LnR5cGUgIT09ICdCbG9jaycpIHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZTogJ2R5bmFtaWMgaW1wb3J0cyByZXF1aXJlIGEgLyogZm9vICovIHN0eWxlIGNvbW1lbnQsIG5vdCBhIC8vIGZvbyBjb21tZW50JyxcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIXBhZGRlZENvbW1lbnRSZWdleC50ZXN0KGNvbW1lbnQudmFsdWUpKSB7XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIG1lc3NhZ2U6IGBkeW5hbWljIGltcG9ydHMgcmVxdWlyZSBhIGJsb2NrIGNvbW1lbnQgcGFkZGVkIHdpdGggc3BhY2VzIC0gLyogZm9vICovYCxcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0cnkge1xuICAgICAgICAgIC8vIGp1c3QgbGlrZSB3ZWJwYWNrIGl0c2VsZiBkb2VzXG4gICAgICAgICAgdm0ucnVuSW5OZXdDb250ZXh0KGAoZnVuY3Rpb24oKXtyZXR1cm4geyR7Y29tbWVudC52YWx1ZX19fSkoKWApO1xuICAgICAgICB9XG4gICAgICAgIGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICBtZXNzYWdlOiBgZHluYW1pYyBpbXBvcnRzIHJlcXVpcmUgYSBcIndlYnBhY2tcIiBjb21tZW50IHdpdGggdmFsaWQgc3ludGF4YCxcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWNvbW1lbnRTdHlsZVJlZ2V4LnRlc3QoY29tbWVudC52YWx1ZSkpIHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZTpcbiAgICAgICAgICAgICAgYGR5bmFtaWMgaW1wb3J0cyByZXF1aXJlIGEgbGVhZGluZyBjb21tZW50IGluIHRoZSBmb3JtIC8qJHtjaHVua1N1YnN0ckZvcm1hdH0qL2AsXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNodW5rU3Vic3RyUmVnZXgudGVzdChjb21tZW50LnZhbHVlKSkge1xuICAgICAgICAgIGlzQ2h1bmtuYW1lUHJlc2VudCA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKCFpc0NodW5rbmFtZVByZXNlbnQpIHtcbiAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgbWVzc2FnZTpcbiAgICAgICAgICAgIGBkeW5hbWljIGltcG9ydHMgcmVxdWlyZSBhIGxlYWRpbmcgY29tbWVudCBpbiB0aGUgZm9ybSAvKiR7Y2h1bmtTdWJzdHJGb3JtYXR9Ki9gLFxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgSW1wb3J0RXhwcmVzc2lvbihub2RlKSB7XG4gICAgICAgIHJ1bihub2RlLCBub2RlLnNvdXJjZSk7XG4gICAgICB9LFxuXG4gICAgICBDYWxsRXhwcmVzc2lvbihub2RlKSB7XG4gICAgICAgIGlmIChub2RlLmNhbGxlZS50eXBlICE9PSAnSW1wb3J0JyAmJiBpbXBvcnRGdW5jdGlvbnMuaW5kZXhPZihub2RlLmNhbGxlZS5uYW1lKSA8IDApIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBydW4obm9kZSwgbm9kZS5hcmd1bWVudHNbMF0pO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lcXVpcmUgYSBsZWFkaW5nIGNvbW1lbnQgd2l0aCB0aGUgd2VicGFjayBjaHVua25hbWUnLFxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICBsZXQgaXNDaHVua25hbWVQcmVzZW50ID0gZmFsc2U7XG5cbiAgICAgIGZvciAoY29uc3QgY29tbWVudCBvZiBsZWFkaW5nQ29tbWVudHMpIHtcbiAgICAgICAgaWYgKGNvbW1lbnQudHlwZSAhPT0gJ0Jsb2NrJykge1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICBtZXNzYWdlOiAnZHluYW1pYyBpbXBvcnRzIHJlcXVpcmUgYSAvKiBmb28gKi8gc3R5bGUgY29tbWVudCwgbm90IGEgLy8gZm9vIGNvbW1lbnQnLFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghcGFkZGVkQ29tbWVudFJlZ2V4LnRlc3QoY29tbWVudC52YWx1ZSkpIHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZTogYGR5bmFtaWMgaW1wb3J0cyByZXF1aXJlIGEgYmxvY2sgY29tbWVudCBwYWRkZWQgd2l0aCBzcGFjZXMgLSAvKiBmb28gKi9gLFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgLy8ganVzdCBsaWtlIHdlYnBhY2sgaXRzZWxmIGRvZXNcbiAgICAgICAgICB2bS5ydW5Jbk5ld0NvbnRleHQoYChmdW5jdGlvbigpIHtyZXR1cm4geyR7Y29tbWVudC52YWx1ZX19fSkoKWApO1xuICAgICAgICB9XG4gICAgICAgIGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICBtZXNzYWdlOiBgZHluYW1pYyBpbXBvcnRzIHJlcXVpcmUgYSBcIndlYnBhY2tcIiBjb21tZW50IHdpdGggdmFsaWQgc3ludGF4YCxcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWNvbW1lbnRTdHlsZVJlZ2V4LnRlc3QoY29tbWVudC52YWx1ZSkpIHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZTpcbiAgICAgICAgICAgICAgYGR5bmFtaWMgaW1wb3J0cyByZXF1aXJlIGEgXCJ3ZWJwYWNrXCIgY29tbWVudCB3aXRoIHZhbGlkIHN5bnRheGAsXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNodW5rU3Vic3RyUmVnZXgudGVzdChjb21tZW50LnZhbHVlKSkge1xuICAgICAgICAgIGlzQ2h1bmtuYW1lUHJlc2VudCA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKCFpc0NodW5rbmFtZVByZXNlbnQpIHtcbiAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgbWVzc2FnZTpcbiAgICAgICAgICAgIGBkeW5hbWljIGltcG9ydHMgcmVxdWlyZSBhIGxlYWRpbmcgY29tbWVudCBpbiB0aGUgZm9ybSAvKiR7Y2h1bmtTdWJzdHJGb3JtYXR9Ki9gLFxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgSW1wb3J0RXhwcmVzc2lvbihub2RlKSB7XG4gICAgICAgIHJ1bihub2RlLCBub2RlLnNvdXJjZSk7XG4gICAgICB9LFxuXG4gICAgICBDYWxsRXhwcmVzc2lvbihub2RlKSB7XG4gICAgICAgIGlmIChub2RlLmNhbGxlZS50eXBlICE9PSAnSW1wb3J0JyAmJiBpbXBvcnRGdW5jdGlvbnMuaW5kZXhPZihub2RlLmNhbGxlZS5uYW1lKSA8IDApIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBydW4obm9kZSwgbm9kZS5hcmd1bWVudHNbMF0pO1xuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/export.js b/node_modules/eslint-plugin-import/lib/rules/export.js index 5f810ee8d..069d5c188 100644 --- a/node_modules/eslint-plugin-import/lib/rules/export.js +++ b/node_modules/eslint-plugin-import/lib/rules/export.js @@ -1,25 +1,26 @@ 'use strict';var _slicedToArray = function () {function sliceIterator(arr, i) {var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"]) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}return function (arr, i) {if (Array.isArray(arr)) {return arr;} else if (Symbol.iterator in Object(arr)) {return sliceIterator(arr, i);} else {throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}();var _ExportMap = require('../ExportMap');var _ExportMap2 = _interopRequireDefault(_ExportMap); var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl); -var _arrayIncludes = require('array-includes');var _arrayIncludes2 = _interopRequireDefault(_arrayIncludes);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} +var _arrayIncludes = require('array-includes');var _arrayIncludes2 = _interopRequireDefault(_arrayIncludes); +var _arrayPrototype = require('array.prototype.flatmap');var _arrayPrototype2 = _interopRequireDefault(_arrayPrototype);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} /* - Notes on TypeScript namespaces aka TSModuleDeclaration: - - There are two forms: - - active namespaces: namespace Foo {} / module Foo {} - - ambient modules; declare module "eslint-plugin-import" {} - - active namespaces: - - cannot contain a default export - - cannot contain an export all - - cannot contain a multi name export (export { a, b }) - - can have active namespaces nested within them - - ambient namespaces: - - can only be defined in .d.ts files - - cannot be nested within active namespaces - - have no other restrictions - */ + Notes on TypeScript namespaces aka TSModuleDeclaration: + + There are two forms: + - active namespaces: namespace Foo {} / module Foo {} + - ambient modules; declare module "eslint-plugin-import" {} + + active namespaces: + - cannot contain a default export + - cannot contain an export all + - cannot contain a multi name export (export { a, b }) + - can have active namespaces nested within them + + ambient namespaces: + - can only be defined in .d.ts files + - cannot be nested within active namespaces + - have no other restrictions + */ var rootProgram = 'root'; var tsTypePrefix = 'type:'; @@ -35,13 +36,78 @@ var tsTypePrefix = 'type:'; * @returns {boolean} */ function isTypescriptFunctionOverloads(nodes) { + var nodesArr = Array.from(nodes); + + var idents = (0, _arrayPrototype2['default'])(nodesArr, function (node) {return ( + node.declaration && ( + node.declaration.type === 'TSDeclareFunction' // eslint 6+ + || node.declaration.type === 'TSEmptyBodyFunctionDeclaration' // eslint 4-5 + ) ? + node.declaration.id.name : + []);}); + + if (new Set(idents).size !== idents.length) { + return true; + } + + var types = new Set(nodesArr.map(function (node) {return node.parent.type;})); + if (!types.has('TSDeclareFunction')) { + return false; + } + if (types.size === 1) { + return true; + } + if (types.size === 2 && types.has('FunctionDeclaration')) { + return true; + } + return false; +} + +/** + * Detect merging Namespaces with Classes, Functions, or Enums like: + * ```ts + * export class Foo { } + * export namespace Foo { } + * ``` + * @param {Set} nodes + * @returns {boolean} + */ +function isTypescriptNamespaceMerging(nodes) { var types = new Set(Array.from(nodes, function (node) {return node.parent.type;})); - return ( - types.has('TSDeclareFunction') && ( + var noNamespaceNodes = Array.from(nodes).filter(function (node) {return node.parent.type !== 'TSModuleDeclaration';}); - types.size === 1 || - types.size === 2 && types.has('FunctionDeclaration'))); + return types.has('TSModuleDeclaration') && ( + types.size === 1 + // Merging with functions + || types.size === 2 && (types.has('FunctionDeclaration') || types.has('TSDeclareFunction')) || + types.size === 3 && types.has('FunctionDeclaration') && types.has('TSDeclareFunction') + // Merging with classes or enums + || types.size === 2 && (types.has('ClassDeclaration') || types.has('TSEnumDeclaration')) && noNamespaceNodes.length === 1); + +} + +/** + * Detect if a typescript namespace node should be reported as multiple export: + * ```ts + * export class Foo { } + * export function Foo(); + * export namespace Foo { } + * ``` + * @param {Object} node + * @param {Set} nodes + * @returns {boolean} + */ +function shouldSkipTypescriptNamespace(node, nodes) { + var types = new Set(Array.from(nodes, function (node) {return node.parent.type;})); + + return !isTypescriptNamespaceMerging(nodes) && + node.parent.type === 'TSModuleDeclaration' && ( + + types.has('TSEnumDeclaration') || + types.has('ClassDeclaration') || + types.has('FunctionDeclaration') || + types.has('TSDeclareFunction')); } @@ -49,6 +115,8 @@ module.exports = { meta: { type: 'problem', docs: { + category: 'Helpful warnings', + description: 'Forbid any invalid exports, i.e. re-export of the same name.', url: (0, _docsUrl2['default'])('export') }, schema: [] }, @@ -85,15 +153,19 @@ module.exports = { } return { - 'ExportDefaultDeclaration': function () {function ExportDefaultDeclaration(node) {return addNamed('default', node, getParent(node));}return ExportDefaultDeclaration;}(), + ExportDefaultDeclaration: function () {function ExportDefaultDeclaration(node) { + addNamed('default', node, getParent(node)); + }return ExportDefaultDeclaration;}(), - 'ExportSpecifier': function () {function ExportSpecifier(node) {return addNamed( - node.exported.name, + ExportSpecifier: function () {function ExportSpecifier(node) { + addNamed( + node.exported.name || node.exported.value, node.exported, - getParent(node.parent));}return ExportSpecifier;}(), + getParent(node.parent)); + }return ExportSpecifier;}(), - 'ExportNamedDeclaration': function () {function ExportNamedDeclaration(node) { + ExportNamedDeclaration: function () {function ExportNamedDeclaration(node) { if (node.declaration == null) return; var parent = getParent(node); @@ -119,7 +191,7 @@ module.exports = { } }return ExportNamedDeclaration;}(), - 'ExportAllDeclaration': function () {function ExportAllDeclaration(node) { + ExportAllDeclaration: function () {function ExportAllDeclaration(node) { if (node.source == null) return; // not sure if this is ever true // `export * as X from 'path'` does not conflict @@ -156,9 +228,11 @@ module.exports = { for (var _iterator3 = named[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {var _ref3 = _step3.value;var _ref4 = _slicedToArray(_ref3, 2);var name = _ref4[0];var nodes = _ref4[1]; if (nodes.size <= 1) continue; - if (isTypescriptFunctionOverloads(nodes)) continue;var _iteratorNormalCompletion4 = true;var _didIteratorError4 = false;var _iteratorError4 = undefined;try { + if (isTypescriptFunctionOverloads(nodes) || isTypescriptNamespaceMerging(nodes)) continue;var _iteratorNormalCompletion4 = true;var _didIteratorError4 = false;var _iteratorError4 = undefined;try { for (var _iterator4 = nodes[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {var node = _step4.value; + if (shouldSkipTypescriptNamespace(node, nodes)) continue; + if (name === 'default') { context.report(node, 'Multiple default exports.'); } else { @@ -173,4 +247,4 @@ module.exports = { }return ProgramExit;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9leHBvcnQuanMiXSwibmFtZXMiOlsicm9vdFByb2dyYW0iLCJ0c1R5cGVQcmVmaXgiLCJpc1R5cGVzY3JpcHRGdW5jdGlvbk92ZXJsb2FkcyIsIm5vZGVzIiwidHlwZXMiLCJTZXQiLCJBcnJheSIsImZyb20iLCJub2RlIiwicGFyZW50IiwidHlwZSIsImhhcyIsInNpemUiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJ1cmwiLCJzY2hlbWEiLCJjcmVhdGUiLCJjb250ZXh0IiwibmFtZXNwYWNlIiwiTWFwIiwiYWRkTmFtZWQiLCJuY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CBub2RlLCBwYXJlbnQpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgaWYgKCFhbnkpIHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydChcbiAgICAgICAgICAgIG5vZGUuc291cmNlLFxuICAgICAgICAgICAgYE5vIG5hbWVkIGV4cG9ydHMgZm91bmQgaW4gbW9kdWxlICcke25vZGUuc291cmNlLnZhbHVlfScuYFxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgIH0sXG5cbiAgICAgICdQcm9ncmFtOmV4aXQnOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGZvciAoY29uc3QgWywgbmFtZWRdIG9mIG5hbWVzcGFjZSkge1xuICAgICAgICAgIGZvciAoY29uc3QgW25hbWUsIG5vZGVzXSBvZiBuYW1lZCkge1xuICAgICAgICAgICAgaWYgKG5vZGVzLnNpemUgPD0gMSkgY29udGludWU7XG5cbiAgICAgICAgICAgIGlmIChpc1R5cGVzY3JpcHRGdW5jdGlvbk92ZXJsb2Fkcyhub2RlcykpIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICBmb3IgKGNvbnN0IG5vZGUgb2Ygbm9kZXMpIHtcbiAgICAgICAgICAgICAgaWYgKG5hbWUgPT09ICdkZWZhdWx0Jykge1xuICAgICAgICAgICAgICAgIGNvbnRleHQucmVwb3J0KG5vZGUsICdNdWx0aXBsZSBkZWZhdWx0IGV4cG9ydHMuJyk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5yZXBvcnQoXG4gICAgICAgICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgICAgICAgYE11bHRpcGxlIGV4cG9ydHMgb2YgbmFtZSAnJHtuYW1lLnJlcGxhY2UodHNUeXBlUHJlZml4LCAnJyl9Jy5gXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVx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1bmN0aW9uICgpIHtcbiAgICAgICAgZm9yIChjb25zdCBbLCBuYW1lZF0gb2YgbmFtZXNwYWNlKSB7XG4gICAgICAgICAgZm9yIChjb25zdCBbbmFtZSwgbm9kZXNdIG9mIG5hbWVkKSB7XG4gICAgICAgICAgICBpZiAobm9kZXMuc2l6ZSA8PSAxKSBjb250aW51ZTtcblxuICAgICAgICAgICAgaWYgKGlzVHlwZXNjcmlwdEZ1bmN0aW9uT3ZlcmxvYWRzKG5vZGVzKSB8fCBpc1R5cGVzY3JpcHROYW1lc3BhY2VNZXJnaW5nKG5vZGVzKSkgY29udGludWU7XG5cbiAgICAgICAgICAgIGZvciAoY29uc3Qgbm9kZSBvZiBub2Rlcykge1xuICAgICAgICAgICAgICBpZiAoc2hvdWxkU2tpcFR5cGVzY3JpcHROYW1lc3BhY2Uobm9kZSwgbm9kZXMpKSBjb250aW51ZTtcblxuICAgICAgICAgICAgICBpZiAobmFtZSA9PT0gJ2RlZmF1bHQnKSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5yZXBvcnQobm9kZSwgJ011bHRpcGxlIGRlZmF1bHQgZXhwb3J0cy4nKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0LnJlcG9ydChcbiAgICAgICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgICAgICBgTXVsdGlwbGUgZXhwb3J0cyBvZiBuYW1lICcke25hbWUucmVwbGFjZSh0c1R5cGVQcmVmaXgsICcnKX0nLmAsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/exports-last.js b/node_modules/eslint-plugin-import/lib/rules/exports-last.js index f63b9d262..c8b998367 100644 --- a/node_modules/eslint-plugin-import/lib/rules/exports-last.js +++ b/node_modules/eslint-plugin-import/lib/rules/exports-last.js @@ -10,6 +10,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Ensure all exports appear after other statements.', url: (0, _docsUrl2['default'])('exports-last') }, schema: [] }, @@ -38,4 +40,4 @@ module.exports = { }return Program;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9leHBvcnRzLWxhc3QuanMiXSwibmFtZXMiOlsiaXNOb25FeHBvcnRTdGF0ZW1lbnQiLCJ0eXBlIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJkb2NzIiwidXJsIiwic2NoZW1hIiwiY3JlYXRlIiwiY29udGV4dCIsIlByb2dyYW0iLCJib2R5IiwibGFzdE5vbkV4cG9ydFN0YXRlbWVudEluZGV4IiwicmVkdWNlIiwiZmluZExhc3RJbmRleCIsImFjYyIsIml0ZW0iLCJpbmRleCIsInNsaWNlIiwiZm9yRWFjaCIsImNoZWNrTm9uRXhwb3J0Iiwibm9kZSIsInJlcG9ydCIsIm1lc3NhZ2UiXSwibWFwcGluZ3MiOiJhQUFBLHFDOztBQUVBLFNBQVNBLG9CQUFULE9BQXdDLEtBQVJDLElBQVEsUUFBUkEsSUFBUTtBQUN0QyxTQUFPQSxTQUFTLDBCQUFUO0FBQ0xBLFdBQVMsd0JBREo7QUFFTEEsV0FBUyxzQkFGWDtBQUdEOztBQUVEQyxPQUFPQyxPQUFQLEdBQWlCO0FBQ2ZDLFFBQU07QUFDSkgsVUFBTSxZQURGO0FBRUpJLFVBQU07QUFDSkMsV0FBSywwQkFBUSxjQUFSLENBREQsRUFGRjs7QUFLSkMsWUFBUSxFQUxKLEVBRFM7OztBQVNmQyx1QkFBUSxnQkFBVUMsT0FBVixFQUFtQjtBQUN6QixhQUFPO0FBQ0xDLDhCQUFTLHdCQUFvQixLQUFSQyxJQUFRLF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aWxlJyxcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/extensions.js b/node_modules/eslint-plugin-import/lib/rules/extensions.js index f80fe90b6..bb46df6c1 100644 --- a/node_modules/eslint-plugin-import/lib/rules/extensions.js +++ b/node_modules/eslint-plugin-import/lib/rules/extensions.js @@ -63,6 +63,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Ensure consistent use of file extension within the import path.', url: (0, _docsUrl2['default'])('extensions') }, @@ -131,11 +133,11 @@ module.exports = { var slashCount = file.split('/').length - 1; if (slashCount === 0) return true; - if ((0, _importType.isScopedModule)(file) && slashCount <= 1) return true; + if ((0, _importType.isScoped)(file) && slashCount <= 1) return true; return false; } - function checkFileExtension(source) { + function checkFileExtension(source, node) { // bail if the declaration doesn't have a source, e.g. "export { foo };", or if it's only partially typed like in an editor if (!source || !source.value) return; @@ -159,12 +161,13 @@ module.exports = { // determine if this is a module var isPackage = (0, _importType.isExternalModule)( importPath, - context.settings, (0, _resolve2['default'])(importPath, context), context) || (0, _importType.isScoped)(importPath); if (!extension || !importPath.endsWith('.' + String(extension))) { + // ignore type-only imports and exports + if (node.importKind === 'type' || node.exportKind === 'type') return; var extensionRequired = isUseOfExtensionRequired(extension, isPackage); var extensionForbidden = isUseOfExtensionForbidden(extension); if (extensionRequired && !extensionForbidden) { @@ -186,4 +189,4 @@ module.exports = { return (0, _moduleVisitor2['default'])(checkFileExtension, { commonjs: true }); }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9leHRlbnNpb25zLmpzIl0sIm5hbWVzIjpbImVudW1WYWx1ZXMiLCJwYXR0ZXJuUHJvcGVydGllcyI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gICAgICAgICBdLFxuICAgICAgICAgIGFkZGl0aW9uYWxJdGVtczogZmFsc2UsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgIGl0ZW1zOiBbcHJvcGVydGllc10sXG4gICAgICAgICAgYWRkaXRpb25hbEl0ZW1zOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgaXRlbXM6IFtwYXR0ZXJuUHJvcGVydGllc10sXG4gICAgICAgICAgYWRkaXRpb25hbEl0ZW1zOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgaXRlbXM6IFtcbiAgICAgICAgICAgIGVudW1WYWx1ZXMsXG4gICAgICAgICAgICBwYXR0ZXJuUHJvcGVydGllcyxcbiAgICAgICAgICBdLFxuICAgICAgICAgIGFkZGl0aW9uYWxJdGVtczogZmFsc2UsXG4gICAgICAgIH0sXG4gICAgICBdLFxuICAgIH0sXG4gIH0sXG5cbiAgY3JlYXRlOiBmdW5jdGlvbiAoY29udGV4dCkge1xuXG4gICAgY29uc3QgcHJvcHMgPSBidWlsZFByb3BlcnRpZXMoY29udGV4dCk7XG5cbiAgICBmdW5jdGlvbiBnZXRNb2RpZmllcihleHRlbnNpb24pIHtcbiAgICAgIHJldHVybiBwcm9wcy5wYXR0ZXJuW2V4dGVuc2lvbl0gfHwgcHJvcHMuZGVmYXVsdENvbmZpZztcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpc1VzZU9mRXh0ZW5zaW9uUmVxdWlyZWQoZXh0ZW5zaW9uLCBpc1BhY2thZ2UpIHtcbiAgICAgIHJldHVybiBnZXRNb2RpZmllcihleHRlbnNpb24pID09PSAnYWx3YXlzJyAmJiAoIXByb3BzLmlnbm9yZVBhY2thZ2VzIHx8ICFpc1BhY2thZ2UpO1x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BvcnRQYXRoKSkge1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgIG5vZGU6IHNvdXJjZSxcbiAgICAgICAgICAgIG1lc3NhZ2U6IGBVbmV4cGVjdGVkIHVzZSBvZiBmaWxlIGV4dGVuc2lvbiBcIiR7ZXh0ZW5zaW9ufVwiIGZvciBcIiR7aW1wb3J0UGF0aFdpdGhRdWVyeVN0cmluZ31cImAsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gbW9kdWxlVmlzaXRvcihjaGVja0ZpbGVFeHRlbnNpb24sIHsgY29tbW9uanM6IHRydWUgfSk7XG4gIH0sXG59O1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9leHRlbnNpb25zLmpzIl0sIm5hbWVzIjpbImVudW1WYWx1ZXMiLCJwYXR0ZXJuUHJvcGVydGllcyIsInR5cGUiLCJwcm9wZXJ0aWVzIiwiYnVpbGRQcm9wZXJ0aWVzIiwiY29udGV4dCIsInJlc3VsdCIsImRlZmF1bHRDb25maWciLCJwYXR0ZXJuIiwiaWdub3JlUGFja2FnZXMiLCJvcHRpb25zIiwiZm9yRWFjaCIsIm9iaiIsInVuZGVmaW5lZCIsIk9iamVjdCIsImFzc2lnbiIsIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsImNhdGVnb3J5IiwiZGVzY3JpcHRpb24iLCJ1cmwiLCJzY2hlbWEiLCJhbnlPZiIsIml0ZW1zIiwiYWRkaXRpb25hbEl0ZW1zIiwiY3JlYXRlIiwicHJvcHMiLCJnZXRNb2RpZmllciIsImV4dGVuc2lvbiIsImlzVXNlT2ZFeHRlbnNpb25SZXF1aXJlZCIsImlzUGFja2FnZSIsImlzVXNlT2ZFeHRlbnNpb25Gb3JiaWRkZW4iLC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mVwb3J0KHtcbiAgICAgICAgICAgIG5vZGU6IHNvdXJjZSxcbiAgICAgICAgICAgIG1lc3NhZ2U6IGBVbmV4cGVjdGVkIHVzZSBvZiBmaWxlIGV4dGVuc2lvbiBcIiR7ZXh0ZW5zaW9ufVwiIGZvciBcIiR7aW1wb3J0UGF0aFdpdGhRdWVyeVN0cmluZ31cImAsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gbW9kdWxlVmlzaXRvcihjaGVja0ZpbGVFeHRlbnNpb24sIHsgY29tbW9uanM6IHRydWUgfSk7XG4gIH0sXG59O1xuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/first.js b/node_modules/eslint-plugin-import/lib/rules/first.js index 578e970da..b652ba4ec 100644 --- a/node_modules/eslint-plugin-import/lib/rules/first.js +++ b/node_modules/eslint-plugin-import/lib/rules/first.js @@ -10,6 +10,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Ensure all imports appear before other statements.', url: (0, _docsUrl2['default'])('first') }, fixable: 'code', @@ -31,6 +33,9 @@ module.exports = { return { 'Program': function () {function Program(n) { var body = n.body; + if (!body) { + return; + } var absoluteFirst = context.options[0] === 'absolute-first'; var message = 'Import in body of module; reorder to top.'; var sourceCode = context.getSourceCode(); @@ -135,4 +140,4 @@ module.exports = { }return Program;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9maXJzdC5qcyJdLCJuYW1lcyI6WyJnZXRJbXBvcnRWYWx1ZSIsIm5vZGUiLCJ0eXBlIiwic291cmNlIiwidmFsdWUiLCJtb2R1bGVSZWZlcmVuY2UiLCJleHByZXNzaW9uIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJkb2NzIiwidXJsIiwiZml4YWJsZSIsInNjaGVtYSIs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1bGVSZWZlcmVuY2UsXG4gICAgICAgICAgICAgICAgICBtZXNzYWdlOiAnQWJzb2x1dGUgaW1wb3J0cyBzaG91bGQgY29tZSBiZWZvcmUgcmVsYXRpdmUgaW1wb3J0cy4nLFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobm9uSW1wb3J0Q291bnQgPiAwKSB7XG4gICAgICAgICAgICAgIGZvciAoY29uc3QgdmFyaWFibGUgb2YgY29udGV4dC5nZXREZWNsYXJlZFZhcmlhYmxlcyhub2RlKSkge1xuICAgICAgICAgICAgICAgIGlmICghc2hvdWxkU29ydCkgYnJlYWs7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVmZXJlbmNlcyA9IHZhcmlhYmxlLnJlZmVyZW5jZXM7XG4gICAgICAgICAgICAgICAgaWYgKHJlZmVyZW5jZXMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHJlZmVyZW5jZSBvZiByZWZlcmVuY2VzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZWZlcmVuY2UuaWRlbnRpZmllci5yYW5nZVswXSA8IG5vZGUucmFuZ2VbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICBzaG91bGRTb3J0ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgc2hvdWxkU29ydCAmJiAobGFzdFNvcnROb2Rlc0luZGV4ID0gZXJyb3JJbmZvcy5sZW5ndGgpO1xuICAgICAgICAgICAgICBlcnJvckluZm9zLnB1c2goe1xuICAgICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgICAgcmFuZ2U6IFtib2R5W2luZGV4IC0gMV0ucmFuZ2VbMV0sIG5vZGUucmFuZ2VbMV1dLFxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGxhc3RMZWdhbEltcCA9IG5vZGU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG5vbkltcG9ydENvdW50Kys7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgaWYgKCFlcnJvckluZm9zLmxlbmd0aCkgcmV0dXJuO1xuICAgICAgICBlcnJvckluZm9zLmZvckVhY2goZnVuY3Rpb24gKGVycm9ySW5mbywgaW5kZXgpIHtcbiAgICAgICAgICBjb25zdCBub2RlID0gZXJyb3JJbmZvLm5vZGU7XG4gICAgICAgICAgY29uc3QgaW5mb3MgPSB7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZSxcbiAgICAgICAgICB9O1xuICAgICAgICAgIGlmIChpbmRleCA8IGxhc3RTb3J0Tm9kZXNJbmRleCkge1xuICAgICAgICAgICAgaW5mb3MuZml4ID0gZnVuY3Rpb24gKGZpeGVyKSB7XG4gICAgICAgICAgICAgIHJldHVybiBmaXhlci5pbnNlcnRUZXh0QWZ0ZXIobm9kZSwgJycpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluZGV4ID09PSBsYXN0U29ydE5vZGVzSW5kZXgpIHtcbiAgICAgICAgICAgIGNvbnN0IHNvcnROb2RlcyA9IGVycm9ySW5mb3Muc2xpY2UoMCwgbGFzdFNvcnROb2Rlc0luZGV4ICsgMSk7XG4gICAgICAgICAgICBpbmZvcy5maXggPSBmdW5jdGlvbiAoZml4ZXIpIHtcbiAgICAgICAgICAgICAgY29uc3QgcmVtb3ZlRml4ZXJzID0gc29ydE5vZGVzLm1hcChmdW5jdGlvbiAoX2Vycm9ySW5mbykge1xuICAgICAgICAgICAgICAgIHJldHVybiBmaXhlci5yZW1vdmVSYW5nZShfZXJyb3JJbmZvLnJhbmdlKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIGNvbnN0IHJhbmdlID0gWzAsIHJlbW92ZUZpeGVyc1tyZW1vdmVGaXhlcnMubGVuZ3RoIC0gMV0ucmFuZ2VbMV1dO1xuICAgICAgICAgICAgICBsZXQgaW5zZXJ0U291cmNlQ29kZSA9IHNvcnROb2Rlcy5tYXAoZnVuY3Rpb24gKF9lcnJvckluZm8pIHtcbiAgICAgICAgICAgICAgICBjb25zdCBub2RlU291cmNlQ29kZSA9IFN0cmluZy5wcm90b3R5cGUuc2xpY2UuYXBwbHkoXG4gICAgICAgICAgICAgICAgICBvcmlnaW5Tb3VyY2VDb2RlLCBfZXJyb3JJbmZvLnJhbmdlXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICBpZiAoL1xcUy8udGVzdChub2RlU291cmNlQ29kZVswXSkpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiAnXFxuJyArIG5vZGVTb3VyY2VDb2RlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZVNvdXJjZUNvZGU7XG4gICAgICAgICAgICAgIH0pLmpvaW4oJycpO1xuICAgICAgICAgICAgICBsZXQgaW5zZXJ0Rml4ZXIgPSBudWxsO1xuICAgICAgICAgICAgICBsZXQgcmVwbGFjZVNvdXJjZUNvZGUgPSAnJztcbiAgICAgICAgICAgICAgaWYgKCFsYXN0TGVnYWxJbXApIHtcbiAgICAgICAgICAgICAgICBpbnNlcnRTb3VyY2VDb2RlID1cbiAgICAgICAgICAgICAgICAgICAgaW5zZXJ0U291cmNlQ29kZS50cmltKCkgKyBpbnNlcnRTb3VyY2VDb2RlLm1hdGNoKC9eKFxccyspLylbMF07XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaW5zZXJ0Rml4ZXIgPSBsYXN0TGVnYWxJbXAgP1xuICAgICAgICAgICAgICAgIGZpeGVyLmluc2VydFRleHRBZnRlcihsYXN0TGVnYWxJbXAsIGluc2VydFNvdXJjZUNvZGUpIDpcbiAgICAgICAgICAgICAgICBmaXhlci5pbnNlcnRUZXh0QmVmb3JlKGJvZHlbMF0sIGluc2VydFNvdXJjZUNvZGUpO1xuICAgICAgICAgICAgICBjb25zdCBmaXhlcnMgPSBbaW5zZXJ0Rml4ZXJdLmNvbmNhdChyZW1vdmVGaXhlcnMpO1xuICAgICAgICAgICAgICBmaXhlcnMuZm9yRWFjaChmdW5jdGlvbiAoY29tcHV0ZWRGaXhlciwgaSkge1xuICAgICAgICAgICAgICAgIHJlcGxhY2VTb3VyY2VDb2RlICs9IChvcmlnaW5Tb3VyY2VDb2RlLnNsaWNlKFxuICAgICAgICAgICAgICAgICAgZml4ZXJzW2kgLSAxXSA/IGZpeGVyc1tpIC0gMV0ucmFuZ2VbMV0gOiAwLCBjb21wdXRlZEZpeGVyLnJhbmdlWzBdXG4gICAgICAgICAgICAgICAgKSArIGNvbXB1dGVkRml4ZXIudGV4dCk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICByZXR1cm4gZml4ZXIucmVwbGFjZVRleHRSYW5nZShyYW5nZSwgcmVwbGFjZVNvdXJjZUNvZGUpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoaW5mb3MpO1xuICAgICAgICB9KTtcbiAgICAgIH0sXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9maXJzdC5qcyJdLCJuYW1lcyI6WyJnZXRJbXBvcnRWYWx1ZSIsIm5vZGUiLCJ0eXBlIiwic291cmNlIiwidmFsdWUiLCJtb2R1bGVSZWZlcmVuY2UiLCJleHByZXNzaW9uIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJkb2NzIiwiY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RlY2xhcmF0aW9uJykge1xuICAgICAgICAgICAgaWYgKGFic29sdXRlRmlyc3QpIHtcbiAgICAgICAgICAgICAgaWYgKC9eXFwuLy50ZXN0KGdldEltcG9ydFZhbHVlKG5vZGUpKSkge1xuICAgICAgICAgICAgICAgIGFueVJlbGF0aXZlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChhbnlSZWxhdGl2ZSkge1xuICAgICAgICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgICAgICAgIG5vZGU6IG5vZGUudHlwZSA9PT0gJ0ltcG9ydERlY2xhcmF0aW9uJyA/IG5vZGUuc291cmNlIDogbm9kZS5tb2R1bGVSZWZlcmVuY2UsXG4gICAgICAgICAgICAgICAgICBtZXNzYWdlOiAnQWJzb2x1dGUgaW1wb3J0cyBzaG91bGQgY29tZSBiZWZvcmUgcmVsYXRpdmUgaW1wb3J0cy4nLFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobm9uSW1wb3J0Q291bnQgPiAwKSB7XG4gICAgICAgICAgICAgIGZvciAoY29uc3QgdmFyaWFibGUgb2YgY29udGV4dC5nZXREZWNsYXJlZFZhcmlhYmxlcyhub2RlKSkge1xuICAgICAgICAgICAgICAgIGlmICghc2hvdWxkU29ydCkgYnJlYWs7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVmZXJlbmNlcyA9IHZhcmlhYmxlLnJlZmVyZW5jZXM7XG4gICAgICAgICAgICAgICAgaWYgKHJlZmVyZW5jZXMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHJlZmVyZW5jZSBvZiByZWZlcmVuY2VzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZWZlcmVuY2UuaWRlbnRpZmllci5yYW5nZVswXSA8IG5vZGUucmFuZ2VbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICBzaG91bGRTb3J0ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgc2hvdWxkU29ydCAmJiAobGFzdFNvcnROb2Rlc0luZGV4ID0gZXJyb3JJbmZvcy5sZW5ndGgpO1xuICAgICAgICAgICAgICBlcnJvckluZm9zLnB1c2goe1xuICAgICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgICAgcmFuZ2U6IFtib2R5W2luZGV4IC0gMV0ucmFuZ2VbMV0sIG5vZGUucmFuZ2VbMV1dLFxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGxhc3RMZWdhbEltcCA9IG5vZGU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG5vbkltcG9ydENvdW50Kys7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgaWYgKCFlcnJvckluZm9zLmxlbmd0aCkgcmV0dXJuO1xuICAgICAgICBlcnJvckluZm9zLmZvckVhY2goZnVuY3Rpb24gKGVycm9ySW5mbywgaW5kZXgpIHtcbiAgICAgICAgICBjb25zdCBub2RlID0gZXJyb3JJbmZvLm5vZGU7XG4gICAgICAgICAgY29uc3QgaW5mb3MgPSB7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZSxcbiAgICAgICAgICB9O1xuICAgICAgICAgIGlmIChpbmRleCA8IGxhc3RTb3J0Tm9kZXNJbmRleCkge1xuICAgICAgICAgICAgaW5mb3MuZml4ID0gZnVuY3Rpb24gKGZpeGVyKSB7XG4gICAgICAgICAgICAgIHJldHVybiBmaXhlci5pbnNlcnRUZXh0QWZ0ZXIobm9kZSwgJycpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluZGV4ID09PSBsYXN0U29ydE5vZGVzSW5kZXgpIHtcbiAgICAgICAgICAgIGNvbnN0IHNvcnROb2RlcyA9IGVycm9ySW5mb3Muc2xpY2UoMCwgbGFzdFNvcnROb2Rlc0luZGV4ICsgMSk7XG4gICAgICAgICAgICBpbmZvcy5maXggPSBmdW5jdGlvbiAoZml4ZXIpIHtcbiAgICAgICAgICAgICAgY29uc3QgcmVtb3ZlRml4ZXJzID0gc29ydE5vZGVzLm1hcChmdW5jdGlvbiAoX2Vycm9ySW5mbykge1xuICAgICAgICAgICAgICAgIHJldHVybiBmaXhlci5yZW1vdmVSYW5nZShfZXJyb3JJbmZvLnJhbmdlKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIGNvbnN0IHJhbmdlID0gWzAsIHJlbW92ZUZpeGVyc1tyZW1vdmVGaXhlcnMubGVuZ3RoIC0gMV0ucmFuZ2VbMV1dO1xuICAgICAgICAgICAgICBsZXQgaW5zZXJ0U291cmNlQ29kZSA9IHNvcnROb2Rlcy5tYXAoZnVuY3Rpb24gKF9lcnJvckluZm8pIHtcbiAgICAgICAgICAgICAgICBjb25zdCBub2RlU291cmNlQ29kZSA9IFN0cmluZy5wcm90b3R5cGUuc2xpY2UuYXBwbHkoXG4gICAgICAgICAgICAgICAgICBvcmlnaW5Tb3VyY2VDb2RlLCBfZXJyb3JJbmZvLnJhbmdlLFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgaWYgKC9cXFMvLnRlc3Qobm9kZVNvdXJjZUNvZGVbMF0pKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gJ1xcbicgKyBub2RlU291cmNlQ29kZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vZGVTb3VyY2VDb2RlO1xuICAgICAgICAgICAgICB9KS5qb2luKCcnKTtcbiAgICAgICAgICAgICAgbGV0IGluc2VydEZpeGVyID0gbnVsbDtcbiAgICAgICAgICAgICAgbGV0IHJlcGxhY2VTb3VyY2VDb2RlID0gJyc7XG4gICAgICAgICAgICAgIGlmICghbGFzdExlZ2FsSW1wKSB7XG4gICAgICAgICAgICAgICAgaW5zZXJ0U291cmNlQ29kZSA9XG4gICAgICAgICAgICAgICAgICAgIGluc2VydFNvdXJjZUNvZGUudHJpbSgpICsgaW5zZXJ0U291cmNlQ29kZS5tYXRjaCgvXihcXHMrKS8pWzBdO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGluc2VydEZpeGVyID0gbGFzdExlZ2FsSW1wID9cbiAgICAgICAgICAgICAgICBmaXhlci5pbnNlcnRUZXh0QWZ0ZXIobGFzdExlZ2FsSW1wLCBpbnNlcnRTb3VyY2VDb2RlKSA6XG4gICAgICAgICAgICAgICAgZml4ZXIuaW5zZXJ0VGV4dEJlZm9yZShib2R5WzBdLCBpbnNlcnRTb3VyY2VDb2RlKTtcbiAgICAgICAgICAgICAgY29uc3QgZml4ZXJzID0gW2luc2VydEZpeGVyXS5jb25jYXQocmVtb3ZlRml4ZXJzKTtcbiAgICAgICAgICAgICAgZml4ZXJzLmZvckVhY2goZnVuY3Rpb24gKGNvbXB1dGVkRml4ZXIsIGkpIHtcbiAgICAgICAgICAgICAgICByZXBsYWNlU291cmNlQ29kZSArPSAob3JpZ2luU291cmNlQ29kZS5zbGljZShcbiAgICAgICAgICAgICAgICAgIGZpeGVyc1tpIC0gMV0gPyBmaXhlcnNbaSAtIDFdLnJhbmdlWzFdIDogMCwgY29tcHV0ZWRGaXhlci5yYW5nZVswXSxcbiAgICAgICAgICAgICAgICApICsgY29tcHV0ZWRGaXhlci50ZXh0KTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIHJldHVybiBmaXhlci5yZXBsYWNlVGV4dFJhbmdlKHJhbmdlLCByZXBsYWNlU291cmNlQ29kZSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb250ZXh0LnJlcG9ydChpbmZvcyk7XG4gICAgICAgIH0pO1xuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/group-exports.js b/node_modules/eslint-plugin-import/lib/rules/group-exports.js index 4862b7e30..37922f882 100644 --- a/node_modules/eslint-plugin-import/lib/rules/group-exports.js +++ b/node_modules/eslint-plugin-import/lib/rules/group-exports.js @@ -5,6 +5,8 @@ var _arrayPrototype = require('array.prototype.flat');var _arrayPrototype2 = _in var meta = { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Prefer named exports to be grouped together in a single export declaration', url: (0, _docsUrl2['default'])('group-exports') } }; @@ -150,4 +152,4 @@ function create(context) { module.exports = { meta: meta, create: create }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9ncm91cC1leHBvcnRzLmpzIl0sIm5hbWVzIjpbIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsImVycm9ycyIsIkV4cG9ydE5hbWVkRGVjbGFyYXRpb24iLCJBc3NpZ25tZW50RXhwcmVzc2lvbiIsImFjY2Vzc29yQ2hhaW4iLCJub2RlIiwiY2hhaW4iLCJ1bnNoaWZ0IiwicHJvcGVydHkiLCJuYW1lIiwib2JqZWN0IiwiY3JlYXRlIiwiY29udGV4dCIsIm5vZGVzIiwibW9kdWxlcyIsInNldCIsIlNldCIsInNvdXJjZXMiLCJ0eXBlcyIsImNvbW1vbmpzIiwidGFyZ2V0IiwiZXhwb3J0S2luZCIsInNvdXJjZSIsImFkZCIsIkFycmF5IiwiaXNBcnJheSIsInZhbHVlIiwicHVzaCIsImxlZnQiLCJsZW5ndGgiLCJvbkV4aXQiLCJzaXplIiwiZm9yRWFjaCIsInJlcG9ydCIsIm1lc3NhZ2UiLCJmaWx0ZXIiLCJub2Rlc1dpdGhTb3VyY2UiLCJtb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LnNldC5zaXplID4gMSkge1xuICAgICAgICBub2Rlcy50eXBlcy5zZXQuZm9yRWFjaChub2RlID0+IHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZTogZXJyb3JzW25vZGUudHlwZV0sXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuXG4gICAgICAvLyBSZXBvcnQgbXVsdGlwbGUgYGFnZ3JlZ2F0ZWQgdHlwZSBleHBvcnRzYCBmcm9tIHRoZSBzYW1lIG1vZHVsZSAoRkxPVyBFUzIwMTUgbW9kdWxlcylcbiAgICAgIGZsYXQodmFsdWVzKG5vZGVzLnR5cGVzLnNvdXJjZXMpXG4gICAgICAgIC5maWx0ZXIobm9kZXNXaXRoU291cmNlID0+IEFycmF5LmlzQXJyYXkobm9kZXNXaXRoU291cmNlKSAmJiBub2Rlc1dpdGhTb3VyY2UubGVuZ3RoID4gMSkpXG4gICAgICAgIC5mb3JFYWNoKChub2RlKSA9PiB7XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIG1lc3NhZ2U6IGVycm9yc1tub2RlLnR5cGVdLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgLy8gUmVwb3J0IG11bHRpcGxlIGBtb2R1bGUuZXhwb3J0c2AgYXNzaWdubWVudHMgKENvbW1vbkpTKVxuICAgICAgaWYgKG5vZGVzLmNvbW1vbmpzLnNldC5zaXplID4gMSkge1xuICAgICAgICBub2Rlcy5jb21tb25qcy5zZXQuZm9yRWFjaChub2RlID0+IHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZTogZXJyb3JzW25vZGUudHlwZV0sXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH0sXG4gIH07XG59XG5cbm1vZHVsZS5leHBvcnRzID0ge1xuICBtZXRhLFxuICBjcmVhdGUsXG59O1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9ncm91cC1leHBvcnRzLmpzIl0sIm5hbWVzIjpbIm1ldGEiLCJ0eXBlIiwiZG9jcyIsImNhdGVnb3J5IiwiZGVzY3JpcHRpb24iLCJ1cmwiLCJlcnJvcnMiLCJFeHBvcnROYW1lZERlY2xhcmF0aW9uIiwiQXNzaWdubWVudEV4cHJlc3Npb24iLCJhY2Nlc3NvckNoYWluIiwibm9kZSIsImNoYWluIiwidW5zaGlmdCIsInByb3BlcnR5IiwibmFtZSIsIm9iamVjdCIsImNyZWF0ZSIsImNvbnRleHQiLCJub2RlcyIsIm1vZHVsZXMiLCJzZXQiLCJTZXQiLCJzb3VyY2VzIiwidHlwZXMiLCJjb21tb25qcyIsInRhcmdldCIsImV4cG9ydEtpbmQiLCJzb3VyY2UiLCJhZGQiLCJBcnJheSIsImlzQXJyYXkiLCJ2YWx1ZSIsInB1c2giLCJsZWZ0IiwibGVuZ3RoIiwib25FeGl0Iiwic2l6ZSIsImZvckVhY2giLCJyZXBvcnQiLCJtZXNzYWdlIiwiZmlsdGVyIiwibm9kZXNXaXRoU291cmNlIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJtYXBwaW5ncyI6ImFBQUEscUM7QUFDQSx1QztBQUNBLHNEOztBQUVBLElBQU1BLE9BQU87QUFDWEMsUUFBTSxZQURLO0FBRVhDLFFBQU07QUFDSkMsY0FBVSxhQUROO0FBRUpDLGlCQUFhLDRFQUZUO0FBR0pDLFNBQUssMEJBQVEsZUFBUixDQUhELEVBRkssRUFBYjs7O0FBUUE7QUFDQSxJQUFNQyxTQUFTO0FBQ2JDLDBCQUF3QixvR0FEWDtBQUViQyx3QkFBc0IsaUdBRlQsRUFBZjs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gY3JlYXRlLFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/imports-first.js b/node_modules/eslint-plugin-import/lib/rules/imports-first.js index f0f941ea3..5eca62cea 100644 --- a/node_modules/eslint-plugin-import/lib/rules/imports-first.js +++ b/node_modules/eslint-plugin-import/lib/rules/imports-first.js @@ -5,9 +5,11 @@ var first = require('./first'); var newMeta = Object.assign({}, first.meta, { deprecated: true, docs: { + category: 'Style guide', + description: 'Replaced by `import/first`.', url: (0, _docsUrl2['default'])('imports-first', '7b25c1cb95ee18acc1531002fd343e1e6031f9ed') } }); module.exports = Object.assign({}, first, { meta: newMeta }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9pbXBvcnRzLWZpcnN0LmpzIl0sIm5hbWVzIjpbImZpcnN0IiwicmVxdWlyZSIsIm5ld01ldGEiLCJPYmplY3QiLCJhc3NpZ24iLCJtZXRhIiwiZGVwcmVjYXRlZCIsImRvY3MiLCJ1cmwiLCJtb2R1bGUiLCJleHBvcnRzIl0sIm1hcHBpbmdzIjoiYUFBQSxxQzs7QUFFQSxJQUFNQSxRQUFRQyxRQUFRLFNBQVIsQ0FBZDs7QUFFQSxJQUFNQyxVQUFVQyxPQUFPQyxNQUFQLENBQWMsRUFBZCxFQUFrQkosTUFBTUssSUFBeEIsRUFBOEI7QUFDNUNDLGNBQVksSUFEZ0M7QUFFNUNDLFFBQU07QUFDSkMsU0FBSywwQkFBUSxlQUFSLEVBQXlCLDBDQUF6QixDQURELEVBRnNDLEVBQTlCLENBQWhCOzs7O0FBT0FDLE9BQU9DLE9BQVAsR0FBaUJQLE9BQU9DLE1BQVAsQ0FBYyxFQUFkLEVBQWtCSixLQUFsQixFQUF5QixFQUFFSyxNQUFNSCxPQUFSLEVBQXpCLENBQWpCIiwiZmlsZSI6ImltcG9ydHMtZmlyc3QuanMiLCJzb3VyY2Vz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ozs7QUFTQUMsT0FBT0MsT0FBUCxHQUFpQlQsT0FBT0MsTUFBUCxDQUFjLEVBQWQsRUFBa0JKLEtBQWxCLEVBQXlCLEVBQUVLLE1BQU1ILE9BQVIsRUFBekIsQ0FBakIiLCJmaWxlIjoiaW1wb3J0cy1maXJzdC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBkb2NzVXJsIGZyb20gJy4uL2RvY3NVcmwnO1xuXG5jb25zdCBmaXJzdCA9IHJlcXVpcmUoJy4vZmlyc3QnKTtcblxuY29uc3QgbmV3TWV0YSA9IE9iamVjdC5hc3NpZ24oe30sIGZpcnN0Lm1ldGEsIHtcbiAgZGVwcmVjYXRlZDogdHJ1ZSxcbiAgZG9jczoge1xuICAgIGNhdGVnb3J5OiAnU3R5bGUgZ3VpZGUnLFxuICAgIGRlc2NyaXB0aW9uOiAnUmVwbGFjZWQgYnkgYGltcG9ydC9maXJzdGAuJyxcbiAgICB1cmw6IGRvY3NVcmwoJ2ltcG9ydHMtZmlyc3QnLCAnN2IyNWMxY2I5NWVlMThhY2MxNTMxMDAyZmQzNDNlMWU2MDMxZjllZCcpLFxuICB9LFxufSk7XG5cbm1vZHVsZS5leHBvcnRzID0gT2JqZWN0LmFzc2lnbih7fSwgZmlyc3QsIHsgbWV0YTogbmV3TWV0YSB9KTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/max-dependencies.js b/node_modules/eslint-plugin-import/lib/rules/max-dependencies.js index 76d9b44b2..b23f47f47 100644 --- a/node_modules/eslint-plugin-import/lib/rules/max-dependencies.js +++ b/node_modules/eslint-plugin-import/lib/rules/max-dependencies.js @@ -17,6 +17,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Enforce the maximum number of dependencies a module can have.', url: (0, _docsUrl2['default'])('max-dependencies') }, @@ -51,4 +53,4 @@ module.exports = { lastNode = source; }, { commonjs: true })); }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf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ICAgIGNvbnN0IHtcbiAgICAgIGlnbm9yZVR5cGVJbXBvcnRzID0gREVGQVVMVF9JR05PUkVfVFlQRV9JTVBPUlRTLFxuICAgIH0gPSBjb250ZXh0Lm9wdGlvbnNbMF0gfHwge307XG5cbiAgICBjb25zdCBkZXBlbmRlbmNpZXMgPSBuZXcgU2V0KCk7IC8vIGtlZXAgdHJhY2sgb2YgZGVwZW5kZW5jaWVzXG4gICAgbGV0IGxhc3ROb2RlOyAvLyBrZWVwIHRyYWNrIG9mIHRoZSBsYXN0IG5vZGUgdG8gcmVwb3J0IG9uXG5cbiAgICByZXR1cm4gT2JqZWN0LmFzc2lnbih7XG4gICAgICAnUHJvZ3JhbTpleGl0JzogZnVuY3Rpb24gKCkge1xuICAgICAgICBjb3VudERlcGVuZGVuY2llcyhkZXBlbmRlbmNpZXMsIGxhc3ROb2RlLCBjb250ZXh0KTtcbiAgICAgIH0sXG4gICAgfSwgbW9kdWxlVmlzaXRvcigoc291cmNlLCB7IGltcG9ydEtpbmQgfSkgPT4ge1xuICAgICAgaWYgKGltcG9ydEtpbmQgIT09IFRZUEVfSU1QT1JUIHx8ICFpZ25vcmVUeXBlSW1wb3J0cykge1xuICAgICAgICBkZXBlbmRlbmNpZXMuYWRkKHNvdXJjZS52YWx1ZSk7XG4gICAgICB9XG4gICAgICBsYXN0Tm9kZSA9IHNvdXJjZTtcbiAgICB9LCB7IGNvbW1vbmpzOiB0cnVlIH0pKTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9tYXgtZGVwZW5kZW5jaWVzLmpzIl0sIm5hbWVzIjpbIkRFRkFVTFRfTUFYIiwiREVGQVVMVF9JR05PUkVfVFlQRV9JTVBPUlRTIiwiVFlQRV9JTVBPUlQiLCJjb3VudERlcGVuZGVuY2llcyIsImRlcGVuZGVuY2llcyIsImxhc3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TogY29udGV4dCA9PiB7XG4gICAgY29uc3Qge1xuICAgICAgaWdub3JlVHlwZUltcG9ydHMgPSBERUZBVUxUX0lHTk9SRV9UWVBFX0lNUE9SVFMsXG4gICAgfSA9IGNvbnRleHQub3B0aW9uc1swXSB8fCB7fTtcblxuICAgIGNvbnN0IGRlcGVuZGVuY2llcyA9IG5ldyBTZXQoKTsgLy8ga2VlcCB0cmFjayBvZiBkZXBlbmRlbmNpZXNcbiAgICBsZXQgbGFzdE5vZGU7IC8vIGtlZXAgdHJhY2sgb2YgdGhlIGxhc3Qgbm9kZSB0byByZXBvcnQgb25cblxuICAgIHJldHVybiBPYmplY3QuYXNzaWduKHtcbiAgICAgICdQcm9ncmFtOmV4aXQnOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGNvdW50RGVwZW5kZW5jaWVzKGRlcGVuZGVuY2llcywgbGFzdE5vZGUsIGNvbnRleHQpO1xuICAgICAgfSxcbiAgICB9LCBtb2R1bGVWaXNpdG9yKChzb3VyY2UsIHsgaW1wb3J0S2luZCB9KSA9PiB7XG4gICAgICBpZiAoaW1wb3J0S2luZCAhPT0gVFlQRV9JTVBPUlQgfHwgIWlnbm9yZVR5cGVJbXBvcnRzKSB7XG4gICAgICAgIGRlcGVuZGVuY2llcy5hZGQoc291cmNlLnZhbHVlKTtcbiAgICAgIH1cbiAgICAgIGxhc3ROb2RlID0gc291cmNlO1xuICAgIH0sIHsgY29tbW9uanM6IHRydWUgfSkpO1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/named.js b/node_modules/eslint-plugin-import/lib/rules/named.js index b48e3efba..2aa59a387 100644 --- a/node_modules/eslint-plugin-import/lib/rules/named.js +++ b/node_modules/eslint-plugin-import/lib/rules/named.js @@ -6,6 +6,8 @@ module.exports = { meta: { type: 'problem', docs: { + category: 'Static analysis', + description: 'Ensure named imports correspond to a named export in the remote file.', url: (0, _docsUrl2['default'])('named') }, schema: [ @@ -40,7 +42,7 @@ module.exports = { } var imports = _ExportMap2['default'].get(node.source.value, context); - if (imports == null) { + if (imports == null || imports.parseGoal === 'ambiguous') { return; } @@ -58,7 +60,9 @@ module.exports = { return; } - var deepLookup = imports.hasDeep(im[key].name); + var name = im[key].name || im[key].value; + + var deepLookup = imports.hasDeep(name); if (!deepLookup.found) { if (deepLookup.path.length > 1) { @@ -66,9 +70,9 @@ module.exports = { map(function (i) {return path.relative(path.dirname(context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename()), i.path);}). join(' -> '); - context.report(im[key], String(im[key].name) + ' not found via ' + String(deepPath)); + context.report(im[key], String(name) + ' not found via ' + String(deepPath)); } else { - context.report(im[key], im[key].name + ' not found in \'' + node.source.value + '\''); + context.report(im[key], name + ' not found in \'' + node.source.value + '\''); } } }); @@ -96,7 +100,8 @@ module.exports = { call.callee.type !== 'Identifier' || call.callee.name !== 'require' || call.arguments.length !== 1 // return if it's not a string source || source.type !== 'Literal' || - variableExports == null) + variableExports == null || + variableExports.parseGoal === 'ambiguous') { return; } @@ -135,4 +140,4 @@ module.exports = { VariableDeclarator: checkRequire }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uYW1lZC5qcyJdLCJuYW1lcyI6WyJwYXRoIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsInNjaGVtYSIsInByb3BlcnRpZXMiLCJjb21tb25qcyIsImFkZGl0aW9uYWxQcm9wZXJ0aWVzIiwiY3JlYXRlIiwiY29udGV4dCIsIm9wdGlvbnMiLCJjaGVja1NwZWNpZmllcnMiLCJrZXkiLCJub2RlIiwic291cmNlIiwiaW1wb3J0S2luZCIsImV4cG9ydEtpbmQiLCJzcGVjaWZpZXJzIiwic29tZSIsImltIiwiaW1wb3J0cyIsIkV4cG9ydHMiLCJnZXQiLCJ2YWx1Z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BvcnRzID0gRXhwb3J0cy5nZXQobm9kZS5zb3VyY2UudmFsdWUsIGNvbnRleHQpO1xuICAgICAgaWYgKGltcG9ydHMgPT0gbnVsbCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIGlmIChpbXBvcnRzLmVycm9ycy5sZW5ndGgpIHtcbiAgICAgICAgaW1wb3J0cy5yZXBvcnRFcnJvcnMoY29udGV4dCwgbm9kZSk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgbm9kZS5zcGVjaWZpZXJzLmZvckVhY2goZnVuY3Rpb24gKGltKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICBpbS50eXBlICE9PSB0eXBlXG4gICAgICAgICAgLy8gaWdub3JlIHR5cGUgaW1wb3J0c1xuICAgICAgICAgIHx8IGltLmltcG9ydEtpbmQgPT09ICd0eXBlJyB8fCBpbS5pbXBvcnRLaW5kID09PSAndHlwZW9mJ1xuICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBkZWVwTG9va3VwID0gaW1wb3J0cy5oYXNEZWVwKGltW2tleV0ubmFtZSk7XG5cbiAgICAgICAgaWYgKCFkZWVwTG9va3VwLmZvdW5kKSB7XG4gICAgICAgICAgaWYgKGRlZXBMb29rdXAucGF0aC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICBjb25zdCBkZWVwUGF0aCA9IGRlZXBMb29rdXAucGF0aFxuICAgICAgICAgICAgICAubWFwKGkgPT4gcGF0aC5yZWxhdGl2ZShwYXRoLmRpcm5hbWUoY29udGV4dC5nZXRQaHlzaWNhbEZpbGVuYW1lID8gY29udGV4dC5nZXRQaHlzaWNhbEZpbGVuYW1lKCkgOiBjb250ZXh0LmdldEZpbGVuYW1lKCkpLCBpLnBhdGgpKVxuICAgICAgICAgICAgICAuam9pbignIC0+ICcpO1xuXG4gICAgICAgICAgICBjb250ZXh0LnJlcG9ydChpbVtrZXldLCB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gIGNvbnN0IGRlZXBQYXRoID0gZGVlcExvb2t1cC5wYXRoXG4gICAgICAgICAgICAgIC5tYXAoaSA9PiBwYXRoLnJlbGF0aXZlKHBhdGguZGlybmFtZShjb250ZXh0LmdldEZpbGVuYW1lKCkpLCBpLnBhdGgpKVxuICAgICAgICAgICAgICAuam9pbignIC0+ICcpO1xuXG4gICAgICAgICAgICBjb250ZXh0LnJlcG9ydChpbS5rZXksIGAke2ltLmtleS5uYW1lfSBub3QgZm91bmQgdmlhICR7ZGVlcFBhdGh9YCk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbnRleHQucmVwb3J0KGltLmtleSwgaW0ua2V5Lm5hbWUgKyAnIG5vdCBmb3VuZCBpbiBcXCcnICsgc291cmNlLnZhbHVlICsgJ1xcJycpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHtcbiAgICAgIEltcG9ydERlY2xhcmF0aW9uOiBjaGVja1NwZWNpZmllcnMuYmluZChudWxsLCAnaW1wb3J0ZWQnLCAnSW1wb3J0U3BlY2lmaWVyJyksXG5cbiAgICAgIEV4cG9ydE5hbWVkRGVjbGFyYXRpb246IGNoZWNrU3BlY2lmaWVycy5iaW5kKG51bGwsICdsb2NhbCcsICdFeHBvcnRTcGVjaWZpZXInKSxcblxuICAgICAgVmFyaWFibGVEZWNsYXJhdG9yOiBjaGVja1JlcXVpcmUsXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uYW1lZC5qcyJdLCJuYW1lcyI6WyJwYXRoIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsImNhdGVnb3J5IiwiZGVzY3JpcHRpb24iLCJ1cmwiLCJzY2hlbWEiLCJw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bS5pbXBvcnRLaW5kID09PSAndHlwZScgfHwgaW0uaW1wb3J0S2luZCA9PT0gJ3R5cGVvZidcbiAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgbmFtZSA9IGltW2tleV0ubmFtZSB8fCBpbVtrZXldLnZhbHVlO1xuXG4gICAgICAgIGNvbnN0IGRlZXBMb29rdXAgPSBpbXBvcnRzLmhhc0RlZXAobmFtZSk7XG5cbiAgICAgICAgaWYgKCFkZWVwTG9va3VwLmZvdW5kKSB7XG4gICAgICAgICAgaWYgKGRlZXBMb29rdXAucGF0aC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICBjb25zdCBkZWVwUGF0aCA9IGRlZXBMb29rdXAucGF0aFxuICAgICAgICAgICAgICAubWFwKGkgPT4gcGF0aC5yZWxhdGl2ZShwYXRoLmRpcm5hbWUoY29udGV4dC5nZXRQaHlzaWNhbEZpbGVuYW1lID8gY29udGV4dC5nZXRQaHlzaWNhbEZpbGVuYW1lKCkgOiBjb250ZXh0LmdldEZpbGVuYW1lKCkpLCBpLnBhdGgpKVxuICAgICAgICAgICAgICAuam9pbignIC0+ICcpO1xuXG4gICAgICAgICAgICBjb250ZXh0LnJlcG9ydChpbVtrZXldLCBgJHtuYW1lfSBub3QgZm91bmQgdmlhICR7ZGVlcFBhdGh9YCk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbnRleHQucmVwb3J0KGltW2tleV0sIG5hbWUgKyAnIG5vdCBmb3VuZCBpbiBcXCcnICsgbm9kZS5zb3VyY2UudmFsdWUgKyAnXFwnJyk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBjaGVja1JlcXVpcmUobm9kZSkge1xuICAgICAgaWYgKFxuICAgICAgICAhb3B0aW9ucy5jb21tb25qc1xuICAgICAgICB8fCBub2RlLnR5cGUgIT09ICdWYX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gdmFyaWFibGVFeHBvcnRzID09IG51bGxcbiAgICAgICAgfHwgdmFyaWFibGVFeHBvcnRzLnBhcnNlR29hbCA9PT0gJ2FtYmlndW91cydcbiAgICAgICkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIGlmICh2YXJpYWJsZUV4cG9ydHMuZXJyb3JzLmxlbmd0aCkge1xuICAgICAgICB2YXJpYWJsZUV4cG9ydHMucmVwb3J0RXJyb3JzKGNvbnRleHQsIG5vZGUpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHZhcmlhYmxlSW1wb3J0cy5mb3JFYWNoKGZ1bmN0aW9uIChpbSkge1xuICAgICAgICBpZiAoaW0udHlwZSAhPT0gJ1Byb3BlcnR5JyB8fCAhaW0ua2V5IHx8IGltLmtleS50eXBlICE9PSAnSWRlbnRpZmllcicpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBkZWVwTG9va3VwID0gdmFyaWFibGVFeHBvcnRzLmhhc0RlZXAoaW0ua2V5Lm5hbWUpO1xuXG4gICAgICAgIGlmICghZGVlcExvb2t1cC5mb3VuZCkge1xuICAgICAgICAgIGlmIChkZWVwTG9va3VwLnBhdGgubGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgY29uc3QgZGVlcFBhdGggPSBkZWVwTG9va3VwLnBhdGhcbiAgICAgICAgICAgICAgLm1hcChpID0+IHBhdGgucmVsYXRpdmUocGF0aC5kaXJuYW1lKGNvbnRleHQuZ2V0RmlsZW5hbWUoKSksIGkucGF0aCkpXG4gICAgICAgICAgICAgIC5qb2luKCcgLT4gJyk7XG5cbiAgICAgICAgICAgIGNvbnRleHQucmVwb3J0KGltLmtleSwgYCR7aW0ua2V5Lm5hbWV9IG5vdCBmb3VuZCB2aWEgJHtkZWVwUGF0aH1gKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29udGV4dC5yZXBvcnQoaW0ua2V5LCBpbS5rZXkubmFtZSArICcgbm90IGZvdW5kIGluIFxcJycgKyBzb3VyY2UudmFsdWUgKyAnXFwnJyk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgSW1wb3J0RGVjbGFyYXRpb246IGNoZWNrU3BlY2lmaWVycy5iaW5kKG51bGwsICdpbXBvcnRlZCcsICdJbXBvcnRTcGVjaWZpZXInKSxcblxuICAgICAgRXhwb3J0TmFtZWREZWNsYXJhdGlvbjogY2hlY2tTcGVjaWZpZXJzLmJpbmQobnVsbCwgJ2xvY2FsJywgJ0V4cG9ydFNwZWNpZmllcicpLFxuXG4gICAgICBWYXJpYWJsZURlY2xhcmF0b3I6IGNoZWNrUmVxdWlyZSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/namespace.js b/node_modules/eslint-plugin-import/lib/rules/namespace.js index 100f4fba8..95fd5de72 100644 --- a/node_modules/eslint-plugin-import/lib/rules/namespace.js +++ b/node_modules/eslint-plugin-import/lib/rules/namespace.js @@ -3,10 +3,50 @@ var _ExportMap = require('../ExportMap');var _ExportMap2 = _interopRequireDefaul var _importDeclaration = require('../importDeclaration');var _importDeclaration2 = _interopRequireDefault(_importDeclaration); var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} +function processBodyStatement(context, namespaces, declaration) { + if (declaration.type !== 'ImportDeclaration') return; + + if (declaration.specifiers.length === 0) return; + + var imports = _ExportMap2['default'].get(declaration.source.value, context); + if (imports == null) return null; + + if (imports.errors.length > 0) { + imports.reportErrors(context, declaration); + return; + } + + declaration.specifiers.forEach(function (specifier) { + switch (specifier.type) { + case 'ImportNamespaceSpecifier': + if (!imports.size) { + context.report( + specifier, 'No exported names found in module \'' + String( + declaration.source.value) + '\'.'); + + } + namespaces.set(specifier.local.name, imports); + break; + case 'ImportDefaultSpecifier': + case 'ImportSpecifier':{ + var meta = imports.get( + // default to 'default' for default https://i.imgur.com/nj6qAWy.jpg + specifier.imported ? specifier.imported.name || specifier.imported.value : 'default'); + + if (!meta || !meta.namespace) {break;} + namespaces.set(specifier.local.name, meta.namespace); + break; + }} + + }); +} + module.exports = { meta: { type: 'problem', docs: { + category: 'Static analysis', + description: 'Ensure imported namespaces contain dereferenced properties as they are dereferenced.', url: (0, _docsUrl2['default'])('namespace') }, @@ -41,44 +81,7 @@ module.exports = { return { // pick up all imports at body entry time, to properly respect hoisting Program: function () {function Program(_ref2) {var body = _ref2.body; - function processBodyStatement(declaration) { - if (declaration.type !== 'ImportDeclaration') return; - - if (declaration.specifiers.length === 0) return; - - var imports = _ExportMap2['default'].get(declaration.source.value, context); - if (imports == null) return null; - - if (imports.errors.length) { - imports.reportErrors(context, declaration); - return; - }var _iteratorNormalCompletion = true;var _didIteratorError = false;var _iteratorError = undefined;try { - - for (var _iterator = declaration.specifiers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {var specifier = _step.value; - switch (specifier.type) { - case 'ImportNamespaceSpecifier': - if (!imports.size) { - context.report( - specifier, 'No exported names found in module \'' + String( - declaration.source.value) + '\'.'); - - } - namespaces.set(specifier.local.name, imports); - break; - case 'ImportDefaultSpecifier': - case 'ImportSpecifier':{ - var meta = imports.get( - // default to 'default' for default http://i.imgur.com/nj6qAWy.jpg - specifier.imported ? specifier.imported.name : 'default'); - - if (!meta || !meta.namespace) {break;} - namespaces.set(specifier.local.name, meta.namespace); - break; - }} - - }} catch (err) {_didIteratorError = true;_iteratorError = err;} finally {try {if (!_iteratorNormalCompletion && _iterator['return']) {_iterator['return']();}} finally {if (_didIteratorError) {throw _iteratorError;}}} - } - body.forEach(processBodyStatement); + body.forEach(function (x) {return processBodyStatement(context, namespaces, x);}); }return Program;}(), // same as above, but does not add names to local map @@ -120,7 +123,6 @@ module.exports = { var namepath = [dereference.object.name]; // while property is namespace and parent is member expression, keep validating while (namespace instanceof _ExportMap2['default'] && dereference.type === 'MemberExpression') { - if (dereference.computed) { if (!allowComputed) { context.report( @@ -147,7 +149,6 @@ module.exports = { namespace = exported.namespace; dereference = dereference.parent; } - }return MemberExpression;}(), VariableDeclarator: function () {function VariableDeclarator(_ref3) {var id = _ref3.id,init = _ref3.init; @@ -162,9 +163,9 @@ module.exports = { function testKey(pattern, namespace) {var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [init.name]; if (!(namespace instanceof _ExportMap2['default'])) return; - if (pattern.type !== 'ObjectPattern') return;var _iteratorNormalCompletion2 = true;var _didIteratorError2 = false;var _iteratorError2 = undefined;try { + if (pattern.type !== 'ObjectPattern') return;var _iteratorNormalCompletion = true;var _didIteratorError = false;var _iteratorError = undefined;try { - for (var _iterator2 = pattern.properties[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {var property = _step2.value; + for (var _iterator = pattern.properties[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {var property = _step.value; if ( property.type === 'ExperimentalRestProperty' || property.type === 'RestElement' || @@ -196,7 +197,7 @@ module.exports = { testKey(property.value, dependencyExportMap.namespace, path); } path.pop(); - }} catch (err) {_didIteratorError2 = true;_iteratorError2 = err;} finally {try {if (!_iteratorNormalCompletion2 && _iterator2['return']) {_iterator2['return']();}} finally {if (_didIteratorError2) {throw _iteratorError2;}}} + }} catch (err) {_didIteratorError = true;_iteratorError = err;} finally {try {if (!_iteratorNormalCompletion && _iterator['return']) {_iterator['return']();}} finally {if (_didIteratorError) {throw _iteratorError;}}} } testKey(id, namespaces.get(init.name)); @@ -214,4 +215,4 @@ module.exports = { }return JSXMemberExpression;}() }; }return namespaceRule;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjoz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zID0gRXhwb3J0cy5nZXQoZGVjbGFyYXRpb24uc291cmNlLnZhbHVlLCBjb250ZXh0KTtcbiAgICAgICAgICBpZiAoaW1wb3J0cyA9PSBudWxsKSByZXR1cm4gbnVsbDtcblxuICAgICAgICAgIGlmIChpbXBvcnRzLmVycm9ycy5sZW5ndGgpIHtcbiAgICAgICAgICAgIGltcG9ydHMucmVwb3J0RXJyb3JzKGNvbnRleHQsIGRlY2xhcmF0aW9uKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBmb3IgKGNvbnN0IHNwZWNpZmllciBvZiBkZWNsYXJhdGlvbi5zcGVjaWZpZXJzKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHNwZWNpZmllci50eXBlKSB7XG4gICAgICAgICAgICBjYXNlICdJbXBvcnROYW1lc3BhY2VTcGVjaWZpZXInOlxuICAgICAgICAgICAgICBpZiAoIWltcG9ydHMuc2l6ZSkge1xuICAgICAgICAgICAgICAgIGNvbnRleHQucmVwb3J0KFxuICAgICAgICAgICAgICAgICAgc3BlY2lmaWVyLFxuICAgICAgICAgICAgICAgICAgYE5vIGV4cG9ydGVkIG5hbWVzIGZvdW5kIGluIG1vZHVsZSAnJHtkZWNsYXJhdGlvbi5zb3VyY2UudmFsdWV9Jy5gXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBuYW1lc3BhY2VzLnNldChzcGVjaWZpZXIubG9jYWwubmFtZSwgaW1wb3J0cyk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAnSW1wb3J0RGVmYXVsdFNwZWNpZmllcic6XG4gICAgICAgICAgICBjYXNlICdJbXBvcnRTcGVjaWZpZXInOiB7XG4gICAgICAgICAgICAgIGNvbnN0IG1ldGEgPSBpbXBvcnRzLmdldChcbiAgICAgICAgICAgICAgICAvLyBkZWZhdWx0IHRvICdkZWZhdWx0JyBmb3IgZGVmYXVsdCBodHRwOi8vaS5pbWd1ci5jb20vbmo2cUFXeS5qcGdcbiAgICAgICAgICAgICAgICBzcGVjaWZpZXIuaW1wb3J0ZWQgPyBzcGVjaWZpZXIuaW1wb3J0ZWQubmFtZSA6ICdkZWZhdWx0J1xuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICBpZiAoIW1ldGEgfHwgIW1ldGEubmFtZXNwYWNlKSB7IGJyZWFrOyB9XG4gICAgICAgICAgICAgIG5hbWVzcGFjZXMuc2V0KHNwZWNpZmllci5sb2NhbC5uYW1lLCBtZXRhLm5hbWVzcGFjZSk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBib2R5LmZvckVhY2gocHJvY2Vzc0JvZHlTdGF0ZW1lbnQpO1xuICAgICAgfSxcblxuICAgICAgLy8gc2FtZSBhcyBhYm92ZSwgYnV0IGRvZXMgbm90IGFkZCBuYW1lcyB0byBsb2NhbCBtYXBcbiAgICAgIEV4cG9ydE5hbWVzcGFjZVNwZWNpZmllcihuYW1lc3BhY2UpIHtcbiAgICAgICAgY29uc3QgZGVjbGFyYXRpb24gPSBpbXBvcnREZWNsYXJhdGlvbihjb250ZXh0KTtcblxuICAgICAgICBjb25zdCBpbXBvcnRzID0gRXhwb3J0cy5nZXQoZGVjbGFyYXRpb24uc291cmNlLnZhbHVlLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKGltcG9ydHMgPT0gbnVsbCkgcmV0dXJuIG51bGw7XG5cbiAgICAgICAgaWYgKGltcG9ydHMuZXJyb3JzLmxlbmd0aCkge1xuICAgICAgICAgIGltcG9ydHMucmVwb3J0RXJyb3JzKGNvbnRleHQsIGRlY2xhcmF0aW9uKTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWltcG9ydHMuc2l6ZSkge1xuICAgICAgICAgIGNvbnRleHQucmVwb3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gICAgICAgIHByb3BlcnR5LnR5cGUgPT09ICdFeHBlcmltZW50YWxSZXN0UHJvcGVydHknXG4gICAgICAgICAgICAgIHx8IHByb3BlcnR5LnR5cGUgPT09ICdSZXN0RWxlbWVudCdcbiAgICAgICAgICAgICAgfHwgIXByb3BlcnR5LmtleVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocHJvcGVydHkua2V5LnR5cGUgIT09ICdJZGVudGlmaWVyJykge1xuICAgICAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICAgICAgbm9kZTogcHJvcGVydHksXG4gICAgICAgICAgICAgICAgbWVzc2FnZTogJ09ubHkgZGVzdHJ1Y3R1cmUgdG9wLWxldmVsIG5hbWVzLicsXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFuYW1lc3BhY2UuaGFzKHByb3BlcnR5LmtleS5uYW1lKSkge1xuICAgICAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICAgICAgbm9kZTogcHJvcGVydHksXG4gICAgICAgICAgICAgICAgbWVzc2FnZTogbWFrZU1lc3NhZ2UocHJvcGVydHkua2V5LCBwYXRoKSxcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBwYXRoLnB1c2gocHJvcGVydHkua2V5Lm5hbWUpO1xuICAgICAgICAgICAgY29uc3QgZGVwZW5kZW5jeUV4cG9ydE1hcCA9IG5hbWVzcGFjZS5nZXQocHJvcGVydHkua2V5Lm5hbWUpO1xuICAgICAgICAgICAgLy8gY291bGQgYmUgbnVsbCB3aGVuIGlnbm9yZWQgb3IgYW1iaWd1b3VzXG4gICAgICAgICAgICBpZiAoZGVwZW5kZW5jeUV4cG9ydE1hcCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICB0ZXN0S2V5KHByb3BlcnR5LnZhbHVlLCBkZXBlbmRlbmN5RXhwb3J0TWFwLm5hbWVzcGFjZSwgcGF0aCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwYXRoLnBvcCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRlc3RLZXkoaWQsIG5hbWVzcGFjZXMuZ2V0KGluaXQubmFtZSkpO1xuICAgICAgfSxcblxuICAgICAgSlNYTWVtYmVyRXhwcmVzc2lvbih7IG9iamVjdCwgcHJvcGVydHkgfSkge1xuICAgICAgICBpZiAoIW5hbWVzcGFjZXMuaGFzKG9iamVjdC5uYW1lKSkgcmV0dXJuO1xuICAgICAgICBjb25zdCBuYW1lc3BhY2UgPSBuYW1lc3BhY2VzLmdldChvYmplY3QubmFtZSk7XG4gICAgICAgIGlmICghbmFtZXNwYWNlLmhhcyhwcm9wZXJ0eS5uYW1lKSkge1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgIG5vZGU6IHByb3BlcnR5LFxuICAgICAgICAgICAgbWVzc2FnZTogbWFrZU1lc3NhZ2UocHJvcGVydHksIFtvYmplY3QubmFtZV0pLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgIH07XG4gIH0sXG59O1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uYW1lc3BhY2UuanMiXSwibmFtZXMiOlsicHJvY2Vzc0JvZHlTdGF0ZW1lbnQiLCJjb250ZXh0IiwibmFtZXNwYWNlcyIsImRlY2xhcmF0aW9uIiwidHlwZSIsInNwZWNpZmllcnMiLCJsZW5ndGgiLCJpbXBvcnRzIiwiRXhwb3J0cyIsImdldCIsInNvdXJjZSIsInZhbHVlIi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AgICAgICAgICAgICBwcm9wZXJ0eS50eXBlID09PSAnRXhwZXJpbWVudGFsUmVzdFByb3BlcnR5J1xuICAgICAgICAgICAgICB8fCBwcm9wZXJ0eS50eXBlID09PSAnUmVzdEVsZW1lbnQnXG4gICAgICAgICAgICAgIHx8ICFwcm9wZXJ0eS5rZXlcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHByb3BlcnR5LmtleS50eXBlICE9PSAnSWRlbnRpZmllcicpIHtcbiAgICAgICAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgICAgIG5vZGU6IHByb3BlcnR5LFxuICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdPbmx5IGRlc3RydWN0dXJlIHRvcC1sZXZlbCBuYW1lcy4nLFxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghbmFtZXNwYWNlLmhhcyhwcm9wZXJ0eS5rZXkubmFtZSkpIHtcbiAgICAgICAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgICAgIG5vZGU6IHByb3BlcnR5LFxuICAgICAgICAgICAgICAgIG1lc3NhZ2U6IG1ha2VNZXNzYWdlKHByb3BlcnR5LmtleSwgcGF0aCksXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcGF0aC5wdXNoKHByb3BlcnR5LmtleS5uYW1lKTtcbiAgICAgICAgICAgIGNvbnN0IGRlcGVuZGVuY3lFeHBvcnRNYXAgPSBuYW1lc3BhY2UuZ2V0KHByb3BlcnR5LmtleS5uYW1lKTtcbiAgICAgICAgICAgIC8vIGNvdWxkIGJlIG51bGwgd2hlbiBpZ25vcmVkIG9yIGFtYmlndW91c1xuICAgICAgICAgICAgaWYgKGRlcGVuZGVuY3lFeHBvcnRNYXAgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgdGVzdEtleShwcm9wZXJ0eS52YWx1ZSwgZGVwZW5kZW5jeUV4cG9ydE1hcC5uYW1lc3BhY2UsIHBhdGgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcGF0aC5wb3AoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0ZXN0S2V5KGlkLCBuYW1lc3BhY2VzLmdldChpbml0Lm5hbWUpKTtcbiAgICAgIH0sXG5cbiAgICAgIEpTWE1lbWJlckV4cHJlc3Npb24oeyBvYmplY3QsIHByb3BlcnR5IH0pIHtcbiAgICAgICAgaWYgKCFuYW1lc3BhY2VzLmhhcyhvYmplY3QubmFtZSkpIHJldHVybjtcbiAgICAgICAgY29uc3QgbmFtZXNwYWNlID0gbmFtZXNwYWNlcy5nZXQob2JqZWN0Lm5hbWUpO1xuICAgICAgICBpZiAoIW5hbWVzcGFjZS5oYXMocHJvcGVydHkubmFtZSkpIHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlOiBwcm9wZXJ0eSxcbiAgICAgICAgICAgIG1lc3NhZ2U6IG1ha2VNZXNzYWdlKHByb3BlcnR5LCBbb2JqZWN0Lm5hbWVdKSxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js b/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js index dd9d46535..2c548f242 100644 --- a/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js +++ b/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js @@ -56,6 +56,8 @@ module.exports = { meta: { type: 'layout', docs: { + category: 'Style guide', + description: 'Enforce a newline after import statements.', url: (0, _docsUrl2['default'])('newline-after-import') }, fixable: 'whitespace', @@ -65,8 +67,9 @@ module.exports = { 'properties': { 'count': { 'type': 'integer', - 'minimum': 1 } }, + 'minimum': 1 }, + 'considerComments': { 'type': 'boolean' } }, 'additionalProperties': false }] }, @@ -75,6 +78,7 @@ module.exports = { create: function () {function create(context) { var level = 0; var requireCalls = []; + var options = Object.assign({ count: 1, considerComments: false }, context.options[0]); function checkForNewLine(node, nextNode, type) { if (isExportDefaultClass(nextNode) || isExportNameClass(nextNode)) { @@ -87,7 +91,6 @@ module.exports = { nextNode = nextNode.decorators[0]; } - var options = context.options[0] || { count: 1 }; var lineDifference = getLineDifference(node, nextNode); var EXPECTED_LINE_DIFFERENCE = options.count + 1; @@ -103,8 +106,32 @@ module.exports = { line: node.loc.end.line, column: column }, - message: 'Expected ' + String(options.count) + ' empty line' + (options.count > 1 ? 's' : '') + ' after ' + String( - type) + ' statement not followed by another ' + String(type) + '.', + message: 'Expected ' + String(options.count) + ' empty line' + (options.count > 1 ? 's' : '') + ' after ' + String(type) + ' statement not followed by another ' + String(type) + '.', + fix: function () {function fix(fixer) {return fixer.insertTextAfter( + node, + '\n'.repeat(EXPECTED_LINE_DIFFERENCE - lineDifference));}return fix;}() }); + + + } + } + + function commentAfterImport(node, nextComment) { + var lineDifference = getLineDifference(node, nextComment); + var EXPECTED_LINE_DIFFERENCE = options.count + 1; + + if (lineDifference < EXPECTED_LINE_DIFFERENCE) { + var column = node.loc.start.column; + + if (node.loc.start.line !== node.loc.end.line) { + column = 0; + } + + context.report({ + loc: { + line: node.loc.end.line, + column: column }, + + message: 'Expected ' + String(options.count) + ' empty line' + (options.count > 1 ? 's' : '') + ' after import statement not followed by another import.', fix: function () {function fix(fixer) {return fixer.insertTextAfter( node, '\n'.repeat(EXPECTED_LINE_DIFFERENCE - lineDifference));}return fix;}() }); @@ -124,13 +151,22 @@ module.exports = { parent = node.parent; var nodePosition = parent.body.indexOf(node); var nextNode = parent.body[nodePosition + 1]; + var endLine = node.loc.end.line; + var nextComment = void 0; + + if (typeof parent.comments !== 'undefined' && options.considerComments) { + nextComment = parent.comments.find(function (o) {return o.loc.start.line === endLine + 1;}); + } + // skip "export import"s if (node.type === 'TSImportEqualsDeclaration' && node.isExport) { return; } - if (nextNode && nextNode.type !== 'ImportDeclaration' && (nextNode.type !== 'TSImportEqualsDeclaration' || nextNode.isExport)) { + if (nextComment && typeof nextComment !== 'undefined') { + commentAfterImport(node, nextComment); + } else if (nextNode && nextNode.type !== 'ImportDeclaration' && (nextNode.type !== 'TSImportEqualsDeclaration' || nextNode.isExport)) { checkForNewLine(node, nextNode, 'import'); } } @@ -181,4 +217,4 @@ module.exports = { 'Decorator:exit': decrementLevel }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uZXdsaW5lLWFmdGVyLWltcG9ydC5qcyJdLCJuYW1lcyI6WyJsb2ciLCJjb250YWluc05vZGVPckVxdWFsIiwib3V0ZXJOb2RlIiwiaW5uZXJOb2RlIiwicmFuZ2UiLCJnZXRTY29wZUJvZHkiLCJzY29wZSIsImJsb2NrIiwidHlwZSIsImJvZHkiLCJmaW5kTm9kZUluZGV4SW5TY29wZUJvZHkiLCJub2RlVG9GaW5kIiwiZmluZEluZGV4Iiwibm9kZSIsImdldExpbmVEaWZmZXJlbmNlIiwibmV4dE5vZGUiLCJsb2MiLCJzdGFydCIsImxpbmUiLCJlbmQiLCJpc0NsYXNzV2l0aERlY29yYXRvciIsImRlY29yYXRvcnMiLCJsZW5ndGgiLCJpc0V4cG9ydERlZmF1bHRDbGFzcyIsImRlY2xhcmF0aW9uIiwiaXNFeHBvcnROYW1lQ2xhc3MiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJ1cmwiLCJmaXhhYmxlIiwic2NoZW1hIiwiY3JlYXRlIiwiY29udGV4dCIsImxldmVsIiwicmVxdWlyZUNhbGxzIiwiY2hlY2tGb3JOZXdMaW5lIiwiY2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nOiBkZWNyZW1lbnRMZXZlbCxcbiAgICAgICdBcnJvd0Z1bmN0aW9uRXhwcmVzc2lvbjpleGl0JzogZGVjcmVtZW50TGV2ZWwsXG4gICAgICAnQmxvY2tTdGF0ZW1lbnQ6ZXhpdCc6IGRlY3JlbWVudExldmVsLFxuICAgICAgJ09iamVjdEV4cHJlc3Npb246ZXhpdCc6IGRlY3JlbWVudExldmVsLFxuICAgICAgJ0RlY29yYXRvcjpleGl0JzogZGVjcmVtZW50TGV2ZWwsXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uZXdsaW5lLWFmdGVyLWltcG9ydC5qcyJdLCJuYW1lcyI6WyJsb2ciLCJjb250YWluc05vZGVPckVxdWFsIiwib3V0ZXJOb2RlIiwiaW5uZXJOb2RlIiwicmFuZ2UiLCJnZXRTY29wZUJvZHkiLCJzY29wZSIsImJsb2NrIiwidHlwZSIsImJvZHkiLCJmaW5kTm9kZUluZGV4SW5TY29wZUJvZHkiLCJub2RlVG9GaW5kIiwiZmluZEluZGV4Iiwibm9kZSIsImdldExpbmVEaWZmZXJlbmNlIiwibmV4dE5vZGUiLCJsb2MiLCJzdGFydCIsImxpbmUiLCJlbmQiLCJpc0NsYXNzV2l0aERlY29yYXRvciIsImRlY29yYXRvcnMiLCJsZW5ndGgiLCJpc0V4cG9ydERlZmF1bHRDbGFzcyIsImRlY2xhcmF0aW9uIiwiaXNFeHBvcnROYW1lQ2xhc3MiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJjYXRlZ29yeSIsImRlc2NyaXB0aW9uIiwidXJsIiwiZml4YWJsZSIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJsZXZlbCIsInJlcXVpcmVDYWxscyIsIm9wdGlvbnMiLCJPYmplY3QiLCJhc3NpZ24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iAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaW5jcmVtZW50TGV2ZWwoKSB7XG4gICAgICBsZXZlbCsrO1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWNyZW1lbnRMZXZlbCgpIHtcbiAgICAgIGxldmVsLS07XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gY2hlY2tJbXBvcnQobm9kZSkge1xuICAgICAgY29uc3QgeyBwYXJlbnQgfSA9IG5vZGU7XG4gICAgICBjb25zdCBub2RlUG9zaXRpb24gPSBwYXJlbnQuYm9keS5pbmRleE9mKG5vZGUpO1xuICAgICAgY29uc3QgbmV4dE5vZGUgPSBwYXJlbnQuYm9keVtub2RlUG9zaXRpb24gKyAxXTtcbiAgICAgIGNvbnN0IGVuZExpbmUgPSBub2RlLmxvYy5lbmQubGluZTtcbiAgICAgIGxldCBuZXh0Q29tbWVudDtcblxuICAgICAgaWYgKHR5cGVvZiBwYXJlbnQuY29tbWVudHMgIT09ICd1bmRlZmluZWQnICYmIG9wdGlvbnMuY29uc2lkZXJDb21tZW50cykge1xuICAgICAgICBuZXh0Q29tbWVudCA9IHBhcmVudC5jb21tZW50cy5maW5kKG8gPT4gby5sb2Muc3RhcnQubGluZSA9PT0gZW5kTGluZSArIDEpO1xuICAgICAgfVxuXG5cbiAgICAgIC8vIHNraXAgXCJleHBvcnQgaW1wb3J0XCJzXG4gICAgICBpZiAobm9kZS50eXBlID09PSAnVFNJbXBvcnRFcXVhbHNEZWNsYXJhdGlvbicgJiYgbm9kZS5pc0V4cG9ydCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIGlmIChuZXh0Q29tbWVudCAmJiB0eXBlb2YgbmV4dENvbW1lbnQgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIGNvbW1lbnRBZnRlckltcG9ydChub2RlLCBuZXh0Q29tbWVudCk7XG4gICAgICB9IGVsc2UgaWYgKG5leHROb2RlICYmIG5leHRO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AgICAgIERlY29yYXRvcjogaW5jcmVtZW50TGV2ZWwsXG4gICAgICAnRnVuY3Rpb25EZWNsYXJhdGlvbjpleGl0JzogZGVjcmVtZW50TGV2ZWwsXG4gICAgICAnRnVuY3Rpb25FeHByZXNzaW9uOmV4aXQnOiBkZWNyZW1lbnRMZXZlbCxcbiAgICAgICdBcnJvd0Z1bmN0aW9uRXhwcmVzc2lvbjpleGl0JzogZGVjcmVtZW50TGV2ZWwsXG4gICAgICAnQmxvY2tTdGF0ZW1lbnQ6ZXhpdCc6IGRlY3JlbWVudExldmVsLFxuICAgICAgJ09iamVjdEV4cHJlc3Npb246ZXhpdCc6IGRlY3JlbWVudExldmVsLFxuICAgICAgJ0RlY29yYXRvcjpleGl0JzogZGVjcmVtZW50TGV2ZWwsXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-absolute-path.js b/node_modules/eslint-plugin-import/lib/rules/no-absolute-path.js index c1bad1d04..9e030f384 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-absolute-path.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-absolute-path.js @@ -1,4 +1,5 @@ -'use strict';var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor); +'use strict';var _path = require('path');var _path2 = _interopRequireDefault(_path); +var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor); var _importType = require('../core/importType'); var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} @@ -6,19 +7,34 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Static analysis', + description: 'Forbid import of modules using absolute paths.', url: (0, _docsUrl2['default'])('no-absolute-path') }, + fixable: 'code', schema: [(0, _moduleVisitor.makeOptionsSchema)()] }, create: function () {function create(context) { function reportIfAbsolute(source) { - if (typeof source.value === 'string' && (0, _importType.isAbsolute)(source.value)) { - context.report(source, 'Do not import modules using an absolute path'); + if ((0, _importType.isAbsolute)(source.value)) { + context.report({ + node: source, + message: 'Do not import modules using an absolute path', + fix: function () {function fix(fixer) { + var resolvedContext = context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename(); + // node.js and web imports work with posix style paths ("/") + var relativePath = _path2['default'].posix.relative(_path2['default'].dirname(resolvedContext), source.value); + if (!relativePath.startsWith('.')) { + relativePath = './' + relativePath; + } + return fixer.replaceText(source, JSON.stringify(relativePath)); + }return fix;}() }); + } } var options = Object.assign({ esmodule: true, commonjs: true }, context.options[0]); return (0, _moduleVisitor2['default'])(reportIfAbsolute, options); }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1hYnNvbHV0ZS1wYXRoLmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJ1cmwiLCJzY2hlbWEiLCJjcmVhdGUiLCJjb250ZXh0IiwicmVwb3J0SWZBYnNvbHV0ZSIsInNvdXJjZSIsInZhbHVlIiwicmVwb3J0Iiwib3B0aW9ucyIsIk9iamVjdCIsImFzc2lnbiIsImVzbW9kdWxlIiwiY29tbW9uanMiXSwibWFwcGluZ3MiOiJhQUFBLGtFO0FBQ0E7QUFDQSxxQzs7QUFFQUEsT0FBT0MsT0FBUCxHQUFpQjtBQUNmQyxRQUFNO0FBQ0pDLFVBQU0sWUFERjtBQUVKQyxVQUFNO0FBQ0pDLFdBQUssMEJBQVEsa0JBQVIsQ0FERCxFQUZGOztBQUtKQyxZQUFRLENBQUUsdUNBQUYsQ0FMSixFQURTOzs7QUFTZkMsdUJBQVEsZ0JBQVVDLE9BQVYsRUFBbUI7QUFDekIsZUFBU0MsZ0JBQVQsQ0FBMEJDLE1BQTFC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ygc291cmNlLnZhbHVlID09PSAnc3RyaW5nJyAmJiBpc0Fic29sdXRlKHNvdXJjZS52YWx1ZSkpIHtcbiAgICAgICAgY29udGV4dC5yZXBvcnQoc291cmNlLCAnRG8gbm90IGltcG9ydCBtb2R1bGVzIHVzaW5nIGFuIGFic29sdXRlIHBhdGgnKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBjb25zdCBvcHRpb25zID0gT2JqZWN0LmFzc2lnbih7IGVzbW9kdWxlOiB0cnVlLCBjb21tb25qczogdHJ1ZSB9LCBjb250ZXh0Lm9wdGlvbnNbMF0pO1xuICAgIHJldHVybiBtb2R1bGVWaXNpdG9yKHJlcG9ydElmQWJzb2x1dGUsIG9wdGlvbnMpO1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1hYnNvbHV0ZS1wYXRoLmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJjYXRlZ29yeSIsImRlc2NyaXB0aW9uIiwidXJsIiwiZml4YWJsZSIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJyZXBvcnRJZkFic29sdXRlIiwic291cmNlIiwidmFsdWUiLCJyZXBvcnQiLCJub2RlIiwibWVzc2FnZSIsImZpeCIsInJlc29sdmVkQ29udGV4dCIsImdldFBoeXNpY2FsRmlsZW5hbWUiLCJnZXRGaWxlbmFtZSIsInJlbGF0aXZlUGF0aCIsInBhdGgiLCJwb3NpeCIsInJlbGF0aXZlIiwiZGlybmFtZSIsInN0YXJ0c1dpdGgiLCJmaXhlciIsInJlcGxhY2VUZXh0IiwiSlNPTiIsInN0cmluZ2lmeSIsIm9wdGlvbnMiLCJPYmplY3QiLCJhc3NpZ24iLCJlc21vZHVsZSIsImNvbW1vbmpzIl0sIm1hcHBpbmd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B9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-amd.js b/node_modules/eslint-plugin-import/lib/rules/no-amd.js index dbc08d89e..073394e3a 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-amd.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-amd.js @@ -13,6 +13,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Module systems', + description: 'Forbid AMD `require` and `define` calls.', url: (0, _docsUrl2['default'])('no-amd') }, schema: [] }, @@ -43,4 +45,4 @@ module.exports = { * @fileoverview Rule to prefer imports to AMD * @author Jamund Ferguson */ -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1hbWQuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJub2RlIiwiZ2V0U2NvcGUiLCJjYWxsZWUiLCJuYW1lIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwibW9kdWxlcyIsInJlcG9ydCJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFLQSxxQzs7QUFFQTtBQUNBO0FBQ0E7O0FBRUFBLE9BQU9DLE9BQVAsR0FBaUI7QUFDZkMsUUFBTTtBQUNKQyxVQUFNLFlBREY7QUFFSkMsVUFBTTtBQUNKQyxXQUFLLDBCQUFRLFFBQVIsQ0FERCxFQUZGOztBQUtKQyxZQUFRLEVBTEosRUFEUzs7O0FBU2ZDLHVCQUFRLGdCQUFVQyxPQUFWLEVBQW1CO0FBQ3pCLGFBQU87QUFDTCx1Q0FBa0Isd0JBQVVDLElBQVYsRUFBZ0I7QUFDaEMsZ0JBQUlELFFBQVFFLFFBQVIsR0FBbUJQLElBQW5CLEtBQTRCLFFBQWhDLEVBQTBDOztBQUUxQyxnQkFBS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5cGU6ICdzdWdnZXN0aW9uJyxcbiAgICBkb2NzOiB7XG4gICAgICB1cmw6IGRvY3NVcmwoJ25vLWFtZCcpLFxuICAgIH0sXG4gICAgc2NoZW1hOiBbXSxcbiAgfSxcblxuICBjcmVhdGU6IGZ1bmN0aW9uIChjb250ZXh0KSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICdDYWxsRXhwcmVzc2lvbic6IGZ1bmN0aW9uIChub2RlKSB7XG4gICAgICAgIGlmIChjb250ZXh0LmdldFNjb3BlKCkudHlwZSAhPT0gJ21vZHVsZScpIHJldHVybjtcblxuICAgICAgICBpZiAobm9kZS5jYWxsZWUudHlwZSAhPT0gJ0lkZW50aWZpZXInKSByZXR1cm47XG4gICAgICAgIGlmIChub2RlLmNhbGxlZS5uYW1lICE9PSAncmVxdWlyZScgJiZcbiAgICAgICAgICAgIG5vZGUuY2FsbGVlLm5hbWUgIT09ICdkZWZpbmUnKSByZXR1cm47XG5cbiAgICAgICAgLy8gdG9kbzogY2FwdHVyZSBkZWZpbmUoKHJlcXVpcmUsIG1vZHVsZSwgZXhwb3J0cykgPT4ge30pIGZvcm0/XG4gICAgICAgIGlmIChub2RlLmFyZ3VtZW50cy5sZW5ndGggIT09IDIpIHJldHVybjtcblxuICAgICAgICBjb25zdCBtb2R1bGVzID0gbm9kZS5hcmd1bWVudHNbMF07XG4gICAgICAgIGlmIChtb2R1bGVzLnR5cGUgIT09ICdBcnJheUV4cHJlc3Npb24nKSByZXR1cm47XG5cbiAgICAgICAgLy8gdG9kbzogY2hlY2sgc2Vjb25kIGFyZyB0eXBlPyAoaWRlbnRpZmllciBvciBjYWxsYmFjaylcblxuICAgICAgICBjb250ZXh0LnJlcG9ydChub2RlLCBgRXhwZWN0ZWQgaW1wb3J0cyBpbnN0ZWFkIG9mIEFNRCAke25vZGUuY2FsbGVlLm5hbWV9KCkuYCk7XG4gICAgICB9LFxuICAgIH07XG5cbiAgfSxcbn07XG4iXX0= \ No newline at end of file +//# sourceMappingUR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jb250ZXh0KSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICdDYWxsRXhwcmVzc2lvbic6IGZ1bmN0aW9uIChub2RlKSB7XG4gICAgICAgIGlmIChjb250ZXh0LmdldFNjb3BlKCkudHlwZSAhPT0gJ21vZHVsZScpIHJldHVybjtcblxuICAgICAgICBpZiAobm9kZS5jYWxsZWUudHlwZSAhPT0gJ0lkZW50aWZpZXInKSByZXR1cm47XG4gICAgICAgIGlmIChub2RlLmNhbGxlZS5uYW1lICE9PSAncmVxdWlyZScgJiZcbiAgICAgICAgICAgIG5vZGUuY2FsbGVlLm5hbWUgIT09ICdkZWZpbmUnKSByZXR1cm47XG5cbiAgICAgICAgLy8gdG9kbzogY2FwdHVyZSBkZWZpbmUoKHJlcXVpcmUsIG1vZHVsZSwgZXhwb3J0cykgPT4ge30pIGZvcm0/XG4gICAgICAgIGlmIChub2RlLmFyZ3VtZW50cy5sZW5ndGggIT09IDIpIHJldHVybjtcblxuICAgICAgICBjb25zdCBtb2R1bGVzID0gbm9kZS5hcmd1bWVudHNbMF07XG4gICAgICAgIGlmIChtb2R1bGVzLnR5cGUgIT09ICdBcnJheUV4cHJlc3Npb24nKSByZXR1cm47XG5cbiAgICAgICAgLy8gdG9kbzogY2hlY2sgc2Vjb25kIGFyZyB0eXBlPyAoaWRlbnRpZmllciBvciBjYWxsYmFjaylcblxuICAgICAgICBjb250ZXh0LnJlcG9ydChub2RlLCBgRXhwZWN0ZWQgaW1wb3J0cyBpbnN0ZWFkIG9mIEFNRCAke25vZGUuY2FsbGVlLm5hbWV9KCkuYCk7XG4gICAgICB9LFxuICAgIH07XG5cbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-anonymous-default-export.js b/node_modules/eslint-plugin-import/lib/rules/no-anonymous-default-export.js index d8cdce718..1755cb38d 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-anonymous-default-export.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-anonymous-default-export.js @@ -48,7 +48,12 @@ var _has = require('has');var _has2 = _interopRequireDefault(_has);function _int TemplateLiteral: { option: 'allowLiteral', description: 'If `false`, will report default export of a literal', - message: 'Assign literal to a variable before exporting as module default' } }; + message: 'Assign literal to a variable before exporting as module default' }, + + NewExpression: { + option: 'allowNew', + description: 'If `false`, will report default export of a class instantiation', + message: 'Assign instance to a variable before exporting as module default' } }; @@ -74,6 +79,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Forbid anonymous values as default exports.', url: (0, _docsUrl2['default'])('no-anonymous-default-export') }, @@ -101,4 +108,4 @@ module.exports = { }return ExportDefaultDeclaration;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1hbm9ueW1vdXMtZGVmYXVsdC1leHBvcnQuanMiXSwibmFtZXMiOlsiZGVmcyIsIkFycmF5RXhwcmVzc2lvbiIsIm9wdGlvbiIsImRlc2NyaXB0aW9uIiwibWVzc2FnZSIsIkFycm93RnVuY3Rpb25FeHByZXNzaW9uIiwiQ2FsbEV4cHJlc3Npb24iLCJDbGFzc0RlY2xhcmF0aW9uIiwiZm9yYmlkIiwibm9kZSIsImRlY2xhcmF0aW9uIiwiaWQiLCJGdW5jdGlvbkRlY2xhcmF0aW9uIiwiTGl0ZXJhbCIsIk9iamVjdEV4cHJlc3Npb24iLCJUZW1wbGF0ZUxpdGVyYWwiLCJzY2hlbWFQcm9wZXJ0aWVzIiwiT2JqZWN0Iiwia2V5cyIsIm1hcCIsImtleSIsInJlZHVjZSIsImFjYyIsImRlZiIsInR5cGUiLCJkZWZhdWx0cyIsIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsInVybCIsInNjaGVtYSIsInByb3BlcnRpZXMiLCJjcmVhdGUiLCJjb250ZXh0Iiwib3B0aW9ucyIsImFzc2lnbiIsInJlcG9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G5cbiAgY3JlYXRlOiBmdW5jdGlvbiAoY29udGV4dCkge1xuICAgIGNvbnN0IG9wdGlvbnMgPSBPYmplY3QuYXNzaWduKHt9LCBkZWZhdWx0cywgY29udGV4dC5vcHRpb25zWzBdKTtcblxuICAgIHJldHVybiB7XG4gICAgICAnRXhwb3J0RGVmYXVsdERlY2xhcmF0aW9uJzogKG5vZGUpID0+IHtcbiAgICAgICAgY29uc3QgZGVmID0gZGVmc1tub2RlLmRlY2xhcmF0aW9uLnR5cGVdO1xuXG4gICAgICAgIC8vIFJlY29nbml6ZWQgbm9kZSB0eXBlIGFuZCBhbGxvd2VkIGJ5IGNvbmZpZ3VyYXRpb24sXG4gICAgICAgIC8vICAgYW5kIGhhcyBubyBmb3JiaWQgY2hlY2ssIG9yIGZvcmJpZCBjaGVjayByZXR1cm4gdmFsdWUgaXMgdHJ1dGh5XG4gICAgICAgIGlmIChkZWYgJiYgIW9wdGlvbnNbZGVmLm9wdGlvbl0gJiYgKCFkZWYuZm9yYmlkIHx8IGRlZi5mb3JiaWQobm9kZSkpKSB7XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoeyBub2RlLCBtZXNzYWdlOiBkZWYubWVzc2FnZSB9KTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1hbm9ueW1vdXMtZGVmYXVsdC1leHBvcnQuanMiXSwibmFtZXMiOlsiZGVmcyIsIkFycmF5RXhwcmVzc2lvbiIsIm9wdGlvbiIsImRlc2NyaXB0aW9uIiwibWVzc2FnZSIsIkFycm93RnVuY3Rpb25FeHByZXNzaW9uIiwiQ2FsbEV4cHJlc3Npb24iLCJDbGFzc0RlY2xhcmF0aW9uIiwiZm9yYmlkIiwibm9kZSIsImRlY2xhcmF0aW9uIiwiaWQiLCJ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RlZmF1bHRzLCBjb250ZXh0Lm9wdGlvbnNbMF0pO1xuXG4gICAgcmV0dXJuIHtcbiAgICAgICdFeHBvcnREZWZhdWx0RGVjbGFyYXRpb24nOiAobm9kZSkgPT4ge1xuICAgICAgICBjb25zdCBkZWYgPSBkZWZzW25vZGUuZGVjbGFyYXRpb24udHlwZV07XG5cbiAgICAgICAgLy8gUmVjb2duaXplZCBub2RlIHR5cGUgYW5kIGFsbG93ZWQgYnkgY29uZmlndXJhdGlvbixcbiAgICAgICAgLy8gICBhbmQgaGFzIG5vIGZvcmJpZCBjaGVjaywgb3IgZm9yYmlkIGNoZWNrIHJldHVybiB2YWx1ZSBpcyB0cnV0aHlcbiAgICAgICAgaWYgKGRlZiAmJiAhb3B0aW9uc1tkZWYub3B0aW9uXSAmJiAoIWRlZi5mb3JiaWQgfHwgZGVmLmZvcmJpZChub2RlKSkpIHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7IG5vZGUsIG1lc3NhZ2U6IGRlZi5tZXNzYWdlIH0pO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgIH07XG4gIH0sXG59O1xuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-commonjs.js b/node_modules/eslint-plugin-import/lib/rules/no-commonjs.js index ecf911aca..6cb4a5d83 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-commonjs.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-commonjs.js @@ -33,7 +33,7 @@ function validateScope(scope) { return scope.variableScope.type === 'module'; } -// https://github.com/estree/estree/blob/master/es5.md +// https://github.com/estree/estree/blob/HEAD/es5.md function isConditional(node) { if ( node.type === 'IfStatement' || @@ -69,6 +69,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Module systems', + description: 'Forbid CommonJS `require` calls and `module.exports` or `exports.*`.', url: (0, _docsUrl2['default'])('no-commonjs') }, @@ -134,4 +136,4 @@ module.exports = { }return create;}() }; -//# sourceMappingURL=data:application/json;charset=ut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GllczogZmFsc2UsXG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgbWV0YToge1xuICAgIHR5cGU6ICdzdWdnZXN0aW9uJyxcbiAgICBkb2NzOiB7XG4gICAgICB1cmw6IGRvY3NVcmwoJ25vLWNvbW1vbmpzJyksXG4gICAgfSxcblxuICAgIHNjaGVtYToge1xuICAgICAgYW55T2Y6IFtcbiAgICAgICAge1xuICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgaXRlbXM6IFtzY2hlbWFTdHJpbmddLFxuICAgICAgICAgIGFkZGl0aW9uYWxJdGVtczogZmFsc2UsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgIGl0ZW1zOiBbc2NoZW1hT2JqZWN0XSxcbiAgICAgICAgICBhZGRpdGlvbmFsSXRlbXM6IGZhbHNlLFxuICAgICAgICB9LFxuICAgICAgXSxcbiAgICB9LFxuICB9LFxuXG4gIGNyZWF0ZTogZnVuY3Rpb24gKGNvbnRleHQpIHtcbiAgICBjb25zdCBvcHRpb25zID0gbm9ybWFsaXplTGVnYWN5T3B0aW9ucyhjb250ZXh0Lm9wdGlvbnMpO1xuXG4gICAgcmV0dXJuIHtcblxuICAgICAgJ01lbWJlckV4cHJlc3Npb24nOiBmdW5jdGlvbiAobm9kZSkge1xuXG4gICAgICAgIC8vIG1vZHVsZS5leHBvcnRzXG4gICAgICAgIGlmIChub2RlLm9iamVjdC5uYW1lID09PSAnbW9kdWxlJyAmJiBub2RlLnByb3BlcnR5Lm5hbWUgPT09ICdleHBvcnRzJykge1xuICAgICAgICAgIGlmIChhbGxvd1ByaW1pdGl2ZShub2RlLCBvcHRpb25zKSkgcmV0dXJuO1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KHsgbm9kZSwgbWVzc2FnZTogRVhQT1JUX01FU1NBR0UgfSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBleHBvcnRzLlxuIC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yZSByZXBvcnRlZFxuICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgbm9kZTogY2FsbC5jYWxsZWUsXG4gICAgICAgICAgbWVzc2FnZTogSU1QT1JUX01FU1NBR0UsXG4gICAgICAgIH0pO1xuICAgICAgfSxcbiAgICB9O1xuXG4gIH0sXG59O1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1jb21tb25qcy5qcyJdLCJuYW1lcyI6WyJFWFBPUlRfTUVTU0FHRSIsIklNUE9SVF9NRVNTQUdFIiwibm9ybWFsaXplTGVnYWN5T3B0aW9ucyIsIm9wdGlvbnMiLCJpbmRleE9mIiwiYWxsb3dQcmltaXRpdmVNb2R1bGVzIiwiYWxsb3dQcmltaXRpdmUiLCJub2RlIiwicGFyZW50IiwidHlwZSIsInJpZ2h0IiwiYWxsb3dSZXF1aXJlIiwiYWxsb3dDb25kaXRpb25hbFJlcXVpcmUiLCJ2YWxpZGF0ZVNjb3BlIiwic2NvcGUiLCJ2YXJpYWJsZVNjb3BlIiwiaXNDb25kaXRpb25hbCIsImlzTGl0ZXJhbFN0cmluZyIsInZhbHVlIiwiZXhwcmVzc2lvbnMiLCJsZW5ndGgiLCJzY2hlbWFTdHJpbmciLCJzY2hlbWFPYmplY3QiLCJwcm9wZXJ0aWVzIiwiYWRkaXRpb25hbFByb3BlcnRpZXMiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJjYXRlZ29yeSIsImRlc2NyaXB0aW9uIiwidXJsIiwic2NoZW1hIiwiYW55T2YiLCJpdGVtcyIsImFkZGl0aW9uYWxJdGVtcyIsImNyZWF0ZSIsImNvbnRleHQiLCJvYmplY3QiLCJuYW1lIiwicHJvcGVydHkiLCJyZXBvcnQiLCJtZXNzYWdlIiwiaXNJblNjb3BlIiwiZ2V0U2NvcGUiLCJ2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E9PSAncmVxdWlyZScpIHJldHVybjtcblxuICAgICAgICBpZiAoY2FsbC5hcmd1bWVudHMubGVuZ3RoICE9PSAxKSByZXR1cm47XG4gICAgICAgIGlmICghaXNMaXRlcmFsU3RyaW5nKGNhbGwuYXJndW1lbnRzWzBdKSkgcmV0dXJuO1xuXG4gICAgICAgIGlmIChhbGxvd1JlcXVpcmUoY2FsbCwgb3B0aW9ucykpIHJldHVybjtcblxuICAgICAgICBpZiAoYWxsb3dDb25kaXRpb25hbFJlcXVpcmUoY2FsbCwgb3B0aW9ucykgJiYgaXNDb25kaXRpb25hbChjYWxsLnBhcmVudCkpIHJldHVybjtcblxuICAgICAgICAvLyBrZWVwaW5nIGl0IHNpbXBsZTogYWxsIDEtc3RyaW5nLWFyZyBgcmVxdWlyZWAgY2FsbHMgYXJlIHJlcG9ydGVkXG4gICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICBub2RlOiBjYWxsLmNhbGxlZSxcbiAgICAgICAgICBtZXNzYWdlOiBJTVBPUlRfTUVTU0FHRSxcbiAgICAgICAgfSk7XG4gICAgICB9LFxuICAgIH07XG5cbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-cycle.js b/node_modules/eslint-plugin-import/lib/rules/no-cycle.js index e78ba3a06..bf8cef5da 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-cycle.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-cycle.js @@ -9,14 +9,19 @@ var _importType = require('../core/importType'); var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor); var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _toConsumableArray(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {arr2[i] = arr[i];}return arr2;} else {return Array.from(arr);}} -// todo: cache cycles / deep relationships for faster repeat evaluation +var traversed = new Set(); + module.exports = { meta: { type: 'suggestion', - docs: { url: (0, _docsUrl2['default'])('no-cycle') }, + docs: { + category: 'Static analysis', + description: 'Forbid a module from importing a module with a dependency path back to itself.', + url: (0, _docsUrl2['default'])('no-cycle') }, + schema: [(0, _moduleVisitor.makeOptionsSchema)({ maxDepth: { - oneOf: [ + anyOf: [ { description: 'maximum dependency depth to traverse', type: 'integer', @@ -31,6 +36,11 @@ module.exports = { ignoreExternal: { description: 'ignore external modules', type: 'boolean', + 'default': false }, + + allowUnsafeDynamicCyclicDependency: { + description: 'Allow cyclic dependency if there is at least one dynamic import in the chain', + type: 'boolean', 'default': false } })] }, @@ -44,7 +54,6 @@ module.exports = { var maxDepth = typeof options.maxDepth === 'number' ? options.maxDepth : Infinity; var ignoreModule = function () {function ignoreModule(name) {return options.ignoreExternal && (0, _importType.isExternalModule)( name, - context.settings, (0, _resolve2['default'])(name, context), context);}return ignoreModule;}(); @@ -53,6 +62,13 @@ module.exports = { if (ignoreModule(sourceNode.value)) { return; // ignore external modules } + if (options.allowUnsafeDynamicCyclicDependency && ( + // Ignore `import()` + importer.type === 'ImportExpression' || + // `require()` calls are always checked (if possible) + importer.type === 'CallExpression' && importer.callee.name !== 'require')) { + return; // cycle via dynamic import allowed by config + } if ( importer.type === 'ImportDeclaration' && ( @@ -76,7 +92,6 @@ module.exports = { } var untraversed = [{ mget: function () {function mget() {return imported;}return mget;}(), route: [] }]; - var traversed = new Set(); function detectCycle(_ref2) {var mget = _ref2.mget,route = _ref2.route; var m = mget(); if (m == null) return; @@ -90,14 +105,20 @@ module.exports = { // Ignore only type imports !isOnlyImportingTypes);}); + /* - Only report as a cycle if there are any import declarations that are considered by - the rule. For example: - a.ts: - import { foo } from './b' // should not be reported as a cycle - b.ts: - import type { Bar } from './a' + If cyclic dependency is allowed via dynamic import, skip checking if any module is imported dynamically */ + if (options.allowUnsafeDynamicCyclicDependency && toTraverse.some(function (d) {return d.dynamic;})) return; + + /* + Only report as a cycle if there are any import declarations that are considered by + the rule. For example: + a.ts: + import { foo } from './b' // should not be reported as a cycle + b.ts: + import type { Bar } from './a' + */ if (path === myPath && toTraverse.length > 0) return true; @@ -121,11 +142,15 @@ module.exports = { } } - return (0, _moduleVisitor2['default'])(checkSourceValue, context.options[0]); + return Object.assign((0, _moduleVisitor2['default'])(checkSourceValue, context.options[0]), { + 'Program:exit': function () {function ProgramExit() { + traversed.clear(); + }return ProgramExit;}() }); + }return create;}() }; function routeString(route) { return route.map(function (s) {return String(s.value) + ':' + String(s.loc.start.line);}).join('=>'); } -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1jeWNsZS5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiLCJkb2NzIiwidXJsIiwic2NoZW1hIiwibWF4RGVwdGgiLCJvbmVPZiIsImRlc2NyaXB0aW9uIiwibWluaW11bSIsImlnbm9yZUV4dGVybmFsIiwiY3JlYXRlIiwiY29udGV4dCIsIm15UGF0aCIsImdldFBoeXNpY2FsRmlsZW5hbWUiLCJnZXRGaWxlbmFtZSIsIm9wdGlvbnMiLCJJbmZpbml0eSIsImlnbm9yZU1vZHVsZSIsIm5hbWUiLCJzZXR0aW5ncyIsImNoZWNrU291cmNlVmFsdWUiLCJzb3VyY2VOb2RlIiwiaW1wb3J0ZXIiLCJ2YWx1ZSIsImltcG9ydEtpbmQiLCJzcGVjaWZpZXJzIiwiZXZlcnkiLCJpbXBvcnRlZCIsIkV4cG9ydHMiLCJnZXQiLCJwYXRoIiwidW50cmF2ZXJzZWQiLCJtZ2V0Iiwicm91dGUiLCJ0cmF2ZXJzZWQiLCJTZXQiLCJkZXRlY3RDeWNsZSIsIm0iLCJoYXMiLCJhZGQiLCJpbXBvcnRzIiwiZ2V0dGVyIiwiZGVjbGFyYXRpb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WF4RGVwdGgpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgeyBzb3VyY2UgfSBvZiB0b1RyYXZlcnNlKSB7XG4gICAgICAgICAgICAgIHVudHJhdmVyc2VkLnB1c2goeyBtZ2V0OiBnZXR0ZXIsIHJvdXRlOiByb3V0ZS5jb25jYXQoc291cmNlKSB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgd2hpbGUgKHVudHJhdmVyc2VkLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbmV4dCA9IHVudHJhdmVyc2VkLnNoaWZ0KCk7IC8vIGJmcyFcbiAgICAgICAgaWYgKGRldGVjdEN5Y2xlKG5leHQpKSB7XG4gICAgICAgICAgY29uc3QgbWVzc2FnZSA9IChuZXh0LnJvdXRlLmxlbmd0aCA+IDBcbiAgICAgICAgICAgID8gYERlcGVuZGVuY3kgY3ljbGUgdmlhICR7cm91dGVTdHJpbmcobmV4dC5yb3V0ZSl9YFxuICAgICAgICAgICAgOiAnRGVwZW5kZW5jeSBjeWNsZSBkZXRlY3RlZC4nKTtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydChpbXBvcnRlciwgbWVzc2FnZSk7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG1vZHVsZVZpc2l0b3IoY2hlY2tTb3VyY2VWYWx1ZSwgY29udGV4dC5vcHRpb25zWzBdKTtcbiAgfSxcbn07XG5cbmZ1bmN0aW9uIHJvdXRlU3RyaW5nKHJvdXRlKSB7XG4gIHJldHVybiByb3V0ZS5tYXAocyA9PiBgJHtzLnZhbHVlfToke3MubG9jLnN0YXJ0LmxpbmV9YCkuam9pbignPT4nKTtcbn1cbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3Ny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G4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIE9iamVjdC5hc3NpZ24obW9kdWxlVmlzaXRvcihjaGVja1NvdXJjZVZhbHVlLCBjb250ZXh0Lm9wdGlvbnNbMF0pLCB7XG4gICAgICAnUHJvZ3JhbTpleGl0JzogKCkgPT4ge1xuICAgICAgICB0cmF2ZXJzZWQuY2xlYXIoKTtcbiAgICAgIH0sXG4gICAgfSk7XG4gIH0sXG59O1xuXG5mdW5jdGlvbiByb3V0ZVN0cmluZyhyb3V0ZSkge1xuICByZXR1cm4gcm91dGUubWFwKHMgPT4gYCR7cy52YWx1ZX06JHtzLmxvYy5zdGFydC5saW5lfWApLmpvaW4oJz0+Jyk7XG59XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-default-export.js b/node_modules/eslint-plugin-import/lib/rules/no-default-export.js index 1c0391a62..3bad59185 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-default-export.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-default-export.js @@ -4,6 +4,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Forbid default exports.', url: (0, _docsUrl2['default'])('no-default-export') }, schema: [] }, @@ -16,26 +18,24 @@ module.exports = { } var preferNamed = 'Prefer named exports.'; - var noAliasDefault = function () {function noAliasDefault(_ref) {var local = _ref.local;return ( - 'Do not alias `' + String(local.name) + '` as `default`. Just export ' + ('`' + String( - local.name) + '` itself instead.'));}return noAliasDefault;}(); + var noAliasDefault = function () {function noAliasDefault(_ref) {var local = _ref.local;return 'Do not alias `' + String(local.name) + '` as `default`. Just export `' + String(local.name) + '` itself instead.';}return noAliasDefault;}(); return { - ExportDefaultDeclaration: function () {function ExportDefaultDeclaration(node) { - context.report({ node: node, message: preferNamed }); + ExportDefaultDeclaration: function () {function ExportDefaultDeclaration(node) {var _ref2 = + context.getSourceCode().getFirstTokens(node)[1] || {},loc = _ref2.loc; + context.report({ node: node, message: preferNamed, loc: loc }); }return ExportDefaultDeclaration;}(), ExportNamedDeclaration: function () {function ExportNamedDeclaration(node) { - node.specifiers.forEach(function (specifier) { - if (specifier.type === 'ExportDefaultSpecifier' && - specifier.exported.name === 'default') { - context.report({ node: node, message: preferNamed }); - } else if (specifier.type === 'ExportSpecifier' && - specifier.exported.name === 'default') { - context.report({ node: node, message: noAliasDefault(specifier) }); + node.specifiers.filter(function (specifier) {return (specifier.exported.name || specifier.exported.value) === 'default';}).forEach(function (specifier) {var _ref3 = + context.getSourceCode().getFirstTokens(node)[1] || {},loc = _ref3.loc; + if (specifier.type === 'ExportDefaultSpecifier') { + context.report({ node: node, message: preferNamed, loc: loc }); + } else if (specifier.type === 'ExportSpecifier') { + context.report({ node: node, message: noAliasDefault(specifier), loc: loc }); } }); }return ExportNamedDeclaration;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1kZWZhdWx0LWV4cG9ydC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiLCJkb2NzIiwidXJsIiwic2NoZW1hIiwiY3JlYXRlIiwiY29udGV4dCIsInBhcnNlck9wdGlvbnMiLCJzb3VyY2VUeXBlIiwicHJlZmVyTmFtZWQiLCJub0FsaWFzRGVmYXVsdCIsImxvY2FsIiwibmFtZSIsIkV4cG9ydERlZmF1bHREZWNsYXJhdGlvbiIsIm5vZGUiLCJyZXBvcnQiLCJtZXNzYWdlIiwiRXhwb3J0TmFtZWREZWNsYXJhdGlvbiIsInNwZWNpZmllcnMiLCJmb3JFYWNoIiwic3BlY2lmaWVyIiwiZXhwb3J0ZWQiXSwibWFwcGluZ3MiOiJhQUFBLHFDOztBQUVBQSxPQUFPQyxPQUFQLEdBQWlCO0FBQ2ZDLFFBQU07QUFDSkMsVUFBTSxZQURG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ICAgIG5vZGUuc3BlY2lmaWVycy5mb3JFYWNoKHNwZWNpZmllciA9PiB7XG4gICAgICAgICAgaWYgKHNwZWNpZmllci50eXBlID09PSAnRXhwb3J0RGVmYXVsdFNwZWNpZmllcicgJiZcbiAgICAgICAgICAgICAgc3BlY2lmaWVyLmV4cG9ydGVkLm5hbWUgPT09ICdkZWZhdWx0Jykge1xuICAgICAgICAgICAgY29udGV4dC5yZXBvcnQoeyBub2RlLCBtZXNzYWdlOiBwcmVmZXJOYW1lZCB9KTtcbiAgICAgICAgICB9IGVsc2UgaWYgKHNwZWNpZmllci50eXBlID09PSAnRXhwb3J0U3BlY2lmaWVyJyAmJlxuICAgICAgICAgICAgICBzcGVjaWZpZXIuZXhwb3J0ZWQubmFtZSA9PT0gJ2RlZmF1bHQnKSB7XG4gICAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7IG5vZGUsIG1lc3NhZ2U6IG5vQWxpYXNEZWZhdWx0KHNwZWNpZmllcikgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH0sXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1kZWZhdWx0LWV4cG9ydC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiLCJkb2NzIiwiY2F0ZWdvcnkiLCJkZXNjcmlwdGlvbiIsInVybCIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJwYXJzZXJPcHRpb25zIiwic291cmNlVHlwZSIsInByZWZlck5hbWVkIiwibm9BbGlhc0RlZmF1bHQiLCJsb2NhbCIsIm5hbWUiLCJFeHBvcnREZWZhdWx0RGVjbGFyYXRpb24iLCJub2RlIiwiZ2V0U291cmNlQ29kZSIsImdldEZpcnN0VG9rZW5zIiwibG9jIiwicmV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5zKG5vZGUpWzFdIHx8IHt9O1xuICAgICAgICAgIGlmIChzcGVjaWZpZXIudHlwZSA9PT0gJ0V4cG9ydERlZmF1bHRTcGVjaWZpZXInKSB7XG4gICAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7IG5vZGUsIG1lc3NhZ2U6IHByZWZlck5hbWVkLCBsb2MgfSk7XG4gICAgICAgICAgfSBlbHNlIGlmIChzcGVjaWZpZXIudHlwZSA9PT0gJ0V4cG9ydFNwZWNpZmllcicpIHtcbiAgICAgICAgICAgIGNvbnRleHQucmVwb3J0KHsgbm9kZSwgbWVzc2FnZTogbm9BbGlhc0RlZmF1bHQoc3BlY2lmaWVyKSwgbG9jICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js b/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js index ac75b5418..0f4f68248 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js @@ -16,6 +16,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Helpful warnings', + description: 'Forbid imported names marked with `@deprecated` documentation tag.', url: (0, _docsUrl2['default'])('no-deprecated') }, schema: [] }, @@ -136,4 +138,4 @@ module.exports = { }return MemberExpression;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1kZXByZWNhdGVkLmpzIl0sIm5hbWVzIjpbIm1lc3NhZ2UiLCJkZXByZWNhdGlvbiIsImRlc2NyaXB0aW9uIiwiZ2V0RGVwcmVjYXRpb24iLCJtZXRhZGF0YSIsImRvYyIsInRhZ3MiLCJmaW5kIiwidCIsInRpdGxlIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ld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5kIHBhcmVudCBpcyBtZW1iZXIgZXhwcmVzc2lvbiwga2VlcCB2YWxpZGF0aW5nXG4gICAgICAgIHdoaWxlIChuYW1lc3BhY2UgaW5zdGFuY2VvZiBFeHBvcnRzICYmXG4gICAgICAgICAgICAgICBkZXJlZmVyZW5jZS50eXBlID09PSAnTWVtYmVyRXhwcmVzc2lvbicpIHtcblxuICAgICAgICAgIC8vIGlnbm9yZSBjb21wdXRlZCBwYXJ0cyBmb3Igbm93XG4gICAgICAgICAgaWYgKGRlcmVmZXJlbmNlLmNvbXB1dGVkKSByZXR1cm47XG5cbiAgICAgICAgICBjb25zdCBtZXRhZGF0YSA9IG5hbWVzcGFjZS5nZXQoZGVyZWZlcmVuY2UucHJvcGVydHkubmFtZSk7XG5cbiAgICAgICAgICBpZiAoIW1ldGFkYXRhKSBicmVhaztcbiAgICAgICAgICBjb25zdCBkZXByZWNhdGlvbiA9IGdldERlcHJlY2F0aW9uKG1ldGFkYXRhKTtcblxuICAgICAgICAgIGlmIChkZXByZWNhdGlvbikge1xuICAgICAgICAgICAgY29udGV4dC5yZXBvcnQoeyBub2RlOiBkZXJlZmVyZW5jZS5wcm9wZXJ0eSwgbWVzc2FnZTogbWVzc2FnZShkZXByZWNhdGlvbikgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLy8gc3Rhc2ggYW5kIHBvcFxuICAgICAgICAgIG5hbWVwYXRoLnB1c2goZGVyZWZlcmVuY2UucHJvcGVydHkubmFtZSk7XG4gICAgICAgICAgbmFtZXNwYWNlID0gbWV0YWRhdGEubmFtZXNwYWNlO1xuICAgICAgICAgIGRlcmVmZXJlbmNlID0gZGVyZWZlcmVuY2UucGFyZW50O1xuICAgICAgICB9XG4gICAgICB9LFxuICAgIH07XG4gIH0sXG59O1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1kZXByZW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XNzYWdlKGRlcHJlY2F0aW9uKSB9KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBzdGFzaCBhbmQgcG9wXG4gICAgICAgICAgbmFtZXBhdGgucHVzaChkZXJlZmVyZW5jZS5wcm9wZXJ0eS5uYW1lKTtcbiAgICAgICAgICBuYW1lc3BhY2UgPSBtZXRhZGF0YS5uYW1lc3BhY2U7XG4gICAgICAgICAgZGVyZWZlcmVuY2UgPSBkZXJlZmVyZW5jZS5wYXJlbnQ7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-duplicates.js b/node_modules/eslint-plugin-import/lib/rules/no-duplicates.js index f0defd963..f9dc350c5 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-duplicates.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-duplicates.js @@ -1,5 +1,11 @@ 'use strict';var _slicedToArray = function () {function sliceIterator(arr, i) {var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"]) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}return function (arr, i) {if (Array.isArray(arr)) {return arr;} else if (Symbol.iterator in Object(arr)) {return sliceIterator(arr, i);} else {throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}();var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve); -var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _toConsumableArray(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {arr2[i] = arr[i];}return arr2;} else {return Array.from(arr);}}function _toArray(arr) {return Array.isArray(arr) ? arr : Array.from(arr);} +var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl); +var _semver = require('semver');var _semver2 = _interopRequireDefault(_semver);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _toConsumableArray(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {arr2[i] = arr[i];}return arr2;} else {return Array.from(arr);}}function _toArray(arr) {return Array.isArray(arr) ? arr : Array.from(arr);} + +var typescriptPkg = void 0; +try { + typescriptPkg = require('typescript/package.json'); // eslint-disable-line import/no-extraneous-dependencies +} catch (e) {/**/} function checkImports(imported, context) {var _iteratorNormalCompletion = true;var _didIteratorError = false;var _iteratorError = undefined;try { for (var _iterator = imported.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {var _ref = _step.value;var _ref2 = _slicedToArray(_ref, 2);var _module = _ref2[0];var nodes = _ref2[1]; @@ -7,7 +13,7 @@ function checkImports(imported, context) {var _iteratorNormalCompletion = true;v var message = '\'' + String(_module) + '\' imported multiple times.';var _nodes = _toArray( nodes),first = _nodes[0],rest = _nodes.slice(1); var sourceCode = context.getSourceCode(); - var fix = getFix(first, rest, sourceCode); + var fix = getFix(first, rest, sourceCode, context); context.report({ node: first.source, @@ -25,7 +31,7 @@ function checkImports(imported, context) {var _iteratorNormalCompletion = true;v }} catch (err) {_didIteratorError = true;_iteratorError = err;} finally {try {if (!_iteratorNormalCompletion && _iterator['return']) {_iterator['return']();}} finally {if (_didIteratorError) {throw _iteratorError;}}} } -function getFix(first, rest, sourceCode) { +function getFix(first, rest, sourceCode, context) { // Sorry ESLint <= 3 users, no autofix for you. Autofixing duplicate imports // requires multiple `fixer.whatever()` calls in the `fix`: We both need to // update the first one, and remove the rest. Support for multiple @@ -108,10 +114,19 @@ function getFix(first, rest, sourceCode) { specifiers.reduce( function (_ref3, specifier) {var _ref4 = _slicedToArray(_ref3, 2),result = _ref4[0],needsComma = _ref4[1]; + var isTypeSpecifier = specifier.importNode.importKind === 'type'; + + var preferInline = context.options[0] && context.options[0]['prefer-inline']; + // a user might set prefer-inline but not have a supporting TypeScript version. Flow does not support inline types so this should fail in that case as well. + if (preferInline && (!typescriptPkg || !_semver2['default'].satisfies(typescriptPkg.version, '>= 4.5'))) { + throw new Error('Your version of TypeScript does not support inline type imports.'); + } + + var insertText = '' + (preferInline && isTypeSpecifier ? 'type ' : '') + String(specifier.text); return [ needsComma && !specifier.isEmpty ? String( - result) + ',' + String(specifier.text) : '' + String( - result) + String(specifier.text), + result) + ',' + insertText : '' + String( + result) + insertText, specifier.isEmpty ? needsComma : true]; }, @@ -245,6 +260,8 @@ module.exports = { meta: { type: 'problem', docs: { + category: 'Style guide', + description: 'Forbid repeated import of the same module in multiple places.', url: (0, _docsUrl2['default'])('no-duplicates') }, fixable: 'code', @@ -253,6 +270,9 @@ module.exports = { type: 'object', properties: { considerQueryString: { + type: 'boolean' }, + + 'prefer-inline': { type: 'boolean' } }, @@ -274,15 +294,33 @@ module.exports = { return defaultResolver(parts[1]) + '?' + parts[2]; } : defaultResolver; - var imported = new Map(); - var nsImported = new Map(); - var typesImported = new Map(); + var moduleMaps = new Map(); + + function getImportMap(n) { + if (!moduleMaps.has(n.parent)) { + moduleMaps.set(n.parent, { + imported: new Map(), + nsImported: new Map(), + defaultTypesImported: new Map(), + namedTypesImported: new Map() }); + + } + var map = moduleMaps.get(n.parent); + if (n.importKind === 'type') { + return n.specifiers.length > 0 && n.specifiers[0].type === 'ImportDefaultSpecifier' ? map.defaultTypesImported : map.namedTypesImported; + } + if (n.specifiers.some(function (spec) {return spec.importKind === 'type';})) { + return map.namedTypesImported; + } + + return hasNamespace(n) ? map.nsImported : map.imported; + } + return { - 'ImportDeclaration': function () {function ImportDeclaration(n) { + ImportDeclaration: function () {function ImportDeclaration(n) { // resolved path will cover aliased duplicates var resolvedPath = resolver(n.source.value); - var importMap = n.importKind === 'type' ? typesImported : - hasNamespace(n) ? nsImported : imported; + var importMap = getImportMap(n); if (importMap.has(resolvedPath)) { importMap.get(resolvedPath).push(n); @@ -291,11 +329,14 @@ module.exports = { } }return ImportDeclaration;}(), - 'Program:exit': function () {function ProgramExit() { - checkImports(imported, context); - checkImports(nsImported, context); - checkImports(typesImported, context); + 'Program:exit': function () {function ProgramExit() {var _iteratorNormalCompletion5 = true;var _didIteratorError5 = false;var _iteratorError5 = undefined;try { + for (var _iterator5 = moduleMaps.values()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {var map = _step5.value; + checkImports(map.imported, context); + checkImports(map.nsImported, context); + checkImports(map.defaultTypesImported, context); + checkImports(map.namedTypesImported, context); + }} catch (err) {_didIteratorError5 = true;_iteratorError5 = err;} finally {try {if (!_iteratorNormalCompletion5 && _iterator5['return']) {_iterator5['return']();}} finally {if (_didIteratorError5) {throw _iteratorError5;}}} }return ProgramExit;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1kdXBsaWNhdGVzLmpzIl0sIm5hbWVzIjpbImNoZWNrSW1wb3J0cyIsImltcG9ydGVkIiwiY29udGV4dCIsImVudHJpZXMiLCJtb2R1bGUiLCJub2RlcyIsImxlbmd0aCIsIm1lc3NhZ2UiLCJmaXJzdCIsInJlc3QiLCJzb3VyY2VDb2RlIiwiZ2V0U291cmNlQ29kZSIsImZpeCIsImdldEZpeCIsInJlcG9ydCIsIm5vZGUiLCJzb3VyY2UiLCJnZXRDb21tZW50c0JlZm9yZSIsInVuZGVmaW5lZCIsImhhc1Byb2JsZW1hdGljQ29tbWVudHMiLCJoYXNOYW1lc3BhY2UiLCJkZWZhdWx0SW1wb3J0TmFtZXMiLCJTZXQiLCJtYXAiLCJnZXREZWZhdWx0SW1wb3J0TmFtZSIsImZpbHRlciIs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WFwKCk7XG4gICAgcmV0dXJuIHtcbiAgICAgICdJbXBvcnREZWNsYXJhdGlvbic6IGZ1bmN0aW9uIChuKSB7XG4gICAgICAgIC8vIHJlc29sdmVkIHBhdGggd2lsbCBjb3ZlciBhbGlhc2VkIGR1cGxpY2F0ZXNcbiAgICAgICAgY29uc3QgcmVzb2x2ZWRQYXRoID0gcmVzb2x2ZXIobi5zb3VyY2UudmFsdWUpO1xuICAgICAgICBjb25zdCBpbXBvcnRNYXAgPSBuLmltcG9ydEtpbmQgPT09ICd0eXBlJyA/IHR5cGVzSW1wb3J0ZWQgOlxuICAgICAgICAgIChoYXNOYW1lc3BhY2UobikgPyBuc0ltcG9ydGVkIDogaW1wb3J0ZWQpO1xuXG4gICAgICAgIGlmIChpbXBvcnRNYXAuaGFzKHJlc29sdmVkUGF0aCkpIHtcbiAgICAgICAgICBpbXBvcnRNYXAuZ2V0KHJlc29sdmVkUGF0aCkucHVzaChuKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpbXBvcnRNYXAuc2V0KHJlc29sdmVkUGF0aCwgW25dKTtcbiAgICAgICAgfVxuICAgICAgfSxcblxuICAgICAgJ1Byb2dyYW06ZXhpdCc6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgY2hlY2tJbXBvcnRzKGltcG9ydGVkLCBjb250ZXh0KTtcbiAgICAgICAgY2hlY2tJbXBvcnRzKG5zSW1wb3J0ZWQsIGNvbnRleHQpO1xuICAgICAgICBjaGVja0ltcG9ydHModHlwZXNJbXBvcnRlZCwgY29udGV4dCk7XG4gICAgICB9LFxuICAgIH07XG4gIH0sXG59O1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1kdXBsaWNhdGVzLmpzIl0sIm5hbWVzIjpbInR5cGVzY3JpcHRQa2ciLCJyZXF1aXJlIiwiZSIsImNoZWNrSW1wb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KG1hcC5pbXBvcnRlZCwgY29udGV4dCk7XG4gICAgICAgICAgY2hlY2tJbXBvcnRzKG1hcC5uc0ltcG9ydGVkLCBjb250ZXh0KTtcbiAgICAgICAgICBjaGVja0ltcG9ydHMobWFwLmRlZmF1bHRUeXBlc0ltcG9ydGVkLCBjb250ZXh0KTtcbiAgICAgICAgICBjaGVja0ltcG9ydHMobWFwLm5hbWVkVHlwZXNJbXBvcnRlZCwgY29udGV4dCk7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-dynamic-require.js b/node_modules/eslint-plugin-import/lib/rules/no-dynamic-require.js index 51758a209..0fd98c038 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-dynamic-require.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-dynamic-require.js @@ -19,10 +19,14 @@ function isStaticValue(arg) { arg.type === 'TemplateLiteral' && arg.expressions.length === 0; } +var dynamicImportErrorMessage = 'Calls to import() should use string literals'; + module.exports = { meta: { type: 'suggestion', docs: { + category: 'Static analysis', + description: 'Forbid `require()` calls with expressions.', url: (0, _docsUrl2['default'])('no-dynamic-require') }, schema: [ @@ -55,10 +59,19 @@ module.exports = { if (options.esmodule && isDynamicImport(node)) { return context.report({ node: node, - message: 'Calls to import() should use string literals' }); + message: dynamicImportErrorMessage }); } - }return CallExpression;}() }; + }return CallExpression;}(), + ImportExpression: function () {function ImportExpression(node) { + if (!options.esmodule || isStaticValue(node.source)) { + return; + } + return context.report({ + node: node, + message: dynamicImportErrorMessage }); + + }return ImportExpression;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1keW5hbWljLXJlcXVpcmUuanMiXSwibmFtZXMiOlsiaXNSZXF1aXJlIiwibm9kZSIsImNhbGxlZSIsInR5cGUiLCJu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2FsbEV4cHJlc3Npb24obm9kZSkge1xuICAgICAgICBpZiAoIW5vZGUuYXJndW1lbnRzWzBdIHx8IGlzU3RhdGljVmFsdWUobm9kZS5hcmd1bWVudHNbMF0pKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpc1JlcXVpcmUobm9kZSkpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIG1lc3NhZ2U6ICdDYWxscyB0byByZXF1aXJlKCkgc2hvdWxkIHVzZSBzdHJpbmcgbGl0ZXJhbHMnLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChvcHRpb25zLmVzbW9kdWxlICYmIGlzRHluYW1pY0ltcG9ydChub2RlKSkge1xuICAgICAgICAgIHJldHVybiBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZTogJ0NhbGxzIHRvIGltcG9ydCgpIHNob3VsZCB1c2Ugc3RyaW5nIGxpdGVyYWxzJyxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1keW5hbWljLXJlcXVpcmUuanMiXSwibmFtZXMiOlsiaXNSZXF1aXJlIiwibm9kZSIsImNhbGxlZSIsInR5cGUiLCJuYW1lIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwiaXNEeW5hbWljSW1wb3J0IiwiaXNTdGF0aWNWYWx1ZSIsImFyZyIsImV4cHJlc3Npb25zIiwiZHluYW1pY0ltcG9ydEVycm9yTWVzc2FnZSIsIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsImNhdGVn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aXB0aW9uOiAnRm9yYmlkIGByZXF1aXJlKClgIGNhbGxzIHdpdGggZXhwcmVzc2lvbnMuJyxcbiAgICAgIHVybDogZG9jc1VybCgnbm8tZHluYW1pYy1yZXF1aXJlJyksXG4gICAgfSxcbiAgICBzY2hlbWE6IFtcbiAgICAgIHtcbiAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICBlc21vZHVsZToge1xuICAgICAgICAgICAgdHlwZTogJ2Jvb2xlYW4nLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIGFkZGl0aW9uYWxQcm9wZXJ0aWVzOiBmYWxzZSxcbiAgICAgIH0sXG4gICAgXSxcbiAgfSxcblxuICBjcmVhdGUoY29udGV4dCkge1xuICAgIGNvbnN0IG9wdGlvbnMgPSBjb250ZXh0Lm9wdGlvbnNbMF0gfHwge307XG5cbiAgICByZXR1cm4ge1xuICAgICAgQ2FsbEV4cHJlc3Npb24obm9kZSkge1xuICAgICAgICBpZiAoIW5vZGUuYXJndW1lbnRzWzBdIHx8IGlzU3RhdGljVmFsdWUobm9kZS5hcmd1bWVudHNbMF0pKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpc1JlcXVpcmUobm9kZSkpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIG1lc3NhZ2U6ICdDYWxscyB0byByZXF1aXJlKCkgc2hvdWxkIHVzZSBzdHJpbmcgbGl0ZXJhbHMnLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChvcHRpb25zLmVzbW9kdWxlICYmIGlzRHluYW1pY0ltcG9ydChub2RlKSkge1xuICAgICAgICAgIHJldHVybiBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgbWVzc2FnZTogZHluYW1pY0ltcG9ydEVycm9yTWVzc2FnZSxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIEltcG9ydEV4cHJlc3Npb24obm9kZSkge1xuICAgICAgICBpZiAoIW9wdGlvbnMuZXNtb2R1bGUgfHwgaXNTdGF0aWNWYWx1ZShub2RlLnNvdXJjZSkpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICBub2RlLFxuICAgICAgICAgIG1lc3NhZ2U6IGR5bmFtaWNJbXBvcnRFcnJvck1lc3NhZ2UsXG4gICAgICAgIH0pO1xuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-empty-named-blocks.js b/node_modules/eslint-plugin-import/lib/rules/no-empty-named-blocks.js new file mode 100644 index 000000000..1c7426491 --- /dev/null +++ b/node_modules/eslint-plugin-import/lib/rules/no-empty-named-blocks.js @@ -0,0 +1,108 @@ +'use strict';var _slicedToArray = function () {function sliceIterator(arr, i) {var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"]) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}return function (arr, i) {if (Array.isArray(arr)) {return arr;} else if (Symbol.iterator in Object(arr)) {return sliceIterator(arr, i);} else {throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}();var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} + +function getEmptyBlockRange(tokens, index) { + var token = tokens[index]; + var nextToken = tokens[index + 1]; + var prevToken = tokens[index - 1]; + var start = token.range[0]; + var end = nextToken.range[1]; + + // Remove block tokens and the previous comma + if (prevToken.value === ',' || prevToken.value === 'type' || prevToken.value === 'typeof') { + start = prevToken.range[0]; + } + + return [start, end]; +} + +module.exports = { + meta: { + type: 'suggestion', + docs: { + category: 'Helpful warnings', + description: 'Forbid empty named import blocks.', + url: (0, _docsUrl2['default'])('no-empty-named-blocks') }, + + fixable: 'code', + schema: [], + hasSuggestions: true }, + + + create: function () {function create(context) { + var importsWithoutNameds = []; + + return { + ImportDeclaration: function () {function ImportDeclaration(node) { + if (!node.specifiers.some(function (x) {return x.type === 'ImportSpecifier';})) { + importsWithoutNameds.push(node); + } + }return ImportDeclaration;}(), + + 'Program:exit': function () {function ProgramExit(program) { + var importsTokens = importsWithoutNameds.map(function (node) { + return [node, program.tokens.filter(function (x) {return x.range[0] >= node.range[0] && x.range[1] <= node.range[1];})]; + }); + + importsTokens.forEach(function (_ref) {var _ref2 = _slicedToArray(_ref, 2),node = _ref2[0],tokens = _ref2[1]; + tokens.forEach(function (token) { + var idx = program.tokens.indexOf(token); + var nextToken = program.tokens[idx + 1]; + + if (nextToken && token.value === '{' && nextToken.value === '}') { + var hasOtherIdentifiers = tokens.some(function (token) {return ( + token.type === 'Identifier' && + token.value !== 'from' && + token.value !== 'type' && + token.value !== 'typeof');}); + + + // If it has no other identifiers it's the only thing in the import, so we can either remove the import + // completely or transform it in a side-effects only import + if (!hasOtherIdentifiers) { + context.report({ + node: node, + message: 'Unexpected empty named import block', + suggest: [ + { + desc: 'Remove unused import', + fix: function () {function fix(fixer) { + // Remove the whole import + return fixer.remove(node); + }return fix;}() }, + + { + desc: 'Remove empty import block', + fix: function () {function fix(fixer) { + // Remove the empty block and the 'from' token, leaving the import only for its side + // effects, e.g. `import 'mod'` + var sourceCode = context.getSourceCode(); + var fromToken = program.tokens.find(function (t) {return t.value === 'from';}); + var importToken = program.tokens.find(function (t) {return t.value === 'import';}); + var hasSpaceAfterFrom = sourceCode.isSpaceBetween(fromToken, sourceCode.getTokenAfter(fromToken)); + var hasSpaceAfterImport = sourceCode.isSpaceBetween(importToken, sourceCode.getTokenAfter(fromToken));var _getEmptyBlockRange = + + getEmptyBlockRange(program.tokens, idx),_getEmptyBlockRange2 = _slicedToArray(_getEmptyBlockRange, 1),start = _getEmptyBlockRange2[0];var _fromToken$range = _slicedToArray( + fromToken.range, 2),end = _fromToken$range[1]; + var range = [start, hasSpaceAfterFrom ? end + 1 : end]; + + return fixer.replaceTextRange(range, hasSpaceAfterImport ? '' : ' '); + }return fix;}() }] }); + + + + } else { + context.report({ + node: node, + message: 'Unexpected empty named import block', + fix: function () {function fix(fixer) { + return fixer.removeRange(getEmptyBlockRange(program.tokens, idx)); + }return fix;}() }); + + } + } + }); + }); + }return ProgramExit;}() }; + + }return create;}() }; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1lbXB0eS1uYW1lZC1ibG9ja3MuanMiXSwibmFtZXMiOlsiZ2V0RW1wdHlCbG9ja1JhbmdlIiwidG9rZW5zIiwiaW5kZXgiLCJ0b2tlbiIsIm5leHRUb2tlbiIsInByZXZUb2tlbiIsInN0YXJ0IiwicmFuZ2UiLCJlbmQiLCJ2YWx1ZSIsIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJjYXRlZ29yeSIsImRlc2NyaXB0aW9uIiwidXJsIiwiZml4YWJsZSIsInNjaGVtYSIsImhhc1N1Z2dlc3Rpb25zIiwiY3JlYXRlIiwiY29udGV4dCIsImltcG9ydHNXaXRob3V0TmFtZWRzIiwiSW1wb3J0RGVjbGFyYXRpb24iLCJub2RlIiwic3BlY2lmaWVycyIsInNvbWUiLCJ4IiwicHVzaCIsInByb2dyYW0iLCJpbXBvcnRzVG9rZW5zIiwibWFwIiwiZmlsdGVyIiwiZm9yRWFjaCIsImlkeCIsImluZGV4T2YiLCJoYXNPdGhlcklkZW50aWZpZXJzIiw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IGhhc090aGVySWRlbnRpZmllcnMgPSB0b2tlbnMuc29tZSgodG9rZW4pID0+IChcbiAgICAgICAgICAgICAgICB0b2tlbi50eXBlID09PSAnSWRlbnRpZmllcidcbiAgICAgICAgICAgICAgICAgICYmIHRva2VuLnZhbHVlICE9PSAnZnJvbSdcbiAgICAgICAgICAgICAgICAgICYmIHRva2VuLnZhbHVlICE9PSAndHlwZSdcbiAgICAgICAgICAgICAgICAgICYmIHRva2VuLnZhbHVlICE9PSAndHlwZW9mJ1xuICAgICAgICAgICAgICApKTtcblxuICAgICAgICAgICAgICAvLyBJZiBpdCBoYXMgbm8gb3RoZXIgaWRlbnRpZmllcnMgaXQncyB0aGUgb25seSB0aGluZyBpbiB0aGUgaW1wb3J0LCBzbyB3ZSBjYW4gZWl0aGVyIHJlbW92ZSB0aGUgaW1wb3J0XG4gICAgICAgICAgICAgIC8vIGNvbXBsZXRlbHkgb3IgdHJhbnNmb3JtIGl0IGluIGEgc2lkZS1lZmZlY3RzIG9ubHkgaW1wb3J0XG4gICAgICAgICAgICAgIGlmICghaGFzT3RoZXJJZGVudGlmaWVycykge1xuICAgICAgICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgICAgICBtZXNzYWdlOiAnVW5leHBlY3RlZCBlbXB0eSBuYW1lZCBpbXBvcnQgYmxvY2snLFxuICAgICAgICAgICAgICAgICAgc3VnZ2VzdDogW1xuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ1JlbW92ZSB1bnVzZWQgaW1wb3J0JyxcbiAgICAgICAgICAgICAgICAgICAgICBmaXgoZml4ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJlbW92ZSB0aGUgd2hvbGUgaW1wb3J0XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZml4ZXIucmVtb3ZlKG5vZGUpO1xuICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAnUmVtb3ZlIGVtcHR5IGltcG9ydCBibG9jaycsXG4gICAgICAgICAgICAgICAgICAgICAgZml4KGZpeGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBSZW1vdmUgdGhlIGVtcHR5IGJsb2NrIGFuZCB0aGUgJ2Zyb20nIHRva2VuLCBsZWF2aW5nIHRoZSBpbXBvcnQgb25seSBmb3IgaXRzIHNpZGVcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVmZmVjdHMsIGUuZy4gYGltcG9ydCAnbW9kJ2BcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNvdXJjZUNvZGUgPSBjb250ZXh0LmdldFNvdXJjZUNvZGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGZyb21Ub2tlbiA9IHByb2dyYW0udG9rZW5zLmZpbmQodCA9PiB0LnZhbHVlID09PSAnZnJvbScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaW1wb3J0VG9rZW4gPSBwcm9ncmFtLnRva2Vucy5maW5kKHQgPT4gdC52YWx1ZSA9PT0gJ2ltcG9ydCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaGFzU3BhY2VBZnRlckZyb20gPSBzb3VyY2VDb2RlLmlzU3BhY2VCZXR3ZWVuKGZyb21Ub2tlbiwgc291cmNlQ29kZS5nZXRUb2tlbkFmdGVyKGZyb21Ub2tlbikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaGFzU3BhY2VBZnRlckltcG9ydCA9IHNvdXJjZUNvZGUuaXNTcGFjZUJldHdlZW4oaW1wb3J0VG9rZW4sIHNvdXJjZUNvZGUuZ2V0VG9rZW5BZnRlcihmcm9tVG9rZW4pKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgW3N0YXJ0XSA9IGdldEVtcHR5QmxvY2tSYW5nZShwcm9ncmFtLnRva2VucywgaWR4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IFssIGVuZF0gPSBmcm9tVG9rZW4ucmFuZ2U7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByYW5nZSA9IFtzdGFydCwgaGFzU3BhY2VBZnRlckZyb20gPyBlbmQgKyAxIDogZW5kXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZpeGVyLnJlcGxhY2VUZXh0UmFuZ2UocmFuZ2UsIGhhc1NwYWNlQWZ0ZXJJbXBvcnQgPyAnJyA6ICcgJyk7XG4gICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdVbmV4cGVjdGVkIGVtcHR5IG5hbWVkIGltcG9ydCBibG9jaycsXG4gICAgICAgICAgICAgICAgICBmaXgoZml4ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZpeGVyLnJlbW92ZVJhbmdlKGdldEVtcHR5QmxvY2tSYW5nZShwcm9ncmFtLnRva2VucywgaWR4KSk7XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-extraneous-dependencies.js b/node_modules/eslint-plugin-import/lib/rules/no-extraneous-dependencies.js index 697e6af36..44a975a82 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-extraneous-dependencies.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-extraneous-dependencies.js @@ -1,6 +1,6 @@ 'use strict';var _slicedToArray = function () {function sliceIterator(arr, i) {var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"]) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}return function (arr, i) {if (Array.isArray(arr)) {return arr;} else if (Symbol.iterator in Object(arr)) {return sliceIterator(arr, i);} else {throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}();var _path = require('path');var _path2 = _interopRequireDefault(_path); var _fs = require('fs');var _fs2 = _interopRequireDefault(_fs); -var _readPkgUp = require('read-pkg-up');var _readPkgUp2 = _interopRequireDefault(_readPkgUp); +var _pkgUp = require('eslint-module-utils/pkgUp');var _pkgUp2 = _interopRequireDefault(_pkgUp); var _minimatch = require('minimatch');var _minimatch2 = _interopRequireDefault(_minimatch); var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve); var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor); @@ -18,6 +18,16 @@ function arrayOrKeys(arrayOrObject) { return Array.isArray(arrayOrObject) ? arrayOrObject : Object.keys(arrayOrObject); } +function readJSON(jsonPath, throwException) { + try { + return JSON.parse(_fs2['default'].readFileSync(jsonPath, 'utf8')); + } catch (err) { + if (throwException) { + throw err; + } + } +} + function extractDepFields(pkg) { return { dependencies: pkg.dependencies || {}, @@ -30,6 +40,15 @@ function extractDepFields(pkg) { } +function getPackageDepFields(packageJsonPath, throwAtRead) { + if (!depFieldCache.has(packageJsonPath)) { + var depFields = extractDepFields(readJSON(packageJsonPath, throwAtRead)); + depFieldCache.set(packageJsonPath, depFields); + } + + return depFieldCache.get(packageJsonPath); +} + function getDependencies(context, packageDir) { var paths = []; try { @@ -53,24 +72,21 @@ function getDependencies(context, packageDir) { // use rule config to find package.json paths.forEach(function (dir) { var packageJsonPath = _path2['default'].join(dir, 'package.json'); - if (!depFieldCache.has(packageJsonPath)) { - var depFields = extractDepFields( - JSON.parse(_fs2['default'].readFileSync(packageJsonPath, 'utf8'))); - - depFieldCache.set(packageJsonPath, depFields); - } - var _packageContent = depFieldCache.get(packageJsonPath); + var _packageContent = getPackageDepFields(packageJsonPath, true); Object.keys(packageContent).forEach(function (depsKey) {return ( Object.assign(packageContent[depsKey], _packageContent[depsKey]));}); }); } else { + var packageJsonPath = (0, _pkgUp2['default'])({ + cwd: context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename(), + normalize: false }); + + // use closest package.json Object.assign( packageContent, - extractDepFields( - _readPkgUp2['default'].sync({ cwd: context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename(), normalize: false }).pkg)); - + getPackageDepFields(packageJsonPath, false)); } @@ -159,16 +175,20 @@ function checkDependencyDeclaration(deps, packageName, declarationStatus) { } function reportIfMissing(context, deps, depsOptions, node, name) { - // Do not report when importing types + // Do not report when importing types unless option is enabled if ( - node.importKind === 'type' || - node.parent && node.parent.importKind === 'type' || - node.importKind === 'typeof') + !depsOptions.verifyTypeImports && ( + node.importKind === 'type' || node.importKind === 'typeof')) { return; } - if ((0, _importType2['default'])(name, context) !== 'external') { + var typeOfImport = (0, _importType2['default'])(name, context); + + if ( + typeOfImport !== 'external' && ( + typeOfImport !== 'internal' || !depsOptions.verifyInternalDeps)) + { return; } @@ -234,6 +254,8 @@ module.exports = { meta: { type: 'problem', docs: { + category: 'Helpful warnings', + description: 'Forbid the use of extraneous packages.', url: (0, _docsUrl2['default'])('no-extraneous-dependencies') }, @@ -245,7 +267,9 @@ module.exports = { 'optionalDependencies': { 'type': ['boolean', 'array'] }, 'peerDependencies': { 'type': ['boolean', 'array'] }, 'bundledDependencies': { 'type': ['boolean', 'array'] }, - 'packageDir': { 'type': ['string', 'array'] } }, + 'packageDir': { 'type': ['string', 'array'] }, + 'includeInternal': { 'type': ['boolean'] }, + 'includeTypes': { 'type': ['boolean'] } }, 'additionalProperties': false }] }, @@ -261,11 +285,17 @@ module.exports = { allowDevDeps: testConfig(options.devDependencies, filename) !== false, allowOptDeps: testConfig(options.optionalDependencies, filename) !== false, allowPeerDeps: testConfig(options.peerDependencies, filename) !== false, - allowBundledDeps: testConfig(options.bundledDependencies, filename) !== false }; + allowBundledDeps: testConfig(options.bundledDependencies, filename) !== false, + verifyInternalDeps: !!options.includeInternal, + verifyTypeImports: !!options.includeTypes }; return (0, _moduleVisitor2['default'])(function (source, node) { reportIfMissing(context, deps, depsOptions, node, source.value); }, { commonjs: true }); - }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1leHRyYW5lb3VzLWRlcGVuZGVuY2llcy5qcyJdLCJuYW1lcyI6WyJkZXBGaWVsZENhY2hlIiwiTWFwIiwiaGFzS2V5cyIsIm9iaiIsIk9iamVjdCIsImtleXMiLCJsZW5ndGgiLCJhcnJheU9yS2V5cyIsImFycmF5T3JPYmplY3QiLCJBcnJheSIsImlzQXJyYXkiLCJleHRyYWN0RGVwRmllbGRzIiwicGtnIiwiZGVwZW5kZW5jaWVzIiwiZGV2RGVwZW5kZW5jaWVzIiwib3B0aW9uYWxEZXBlbmRlbmNpZXMiLCJwZWVyRGVwZW5kZW5jaWVzIiwiYnVuZGxlZERlcGVuZGVuY2llcyIsImJ1bmRsZURlcGVuZGVuY2llcyIsImdldERlcGVuZGVuY2llcyIsImNvbnRleHQiLCJwYWNrYWdlRGlyIiwicGF0aHMiLCJwYWNrYWdlQ29udGVudCIsInBhdGgiLCJyZXNvbHZlIiwibWFwIiwiZGlyIiwiZm9yRWFjaCIsInBhY2thZ2VKc29uUGF0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3NpbmcoY29udGV4dCwgZGVwcywgZGVwc09wdGlvbnMsIG5vZGUsIHNvdXJjZS52YWx1ZSk7XG4gICAgfSwgeyBjb21tb25qczogdHJ1ZSB9KTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file + }return create;}(), + + 'Program:exit': function () {function ProgramExit() { + depFieldCache.clear(); + }return ProgramExit;}() }; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1leHRyYW5lb3VzLWRlcGVuZGVuY2llcy5qcyJdLCJuYW1lcyI6WyJkZXBGaWVsZENhY2hlIiwiTWFwIiwiaGFzS2V5cyIsIm9iaiIsIk9iamVjdCIsImtleXMiLCJsZW5ndGgiLCJhcnJheU9yS2V5cyIsImFycmF5T3JPYmplY3QiLCJBcnJheSIsImlzQXJyYXkiLCJyZWFkSlNPTiIsImpzb25QYXRoIiwidGhyb3dFeGNlcHRpb24iLCJKU09OIiwicGFyc2UiLCJmcyIsInJlYWRGaWxlU3luYyIsImVyciIsImV4dHJhY3REZXBGaWVsZHMiLCJwa2ciLCJkZXBlbmRlbmNpZXMiLCJkZXZEZXBlbmRlbmNpZXMiLCJvcHRpb25hbERlcGVuZGVuY2llcyIsInBlZXJEZXBlbmRlbmNpZXMiLCJidW5kbGVkRGVwZW5kZW5jaWVzIiwiYnVuZGxlRGVwZW5kZW5jaWVzIiwiZ2V0UGFja2FnZURlcEZpZWxkcyIsInBhY2thZ2VKc29uUGF0aCIsInRocm93QXRSZWFkIiwiaGFzIiwiZGVwRmllbGRzIiwic2V0IiwiZ2V0IiwiZ2V0RGVwZW5kZW5jaWVzIiwiY29udGV4dCIsInBhY2thZ2VEaXIiLCJwYXRocyIsInBhY2thZ2VDb250ZW50IiwicGF0aCIsInJlc29sdmUiLCJtYXAiLCJkaXIiLCJmb3JFYWNoIiwiam9pbiIsIl9wYWNrYWdlQ29udGVudCIsImFzc2lnbiIsImRlc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3B0aW9ucy5wYWNrYWdlRGlyKSB8fCBleHRyYWN0RGVwRmllbGRzKHt9KTtcblxuICAgIGNvbnN0IGRlcHNPcHRpb25zID0ge1xuICAgICAgYWxsb3dEZXZEZXBzOiB0ZXN0Q29uZmlnKG9wdGlvbnMuZGV2RGVwZW5kZW5jaWVzLCBmaWxlbmFtZSkgIT09IGZhbHNlLFxuICAgICAgYWxsb3dPcHREZXBzOiB0ZXN0Q29uZmlnKG9wdGlvbnMub3B0aW9uYWxEZXBlbmRlbmNpZXMsIGZpbGVuYW1lKSAhPT0gZmFsc2UsXG4gICAgICBhbGxvd1BlZXJEZXBzOiB0ZXN0Q29uZmlnKG9wdGlvbnMucGVlckRlcGVuZGVuY2llcywgZmlsZW5hbWUpICE9PSBmYWxzZSxcbiAgICAgIGFsbG93QnVuZGxlZERlcHM6IHRlc3RDb25maWcob3B0aW9ucy5idW5kbGVkRGVwZW5kZW5jaWVzLCBmaWxlbmFtZSkgIT09IGZhbHNlLFxuICAgICAgdmVyaWZ5SW50ZXJuYWxEZXBzOiAhIW9wdGlvbnMuaW5jbHVkZUludGVybmFsLFxuICAgICAgdmVyaWZ5VHlwZUltcG9ydHM6ICEhb3B0aW9ucy5pbmNsdWRlVHlwZXMsXG4gICAgfTtcblxuICAgIHJldHVybiBtb2R1bGVWaXNpdG9yKChzb3VyY2UsIG5vZGUpID0+IHtcbiAgICAgIHJlcG9ydElmTWlzc2luZyhjb250ZXh0LCBkZXBzLCBkZXBzT3B0aW9ucywgbm9kZSwgc291cmNlLnZhbHVlKTtcbiAgICB9LCB7IGNvbW1vbmpzOiB0cnVlIH0pO1xuICB9LFxuXG4gICdQcm9ncmFtOmV4aXQnOiAoKSA9PiB7XG4gICAgZGVwRmllbGRDYWNoZS5jbGVhcigpO1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-import-module-exports.js b/node_modules/eslint-plugin-import/lib/rules/no-import-module-exports.js index a0d73508b..b93d96e72 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-import-module-exports.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-import-module-exports.js @@ -1,9 +1,9 @@ 'use strict';var _minimatch = require('minimatch');var _minimatch2 = _interopRequireDefault(_minimatch); var _path = require('path');var _path2 = _interopRequireDefault(_path); -var _pkgUp = require('pkg-up');var _pkgUp2 = _interopRequireDefault(_pkgUp);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} +var _pkgUp = require('eslint-module-utils/pkgUp');var _pkgUp2 = _interopRequireDefault(_pkgUp);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} function getEntryPoint(context) { - var pkgPath = _pkgUp2['default'].sync(context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename()); + var pkgPath = (0, _pkgUp2['default'])({ cwd: context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename() }); try { return require.resolve(_path2['default'].dirname(pkgPath)); } catch (error) { @@ -13,12 +13,23 @@ function getEntryPoint(context) { } } +function findScope(context, identifier) {var _context$getSourceCod = + context.getSourceCode(),scopeManager = _context$getSourceCod.scopeManager; + + return scopeManager && scopeManager.scopes.slice().reverse().find(function (scope) {return scope.variables.some(function (variable) {return variable.identifiers.some(function (node) {return node.name === identifier;});});}); +} + +function findDefinition(objectScope, identifier) { + var variable = objectScope.variables.find(function (variable) {return variable.name === identifier;}); + return variable.defs.find(function (def) {return def.name.name === identifier;}); +} + module.exports = { meta: { type: 'problem', docs: { - description: 'Disallow import statements with module.exports', - category: 'Best Practices', + category: 'Module systems', + description: 'Forbid import statements with CommonJS module.exports.', recommended: true }, fixable: 'code', @@ -43,10 +54,13 @@ module.exports = { var isEntryPoint = entryPoint === fileName; var isIdentifier = node.object.type === 'Identifier'; var hasKeywords = /^(module|exports)$/.test(node.object.name); - var isException = options.exceptions && - options.exceptions.some(function (glob) {return (0, _minimatch2['default'])(fileName, glob);}); + var objectScope = hasKeywords && findScope(context, node.object.name); + var variableDefinition = objectScope && findDefinition(objectScope, node.object.name); + var isImportBinding = variableDefinition && variableDefinition.type === 'ImportBinding'; + var hasCJSExportReference = hasKeywords && (!objectScope || objectScope.type === 'module'); + var isException = !!options.exceptions && options.exceptions.some(function (glob) {return (0, _minimatch2['default'])(fileName, glob);}); - if (isIdentifier && hasKeywords && !isEntryPoint && !isException) { + if (isIdentifier && hasCJSExportReference && !isEntryPoint && !isException && !isImportBinding) { importDeclarations.forEach(function (importDeclaration) { context.report({ node: importDeclaration, @@ -69,4 +83,4 @@ module.exports = { }return MemberExpression;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1pbXBvcnQtbW9kdWxlLWV4cG9ydHMuanMiXSwibmFtZXMiOlsiZ2V0RW50cnlQb2ludCIsImNvbnRleHQiLCJwa2dQYXRoIiwicGtnVXAiLCJzeW5jIiwiZ2V0UGh5c2ljYWxGaWxlbmFtZSIsImdldEZpbGVuYW1lIiwicmVxdWlyZSIsInJlc29sdmUiLCJwYXRoIiwiZGlybmFtZSIsImVycm9yIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsImRlc2NyaXB0aW9uIiwiY2F0ZWdvcnkiLCJyZWNvbW1lbmRlZCIsImZpeGFibGUiLCJzY2hlbWEiLCJjcmVhdGUiLCJpbXBvcnREZWNsYXJhdGlvbnMiLCJlbnRyeVBvaW50Iiwib3B0aW9ucyIsImFscmVhZHlSZXBvcnRlZCIsInJlcG9ydCIsIm5vZGUiLCJmaWxlTmFtZSIsImlzRW50cnlQb2ludCIsImlzSWRlbnRpZmllciIsIm9iamVjdCIsImhhc0tleXdvcmRzIiwidGVzdCIsIm5hbWUiLCJpc0V4Y2VwdGlvbiIsImV4Y2VwdGlvbnMiLCJzb21lIiwiZ2xvYiIsImZvckVhY2giLCJpbXBvcnREZWNsYXJ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KGlzSWRlbnRpZmllciAmJiBoYXNLZXl3b3JkcyAmJiAhaXNFbnRyeVBvaW50ICYmICFpc0V4Y2VwdGlvbikge1xuICAgICAgICBpbXBvcnREZWNsYXJhdGlvbnMuZm9yRWFjaChpbXBvcnREZWNsYXJhdGlvbiA9PiB7XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgICAgICAgbm9kZTogaW1wb3J0RGVjbGFyYXRpb24sXG4gICAgICAgICAgICBtZXNzYWdlOiBgQ2Fubm90IHVzZSBpbXBvcnQgZGVjbGFyYXRpb25zIGluIG1vZHVsZXMgdGhhdCBleHBvcnQgdXNpbmcgYCArXG4gICAgICAgICAgICAgIGBDb21tb25KUyAobW9kdWxlLmV4cG9ydHMgPSAnZm9vJyBvciBleHBvcnRzLmJhciA9ICdoaScpYCxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICAgIGFscmVhZHlSZXBvcnRlZCA9IHRydWU7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIHtcbiAgICAgIEltcG9ydERlY2xhcmF0aW9uKG5vZGUpIHtcbiAgICAgICAgaW1wb3J0RGVjbGFyYXRpb25zLnB1c2gobm9kZSk7XG4gICAgICB9LFxuICAgICAgTWVtYmVyRXhwcmVzc2lvbihub2RlKSB7XG4gICAgICAgIGlmICghYWxyZWFkeVJlcG9ydGVkKSB7XG4gICAgICAgICAgcmVwb3J0KG5vZGUpO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgIH07XG4gIH0sXG59O1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1pbXBvcnQtbW9kdWxlLWV4cG9ydHMuanMiXSwibmFtZXMiOlsiZ2V0RW50cnlQb2ludCIsImNvbnRleHQiLCJwa2dQYXRoIiwiY3dkIiwiZ2V0UGh5c2ljYWxGaWxlbmFtZSIs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ICAgICBpZiAoaXNJZGVudGlmaWVyICYmIGhhc0NKU0V4cG9ydFJlZmVyZW5jZSAmJiAhaXNFbnRyeVBvaW50ICYmICFpc0V4Y2VwdGlvbiAmJiAhaXNJbXBvcnRCaW5kaW5nKSB7XG4gICAgICAgIGltcG9ydERlY2xhcmF0aW9ucy5mb3JFYWNoKGltcG9ydERlY2xhcmF0aW9uID0+IHtcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICBub2RlOiBpbXBvcnREZWNsYXJhdGlvbixcbiAgICAgICAgICAgIG1lc3NhZ2U6IGBDYW5ub3QgdXNlIGltcG9ydCBkZWNsYXJhdGlvbnMgaW4gbW9kdWxlcyB0aGF0IGV4cG9ydCB1c2luZyBgICtcbiAgICAgICAgICAgICAgYENvbW1vbkpTIChtb2R1bGUuZXhwb3J0cyA9ICdmb28nIG9yIGV4cG9ydHMuYmFyID0gJ2hpJylgLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICAgICAgYWxyZWFkeVJlcG9ydGVkID0gdHJ1ZTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgSW1wb3J0RGVjbGFyYXRpb24obm9kZSkge1xuICAgICAgICBpbXBvcnREZWNsYXJhdGlvbnMucHVzaChub2RlKTtcbiAgICAgIH0sXG4gICAgICBNZW1iZXJFeHByZXNzaW9uKG5vZGUpIHtcbiAgICAgICAgaWYgKCFhbHJlYWR5UmVwb3J0ZWQpIHtcbiAgICAgICAgICByZXBvcnQobm9kZSk7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-internal-modules.js b/node_modules/eslint-plugin-import/lib/rules/no-internal-modules.js index da2513ce5..c5ba71773 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-internal-modules.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-internal-modules.js @@ -9,12 +9,14 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Static analysis', + description: 'Forbid importing the submodules of other modules.', url: (0, _docsUrl2['default'])('no-internal-modules') }, schema: [ { - oneOf: [ + anyOf: [ { type: 'object', properties: { @@ -137,4 +139,4 @@ module.exports = { checkImportForReaching(source.value, source); }, { commonjs: true }); }return noReachingInside;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1pbnRlcm5hbC1tb2R1bGVzLmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJ1cmwiLCJzY2hlbWEiLCJvbmVPZiIsInByb3BlcnRpZXMiLCJhbGxvdyIsIml0ZW1zIiwiYWRkaXRpb25hbFByb3BlcnRpZXMiLCJmb3JiaWQiLCJjcmVhdGUiLCJub1JlYWNoaW5nSW5zaWRlIiwiY29udGV4dCIsIm9wdGlvbnMiLCJhbGxvd1JlZ2V4cHMiLCJtYXAiLCJtaW5pbWF0Y2giLCJtYWtlUmUiLCJwIiwiZm9yYmlkUmVnZXhwcyIsIm5vcm1hbGl6ZVNlcCIsInNvbWVQYXRoIiwic3BsaXQiLCJqb2luIiwidG9TdGVwcyIsInJlZHVjZSIsImFjYyIsInN0ZXAiLCJzbGljZSIsImNvbmNhdCIsInJlYWNoaW5nQWxsb3dlZCIsImltcG9ydFBhdGgiLCJzb21lIiwicmUiLCJ0ZXN0IiwicmVhY2hpbmdGb3JiaWRkZW4iLCJpc0FsbG93VmlvbGF0aW9uIiwic3RlcHMiLCJub25TY29wZVN0ZXBzIiwiZmlsdGVyIiwiaW5kZXhPZiIsImxlbmd0aCIsImp1c3RTdGVwcyIsInJlc29sdmVkIiwiaXNGb3JiaWRWaW9sYXRpb24iLCJpc1JlYWNoVmlvbGF0aW9uIiwiY2hlY2tJbXBvcnRGb3JSZWFjaGluZy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bXBvcnQgaW1wb3J0VHlwZSBmcm9tICcuLi9jb3JlL2ltcG9ydFR5cGUnO1xuaW1wb3J0IG1vZHVsZVZpc2l0b3IgZnJvbSAnZXNsaW50LW1vZHVsZS11dGlscy9tb2R1bGVWaXNpdG9yJztcbmltcG9ydCBkb2NzVXJsIGZyb20gJy4uL2RvY3NVcmwnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgbWV0YToge1xuICAgIHR5cGU6ICdzdWdnZXN0aW9uJyxcbiAgICBkb2NzOiB7XG4gICAgICB1cmw6IGRvY3NVcmwoJ25vLWludGVybmFsLW1vZHVsZXMnKSxcbiAgICB9LFxuXG4gICAgc2NoZW1hOiBbXG4gICAgICB7XG4gICAgICAgIG9uZU9mOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICAgIGFsbG93OiB7XG4gICAgICAgICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBhZGRpdGlvbmFsUHJvcGVydGllczogZmFsc2UsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgZm9yYmlkOiB7XG4gICAgICAgICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBhZGRpdGlvbmFs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ZXh0KSkgIT09IC0xICYmXG4gICAgICAgIGlzUmVhY2hWaW9sYXRpb24oaW1wb3J0UGF0aClcbiAgICAgICkge1xuICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgbm9kZSxcbiAgICAgICAgICBtZXNzYWdlOiBgUmVhY2hpbmcgdG8gXCIke2ltcG9ydFBhdGh9XCIgaXMgbm90IGFsbG93ZWQuYCxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG1vZHVsZVZpc2l0b3IoKHNvdXJjZSkgPT4ge1xuICAgICAgY2hlY2tJbXBvcnRGb3JSZWFjaGluZyhzb3VyY2UudmFsdWUsIHNvdXJjZSk7XG4gICAgfSwgeyBjb21tb25qczogdHJ1ZSB9KTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1pbnRlcm5hbC1tb2R1bGVzLmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJjYXRlZ29yeSIsImRlc2NyaXB0aW9uIiwidXJsIiwic2NoZW1hIiwiYW55T2YiLCJwcm9wZXJ0aWVzIiwiYWxsb3ciLCJpdGVtcyIsImFkZGl0aW9uYWxQcm9wZXJ0aWVzIiwiZm9yYmlkIiwiY3JlYXRlIiwibm9SZWFjaGluZ0luc2lkZSIsImNvbnRleHQiLCJvcHRpb25zIiwiYWxsb3dSZWdleHBzIiwibWFwIiwibWluaW1hdGNoIiwibWFrZVJlIiwicCIsImZvcmJpZFJlZ2V4cHMiLCJub3JtYWxpemVTZXAiLCJzb21lUGF0aCIsInNwbGl0Iiwiam9pbiIsInRvU3RlcHMiLCJyZWR1Y2UiLCJhY2MiLCJzdGVwIiwic2xpY2UiLCJjb25jYXQiLCJyZWFjaGluZ0FsbG93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G4gICAgICAgICAgICAgICAgICB0eXBlOiAnc3RyaW5nJyxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGFkZGl0aW9uYWxQcm9wZXJ0aWVzOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgICAgICBmb3JiaWQ6IHtcbiAgICAgICAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgICAgICAgIGl0ZW1zOiB7XG4gICAgICAgICAgICAgICAgICB0eXBlOiAnc3RyaW5nJyxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGFkZGl0aW9uYWxQcm9wZXJ0aWVzOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgfSxcbiAgICBdLFxuICB9LFxuXG4gIGNyZWF0ZTogZnVuY3Rpb24gbm9SZWFjaGluZ0luc2lkZShjb250ZXh0KSB7XG4gICAgY29uc3Qgb3B0aW9ucyA9IGNvbnRleHQub3B0aW9uc1swXSB8fCB7fTtcbiAgICBjb25zdCBhbGxvd1JlZ2V4cHMgPSAob3B0aW9ucy5hbGxvdyB8fCBbXSkubWFwKHAgPT4gbWluaW1hdGNoLm1ha2VSZShwKSk7XG4gICAgY29uc3QgZm9yYmlkUmVnZXhwcyA9IChvcHRpb25zLmZvcmJpZCB8fCBbXSkubWFwKHAgPT4gbWluaW1hdGNoLm1ha2VSZShwKSk7XG5cbiAgICAvLyBtaW5pbWF0Y2ggcGF0dGVybnMgYXJlIGV4cGVjdGVkIHRvIHVzZSAvIHBhdGggc2VwYXJhdG9ycywgbGlrZSBpbXBvcnRcbiAgICAvLyBzdGF0ZW1lbnRzLCBzbyBub3JtYWxpemUgcGF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B0aGF0IGlzIGJlaW5nIHJlYWNoZWQgaW50bywgYnV0IHdoaWNoIHNob3VsZG4ndCBiZVxuICAgIGNvbnN0IGlzUmVhY2hWaW9sYXRpb24gPSBvcHRpb25zLmZvcmJpZCA/IGlzRm9yYmlkVmlvbGF0aW9uIDogaXNBbGxvd1Zpb2xhdGlvbjtcblxuICAgIGZ1bmN0aW9uIGNoZWNrSW1wb3J0Rm9yUmVhY2hpbmcoaW1wb3J0UGF0aCwgbm9kZSkge1xuICAgICAgY29uc3QgcG90ZW50aWFsVmlvbGF0aW9uVHlwZXMgPSBbJ3BhcmVudCcsICdpbmRleCcsICdzaWJsaW5nJywgJ2V4dGVybmFsJywgJ2ludGVybmFsJ107XG4gICAgICBpZiAocG90ZW50aWFsVmlvbGF0aW9uVHlwZXMuaW5kZXhPZihpbXBvcnRUeXBlKGltcG9ydFBhdGgsIGNvbnRleHQpKSAhPT0gLTEgJiZcbiAgICAgICAgaXNSZWFjaFZpb2xhdGlvbihpbXBvcnRQYXRoKVxuICAgICAgKSB7XG4gICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICBub2RlLFxuICAgICAgICAgIG1lc3NhZ2U6IGBSZWFjaGluZyB0byBcIiR7aW1wb3J0UGF0aH1cIiBpcyBub3QgYWxsb3dlZC5gLFxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gbW9kdWxlVmlzaXRvcigoc291cmNlKSA9PiB7XG4gICAgICBjaGVja0ltcG9ydEZvclJlYWNoaW5nKHNvdXJjZS52YWx1ZSwgc291cmNlKTtcbiAgICB9LCB7IGNvbW1vbmpzOiB0cnVlIH0pO1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-mutable-exports.js b/node_modules/eslint-plugin-import/lib/rules/no-mutable-exports.js index 504d8ab09..d162d7b5f 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-mutable-exports.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-mutable-exports.js @@ -4,6 +4,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Helpful warnings', + description: 'Forbid the use of mutable exports with `var` or `let`.', url: (0, _docsUrl2['default'])('no-mutable-exports') }, schema: [] }, @@ -54,4 +56,4 @@ module.exports = { 'ExportNamedDeclaration': handleExportNamed }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1tdXRhYmxlLWV4cG9ydHMuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJjaGVja0RlY2xhcmF0aW9uIiwibm9kZSIsImtpbmQiLCJyZXBvcnQiLCJjaGVja0RlY2xhcmF0aW9uc0luU2NvcGUiLCJuYW1lIiwidmFyaWFibGVzIiwidmFyaWFibGUiLCJkZWZzIiwiZGVmIiwicGFyZW50IiwiaGFuZGxlRXhwb3J0RGVmYXVsdCIsInNjb3BlIiwiZ2V0U2NvcGUiLCJkZWNsYXJhdGlvbiIsImhhbmRsZUV4cG9ydE5hbWVkIiwic291cmNlIiwic3BlY2lmaWVycyIsInNwZWNpZmllciIsImxvY2FsIl0sIm1hcHBpbmdzIjoiYUFBQSxxQzs7QUFFQUEsT0FBT0MsT0FBUCxHQUFpQjtBQUNmQyxRQUFNO0FBQ0pDLFVBQU0sWUFERjtBQUVKQyxVQUFNO0FBQ0pDLFdBQUssMEJBQVEsb0JBQVIsQ0FERCxFQUZGOztBQUtKQyxZQUFRLEVBTEosRUFEUzs7O0FBU2ZDLHVCQUFRLGdCQUFVQyxPQUFWLEVBQW1CO0FBQ3pCLGVBQVNDLGdCQUFULENBQTBCQyxJQUExQixFQUFnQztBQUN0QkMsWUFEc0IsR0FDYkQsSUFEYSxDQUN0QkMsSUF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B9XG5cbiAgICByZXR1cm4ge1xuICAgICAgJ0V4cG9ydERlZmF1bHREZWNsYXJhdGlvbic6IGhhbmRsZUV4cG9ydERlZmF1bHQsXG4gICAgICAnRXhwb3J0TmFtZWREZWNsYXJhdGlvbic6IGhhbmRsZUV4cG9ydE5hbWVkLFxuICAgIH07XG4gIH0sXG59O1xuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-named-as-default-member.js b/node_modules/eslint-plugin-import/lib/rules/no-named-as-default-member.js index f9e56ad65..6e0882184 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-named-as-default-member.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-named-as-default-member.js @@ -16,6 +16,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Helpful warnings', + description: 'Forbid use of exported name as property of default export.', url: (0, _docsUrl2['default'])('no-named-as-default-member') }, schema: [] }, @@ -104,4 +106,4 @@ module.exports = { * @copyright 2016 Desmond Brand. All rights reserved. * See LICENSE in root directory for full license. */ -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lZC1hcy1kZWZhdWx0LW1lbWJlci5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiLCJkb2NzIiwidXJsIiwic2NoZW1hIiwiY3JlYXRlIiwiY29udGV4dCIsImZpbGVJbXBvcnRzIiwiTWFwIiwiYWxsUHJvcGVydHlMb29rdXBzIiwiaGFuZGxlSW1wb3J0RGVmYXVsdCIsIm5vZGUiLCJkZWNsYXJhdGlvbiIsImV4cG9ydE1hcCIsIkV4cG9ydHMiLCJnZXQiLCJzb3VyY2UiLCJ2YWx1ZSIsImVycm9ycyIsImxlbmd0aCIsInJlcG9ydEVycm9ycyIsInNldCIsImxvY2FsIiwibmFtZSIsInNvdXJjZVBhdGgiLCJzdG9yZVByb3BlcnR5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nRleHQucmVwb3J0KHtcbiAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICBtZXNzYWdlOiAoXG4gICAgICAgICAgICAgIGBDYXV0aW9uOiBcXGAke29iamVjdE5hbWV9XFxgIGFsc28gaGFzIGEgbmFtZWQgZXhwb3J0IGAgK1xuICAgICAgICAgICAgICBgXFxgJHtwcm9wTmFtZX1cXGAuIENoZWNrIGlmIHlvdSBtZWFudCB0byB3cml0ZSBgICtcbiAgICAgICAgICAgICAgYFxcYGltcG9ydCB7JHtwcm9wTmFtZX19IGZyb20gJyR7ZmlsZUltcG9ydC5zb3VyY2VQYXRofSdcXGAgYCArXG4gICAgICAgICAgICAgICdpbnN0ZWFkLidcbiAgICAgICAgICAgICksXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICAnSW1wb3J0RGVmYXVsdFNwZWNpZmllcic6IGhhbmRsZUltcG9ydERlZmF1bHQsXG4gICAgICAnTWVtYmVyRXhwcmVzc2lvbic6IGhhbmRsZVByb3BMb29rdXAsXG4gICAgICAnVmFyaWFibGVEZWNsYXJhdG9yJzogaGFuZGxlRGVzdHJ1Y3R1cmluZ0Fzc2lnbm1lbnQsXG4gICAgICAnUHJvZ3JhbTpleGl0JzogaGFuZGxlUHJvZ3JhbUV4aXQsXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-named-as-default.js b/node_modules/eslint-plugin-import/lib/rules/no-named-as-default.js index eee4d9bf4..130db5e45 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-named-as-default.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-named-as-default.js @@ -6,6 +6,8 @@ module.exports = { meta: { type: 'problem', docs: { + category: 'Helpful warnings', + description: 'Forbid use of exported name as identifier of default export.', url: (0, _docsUrl2['default'])('no-named-as-default') }, schema: [] }, @@ -40,4 +42,4 @@ module.exports = { 'ExportDefaultSpecifier': checkDefault.bind(null, 'exported') }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lZC1hcy1kZWZhdWx0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJ1cmwiLCJzY2hlbWEiLCJjcmVhdGUiLCJjb250ZXh0IiwiY2hlY2tEZWZhdWx0IiwibmFtZUtleSIsImRlZmF1bHRTcGVjaWZpZXIiLCJuYW1lIiwiZGVjbGFyYXRpb24iLCJpbXBvcnRzIiwiRXhwb3J0cyIsImdldCIsInNvdXJjZSIsInZhbHVlIiwiZXJyb3JzIiwibGVuZ3RoIiwicmVwb3J0RXJyb3JzIiwiaGFzIiwicmVwb3J0IiwiYmluZCJdLCJtYXBwaW5ncyI6ImFBQUEseUM7QUFDQSx5RDtBQUNBLHFDOztBQUVBQSxPQUFPQyxPQUFQLEdBQWlCO0FBQ2ZDLFFBQU07QUFDSkMsVUFBTSxTQURGO0FBRUpDLFVBQU07QUFDSkMsV0FBSywwQkFBUSxxQkFBUixDQURELEVBRkY7O0FBS0pDLFlBQVEsRUFMSixFQURTOzs7QUFTZkMsdUJBQVEsZ0JBQVVDLE9BQVYsRUFBbUI7QUFDekIsZUFBU0MsWUFBVCxDQUFzQkMsT0FBdEIsRUFBK0JDLGdCQUEvQixFQUFpRDtBQUMvQztBQUNBLFlBQUlBLGlCQUFpQkQsT0FBakIsRUFBMEJFLElBQTFCLEtBQW1DLFNBQXZDLEVBQWtEOztBQUVsRCxZQUFNQyxjQUFjLG9DQUFrQkwsT0FBbEIsQ0FBcEI7O0FBRUEsWUFBTU0sVUFBVUMsdUJBQVFDLEdBQVIsQ0FBWUgsWUFBWUksTUFBWixDQUFtQkMsS0FBL0IsRUFBc0NWLE9BQXRDLENBQWhCO0FBQ0EsWUFBS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llcixcbiAgICAgICAgICAnVXNpbmcgZXhwb3J0ZWQgbmFtZSBcXCcnICsgZGVmYXVsdFNwZWNpZmllcltuYW1lS2V5XS5uYW1lICtcbiAgICAgICAgICAnXFwnIGFzIGlkZW50aWZpZXIgZm9yIGRlZmF1bHQgZXhwb3J0LicpO1xuXG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiB7XG4gICAgICAnSW1wb3J0RGVmYXVsdFNwZWNpZmllcic6IGNoZWNrRGVmYXVsdC5iaW5kKG51bGwsICdsb2NhbCcpLFxuICAgICAgJ0V4cG9ydERlZmF1bHRTcGVjaWZpZXInOiBjaGVja0RlZmF1bHQuYmluZChudWxsLCAnZXhwb3J0ZWQnKSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-named-default.js b/node_modules/eslint-plugin-import/lib/rules/no-named-default.js index ed9290715..4120f94d3 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-named-default.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-named-default.js @@ -4,6 +4,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Forbid named default exports.', url: (0, _docsUrl2['default'])('no-named-default') }, schema: [] }, @@ -17,7 +19,7 @@ module.exports = { return; } - if (im.type === 'ImportSpecifier' && im.imported.name === 'default') { + if (im.type === 'ImportSpecifier' && (im.imported.name || im.imported.value) === 'default') { context.report({ node: im.local, message: 'Use default import syntax to import \'' + String(im.local.name) + '\'.' }); @@ -26,4 +28,4 @@ module.exports = { }return ImportDeclaration;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lZC1kZWZhdWx0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJ1cmwiLCJzY2hlb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ZHVsZS5leHBvcnRzID0ge1xuICBtZXRhOiB7XG4gICAgdHlwZTogJ3N1Z2dlc3Rpb24nLFxuICAgIGRvY3M6IHtcbiAgICAgIHVybDogZG9jc1VybCgnbm8tbmFtZWQtZGVmYXVsdCcpLFxuICAgIH0sXG4gICAgc2NoZW1hOiBbXSxcbiAgfSxcblxuICBjcmVhdGU6IGZ1bmN0aW9uIChjb250ZXh0KSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICdJbXBvcnREZWNsYXJhdGlvbic6IGZ1bmN0aW9uIChub2RlKSB7XG4gICAgICAgIG5vZGUuc3BlY2lmaWVycy5mb3JFYWNoKGZ1bmN0aW9uIChpbSkge1xuICAgICAgICAgIGlmIChpbS5pbXBvcnRLaW5kID09PSAndHlwZScgfHwgaW0uaW1wb3J0S2luZCA9PT0gJ3R5cGVvZicpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoaW0udHlwZSA9PT0gJ0ltcG9ydFNwZWNpZmllcicgJiYgaW0uaW1wb3J0ZWQubmFtZSA9PT0gJ2RlZmF1bHQnKSB7XG4gICAgICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgICAgIG5vZGU6IGltLmxvY2FsLFxuICAgICAgICAgICAgICBtZXNzYWdlOiBgVXNlIGRlZmF1bHQgaW1wb3J0IHN5bnRheCB0byBpbXBvcnQgJyR7aW0ubG9jYWwubmFtZX0nLmAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH0sXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lZC1kZWZhdWx0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJjYXRl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B9KTtcbiAgICAgIH0sXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-named-export.js b/node_modules/eslint-plugin-import/lib/rules/no-named-export.js index 547acf6d2..ffdd9bc34 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-named-export.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-named-export.js @@ -3,7 +3,11 @@ module.exports = { meta: { type: 'suggestion', - docs: { url: (0, _docsUrl2['default'])('no-named-export') }, + docs: { + category: 'Style guide', + description: 'Forbid named exports.', + url: (0, _docsUrl2['default'])('no-named-export') }, + schema: [] }, @@ -25,11 +29,11 @@ module.exports = { return context.report({ node: node, message: message }); } - var someNamed = node.specifiers.some(function (specifier) {return specifier.exported.name !== 'default';}); + var someNamed = node.specifiers.some(function (specifier) {return (specifier.exported.name || specifier.exported.value) !== 'default';}); if (someNamed) { context.report({ node: node, message: message }); } }return ExportNamedDeclaration;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lZC1leHBvcnQuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJwYXJzZXJPcHRpb25zIiwic291cmNlVHlwZSIsIm1lc3NhZ2UiLCJFeHBvcnRBbGxEZWNsYXJhdGlvbiIsIm5vZGUiLCJyZXBvcnQiLCJFeHBvcnROYW1lZERlY2xhcmF0aW9uIiwic3BlY2lmaWVycyIsImxlbmd0aCIsInNvbWVOYW1lZCIsInNvbWUiLCJzcGVjaWZpZXIiLCJleHBvcnRlZCIsIm5hbWUiXSwibWFwcGluZ3MiOiJhQUFBLHFDOztBQUVBQSxPQUFPQyxPQUFQLEdBQWlCO0FBQ2ZDLFFBQU07QUF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PSB7XG4gIG1ldGE6IHtcbiAgICB0eXBlOiAnc3VnZ2VzdGlvbicsXG4gICAgZG9jczogeyB1cmw6IGRvY3NVcmwoJ25vLW5hbWVkLWV4cG9ydCcpIH0sXG4gICAgc2NoZW1hOiBbXSxcbiAgfSxcblxuICBjcmVhdGUoY29udGV4dCkge1xuICAgIC8vIGlnbm9yZSBub24tbW9kdWxlc1xuICAgIGlmIChjb250ZXh0LnBhcnNlck9wdGlvbnMuc291cmNlVHlwZSAhPT0gJ21vZHVsZScpIHtcbiAgICAgIHJldHVybiB7fTtcbiAgICB9XG5cbiAgICBjb25zdCBtZXNzYWdlID0gJ05hbWVkIGV4cG9ydHMgYXJlIG5vdCBhbGxvd2VkLic7XG5cbiAgICByZXR1cm4ge1xuICAgICAgRXhwb3J0QWxsRGVjbGFyYXRpb24obm9kZSkge1xuICAgICAgICBjb250ZXh0LnJlcG9ydCh7IG5vZGUsIG1lc3NhZ2UgfSk7XG4gICAgICB9LFxuXG4gICAgICBFeHBvcnROYW1lZERlY2xhcmF0aW9uKG5vZGUpIHtcbiAgICAgICAgaWYgKG5vZGUuc3BlY2lmaWVycy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5yZXBvcnQoeyBub2RlLCBtZXNzYWdlIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3Qgc29tZU5hbWVkID0gbm9kZS5zcGVjaWZpZXJzLnNvbWUoc3BlY2lmaWVyID0+IHNwZWNpZmllci5leHBvcnRlZC5uYW1lICE9PSAnZGVmYXVsdCcpO1xuICAgICAgICBpZiAoc29tZU5hbWVkKSB7XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoeyBub2RlLCBtZXNzYWdlIH0pO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgIH07XG4gIH0sXG59O1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4u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gJ05hbWVkIGV4cG9ydHMgYXJlIG5vdCBhbGxvd2VkLic7XG5cbiAgICByZXR1cm4ge1xuICAgICAgRXhwb3J0QWxsRGVjbGFyYXRpb24obm9kZSkge1xuICAgICAgICBjb250ZXh0LnJlcG9ydCh7IG5vZGUsIG1lc3NhZ2UgfSk7XG4gICAgICB9LFxuXG4gICAgICBFeHBvcnROYW1lZERlY2xhcmF0aW9uKG5vZGUpIHtcbiAgICAgICAgaWYgKG5vZGUuc3BlY2lmaWVycy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5yZXBvcnQoeyBub2RlLCBtZXNzYWdlIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3Qgc29tZU5hbWVkID0gbm9kZS5zcGVjaWZpZXJzLnNvbWUoc3BlY2lmaWVyID0+IChzcGVjaWZpZXIuZXhwb3J0ZWQubmFtZSB8fCBzcGVjaWZpZXIuZXhwb3J0ZWQudmFsdWUpICE9PSAnZGVmYXVsdCcpO1xuICAgICAgICBpZiAoc29tZU5hbWVkKSB7XG4gICAgICAgICAgY29udGV4dC5yZXBvcnQoeyBub2RlLCBtZXNzYWdlIH0pO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgIH07XG4gIH0sXG59O1xuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-namespace.js b/node_modules/eslint-plugin-import/lib/rules/no-namespace.js index 9153968f9..152951b85 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-namespace.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-namespace.js @@ -4,17 +4,19 @@ var _minimatch = require('minimatch');var _minimatch2 = _interopRequireDefault(_minimatch); -var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _toConsumableArray(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {arr2[i] = arr[i];}return arr2;} else {return Array.from(arr);}} /** - * @fileoverview Rule to disallow namespace import - * @author Radek Benkel - */ //------------------------------------------------------------------------------ +var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} + +//------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ - -module.exports = { - meta: { +/** + * @fileoverview Rule to disallow namespace import + * @author Radek Benkel + */module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Forbid namespace (a.k.a. "wildcard" `*`) imports.', url: (0, _docsUrl2['default'])('no-namespace') }, fixable: 'code', @@ -142,10 +144,7 @@ function getVariableNamesInScope(scopeManager, node) { currentNode = currentNode.parent; scope = scopeManager.acquire(currentNode, true); } - return new Set([].concat(_toConsumableArray( - scope.variables.map(function (variable) {return variable.name;})), _toConsumableArray( - scope.upper.variables.map(function (variable) {return variable.name;})))); - + return new Set(scope.variables.concat(scope.upper.variables).map(function (variable) {return variable.name;})); } /** @@ -174,4 +173,4 @@ function generateLocalNames(names, nameConflicts, namespaceName) { }); return localNames; } -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lc3BhY2UuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsImZpeGFibGUiLCJzY2hlbWEiLCJwcm9wZXJ0aWVzIiwiaWdub3JlIiwiaXRlbXMiLCJ1bmlxdWVJdGVtcyIsImNyZWF0ZSIsImNvbnRleHQiLCJmaXJzdE9wdGlvbiIsIm9wdGlvbnMiLCJpZ25vcmVHbG9icyIsIkltcG9ydE5hbWVzcGFjZVNwZWNpZmllciIsIm5vZGUiLCJmaW5kIiwicGFyZW50Iiwic291cmNlIiwidmFsdWUiLCJnbG9iIiwibWF0Y2hCYXNlIiw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XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gICAgbG9jYWxOYW1lc1tuYW1lXSA9IGxvY2FsTmFtZTtcbiAgfSk7XG4gIHJldHVybiBsb2NhbE5hbWVzO1xufVxuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1uYW1lc3BhY2UuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsImNhdGVnb3J5IiwiZGVzY3JpcHRpb24iLCJ1cmwiLCJmaXhhYmxlIiwic2NoZW1hIiwicHJvcGVydGllcyIsImlnbm9yZSIsIml0ZW1zIiwidW5pcXVlSXRlbXMiLCJjcmVhdGUiLCJjb250ZXh0IiwiZmlyc3RPcHRpb24iLCJvcHRpb25zIiwiaWdub3JlR2xvYnMiLCJJbXBvcnROYW1lc3BhY2VTcGVjaWZpZXIiLCJub2RlIiwiZmluZCIsInBhcmVudCIsInNvdXJjZSIsInZhbHVlIiwiZ2xvYiIsIm1hdGNoQmFzZSIsInNjb3BlVmFyaWFibGVzIiwiZ2V0U2NvcGUiLCJ2YXJpYWJsZXMiLCJuYW1lc3BhY2VWYXJpYWJsZSIsInZhcmlhYmxlIiwiZGVmcyIsIm5hbWVzcGFjZVJlZmVyZW5jZXMiLCJyZWZlcmVuY2VzIiwibmFtZXNwYWNlSWRlbnRpZmllcnMiLCJtYXAiLCJyZWZlcmVuY2UiLCJpZGVudGlmaWVyIiwiY2FuRml4IiwibGVuZ3RoIiwidXNlc05hbWVzcGFjZUFzT2JqZWN0IiwicmVwb3J0IiwibWVzc2FnZSIsImZpeCIsInNjb3BlTWFuYWdlciIsImdldFNvdXJjZUNvZGUiLCJmaXhlcyIsImltcG9ydE5hbWVDb25mbGljdHMiLCJmb3JFYWNoIiwiaW1wb3J0Tm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WVzXG4gICAgICAgICAgICBjb25zdCBpbXBvcnROYW1lQ29uZmxpY3RzID0ge307XG4gICAgICAgICAgICBuYW1lc3BhY2VJZGVudGlmaWVycy5mb3JFYWNoKChpZGVudGlmaWVyKSA9PiB7XG4gICAgICAgICAgICAgIGNvbnN0IHBhcmVudCA9IGlkZW50aWZpZXIucGFyZW50O1xuICAgICAgICAgICAgICBpZiAocGFyZW50ICYmIHBhcmVudC50eXBlID09PSAnTWVtYmVyRXhwcmVzc2lvbicpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpbXBvcnROYW1lID0gZ2V0TWVtYmVyUHJvcGVydHlOYW1lKHBhcmVudCk7XG4gICAgICAgICAgICAgICAgY29uc3QgbG9jYWxDb25mbGljdHMgPSBnZXRWYXJpYWJsZU5hbWVzSW5TY29wZShzY29wZU1hbmFnZXIsIHBhcmVudCk7XG4gICAgICAgICAgICAgICAgaWYgKCFpbXBvcnROYW1lQ29uZmxpY3RzW2ltcG9ydE5hbWVdKSB7XG4gICAgICAgICAgICAgICAgICBpbXBvcnROYW1lQ29uZmxpY3RzW2ltcG9ydE5hbWVdID0gbG9jYWxDb25mbGljdHM7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGxvY2FsQ29uZmxpY3RzLmZvckVhY2goKGMpID0+IGltcG9ydE5hbWVDb25mbGljdHNbaW1wb3J0TmFtZV0uYWRkKGMpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAvLyBDaG9vc2UgbmV3IG5hbWVzIGZvciBlYWNoIGltcG9ydFxuICAgICAgICAgICAgY29uc3QgaW1wb3J0TmFtZXMgPSBPYmplY3Qua2V5cyhpbXBvcnROYW1lQ29uZmxpY3RzKTtcbiAgICAgICAgICAgIGNvbnN0IGltcG9ydExvY2FsTmFtZXMgPSBnZW5lcmF0ZUxvY2FsTmFtZXMoXG4gICAgICAgICA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KiBAcGFyYW0geyp9IG5hbWVzcGFjZU5hbWVcbiAqL1xuZnVuY3Rpb24gZ2VuZXJhdGVMb2NhbE5hbWVzKG5hbWVzLCBuYW1lQ29uZmxpY3RzLCBuYW1lc3BhY2VOYW1lKSB7XG4gIGNvbnN0IGxvY2FsTmFtZXMgPSB7fTtcbiAgbmFtZXMuZm9yRWFjaCgobmFtZSkgPT4ge1xuICAgIGxldCBsb2NhbE5hbWU7XG4gICAgaWYgKCFuYW1lQ29uZmxpY3RzW25hbWVdLmhhcyhuYW1lKSkge1xuICAgICAgbG9jYWxOYW1lID0gbmFtZTtcbiAgICB9IGVsc2UgaWYgKCFuYW1lQ29uZmxpY3RzW25hbWVdLmhhcyhgJHtuYW1lc3BhY2VOYW1lfV8ke25hbWV9YCkpIHtcbiAgICAgIGxvY2FsTmFtZSA9IGAke25hbWVzcGFjZU5hbWV9XyR7bmFtZX1gO1xuICAgIH0gZWxzZSB7XG4gICAgICBmb3IgKGxldCBpID0gMTsgaSA8IEluZmluaXR5OyBpKyspIHtcbiAgICAgICAgaWYgKCFuYW1lQ29uZmxpY3RzW25hbWVdLmhhcyhgJHtuYW1lc3BhY2VOYW1lfV8ke25hbWV9XyR7aX1gKSkge1xuICAgICAgICAgIGxvY2FsTmFtZSA9IGAke25hbWVzcGFjZU5hbWV9XyR7bmFtZX1fJHtpfWA7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gICAgbG9jYWxOYW1lc1tuYW1lXSA9IGxvY2FsTmFtZTtcbiAgfSk7XG4gIHJldHVybiBsb2NhbE5hbWVzO1xufVxuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-nodejs-modules.js b/node_modules/eslint-plugin-import/lib/rules/no-nodejs-modules.js index 158c6075c..ac168c731 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-nodejs-modules.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-nodejs-modules.js @@ -12,6 +12,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Module systems', + description: 'Forbid Node.js builtin modules.', url: (0, _docsUrl2['default'])('no-nodejs-modules') }, schema: [ @@ -39,4 +41,4 @@ module.exports = { reportIfMissing(context, node, allowed, source.value); }, { commonjs: true }); }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1ub2RlanMtbW9kdWxlcy5qcyJdLCJuYW1lcyI6WyJyZXBvcnRJZk1pc3NpbmciLCJjb250ZXh0Iiwibm9kZSIsImFsbG93ZWQiLCJuYW1lIiwiaW5kZXhPZiIsInJlcG9ydCIsIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJ1cmwiLCJzY2hlbWEiLCJwcm9wZXJ0aWVzIiwiYWxsb3ciLCJ1bmlxdWVJdGVtcyIsIml0ZW1zIiwiYWRkaXRpb25hbFByb3BlcnRpZXMiLCJjcmVhdGUiLCJvcHRpb25zIiwic291cmNlIiwidmFsdWUiLCJjb21tb25qcyJdLCJtYXBwaW5ncyI6ImFBQUEsZ0Q7QUFDQSxrRTtBQUNBLHFDOztBQUVBLFNBQVNBLGVBQVQsQ0FBeUJDLE9BQXpCLEVBQWtDQyxJQUFsQyxFQUF3Q0MsT0FBeEMsRUFBaURDLElBQWpELEVBQXVEO0FBQ3JELE1BQUlELFFBQVFFLE9BQVIsQ0FBZ0JELElBQWhCLE1BQTBCLENBQUMsQ0FBM0IsSUFBZ0MsNkJBQVdBLElBQVgsRUFBaUJILE9BQWpCLE1BQThCLFNBQWxFLEVBQTZFO0FBQzNFQSxZQUFRSyxNQUFSLENBQWVKLElBQWYsRUFBcUIsMkNBQTJDRSxJQUEzQyxHQUFrRCxHQUF2RTtBQUNEO0FBQ0Y7O0FBRURHLE9BQU9DLE9BQVAsR0FBaUI7QUFDZkMsUUFBTTtBQUNKQyxVQUFNLF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NaXNzaW5nKGNvbnRleHQsIG5vZGUsIGFsbG93ZWQsIHNvdXJjZS52YWx1ZSk7XG4gICAgfSwgeyBjb21tb25qczogdHJ1ZSB9KTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-relative-packages.js b/node_modules/eslint-plugin-import/lib/rules/no-relative-packages.js index eac847568..334ad2bab 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-relative-packages.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-relative-packages.js @@ -1,13 +1,18 @@ 'use strict';var _path = require('path');var _path2 = _interopRequireDefault(_path); -var _readPkgUp = require('read-pkg-up');var _readPkgUp2 = _interopRequireDefault(_readPkgUp); +var _readPkgUp = require('eslint-module-utils/readPkgUp');var _readPkgUp2 = _interopRequireDefault(_readPkgUp); var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve); var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor); var _importType = require('../core/importType');var _importType2 = _interopRequireDefault(_importType); var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} +/** @param {string} filePath */ +function toPosixPath(filePath) { + return filePath.replace(/\\/g, '/'); +} + function findNamedPackage(filePath) { - var found = _readPkgUp2['default'].sync({ cwd: filePath, normalize: false }); + var found = (0, _readPkgUp2['default'])({ cwd: filePath }); if (found.pkg && !found.pkg.name) { return findNamedPackage(_path2['default'].join(found.path, '../..')); } @@ -41,7 +46,9 @@ function checkImportForRelativePackage(context, importPath, node) { context.report({ node: node, - message: 'Relative import from another package is not allowed. Use `' + String(properImport) + '` instead of `' + String(importPath) + '`' }); + message: 'Relative import from another package is not allowed. Use `' + String(properImport) + '` instead of `' + String(importPath) + '`', + fix: function () {function fix(fixer) {return fixer.replaceText(node, JSON.stringify(toPosixPath(properImport)));}return fix;}() }); + } } @@ -50,12 +57,15 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Static analysis', + description: 'Forbid importing packages through relative paths.', url: (0, _docsUrl2['default'])('no-relative-packages') }, + fixable: 'code', schema: [(0, _moduleVisitor.makeOptionsSchema)()] }, create: function () {function create(context) { return (0, _moduleVisitor2['default'])(function (source) {return checkImportForRelativePackage(context, source.value, source);}, context.options[0]); }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1yZWxhdGl2ZS1wYWNrYWdlcy5qcyJdLCJuYW1lcyI6WyJmaW5kTmFtZWRQYWNrYWdlIiwiZmlsZVBhdGgiLCJmb3VuZCIsInJlYWRQa2dVcCIsInN5bmMiLCJjd2QiLCJub3JtYWxpemUiLCJwa2ciLCJuYW1lIiwicGF0aCIsImpvaW4iLCJjaGVja0ltcG9ydEZvclJlbGF0aXZlUGFja2FnZSIsImNvbnRleHQiLCJpbXBvcnRQYXRoIiwibm9kZSIsInBvdGVudGlhbFZpb2xhdGlvblR5cGVzIiwiaW5kZXhPZiIsInJlc29sdmVkSW1wb3J0IiwicmVzb2x2ZWRDb250ZXh0IiwiZ2V0UGh5c2ljYWxGaWxlbmFtZSIsImdldEZpbGVuYW1lIiwiaW1wb3J0UGtnIiwiY29udGV4dFBrZyIsImltcG9ydEJhc2VOYW1lIiwiYmFzZW5hbWUiLCJpbXBvcnRSb290IiwiZGlybmFtZSIsInByb3BlclBhdGgiLCJyZWxhdGl2ZSIsInByb3BlckltcG9ydCIsInJlcG9ydCIsIm1lc3NhZ2UiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiLCJkb2NzIiwidXJsIiwic2NoZW1hIiwiY3JlYXRlIiwic291cmNlIiwidmFsdWUiLCJvcHRpb25zIl0sIm1hcHBpbmdzIjoiYUFBQSw0QjtBQUNBLHdDOztBQUVBLHNEO0FBQ0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CkgPyAnJyA6IGltcG9ydEJhc2VOYW1lXG4gICAgKTtcbiAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICBub2RlLFxuICAgICAgbWVzc2FnZTogYFJlbGF0aXZlIGltcG9ydCBmcm9tIGFub3RoZXIgcGFja2FnZSBpcyBub3QgYWxsb3dlZC4gVXNlIFxcYCR7cHJvcGVySW1wb3J0fVxcYCBpbnN0ZWFkIG9mIFxcYCR7aW1wb3J0UGF0aH1cXGBgLFxuICAgIH0pO1xuICB9XG59XG5cbm1vZHVsZS5leHBvcnRzID0ge1xuICBtZXRhOiB7XG4gICAgdHlwZTogJ3N1Z2dlc3Rpb24nLFxuICAgIGRvY3M6IHtcbiAgICAgIHVybDogZG9jc1VybCgnbm8tcmVsYXRpdmUtcGFja2FnZXMnKSxcbiAgICB9LFxuICAgIHNjaGVtYTogW21ha2VPcHRpb25zU2NoZW1hKCldLFxuICB9LFxuXG4gIGNyZWF0ZShjb250ZXh0KSB7XG4gICAgcmV0dXJuIG1vZHVsZVZpc2l0b3IoKHNvdXJjZSkgPT4gY2hlY2tJbXBvcnRGb3JSZWxhdGl2ZVBhY2thZ2UoY29udGV4dCwgc291cmNlLnZhbHVlLCBzb3VyY2UpLCBjb250ZXh0Lm9wdGlvbnNbMF0pO1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1yZWxhdGl2ZS1wYWNrYWdlcy5qcyJdLCJuYW1lcyI6WyJ0b1Bvc2l4UGF0aCIsImZpbGVQYXRoIiwicmVwbGFjZSIsImZpbmROYW1lZFBhY2thZ2UiLCJmb3VuZCIsImN3ZCIsInBrZyIsIm5hbWUiLCJwYXRoIiwiam9pbiIsImNoZWNrSW1wb3J0Rm9yUmVsYXRpdmVQYWNrYWdlIiwiY29udGV4dCIsImltcG9ydFBhdGgiLCJub2RlIiwicG90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vdCkgPyAnJyA6IGltcG9ydEJhc2VOYW1lLFxuICAgICk7XG4gICAgY29udGV4dC5yZXBvcnQoe1xuICAgICAgbm9kZSxcbiAgICAgIG1lc3NhZ2U6IGBSZWxhdGl2ZSBpbXBvcnQgZnJvbSBhbm90aGVyIHBhY2thZ2UgaXMgbm90IGFsbG93ZWQuIFVzZSBcXGAke3Byb3BlckltcG9ydH1cXGAgaW5zdGVhZCBvZiBcXGAke2ltcG9ydFBhdGh9XFxgYCxcbiAgICAgIGZpeDogZml4ZXIgPT4gZml4ZXIucmVwbGFjZVRleHQobm9kZSwgSlNPTi5zdHJpbmdpZnkodG9Qb3NpeFBhdGgocHJvcGVySW1wb3J0KSkpXG4gICAgICAsXG4gICAgfSk7XG4gIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIG1ldGE6IHtcbiAgICB0eXBlOiAnc3VnZ2VzdGlvbicsXG4gICAgZG9jczoge1xuICAgICAgY2F0ZWdvcnk6ICdTdGF0aWMgYW5hbHlzaXMnLFxuICAgICAgZGVzY3JpcHRpb246ICdGb3JiaWQgaW1wb3J0aW5nIHBhY2thZ2VzIHRocm91Z2ggcmVsYXRpdmUgcGF0aHMuJyxcbiAgICAgIHVybDogZG9jc1VybCgnbm8tcmVsYXRpdmUtcGFja2FnZXMnKSxcbiAgICB9LFxuICAgIGZpeGFibGU6ICdjb2RlJyxcbiAgICBzY2hlbWE6IFttYWtlT3B0aW9uc1NjaGVtYSgpXSxcbiAgfSxcblxuICBjcmVhdGUoY29udGV4dCkge1xuICAgIHJldHVybiBtb2R1bGVWaXNpdG9yKChzb3VyY2UpID0+IGNoZWNrSW1wb3J0Rm9yUmVsYXRpdmVQYWNrYWdlKGNvbnRleHQsIHNvdXJjZS52YWx1ZSwgc291cmNlKSwgY29udGV4dC5vcHRpb25zWzBdKTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-relative-parent-imports.js b/node_modules/eslint-plugin-import/lib/rules/no-relative-parent-imports.js index b5b00834e..4dc560ec0 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-relative-parent-imports.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-relative-parent-imports.js @@ -9,6 +9,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Static analysis', + description: 'Forbid importing modules from parent directories.', url: (0, _docsUrl2['default'])('no-relative-parent-imports') }, schema: [(0, _moduleVisitor.makeOptionsSchema)()] }, @@ -46,4 +48,4 @@ module.exports = { return (0, _moduleVisitor2['default'])(checkSourceValue, context.options[0]); }return noRelativePackages;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1yZWxhdGl2ZS1wYXJlbnQtaW1wb3J0cy5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiLCJkb2NzIiwidXJsIiwic2NoZW1hIiwiY3JlYXRlIiwibm9SZWxhdGl2ZVBhY2thZ2VzIiwiY29udGV4dCIsIm15UGF0aCIsImdldFBoeXNpY2FsRmlsZW5hbWUiLCJnZXRGaWxlbmFtZSIsImNoZWNrU291cmNlVmFsdWUiLCJzb3VyY2VOb2RlIiwiZGVwUGF0aCIsInZhbHVlIiwiYWJzRGVwUGF0aCIsInJlbERlcFBhdGgiLCJyZXBvcnQiLCJub2RlIiwibWVzc2FnZSIsIm9wdGlvbnMiXSwibWFwcGluZ3MiOiJhQUFBLGtFO0FBQ0EscUM7QUFDQTtBQUNBLHNEOztBQUVBLGdEOztBQUVBQSxPQUFPQyxPQUFQLEdBQWlCO0FBQ2ZDLFFBQU07QUFDSkMsVUFBTSxZQURGO0FBRUpDLFVBQU07QUFDSkMsV0FBSywwQkFBUSw0QkFBUixDQURELEVBRkY7O0FBS0pDLFlBQVEsQ0FBQyx1Q0FBRCxDQUxKLEVBRFM7OztBQVNmQyx1QkFBUSx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ZXBQYXRoID0gcmVzb2x2ZShkZXBQYXRoLCBjb250ZXh0KTtcblxuICAgICAgaWYgKCFhYnNEZXBQYXRoKSB7IC8vIHVuYWJsZSB0byByZXNvbHZlIHBhdGhcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICBjb25zdCByZWxEZXBQYXRoID0gcmVsYXRpdmUoZGlybmFtZShteVBhdGgpLCBhYnNEZXBQYXRoKTtcblxuICAgICAgaWYgKGltcG9ydFR5cGUocmVsRGVwUGF0aCwgY29udGV4dCkgPT09ICdwYXJlbnQnKSB7XG4gICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICBub2RlOiBzb3VyY2VOb2RlLFxuICAgICAgICAgIG1lc3NhZ2U6ICdSZWxhdGl2ZSBpbXBvcnRzIGZyb20gcGFyZW50IGRpcmVjdG9yaWVzIGFyZSBub3QgYWxsb3dlZC4gJyArXG4gICAgICAgICAgICBgUGxlYXNlIGVpdGhlciBwYXNzIHdoYXQgeW91J3JlIGltcG9ydGluZyB0aHJvdWdoIGF0IHJ1bnRpbWUgYCArXG4gICAgICAgICAgICBgKGRlcGVuZGVuY3kgaW5qZWN0aW9uKSwgbW92ZSBcXGAke2Jhc2VuYW1lKG15UGF0aCl9XFxgIHRvIHNhbWUgYCArXG4gICAgICAgICAgICBgZGlyZWN0b3J5IGFzIFxcYCR7ZGVwUGF0aH1cXGAgb3IgY29uc2lkZXIgbWFraW5nIFxcYCR7ZGVwUGF0aH1cXGAgYSBwYWNrYWdlLmAsXG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBtb2R1bGVWaXNpdG9yKGNoZWNrU291cmNlVmFsdWUsIGNvbnRleHQub3B0aW9uc1swXSk7XG4gIH0sXG59O1xuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-restricted-paths.js b/node_modules/eslint-plugin-import/lib/rules/no-restricted-paths.js index c961fb73d..7952fba90 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-restricted-paths.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-restricted-paths.js @@ -2,6 +2,8 @@ var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve); var _moduleVisitor = require('eslint-module-utils/moduleVisitor');var _moduleVisitor2 = _interopRequireDefault(_moduleVisitor); +var _isGlob = require('is-glob');var _isGlob2 = _interopRequireDefault(_isGlob); +var _minimatch = require('minimatch'); var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl); var _importType = require('../core/importType');var _importType2 = _interopRequireDefault(_importType);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} @@ -14,6 +16,8 @@ module.exports = { meta: { type: 'problem', docs: { + category: 'Static analysis', + description: 'Enforce which files can be imported in a given folder.', url: (0, _docsUrl2['default'])('no-restricted-paths') }, @@ -27,8 +31,28 @@ module.exports = { items: { type: 'object', properties: { - target: { type: 'string' }, - from: { type: 'string' }, + target: { + anyOf: [ + { type: 'string' }, + { + type: 'array', + items: { type: 'string' }, + uniqueItems: true, + minLength: 1 }] }, + + + + from: { + anyOf: [ + { type: 'string' }, + { + type: 'array', + items: { type: 'string' }, + uniqueItems: true, + minLength: 1 }] }, + + + except: { type: 'array', items: { @@ -54,17 +78,30 @@ module.exports = { var basePath = options.basePath || process.cwd(); var currentFilename = context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename(); var matchingZones = restrictedPaths.filter(function (zone) { - var targetPath = _path2['default'].resolve(basePath, zone.target); - - return containsPath(currentFilename, targetPath); + return [].concat(zone.target). + map(function (target) {return _path2['default'].resolve(basePath, target);}). + some(function (targetPath) {return isMatchingTargetPath(currentFilename, targetPath);}); }); + function isMatchingTargetPath(filename, targetPath) { + if ((0, _isGlob2['default'])(targetPath)) { + var mm = new _minimatch.Minimatch(targetPath); + return mm.match(filename); + } + + return containsPath(filename, targetPath); + } + function isValidExceptionPath(absoluteFromPath, absoluteExceptionPath) { var relativeExceptionPath = _path2['default'].relative(absoluteFromPath, absoluteExceptionPath); return (0, _importType2['default'])(relativeExceptionPath, context) !== 'parent'; } + function areBothGlobPatternAndAbsolutePath(areGlobPatterns) { + return areGlobPatterns.some(function (isGlob) {return isGlob;}) && areGlobPatterns.some(function (isGlob) {return !isGlob;}); + } + function reportInvalidExceptionPath(node) { context.report({ node: node, @@ -72,57 +109,138 @@ module.exports = { } - var zoneExceptions = matchingZones.map(function (zone) { - var exceptionPaths = zone.except || []; - var absoluteFrom = _path2['default'].resolve(basePath, zone.from); - var absoluteExceptionPaths = exceptionPaths.map(function (exceptionPath) {return _path2['default'].resolve(absoluteFrom, exceptionPath);}); - var hasValidExceptionPaths = absoluteExceptionPaths. - every(function (absoluteExceptionPath) {return isValidExceptionPath(absoluteFrom, absoluteExceptionPath);}); + function reportInvalidExceptionMixedGlobAndNonGlob(node) { + context.report({ + node: node, + message: 'Restricted path `from` must contain either only glob patterns or none' }); + + } + function reportInvalidExceptionGlob(node) { + context.report({ + node: node, + message: 'Restricted path exceptions must be glob patterns when `from` contains glob patterns' }); + + } + + function computeMixedGlobAndAbsolutePathValidator() { return { - absoluteExceptionPaths: absoluteExceptionPaths, - hasValidExceptionPaths: hasValidExceptionPaths }; + isPathRestricted: function () {function isPathRestricted() {return true;}return isPathRestricted;}(), + hasValidExceptions: false, + reportInvalidException: reportInvalidExceptionMixedGlobAndNonGlob }; - }); + } - function checkForRestrictedImportPath(importPath, node) { - var absoluteImportPath = (0, _resolve2['default'])(importPath, context); + function computeGlobPatternPathValidator(absoluteFrom, zoneExcept) { + var isPathException = void 0; - if (!absoluteImportPath) { - return; + var mm = new _minimatch.Minimatch(absoluteFrom); + var isPathRestricted = function () {function isPathRestricted(absoluteImportPath) {return mm.match(absoluteImportPath);}return isPathRestricted;}(); + var hasValidExceptions = zoneExcept.every(_isGlob2['default']); + + if (hasValidExceptions) { + var exceptionsMm = zoneExcept.map(function (except) {return new _minimatch.Minimatch(except);}); + isPathException = function () {function isPathException(absoluteImportPath) {return exceptionsMm.some(function (mm) {return mm.match(absoluteImportPath);});}return isPathException;}(); } - matchingZones.forEach(function (zone, index) { - var absoluteFrom = _path2['default'].resolve(basePath, zone.from); + var reportInvalidException = reportInvalidExceptionGlob; - if (!containsPath(absoluteImportPath, absoluteFrom)) { - return; - }var _zoneExceptions$index = + return { + isPathRestricted: isPathRestricted, + hasValidExceptions: hasValidExceptions, + isPathException: isPathException, + reportInvalidException: reportInvalidException }; - zoneExceptions[index],hasValidExceptionPaths = _zoneExceptions$index.hasValidExceptionPaths,absoluteExceptionPaths = _zoneExceptions$index.absoluteExceptionPaths; + } - if (!hasValidExceptionPaths) { - reportInvalidExceptionPath(node); - return; - } + function computeAbsolutePathValidator(absoluteFrom, zoneExcept) { + var isPathException = void 0; - var pathIsExcepted = absoluteExceptionPaths. - some(function (absoluteExceptionPath) {return containsPath(absoluteImportPath, absoluteExceptionPath);}); + var isPathRestricted = function () {function isPathRestricted(absoluteImportPath) {return containsPath(absoluteImportPath, absoluteFrom);}return isPathRestricted;}(); - if (pathIsExcepted) { - return; - } + var absoluteExceptionPaths = zoneExcept. + map(function (exceptionPath) {return _path2['default'].resolve(absoluteFrom, exceptionPath);}); + var hasValidExceptions = absoluteExceptionPaths. + every(function (absoluteExceptionPath) {return isValidExceptionPath(absoluteFrom, absoluteExceptionPath);}); + + if (hasValidExceptions) { + isPathException = function () {function isPathException(absoluteImportPath) {return absoluteExceptionPaths.some( + function (absoluteExceptionPath) {return containsPath(absoluteImportPath, absoluteExceptionPath);});}return isPathException;}(); + + } + var reportInvalidException = reportInvalidExceptionPath; + + return { + isPathRestricted: isPathRestricted, + hasValidExceptions: hasValidExceptions, + isPathException: isPathException, + reportInvalidException: reportInvalidException }; + + } + + function reportInvalidExceptions(validators, node) { + validators.forEach(function (validator) {return validator.reportInvalidException(node);}); + } + + function reportImportsInRestrictedZone(validators, node, importPath, customMessage) { + validators.forEach(function () { context.report({ node: node, - message: 'Unexpected path "{{importPath}}" imported in restricted zone.' + (zone.message ? ' ' + String(zone.message) : ''), + message: 'Unexpected path "{{importPath}}" imported in restricted zone.' + (customMessage ? ' ' + String(customMessage) : ''), data: { importPath: importPath } }); }); } + var makePathValidators = function () {function makePathValidators(zoneFrom) {var zoneExcept = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var allZoneFrom = [].concat(zoneFrom); + var areGlobPatterns = allZoneFrom.map(_isGlob2['default']); + + if (areBothGlobPatternAndAbsolutePath(areGlobPatterns)) { + return [computeMixedGlobAndAbsolutePathValidator()]; + } + + var isGlobPattern = areGlobPatterns.every(function (isGlob) {return isGlob;}); + + return allZoneFrom.map(function (singleZoneFrom) { + var absoluteFrom = _path2['default'].resolve(basePath, singleZoneFrom); + + if (isGlobPattern) { + return computeGlobPatternPathValidator(absoluteFrom, zoneExcept); + } + return computeAbsolutePathValidator(absoluteFrom, zoneExcept); + }); + }return makePathValidators;}(); + + var validators = []; + + function checkForRestrictedImportPath(importPath, node) { + var absoluteImportPath = (0, _resolve2['default'])(importPath, context); + + if (!absoluteImportPath) { + return; + } + + matchingZones.forEach(function (zone, index) { + if (!validators[index]) { + validators[index] = makePathValidators(zone.from, zone.except); + } + + var applicableValidatorsForImportPath = validators[index].filter(function (validator) {return validator.isPathRestricted(absoluteImportPath);}); + + var validatorsWithInvalidExceptions = applicableValidatorsForImportPath.filter(function (validator) {return !validator.hasValidExceptions;}); + reportInvalidExceptions(validatorsWithInvalidExceptions, node); + + var applicableValidatorsForImportPathExcludingExceptions = applicableValidatorsForImportPath. + filter(function (validator) {return validator.hasValidExceptions;}). + filter(function (validator) {return !validator.isPathException(absoluteImportPath);}); + reportImportsInRestrictedZone(applicableValidatorsForImportPathExcludingExceptions, node, importPath, zone.message); + }); + } + return (0, _moduleVisitor2['default'])(function (source) { checkForRestrictedImportPath(source.value, source); }, { commonjs: true }); }return noRestrictedPaths;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3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HVsZS11dGlscy9tb2R1bGVWaXNpdG9yJztcbmltcG9ydCBkb2NzVXJsIGZyb20gJy4uL2RvY3NVcmwnO1xuaW1wb3J0IGltcG9ydFR5cGUgZnJvbSAnLi4vY29yZS9pbXBvcnRUeXBlJztcblxuY29uc3QgY29udGFpbnNQYXRoID0gKGZpbGVwYXRoLCB0YXJnZXQpID0+IHtcbiAgY29uc3QgcmVsYXRpdmUgPSBwYXRoLnJlbGF0aXZlKHRhcmdldCwgZmlsZXBhdGgpO1xuICByZXR1cm4gcmVsYXRpdmUgPT09ICcnIHx8ICFyZWxhdGl2ZS5zdGFydHNXaXRoKCcuLicpO1xufTtcblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIG1ldGE6IHtcbiAgICB0eXBlOiAncHJvYmxlbScsXG4gICAgZG9jczoge1xuICAgICAgdXJsOiBkb2NzVXJsKCduby1yZXN0cmljdGVkLXBhdGhzJyksXG4gICAgfSxcblxuICAgIHNjaGVtYTogW1xuICAgICAge1xuICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgIHpvbmVzOiB7XG4gICAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgICAgbWluSXRlbXM6IDEsXG4gICAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgICAgICAgIHRhcmdldDogeyB0eXBlOiAnc3RyaW5nJyB9LFxuICAgICAgICAgICAgICAgIGZyb206IHsgdHlwZTogJ3N0cmluZycgfSxcbiAgICAgICAgICAgICAgICBleGNlcHQ6IHtcbiAgICAgICAgICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnc3RyaW5nJyxcbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAg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zdCBwYXRoSXNFeGNlcHRlZCA9IGFic29sdXRlRXhjZXB0aW9uUGF0aHNcbiAgICAgICAgICAuc29tZSgoYWJzb2x1dGVFeGNlcHRpb25QYXRoKSA9PiBjb250YWluc1BhdGgoYWJzb2x1dGVJbXBvcnRQYXRoLCBhYnNvbHV0ZUV4Y2VwdGlvblBhdGgpKTtcblxuICAgICAgICBpZiAocGF0aElzRXhjZXB0ZWQpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgbm9kZSxcbiAgICAgICAgICBtZXNzYWdlOiBgVW5leHBlY3RlZCBwYXRoIFwie3tpbXBvcnRQYXRofX1cIiBpbXBvcnRlZCBpbiByZXN0cmljdGVkIHpvbmUuJHt6b25lLm1lc3NhZ2UgPyBgICR7em9uZS5tZXNzYWdlfWAgOiAnJ31gLFxuICAgICAgICAgIGRhdGE6IHsgaW1wb3J0UGF0aCB9LFxuICAgICAgICB9KTtcbiAgICAgIH0pO1xuICAgIH1cblxuICAgIHJldHVybiBtb2R1bGVWaXNpdG9yKChzb3VyY2UpID0+IHtcbiAgICAgIGNoZWNrRm9yUmVzdHJpY3RlZEltcG9ydFBhdGgoc291cmNlLnZhbHVlLCBzb3VyY2UpO1xuICAgIH0sIHsgY29tbW9uanM6IHRydWUgfSk7XG4gIH0sXG59O1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1yZXN0cmljdGVkLXBhdGhzLmpzIl0sIm5hbWVzIjpbImNvbnRhaW5zUGF0aCIsImZpbGVwYXRoIiwidGFyZ2V0IiwicmVsYXRpdmUiLCJwYXRoIiwic3RhcnRzV2l0aCIsIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJjYXRlZ29yeSIsImRlc2NyaXB0aW9u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xuICAgIHNjaGVtYTogW1xuICAgICAge1xuICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgIHpvbmVzOiB7XG4gICAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgICAgbWluSXRlbXM6IDEsXG4gICAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgICAgICAgIHRhcmdldDoge1xuICAgICAgICAgICAgICAgICAgYW55T2Y6IFtcbiAgICAgICAgICAgICAgICAgICAgeyB0eXBlOiAnc3RyaW5nJyB9LFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICAgICAgICAgICAgICBpdGVtczogeyB0eXBlOiAnc3RyaW5nJyB9LFxuICAgICAgICAgICAgICAgICAgICAgIHVuaXF1ZUl0ZW1zOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgIG1pbkxlbmd0aDogMSxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBmcm9tOiB7XG4gICAgICAgICAgICAgICAgICBhbnlPZjogW1xuICAgICAgICAgICAgICAgICAgICB7IHR5cGU6ICdzdHJpbmcnIH0sXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zOiB7IHR5cGU6ICdzdHJpbmcnIH0sXG4gICAgICAgICAgICAgICAgICAgICAgdW5pcXVlSXRlbXM6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgbWluTGVuZ3RoOiAxLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGV4Y2VwdDoge1xuICAgICAgICAgICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICAgICAgICAgIGl0ZW1zOiB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIHVuaXF1ZUl0ZW1zOiB0cnVlLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgbWVzc2FnZTogeyB0eXBlOiAnc3RyaW5nJyB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBhZGRpdGlvbmFsUHJvcGVydGllczogZmFsc2UsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgICAgYmFzZVBhdGg6IHsgdHlwZTogJ3N0cmluZycgfSxcbiAgICAgICAgfSxcbiAgICAgICAgYWRkaXRpb25hbFByb3BlcnRpZXM6IGZhbHNlLFxuICAgICAgfSxcbiAgICBdLFxuICB9LFxuXG4gIGNyZWF0ZTogZnVuY3Rpb24gbm9SZXN0cmljdGVkUGF0aHMoY29udGV4dCkge1xuICAgIGNvbnN0IG9wdGlvbnMgPSBjb250ZXh0Lm9wdGlvbnNbMF0gfHwge307XG4gICAgY29uc3QgcmVzdHJpY3RlZFBhdGhzID0gb3B0aW9ucy56b25lcyB8fCBbXTtcbiAgICBjb25zdCBiYXNlUGF0aCA9IG9wdGlvbnMuYmFzZVBhdGggfHwgcHJvY2Vzcy5jd2QoKTtcbiAgICBjb25zdCBjdXJyZW50RmlsZW5hbWUgPSBjb250ZXh0LmdldFBoeXNpY2FsRmlsZW5hbWUgPyBjb250ZXh0LmdldFBoeXNpY2FsRmlsZW5hbWUoKSA6IGNvbnRleHQuZ2V0RmlsZW5hbWUoKTtcbiAgICBjb25zdCBtYXRjaGluZ1pvbmVzID0gcmVzdHJpY3RlZFBhdGhzLmZpbHR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ab25lKGFwcGxpY2FibGVWYWxpZGF0b3JzRm9ySW1wb3J0UGF0aEV4Y2x1ZGluZ0V4Y2VwdGlvbnMsIG5vZGUsIGltcG9ydFBhdGgsIHpvbmUubWVzc2FnZSk7XG4gICAgICB9KTtcbiAgICB9XG5cbiAgICByZXR1cm4gbW9kdWxlVmlzaXRvcigoc291cmNlKSA9PiB7XG4gICAgICBjaGVja0ZvclJlc3RyaWN0ZWRJbXBvcnRQYXRoKHNvdXJjZS52YWx1ZSwgc291cmNlKTtcbiAgICB9LCB7IGNvbW1vbmpzOiB0cnVlIH0pO1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-self-import.js b/node_modules/eslint-plugin-import/lib/rules/no-self-import.js index 567158f68..1d722bf37 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-self-import.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-self-import.js @@ -23,7 +23,8 @@ function isImportingSelf(context, node, requireName) { */module.exports = { meta: { type: 'problem', docs: { - description: 'Forbid a module from importing itself', + category: 'Static analysis', + description: 'Forbid a module from importing itself.', recommended: true, url: (0, _docsUrl2['default'])('no-self-import') }, @@ -35,4 +36,4 @@ function isImportingSelf(context, node, requireName) { isImportingSelf(context, node, source.value); }, { commonjs: true }); }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1zZWxmLWltcG9ydC5qcyJdLCJuYW1lcyI6WyJpc0ltcG9ydGluZ1NlbGYiLCJjb250ZXh0Iiwibm9kZSIsInJlcXVpcmVOYW1lIiwiZmlsZVBhdGgiLCJnZXRQaHlzaWNhbEZpbGVuYW1lIiwiZ2V0RmlsZW5hbWUiLCJyZXBvcnQiLCJtZXNzYWdlIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsImRlc2NyaXB0aW9uI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G4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-unassigned-import.js b/node_modules/eslint-plugin-import/lib/rules/no-unassigned-import.js index 5498e24ab..6986f562a 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-unassigned-import.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-unassigned-import.js @@ -56,6 +56,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Forbid unassigned imports', url: (0, _docsUrl2['default'])('no-unassigned-import') }, schema: [ @@ -73,4 +75,4 @@ module.exports = { 'additionalProperties': false }] } }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby11bmFzc2lnbmVkLWltcG9ydC5qcyJdLCJuYW1lcyI6WyJyZXBvcnQiLCJjb250ZXh0Iiwibm9kZSIsIm1lc3NhZ2UiLCJ0ZXN0SXNBbGxvdyIsImdsb2JzIiwiZmlsZW5hbWUiLCJzb3VyY2UiLCJBcnJheSIsImlzQXJyYXkiLCJmaWxlUGF0aCIsInBhdGgiLCJyZXNvbHZlIiwiZGlybmFtZSIsImZpbmQiLCJnbG9iIiwiam9pbiIsInByb2Nlc3MiLCJjd2QiLCJ1bmRlZmluZWQiLCJjcmVhdGUiLCJvcHRpb25zIiwiZ2V0UGh5c2ljYWxGaWxlbmFtZSIsImdldEZpbGVuYW1lIiwiaXNBbGxvdyIsImFsbG93IiwiSW1wb3J0RGVjbGFyYXRpb24iLCJzcGVjaWZpZXJzIiwibGVuZ3RoIiwidmFsdWUiLCJFeHByZXNzaW9uU3RhdGVtZW50IiwiZXhwcmVzc2lvbiIsInR5cGUiLCJhcmd1bWVudHMiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJ1cmwiLCJzY2hlbWEiXSwibWFwcGluZ3MiOiJhQUFBLDRCO0FBQ0Esc0M7O0FBRUEsc0Q7QUFDQSxx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b24uYXJndW1lbnRzWzBdLnZhbHVlKSkge1xuICAgICAgICByZXBvcnQoY29udGV4dCwgbm9kZS5leHByZXNzaW9uKTtcbiAgICAgIH1cbiAgICB9LFxuICB9O1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgY3JlYXRlLFxuICBtZXRhOiB7XG4gICAgdHlwZTogJ3N1Z2dlc3Rpb24nLFxuICAgIGRvY3M6IHtcbiAgICAgIHVybDogZG9jc1VybCgnbm8tdW5hc3NpZ25lZC1pbXBvcnQnKSxcbiAgICB9LFxuICAgIHNjaGVtYTogW1xuICAgICAge1xuICAgICAgICAndHlwZSc6ICdvYmplY3QnLFxuICAgICAgICAncHJvcGVydGllcyc6IHtcbiAgICAgICAgICAnZGV2RGVwZW5kZW5jaWVzJzogeyAndHlwZSc6IFsnYm9vbGVhbicsICdhcnJheSddIH0sXG4gICAgICAgICAgJ29wdGlvbmFsRGVwZW5kZW5jaWVzJzogeyAndHlwZSc6IFsnYm9vbGVhbicsICdhcnJheSddIH0sXG4gICAgICAgICAgJ3BlZXJEZXBlbmRlbmNpZXMnOiB7ICd0eXBlJzogWydib29sZWFuJywgJ2FycmF5J10gfSxcbiAgICAgICAgICAnYWxsb3cnOiB7XG4gICAgICAgICAgICAndHlwZSc6ICdhcnJheScsXG4gICAgICAgICAgICAnaXRlbXMnOiB7XG4gICAgICAgICAgICAgICd0eXBlJzogJ3N0cmluZycsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgICdhZGRpdGlvbmFsUHJvcGVydGllcyc6IGZhbHNlLFxuICAgICAgfSxcbiAgICBdLFxuICB9LFxufTtcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby11bmFzc2lnbmVkLWltcG9ydC5qcyJdLCJuYW1lcyI6WyJyZXBvcnQiLCJjb250Z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bm8tdW5hc3NpZ25lZC1pbXBvcnQnKSxcbiAgICB9LFxuICAgIHNjaGVtYTogW1xuICAgICAge1xuICAgICAgICAndHlwZSc6ICdvYmplY3QnLFxuICAgICAgICAncHJvcGVydGllcyc6IHtcbiAgICAgICAgICAnZGV2RGVwZW5kZW5jaWVzJzogeyAndHlwZSc6IFsnYm9vbGVhbicsICdhcnJheSddIH0sXG4gICAgICAgICAgJ29wdGlvbmFsRGVwZW5kZW5jaWVzJzogeyAndHlwZSc6IFsnYm9vbGVhbicsICdhcnJheSddIH0sXG4gICAgICAgICAgJ3BlZXJEZXBlbmRlbmNpZXMnOiB7ICd0eXBlJzogWydib29sZWFuJywgJ2FycmF5J10gfSxcbiAgICAgICAgICAnYWxsb3cnOiB7XG4gICAgICAgICAgICAndHlwZSc6ICdhcnJheScsXG4gICAgICAgICAgICAnaXRlbXMnOiB7XG4gICAgICAgICAgICAgICd0eXBlJzogJ3N0cmluZycsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgICdhZGRpdGlvbmFsUHJvcGVydGllcyc6IGZhbHNlLFxuICAgICAgfSxcbiAgICBdLFxuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-unresolved.js b/node_modules/eslint-plugin-import/lib/rules/no-unresolved.js index 03f96772f..b77bd08f6 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-unresolved.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-unresolved.js @@ -12,38 +12,49 @@ var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_doc */module.exports = { meta: { type: 'problem', docs: { + category: 'Static analysis', + description: 'Ensure imports point to a file/module that can be resolved.', url: (0, _docsUrl2['default'])('no-unresolved') }, - schema: [(0, _moduleVisitor.makeOptionsSchema)({ - caseSensitive: { type: 'boolean', 'default': true } })] }, + schema: [ + (0, _moduleVisitor.makeOptionsSchema)({ + caseSensitive: { type: 'boolean', 'default': true }, + caseSensitiveStrict: { type: 'boolean', 'default': false } })] }, + create: function () {function create(context) { + var options = context.options[0] || {}; + + function checkSourceValue(source, node) { + // ignore type-only imports and exports + if (node.importKind === 'type' || node.exportKind === 'type') { + return; + } - function checkSourceValue(source) { - var shouldCheckCase = !_resolve.CASE_SENSITIVE_FS && ( - !context.options[0] || context.options[0].caseSensitive !== false); + var caseSensitive = !_resolve.CASE_SENSITIVE_FS && options.caseSensitive !== false; + var caseSensitiveStrict = !_resolve.CASE_SENSITIVE_FS && options.caseSensitiveStrict; var resolvedPath = (0, _resolve2['default'])(source.value, context); if (resolvedPath === undefined) { - context.report(source, 'Unable to resolve path to module \'' + String( + context.report( + source, 'Unable to resolve path to module \'' + String( source.value) + '\'.'); - } else - if (shouldCheckCase) { + } else if (caseSensitive || caseSensitiveStrict) { var cacheSettings = _ModuleCache2['default'].getSettings(context.settings); - if (!(0, _resolve.fileExistsWithCaseSync)(resolvedPath, cacheSettings)) { - context.report(source, 'Casing of ' + String( + if (!(0, _resolve.fileExistsWithCaseSync)(resolvedPath, cacheSettings, caseSensitiveStrict)) { + context.report( + source, 'Casing of ' + String( source.value) + ' does not match the underlying filesystem.'); - } + } } } - return (0, _moduleVisitor2['default'])(checkSourceValue, context.options[0]); - + return (0, _moduleVisitor2['default'])(checkSourceValue, options); }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby11bnJlc29sdmVkLmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJ1cmwiLCJzY2hlbWEiLCJjYXNlU2Vuc2l0aXZlIiwiY3JlYXRlIiwiY29udGV4dCIsImNoZWNrU291cmNlVmFsdWUiLCJzb3VyY2UiLCJzaG91bGRDaGVja0Nhc2UiLCJDQVNFX1NFTlNJVElWRV9GUyIsIm9wdGlvbn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5zaXRpdmVTdHJpY3QpIHtcbiAgICAgICAgY29uc3QgY2FjaGVTZXR0aW5ncyA9IE1vZHVsZUNhY2hlLmdldFNldHRpbmdzKGNvbnRleHQuc2V0dGluZ3MpO1xuICAgICAgICBpZiAoIWZpbGVFeGlzdHNXaXRoQ2FzZVN5bmMocmVzb2x2ZWRQYXRoLCBjYWNoZVNldHRpbmdzLCBjYXNlU2Vuc2l0aXZlU3RyaWN0KSkge1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KFxuICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgYENhc2luZyBvZiAke3NvdXJjZS52YWx1ZX0gZG9lcyBub3QgbWF0Y2ggdGhlIHVuZGVybHlpbmcgZmlsZXN5c3RlbS5gLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gbW9kdWxlVmlzaXRvcihjaGVja1NvdXJjZVZhbHVlLCBvcHRpb25zKTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js b/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js index 36f5505e5..6ed615c62 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js @@ -7,51 +7,62 @@ var _ExportMap = require('../ExportMap');var _ExportMap2 = _interopRequireDefault(_ExportMap); var _ignore = require('eslint-module-utils/ignore'); var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve); +var _visit = require('eslint-module-utils/visit');var _visit2 = _interopRequireDefault(_visit); var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl); var _path = require('path'); -var _readPkgUp = require('read-pkg-up');var _readPkgUp2 = _interopRequireDefault(_readPkgUp); +var _readPkgUp2 = require('eslint-module-utils/readPkgUp');var _readPkgUp3 = _interopRequireDefault(_readPkgUp2); var _object = require('object.values');var _object2 = _interopRequireDefault(_object); var _arrayIncludes = require('array-includes');var _arrayIncludes2 = _interopRequireDefault(_arrayIncludes);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _toConsumableArray(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {arr2[i] = arr[i];}return arr2;} else {return Array.from(arr);}} /** * @fileOverview Ensures that modules contain exports and/or all * modules are consumed within other modules. * @author René Fermann - */ // eslint/lib/util/glob-util has been moved to eslint/lib/util/glob-utils with version 5.3 -// and has been moved to eslint/lib/cli-engine/file-enumerator in version 6 -var listFilesToProcess = void 0;try {var FileEnumerator = require('eslint/lib/cli-engine/file-enumerator').FileEnumerator; + */var FileEnumerator = void 0;var listFilesToProcess = void 0; +try {var _require = + require('eslint/use-at-your-own-risk');FileEnumerator = _require.FileEnumerator; +} catch (e) { + try {var _require2 = + + require('eslint/lib/cli-engine/file-enumerator'); // has been moved to eslint/lib/cli-engine/file-enumerator in version 6 + FileEnumerator = _require2.FileEnumerator;} catch (e) { + try { + // eslint/lib/util/glob-util has been moved to eslint/lib/util/glob-utils with version 5.3 + var _require3 = require('eslint/lib/util/glob-utils'),originalListFilesToProcess = _require3.listFilesToProcess; + + // Prevent passing invalid options (extensions array) to old versions of the function. + // https://github.com/eslint/eslint/blob/v5.16.0/lib/util/glob-utils.js#L178-L280 + // https://github.com/eslint/eslint/blob/v5.2.0/lib/util/glob-util.js#L174-L269 + listFilesToProcess = function listFilesToProcess(src, extensions) { + return originalListFilesToProcess(src, { + extensions: extensions }); + + }; + } catch (e) {var _require4 = + require('eslint/lib/util/glob-util'),_originalListFilesToProcess = _require4.listFilesToProcess; + + listFilesToProcess = function listFilesToProcess(src, extensions) { + var patterns = src.reduce(function (carry, pattern) { + return carry.concat(extensions.map(function (extension) { + return (/\*\*|\*\./.test(pattern) ? pattern : String(pattern) + '/**/*' + String(extension)); + })); + }, src.slice()); + + return _originalListFilesToProcess(patterns); + }; + } + } +} + +if (FileEnumerator) { listFilesToProcess = function listFilesToProcess(src, extensions) { var e = new FileEnumerator({ extensions: extensions }); + return Array.from(e.iterateFiles(src), function (_ref) {var filePath = _ref.filePath,ignored = _ref.ignored;return { ignored: ignored, filename: filePath };}); }; -} catch (e1) { - // Prevent passing invalid options (extensions array) to old versions of the function. - // https://github.com/eslint/eslint/blob/v5.16.0/lib/util/glob-utils.js#L178-L280 - // https://github.com/eslint/eslint/blob/v5.2.0/lib/util/glob-util.js#L174-L269 - var originalListFilesToProcess = void 0; - try { - originalListFilesToProcess = require('eslint/lib/util/glob-utils').listFilesToProcess; - listFilesToProcess = function listFilesToProcess(src, extensions) { - return originalListFilesToProcess(src, { - extensions: extensions }); - - }; - } catch (e2) { - originalListFilesToProcess = require('eslint/lib/util/glob-util').listFilesToProcess; - - listFilesToProcess = function listFilesToProcess(src, extensions) { - var patterns = src.reduce(function (carry, pattern) { - return carry.concat(extensions.map(function (extension) { - return (/\*\*|\*\./.test(pattern) ? pattern : String(pattern) + '/**/*' + String(extension)); - })); - }, src.slice()); - - return originalListFilesToProcess(patterns); - }; - } } var EXPORT_DEFAULT_DECLARATION = 'ExportDefaultDeclaration'; @@ -144,6 +155,8 @@ var importList = new Map(); */ var exportList = new Map(); +var visitorKeyMap = new Map(); + var ignoredFiles = new Set(); var filesOutsideSrc = new Set(); @@ -183,8 +196,15 @@ var prepareImportsAndExports = function prepareImportsAndExports(srcFiles, conte var imports = new Map(); var currentExports = _ExportMap2['default'].get(file, context); if (currentExports) {var - dependencies = currentExports.dependencies,reexports = currentExports.reexports,localImportList = currentExports.imports,namespace = currentExports.namespace; + dependencies = + + + + + currentExports.dependencies,reexports = currentExports.reexports,localImportList = currentExports.imports,namespace = currentExports.namespace,visitorKeys = currentExports.visitorKeys; + + visitorKeyMap.set(file, visitorKeys); // dependencies === export * from var currentExportAll = new Set(); dependencies.forEach(function (getDependency) { @@ -253,8 +273,10 @@ var prepareImportsAndExports = function prepareImportsAndExports(srcFiles, conte exportAll.forEach(function (value, key) { value.forEach(function (val) { var currentExports = exportList.get(val); - var currentExport = currentExports.get(EXPORT_ALL_DECLARATION); - currentExport.whereUsed.add(key); + if (currentExports) { + var currentExport = currentExports.get(EXPORT_ALL_DECLARATION); + currentExport.whereUsed.add(key); + } }); }); }; @@ -331,8 +353,8 @@ var newNamespaceImportExists = function newNamespaceImportExists(specifiers) {re var newDefaultImportExists = function newDefaultImportExists(specifiers) {return ( specifiers.some(function (_ref8) {var type = _ref8.type;return type === IMPORT_DEFAULT_SPECIFIER;}));}; -var fileIsInPkg = function fileIsInPkg(file) {var _readPkgUp$sync = - _readPkgUp2['default'].sync({ cwd: file, normalize: false }),path = _readPkgUp$sync.path,pkg = _readPkgUp$sync.pkg; +var fileIsInPkg = function fileIsInPkg(file) {var _readPkgUp = + (0, _readPkgUp3['default'])({ cwd: file }),path = _readPkgUp.path,pkg = _readPkgUp.pkg; var basePath = (0, _path.dirname)(path); var checkPkgFieldString = function checkPkgFieldString(pkgField) { @@ -342,7 +364,10 @@ var fileIsInPkg = function fileIsInPkg(file) {var _readPkgUp$sync = }; var checkPkgFieldObject = function checkPkgFieldObject(pkgField) { - var pkgFieldFiles = (0, _object2['default'])(pkgField).map(function (value) {return (0, _path.join)(basePath, value);}); + var pkgFieldFiles = (0, _object2['default'])(pkgField). + filter(function (value) {return typeof value !== 'boolean';}). + map(function (value) {return (0, _path.join)(basePath, value);}); + if ((0, _arrayIncludes2['default'])(pkgFieldFiles, file)) { return true; } @@ -386,7 +411,11 @@ var fileIsInPkg = function fileIsInPkg(file) {var _readPkgUp$sync = module.exports = { meta: { type: 'suggestion', - docs: { url: (0, _docsUrl2['default'])('no-unused-modules') }, + docs: { + category: 'Helpful warnings', + description: 'Forbid modules without exports, or exports without matching import in another module.', + url: (0, _docsUrl2['default'])('no-unused-modules') }, + schema: [{ properties: { src: { @@ -584,7 +613,7 @@ module.exports = { if (specifiers.length > 0) { specifiers.forEach(function (specifier) { if (specifier.exported) { - newExportIdentifiers.add(specifier.exported.name); + newExportIdentifiers.add(specifier.exported.name || specifier.exported.value); } }); } @@ -665,6 +694,28 @@ module.exports = { }); }); + function processDynamicImport(source) { + if (source.type !== 'Literal') { + return null; + } + var p = (0, _resolve2['default'])(source.value, context); + if (p == null) { + return null; + } + newNamespaceImports.add(p); + } + + (0, _visit2['default'])(node, visitorKeyMap.get(file), { + ImportExpression: function () {function ImportExpression(child) { + processDynamicImport(child.source); + }return ImportExpression;}(), + CallExpression: function () {function CallExpression(child) { + if (child.callee.type === 'Import') { + processDynamicImport(child.arguments[0]); + } + }return CallExpression;}() }); + + node.body.forEach(function (astNode) { var resolvedPath = void 0; @@ -673,8 +724,8 @@ module.exports = { if (astNode.source) { resolvedPath = (0, _resolve2['default'])(astNode.source.raw.replace(/('|")/g, ''), context); astNode.specifiers.forEach(function (specifier) { - var name = specifier.local.name; - if (specifier.local.name === DEFAULT) { + var name = specifier.local.name || specifier.local.value; + if (name === DEFAULT) { newDefaultImports.add(resolvedPath); } else { newImports.set(name, resolvedPath); @@ -711,7 +762,7 @@ module.exports = { specifier.type === IMPORT_NAMESPACE_SPECIFIER) { return; } - newImports.set(specifier.imported.name, resolvedPath); + newImports.set(specifier.imported.name || specifier.imported.value, resolvedPath); }); } }); @@ -900,7 +951,7 @@ module.exports = { }return ExportDefaultDeclaration;}(), 'ExportNamedDeclaration': function () {function ExportNamedDeclaration(node) { node.specifiers.forEach(function (specifier) { - checkUsage(node, specifier.exported.name); + checkUsage(node, specifier.exported.name || specifier.exported.value); }); forEachDeclarationIdentifier(node.declaration, function (name) { checkUsage(node, name); @@ -908,4 +959,4 @@ module.exports = { }return ExportNamedDeclaration;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby11bnVzZWQtbW9kdWxlcy5qcyJdLCJuYW1lcyI6WyJsaXN0RmlsZXNUb1Byb2Nlc3M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nLFxuICAgIGRvY3M6IHsgdXJsOiBkb2NzVXJsKCduby11bnVzZWQtbW9kdWxlcycpIH0sXG4gICAgc2NoZW1hOiBbe1xuICAgICAgcHJvcGVydGllczoge1xuICAgICAgICBzcmM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjogJ2ZpbGVzL3BhdGhzIHRvIGJlIGFuYWx5emVkIChvbmx5IGZvciB1bnVzZWQgZXhwb3J0cyknLFxuICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgbWluSXRlbXM6IDEsXG4gICAgICAgICAgaXRlbXM6IHtcbiAgICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxuICAgICAgICAgICAgbWluTGVuZ3RoOiAxLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIGlnbm9yZUV4cG9ydHM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjpcbiAgICAgICAgICAgICdmaWxlcy9wYXRocyBmb3Igd2hpY2ggdW51c2VkIGV4cG9ydHMgd2lsbCBub3QgYmUgcmVwb3J0ZWQgKGUuZyBtb2R1bGUgZW50cnkgcG9pbnRzKScsXG4gICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICBtaW5JdGVtczogMSxcbiAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXG4gICAgICAgICAgICBtaW5MZW5ndGg6IDEsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgbWlzc2luZ0V4cG9ydHM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjogJ3JlcG9ydCBtb2R1bGVzIHdpdGhvdXQgYW55IGV4cG9ydHMnLFxuICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgfSxcbiAgICAgICAgdW51c2VkRXhwb3J0czoge1xuICAgICAgICAgIGRlc2NyaXB0aW9uOiAncmVwb3J0IGV4cG9ydHMgd2l0aG91dCBhbnkgdXNhZ2UnLFxuICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBub3Q6IHtcbiAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgIHVudXNlZEV4cG9ydHM6IHsgZW51bTogW2ZhbHNlXSB9LFxuICAgICAgICAgIG1pc3NpbmdFeHBvcnRzOiB7IGVudW06IFtmYWxzZV0gfSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBhbnlPZjpbe1xuICAgICAgICBub3Q6IHtcbiAgICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB1bnVzZWRFeHBvcnRzOiB7IGVudW06IFt0cnVlXSB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIHJlcXVpcmVkOiBbJ21pc3NpbmdFeHBvcnRzJ10sXG4gICAgICB9LCB7XG4gICAgICAgIG5vdDoge1xuICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgIG1pc3NpbmdFeHBvcnRzOiB7IGVudW06IFt0cnVlXSB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIHJlcXVpcmVkOiBbJ3VudXNlZEV4cG9ydHMnXSxcbiAgICAgIH0sIHtcbiAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgIHVudXNlZEV4cG9ydHM6IHsgZW51bTogW3RydWVdIH0sXG4gICAgICAgIH0sXG4gICAgICAgIHJlcXVpcmVkOiBbJ3VudXNlZEV4cG9ydHMnXSxcbiAgICAgIH0sIHtcbiAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgIG1pc3NpbmdFeHBvcnRzOiB7IGVudW06IFt0cnVlXSB9LFxuICAgICAgICB9LFxuICAgICAgICByZXF1aXJlZDogWydtaXNzaW5nRXhwb3J0cyddLFxuICAgICAgfV0sXG4gICAgfV0sXG4gIH0sXG5cbiAgY3JlYXRlOiBjb250ZXh0ID0+IHtcbiAgICB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m9kZS5zb3VyY2UucmF3LnJlcGxhY2UoLygnfFwiKS9nLCAnJyksIGNvbnRleHQpO1xuICAgICAgICAgIGlmICghcmVzb2x2ZWRQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGlzTm9kZU1vZHVsZShyZXNvbHZlZFBhdGgpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKG5ld05hbWVzcGFjZUltcG9ydEV4aXN0cyhhc3ROb2RlLnNwZWNpZmllcnMpKSB7XG4gICAgICAgICAgICBuZXdOYW1lc3BhY2VJbXBvcnRzLmFkZChyZXNvbHZlZFBhdGgpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChuZXdEZWZhdWx0SW1wb3J0RXhpc3RzKGFzdE5vZGUuc3BlY2lmaWVycykpIHtcbiAgICAgICAgICAgIG5ld0RlZmF1bHRJbXBvcnRzLmFkZChyZXNvbHZlZFBhdGgpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGFzdE5vZGUuc3BlY2lmaWVycy5mb3JFYWNoKHNwZWNpZmllciA9PiB7XG4gICAgICAgICAgICBpZiAoc3BlY2lmaWVyLnR5cGUgPT09IElNUE9SVF9ERUZBVUxUX1NQRUNJRklFUiB8fFxuICAgICAgICAgICAgICAgIHNwZWNpZmllci50eXBlID09PSBJTVBPUlRfTkFNRVNQQUNFX1NQRUNJRklFUikge1xuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBuZXdJbXBvcnRzLnNldChzcGVjaWZpZXIuaW1wb3J0ZWQubmFtZSwgcmVzb2x2ZWRQYXRoKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIG5ld0V4cG9ydEFsbC5mb3JFYWNoKHZhbHVlID0+IHtcbiAgICAgICAgaWYgKCFvbGRFeHBvcnRBbGwuaGFzKHZhbHVlKSkge1xuICAgICAgICAgIGxldCBpbXBvcnRzID0gb2xkSW1wb3J0UGF0aHMuZ2V0KHZhbHVlKTtcbiAgICAgICAgICBpZiAodHlwZW9mIGltcG9ydHMgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICBpbXBvcnRzID0gbmV3IFNldCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpbXBvcnRzLmFkZChFWFBPUlRfQUxMX0RFQ0xBUkFUSU9OKTtcbiAgICAgICAgICBvbGRJbXBvcnRQYXRocy5zZXQodmFsdWUsIGltcG9ydHMpO1xuXG4gICAgICAgICAgbGV0IGV4cG9ydHMgPSBleHBvcnRMaXN0LmdldCh2YWx1ZSk7XG4gICAgICAgICAgbGV0IGN1cnJlbnRFeHBvcnQ7XG4gICAgICAgICAgaWYgKHR5cGVvZiBleHBvcnRzICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY3VycmVudEV4cG9ydCA9IGV4cG9ydHMuZ2V0KEVYUE9SVF9BTExfREVDTEFSQVRJT04pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBleHBvcnRzID0gbmV3IE1hcCgpO1xuICAgICAgICAgICAgZXhwb3J0TGlzdC5zZXQodmFsdWUsIGV4cG9ydHMpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmICh0eXBlb2YgY3VycmVudEV4cG9ydCAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIGN1cnJlbnRFeHBvcnQud2hlcmVVc2VkLmFkZChmaWxlKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29uc3Qgd2hlcmVVc2VkID0gbmV3IFNldCgpO1xuICAgICAgICAgICAgd2hlcmVVc2VkLmFkZChmaWxlKTtcbiAgICAgICAgICAgIGV4cG9ydHMuc2V0KEVYUE9SVF9BTExfREVDTEFSQVRJT04sIHsgd2hlcmVVc2VkIH0pO1xuICAgICAgICAgIH1cbiAgICAgIC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tcbiAgICAgICAgICAgIGlmICh0eXBlb2YgY3VycmVudEV4cG9ydCAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgY3VycmVudEV4cG9ydC53aGVyZVVzZWQuZGVsZXRlKGZpbGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIG5ld0ltcG9ydHMuZm9yRWFjaCgodmFsdWUsIGtleSkgPT4ge1xuICAgICAgICBpZiAoIW9sZEltcG9ydHMuaGFzKGtleSkpIHtcbiAgICAgICAgICBsZXQgaW1wb3J0cyA9IG9sZEltcG9ydFBhdGhzLmdldCh2YWx1ZSk7XG4gICAgICAgICAgaWYgKHR5cGVvZiBpbXBvcnRzID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgaW1wb3J0cyA9IG5ldyBTZXQoKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaW1wb3J0cy5hZGQoa2V5KTtcbiAgICAgICAgICBvbGRJbXBvcnRQYXRocy5zZXQodmFsdWUsIGltcG9ydHMpO1xuXG4gICAgICAgICAgbGV0IGV4cG9ydHMgPSBleHBvcnRMaXN0LmdldCh2YWx1ZSk7XG4gICAgICAgICAgbGV0IGN1cnJlbnRFeHBvcnQ7XG4gICAgICAgICAgaWYgKHR5cGVvZiBleHBvcnRzICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY3VycmVudEV4cG9ydCA9IGV4cG9ydHMuZ2V0KGtleSk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGV4cG9ydHMgPSBuZXcgTWFwKCk7XG4gICAgICAgICAgICBleHBvcnRMaXN0LnNldCh2YWx1ZSwgZXhwb3J0cyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHR5cGVvZiBjdXJyZW50RXhwb3J0ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY3VycmVudEV4cG9ydC53aGVyZVVzZ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AgICB9LFxuICAgICAgJ0V4cG9ydERlZmF1bHREZWNsYXJhdGlvbic6IG5vZGUgPT4ge1xuICAgICAgICBjaGVja1VzYWdlKG5vZGUsIElNUE9SVF9ERUZBVUxUX1NQRUNJRklFUik7XG4gICAgICB9LFxuICAgICAgJ0V4cG9ydE5hbWVkRGVjbGFyYXRpb24nOiBub2RlID0+IHtcbiAgICAgICAgbm9kZS5zcGVjaWZpZXJzLmZvckVhY2goc3BlY2lmaWVyID0+IHtcbiAgICAgICAgICBjaGVja1VzYWdlKG5vZGUsIHNwZWNpZmllci5leHBvcnRlZC5uYW1lKTtcbiAgICAgICAgfSk7XG4gICAgICAgIGZvckVhY2hEZWNsYXJhdGlvbklkZW50aWZpZXIobm9kZS5kZWNsYXJhdGlvbiwgKG5hbWUpID0+IHtcbiAgICAgICAgICBjaGVja1VzYWdlKG5vZGUsIG5hbWUpO1xuICAgICAgICB9KTtcbiAgICAgIH0sXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby11bnVzZWQtbW9kdWxlcy5qcyJdLCJuYW1lcyI6WyJGaWxlRW51bWVyYXRvciIsImxpc3RGaWxlc1RvUHJvY2VzcyIsInJlcXVpcmUiLCJlIiwib3JpZ2luYWxMaXN0RmlsZXNUb1Byb2Nlc3MiLCJzcmMiLCJleHRlbnNpb25zIiwicGF0dGVybnMiLCJyZWR1Y2UiLCJjYXJyeSIsInBhdHRlcm4iLCJjb25jYXQiLCJtYXAiLCJleHRlbnNpb24iLCJ0ZXN0Iiwic2xpY2UiLCJBcnJheSIsImZyb20iLCJpdGVyYXRlRmlsZXMiLCJmaWxlUGF0aCIsImlnbm9yZWQiLCJmaWxlbmFtZSIsIkVYUE9SVF9ERUZBVUxUX0RFQ0xBUkFUSU9OIiwiRVhQT1JUX05BTUVEX0RFQ0xBUk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HlwZW9mIGV4cG9ydHMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIHZhbHVlLmZvckVhY2goY3VycmVudEltcG9ydCA9PiB7XG4gICAgICAgICAgbGV0IHNwZWNpZmllcjtcbiAgICAgICAgICBpZiAoY3VycmVudEltcG9ydCA9PT0gSU1QT1JUX05BTUVTUEFDRV9TUEVDSUZJRVIpIHtcbiAgICAgICAgICAgIHNwZWNpZmllciA9IElNUE9SVF9OQU1FU1BBQ0VfU1BFQ0lGSUVSO1xuICAgICAgICAgIH0gZWxzZSBpZiAoY3VycmVudEltcG9ydCA9PT0gSU1QT1JUX0RFRkFVTFRfU1BFQ0lGSUVSKSB7XG4gICAgICAgICAgICBzcGVjaWZpZXIgPSBJTVBPUlRfREVGQVVMVF9TUEVDSUZJRVI7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHNwZWNpZmllciA9IGN1cnJlbnRJbXBvcnQ7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICh0eXBlb2Ygc3BlY2lmaWVyICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY29uc3QgZXhwb3J0U3RhdGVtZW50ID0gZXhwb3J0cy5nZXQoc3BlY2lmaWVyKTtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgZXhwb3J0U3RhdGVtZW50ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICBjb25zdCB7IHdoZXJlVXNlZCB9ID0gZXhwb3J0U3RhdGVtZW50O1xuICAgICAgICAgICAgICB3aGVyZVVzZWQuYWRkKGxpc3RLZXkpO1xuICAgICAgICAgICAgICBleHBvcnRzLnNldChzcGVjaWZpZXIsIHsgd2hlcmVVc2VkIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfSk7XG4gIH0pO1xufTtcblxuY29uc3QgZ2V0U3JjID0gc3JjID0+IHtcbiAgaWYgKHNyYykge1xuICAgIHJldH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uICAgICAgcHJvcGVydGllczoge1xuICAgICAgICBzcmM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjogJ2ZpbGVzL3BhdGhzIHRvIGJlIGFuYWx5emVkIChvbmx5IGZvciB1bnVzZWQgZXhwb3J0cyknLFxuICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgbWluSXRlbXM6IDEsXG4gICAgICAgICAgaXRlbXM6IHtcbiAgICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxuICAgICAgICAgICAgbWluTGVuZ3RoOiAxLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIGlnbm9yZUV4cG9ydHM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjpcbiAgICAgICAgICAgICdmaWxlcy9wYXRocyBmb3Igd2hpY2ggdW51c2VkIGV4cG9ydHMgd2lsbCBub3QgYmUgcmVwb3J0ZWQgKGUuZyBtb2R1bGUgZW50cnkgcG9pbnRzKScsXG4gICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICBtaW5JdGVtczogMSxcbiAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXG4gICAgICAgICAgICBtaW5MZW5ndGg6IDEsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgbWlzc2luZ0V4cG9ydHM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjogJ3JlcG9ydCBtb2R1bGVzIHdpdGhvdXQgYW55IGV4cG9ydHMnLFxuICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgfSxcbiAgICAgICAgdW51c2VkRXhwb3J0czoge1xuICAgICAgICAgIGRlc2NyaXB0aW9uOiAncmVwb3J0IGV4cG9ydHMgd2l0aG91dCBhbnkgdXNhZ2UnLFxuICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBub3Q6IHtcbiAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgIHVudXNlZEV4cG9ydHM6IHsgZW51bTogW2ZhbHNlXSB9LFxuICAgICAgICAgIG1pc3NpbmdFeHBvcnRzOiB7IGVudW06IFtmYWxzZV0gfSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBhbnlPZjpbe1xuICAgICAgICBub3Q6IHtcbiAgICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB1bnVzZWRFeHBvcnRzOiB7IGVudW06IFt0cnVlXSB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIHJlcXVpcmVkOiBbJ21pc3NpbmdFeHBvcnRzJ10sXG4gICAgICB9LCB7XG4gICAgICAgIG5vdDoge1xuICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgIG1pc3NpbmdFeHBvcnRzOiB7IGVudW06IFt0cnVlXSB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIHJlcXVpcmVkOiBbJ3VudXNlZEV4cG9ydHMnXSxcbiAgICAgIH0sIHtcbiAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgIHVudXNlZEV4cG9ydHM6IHsgZW51bTogW3RydWVdIH0sXG4gICAgICAgIH0sXG4gICAgICAgIHJlcXVpcmVkOiBbJ3VudXNlZEV4cG9ydHMnXSxcbiAgICAgIH0sIHtcbiAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgIG1pc3NpbmdFeHBvcnRzOiB7IGVudW06IFt0cnVlXSB9LFxuICAgICAgICB9LFxuICAgICAgICByZXF1aXJlZDogWydtaXNzaW5nRXhwb3J0cyddLFxuICAgICAgfV0sXG4gICAgfV0sXG4gIH0sXG5cbiAgY3JlYXRlOiBjb250ZXh0ID0+IHtcbiAgICBjb25zdCB7XG4gICAgICBzcmMsXG4gICAgICBpZ25vcmVFeHBvcnRzID0gW10sXG4gICAgICBtaXNzaW5nRXhwb3J0cyxcbi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tZSB8fCBzcGVjaWZpZXIubG9jYWwudmFsdWU7XG4gICAgICAgICAgICAgIGlmIChuYW1lID09PSBERUZBVUxUKSB7XG4gICAgICAgICAgICAgICAgbmV3RGVmYXVsdEltcG9ydHMuYWRkKHJlc29sdmVkUGF0aCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbmV3SW1wb3J0cy5zZXQobmFtZSwgcmVzb2x2ZWRQYXRoKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGFzdE5vZGUudHlwZSA9PT0gRVhQT1JUX0FMTF9ERUNMQVJBVElPTikge1xuICAgICAgICAgIHJlc29sdmVkUGF0aCA9IHJlc29sdmUoYXN0Tm9kZS5zb3VyY2UucmF3LnJlcGxhY2UoLygnfFwiKS9nLCAnJyksIGNvbnRleHQpO1xuICAgICAgICAgIG5ld0V4cG9ydEFsbC5hZGQocmVzb2x2ZWRQYXRoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChhc3ROb2RlLnR5cGUgPT09IElNUE9SVF9ERUNMQVJBVElPTikge1xuICAgICAgICAgIHJlc29sdmVkUGF0aCA9IHJlc29sdmUoYXN0Tm9kZS5zb3VyY2UucmF3LnJlcGxhY2UoLygnfFwiKS9nLCAnJyksIGNvbnRleHQpO1xuICAgICAgICAgIGlmICghcmVzb2x2ZWRQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGlzTm9kZU1vZHVsZShyZXNvbHZlZFBhdGgpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKG5ld05hbWVzcGFjZUltcG9ydEV4aXN0cyhhc3ROb2RlLnNwZWNpZmllcnMpKSB7XG4gICAgICAgICAgICBuZXdOYW1lc3BhY2VJbXBvcnRzLmFkZChyZXNvbHZlZFBhdGgpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChuZXdEZWZhdWx0SW1wb3J0RXhpc3RzKGFzdE5vZGUuc3BlY2lmaWVycykpIHtcbiAgICAgICAgICAgIG5ld0RlZmF1bHRJbXBvcnRzLmFkZChyZXNvbHZlZFBhdGgpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGFzdE5vZGUuc3BlY2lmaWVycy5mb3JFYWNoKHNwZWNpZmllciA9PiB7XG4gICAgICAgICAgICBpZiAoc3BlY2lmaWVyLnR5cGUgPT09IElNUE9SVF9ERUZBVUxUX1NQRUNJRklFUiB8fFxuICAgICAgICAgICAgICAgIHNwZWNpZmllci50eXBlID09PSBJTVBPUlRfTkFNRVNQQUNFX1NQRUNJRklFUikge1xuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBuZXdJbXBvcnRzLnNldChzcGVjaWZpZXIuaW1wb3J0ZWQubmFtZSB8fCBzcGVjaWZpZXIuaW1wb3J0ZWQudmFsdWUsIHJlc29sdmVkUGF0aCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICBuZXdFeHBvcnRBbGwuZm9yRWFjaCh2YWx1ZSA9PiB7XG4gICAgICAgIGlmICghb2xkRXhwb3J0QWxsLmhhcyh2YWx1ZSkpIHtcbiAgICAgICAgICBsZXQgaW1wb3J0cyA9IG9sZEltcG9ydFBhdGhzLmdldCh2YWx1ZSk7XG4gICAgICAgICAgaWYgKHR5cGVvZiBpbXBvcnRzID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgaW1wb3J0cyA9IG5ldyBTZXQoKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaW1wb3J0cy5hZGQoRVhQT1JUX0FMTF9ERUNMQVJBVElPTik7XG4gICAgICAgICAgb2xkSW1wb3J0UGF0aHMuc2V0KHZhbHVlLCBpbXBvcnRzKTtcblxuICAgICAgICAgIGxldCB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k7XG4gICAgICAgICAgaWYgKHR5cGVvZiBleHBvcnRzICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY29uc3QgY3VycmVudEV4cG9ydCA9IGV4cG9ydHMuZ2V0KEVYUE9SVF9BTExfREVDTEFSQVRJT04pO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBjdXJyZW50RXhwb3J0ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICBjdXJyZW50RXhwb3J0LndoZXJlVXNlZC5kZWxldGUoZmlsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgICAgbmV3RGVmYXVsdEltcG9ydHMuZm9yRWFjaCh2YWx1ZSA9PiB7XG4gICAgICAgIGlmICghb2xkRGVmYXVsdEltcG9ydHMuaGFzKHZhbHVlKSkge1xuICAgICAgICAgIGxldCBpbXBvcnRzID0gb2xkSW1wb3J0UGF0aHMuZ2V0KHZhbHVlKTtcbiAgICAgICAgICBpZiAodHlwZW9mIGltcG9ydHMgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICBpbXBvcnRzID0gbmV3IFNldCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpbXBvcnRzLmFkZChJTVBPUlRfREVGQVVMVF9TUEVDSUZJRVIpO1xuICAgICAgICAgIG9sZEltcG9ydFBhdGhzLnNldCh2YWx1ZSwgaW1wb3J0cyk7XG5cbiAgICAgICAgICBsZXQgZXhwb3J0cyA9IGV4cG9ydExpc3QuZ2V0KHZhbHVlKTtcbiAgICAgICAgICBsZXQgY3VycmVudEV4cG9ydDtcbiAgICAgICAgICBpZiAodHlwZW9mIGV4cG9ydHMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICBjdXJyZW50RXhwb3J0ID0gZXhwb3J0cy5nZXQoSU1QT1JUX0RFRkFVTFRfU1BFQ0lGSUVSKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC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B7XG4gICAgICAgICAgbGV0IGltcG9ydHMgPSBvbGRJbXBvcnRQYXRocy5nZXQodmFsdWUpO1xuICAgICAgICAgIGlmICh0eXBlb2YgaW1wb3J0cyA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIGltcG9ydHMgPSBuZXcgU2V0KCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGltcG9ydHMuYWRkKGtleSk7XG4gICAgICAgICAgb2xkSW1wb3J0UGF0aHMuc2V0KHZhbHVlLCBpbXBvcnRzKTtcblxuICAgICAgICAgIGxldCBleHBvcnRzID0gZXhwb3J0TGlzdC5nZXQodmFsdWUpO1xuICAgICAgICAgIGxldCBjdXJyZW50RXhwb3J0O1xuICAgICAgICAgIGlmICh0eXBlb2YgZXhwb3J0cyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIGN1cnJlbnRFeHBvcnQgPSBleHBvcnRzLmdldChrZXkpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBleHBvcnRzID0gbmV3IE1hcCgpO1xuICAgICAgICAgICAgZXhwb3J0TGlzdC5zZXQodmFsdWUsIGV4cG9ydHMpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmICh0eXBlb2YgY3VycmVudEV4cG9ydCAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIGN1cnJlbnRFeHBvcnQud2hlcmVVc2VkLmFkZChmaWxlKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29uc3Qgd2hlcmVVc2VkID0gbmV3IFNldCgpO1xuICAgICAgICAgICAgd2hlcmVVc2VkLmFkZChmaWxlKTtcbiAgICAgICAgICAgIGV4cG9ydHMuc2V0KGtleSwgeyB3aGVyZVVzZWQgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgICAgb2xkSW1wb3J0cy5mb3JFYWNoKCh2YWx1ZSwga2V5KSA9PiB7XG4gICAgICAgIGlmICghbmV3SW1wb3J0cy5oYXMoa2V5KSkge1xuICAgICAgICAgIGNvbnN0IGltcG9ydHMgPSBvbGRJbXBvcnRQYXRocy5nZXQodmFsdWUpO1xuICAgICAgICAgIGltcG9ydHMuZGVsZXRlKGtleSk7XG5cbiAgICAgICAgICBjb25zdCBleHBvcnRzID0gZXhwb3J0TGlzdC5nZXQodmFsdWUpO1xuICAgICAgICAgIGlmICh0eXBlb2YgZXhwb3J0cyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRFeHBvcnQgPSBleHBvcnRzLmdldChrZXkpO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBjdXJyZW50RXhwb3J0ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICBjdXJyZW50RXhwb3J0LndoZXJlVXNlZC5kZWxldGUoZmlsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgcmV0dXJuIHtcbiAgICAgICdQcm9ncmFtOmV4aXQnOiBub2RlID0+IHtcbiAgICAgICAgdXBkYXRlRXhwb3J0VXNhZ2Uobm9kZSk7XG4gICAgICAgIHVwZGF0ZUltcG9ydFVzYWdlKG5vZGUpO1xuICAgICAgICBjaGVja0V4cG9ydFByZXNlbmNlKG5vZGUpO1xuICAgICAgfSxcbiAgICAgICdFeHBvcnREZWZhdWx0RGVjbGFyYXRpb24nOiBub2RlID0+IHtcbiAgICAgICAgY2hlY2tVc2FnZShub2RlLCBJTVBPUlRfREVGQVVMVF9TUEVDSUZJRVIpO1xuICAgICAgfSxcbiAgICAgICdFeHBvcnROYW1lZERlY2xhcmF0aW9uJzogbm9kZSA9PiB7XG4gICAgICAgIG5vZGUuc3BlY2lmaWVycy5mb3JFYWNoKHNwZWNpZmllciA9PiB7XG4gICAgICAgICAgY2hlY2tVc2FnZShub2RlLCBzcGVjaWZpZXIuZXhwb3J0ZWQubmFtZSB8fCBzcGVjaWZpZXIuZXhwb3J0ZWQudmFsdWUpO1xuICAgICAgICB9KTtcbiAgICAgICAgZm9yRWFjaERlY2xhcmF0aW9uSWRlbnRpZmllcihub2RlLmRlY2xhcmF0aW9uLCAobmFtZSkgPT4ge1xuICAgICAgICAgIGNoZWNrVXNhZ2Uobm9kZSwgbmFtZSk7XG4gICAgICAgIH0pO1xuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-useless-path-segments.js b/node_modules/eslint-plugin-import/lib/rules/no-useless-path-segments.js index d7acab57a..a9296c603 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-useless-path-segments.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-useless-path-segments.js @@ -40,6 +40,8 @@ module.exports = { meta: { type: 'suggestion', docs: { + category: 'Static analysis', + description: 'Forbid unnecessary path segments in import and require statements.', url: (0, _docsUrl2['default'])('no-useless-path-segments') }, @@ -142,4 +144,4 @@ module.exports = { return (0, _moduleVisitor2['default'])(checkSourceValue, options); }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby11c2VsZXNzLXBhdGgtc2VnbWVudHMuanMiXSwibmFtZXMiOlsidG9SZWxhdGl2ZVBhdGgiLCJyZWxhdGl2ZVBhdGgiLCJzdHJpcHBlZCIsInJlcGxhY2UiLCJ0ZXN0Iiwibm9ybWFsaXplIiwiZm4iLCJwYXRoIiwicG9zaXgiLCJjb3VudFJlbGF0aXZlUGFyZW50cyIsInBhdGhTZWdtZW50cyIsInJlZHVjZSIsInN1bSIsInBhdGhTZWdtZW50IiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsImZpeGFibGUiLCJzY2hlbWEiLCJwcm9wZXJ0aWVzIiwiY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ZSBudW1iZXIgb2YgcmVsYXRpdmUgcGFyZW50cyAtLT4gUGF0aHMgYXJlIHRoZSBzYW1lIC0tPiBSZXR1cm4gZGlyZWN0bHlcbiAgICAgIGlmIChkaWZmIDw9IDApIHtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICAvLyBSZXBvcnQgYW5kIHByb3Bvc2UgbWluaW1hbCBudW1iZXIgb2YgcmVxdWlyZWQgcmVsYXRpdmUgcGFyZW50c1xuICAgICAgcmV0dXJuIHJlcG9ydFdpdGhQcm9wb3NlZFBhdGgoXG4gICAgICAgIHRvUmVsYXRpdmVQYXRoKFxuICAgICAgICAgIGltcG9ydFBhdGhTcGxpdFxuICAgICAgICAgICAgLnNsaWNlKDAsIGNvdW50RXhwZWN0ZWRSZWxhdGl2ZVBhcmVudHMpXG4gICAgICAgICAgICAuY29uY2F0KGltcG9ydFBhdGhTcGxpdC5zbGljZShjb3VudEltcG9ydFBhdGhSZWxhdGl2ZVBhcmVudHMgKyBkaWZmKSlcbiAgICAgICAgICAgIC5qb2luKCcvJylcbiAgICAgICAgKVxuICAgICAgKTtcbiAgICB9XG5cbiAgICByZXR1cm4gbW9kdWxlVmlzaXRvcihjaGVja1NvdXJjZVZhbHVlLCBvcHRpb25zKTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby11c2VsZXNzLXBhdGgtc2VnbWVudHMuanMiXSwibmFtZXMiOlsidG9SZWxhdGl2ZVBhdGgiLCJyZWxhdGl2ZVBhdGgiLCJzdHJpcHBlZCIsInJlcGxhY2UiLCJ0ZXN0Iiwibm9ybWFsaXplIiwiZm4iLCJwYXRoIiwicG9zaXgiLCJjb3VudFJlbGF0aXZlUGFyZW50cyIsInBhdGhTZWdtZW50cyIsInJlZHVjZSIsInN1bSIsInBhdGhTZWdtZW50IiwibW9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XRpdmVQYXJlbnRzID0gY291bnRSZWxhdGl2ZVBhcmVudHMoaW1wb3J0UGF0aFNwbGl0KTtcbiAgICAgIGNvbnN0IGNvdW50RXhwZWN0ZWRSZWxhdGl2ZVBhcmVudHMgPSBjb3VudFJlbGF0aXZlUGFyZW50cyhleHBlY3RlZFNwbGl0KTtcbiAgICAgIGNvbnN0IGRpZmYgPSBjb3VudEltcG9ydFBhdGhSZWxhdGl2ZVBhcmVudHMgLSBjb3VudEV4cGVjdGVkUmVsYXRpdmVQYXJlbnRzO1xuXG4gICAgICAvLyBTYW1lIG51bWJlciBvZiByZWxhdGl2ZSBwYXJlbnRzIC0tPiBQYXRocyBhcmUgdGhlIHNhbWUgLS0+IFJldHVybiBkaXJlY3RseVxuICAgICAgaWYgKGRpZmYgPD0gMCkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIC8vIFJlcG9ydCBhbmQgcHJvcG9zZSBtaW5pbWFsIG51bWJlciBvZiByZXF1aXJlZCByZWxhdGl2ZSBwYXJlbnRzXG4gICAgICByZXR1cm4gcmVwb3J0V2l0aFByb3Bvc2VkUGF0aChcbiAgICAgICAgdG9SZWxhdGl2ZVBhdGgoXG4gICAgICAgICAgaW1wb3J0UGF0aFNwbGl0XG4gICAgICAgICAgICAuc2xpY2UoMCwgY291bnRFeHBlY3RlZFJlbGF0aXZlUGFyZW50cylcbiAgICAgICAgICAgIC5jb25jYXQoaW1wb3J0UGF0aFNwbGl0LnNsaWNlKGNvdW50SW1wb3J0UGF0aFJlbGF0aXZlUGFyZW50cyArIGRpZmYpKVxuICAgICAgICAgICAgLmpvaW4oJy8nKSxcbiAgICAgICAgKSxcbiAgICAgICk7XG4gICAgfVxuXG4gICAgcmV0dXJuIG1vZHVsZVZpc2l0b3IoY2hlY2tTb3VyY2VWYWx1ZSwgb3B0aW9ucyk7XG4gIH0sXG59O1xuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js b/node_modules/eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js index 82f59f70d..4ffd5fdf8 100644 --- a/node_modules/eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js +++ b/node_modules/eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js @@ -13,6 +13,8 @@ module.exports = { meta: { type: 'problem', docs: { + category: 'Static analysis', + description: 'Forbid webpack loader syntax in imports.', url: (0, _docsUrl2['default'])('no-webpack-loader-syntax') }, schema: [] }, @@ -23,4 +25,4 @@ module.exports = { reportIfNonStandard(context, node, source.value); }, { commonjs: true }); }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby13ZWJwYWNrLWxvYWRlci1zeW50YXguanMiXSwibmFtZXMiOlsicmVwb3J0SWZOb25TdGFuZGFyZCIsImNvbnRleHQiLCJub2RlIiwibmFtZSIsImluZGV4T2YiLCJyZXBvcnQiLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiLCJkb2NzIiwidXJsIiwic2NoZW1hIiwiY3JlYXRlIiwic291cmNlIiwidmFsdWUiLCJjb21tb25qcyJdLCJtYXBwaW5ncyI6ImFBQUEsa0U7QUFDQSxxQzs7QUFFQSxTQUFTQSxtQkFBVCxDQUE2QkMsT0FBN0IsRUFBc0NDLElBQXRDLEVBQTRDQyxJQUE1QyxFQUFrRDtBQUNoRCxNQUFJQSxRQUFRQSxLQUFLQyxPQUFMLENBQWEsR0FBYixNQUFzQixDQUFDLENBQW5DLEVBQXNDO0FBQ3BDSCxZQUFRSSxNQUFSLENBQWVILElBQWYsRUFBcUIsa0NBQXNCQyxJQUF0QjtBQUNuQiw0REFERjs7QUFHRDtBQUNGOztBQUVERyxPQUFPQyxPQUFQLEdBQWlCO0FBQ2ZDLFFBQU07QUFDSkMsVUFBTSxTQURGO0FBRUpDLFVBQU07QUFDSkMsV0FBSywwQkFBUSwwQkF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gIHNjaGVtYTogW10sXG4gIH0sXG5cbiAgY3JlYXRlKGNvbnRleHQpIHtcbiAgICByZXR1cm4gbW9kdWxlVmlzaXRvcigoc291cmNlLCBub2RlKSA9PiB7XG4gICAgICByZXBvcnRJZk5vblN0YW5kYXJkKGNvbnRleHQsIG5vZGUsIHNvdXJjZS52YWx1ZSk7XG4gICAgfSwgeyBjb21tb25qczogdHJ1ZSB9KTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/order.js b/node_modules/eslint-plugin-import/lib/rules/order.js index d3028cbc4..877a49f35 100644 --- a/node_modules/eslint-plugin-import/lib/rules/order.js +++ b/node_modules/eslint-plugin-import/lib/rules/order.js @@ -1,6 +1,8 @@ 'use strict';var _slicedToArray = function () {function sliceIterator(arr, i) {var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"]) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}return function (arr, i) {if (Array.isArray(arr)) {return arr;} else if (Symbol.iterator in Object(arr)) {return sliceIterator(arr, i);} else {throw new TypeError("Invalid attempt to destructure non-iterable instance");}};}(); var _minimatch = require('minimatch');var _minimatch2 = _interopRequireDefault(_minimatch); +var _arrayIncludes = require('array-includes');var _arrayIncludes2 = _interopRequireDefault(_arrayIncludes); + var _importType = require('../core/importType');var _importType2 = _interopRequireDefault(_importType); var _staticRequire = require('../core/staticRequire');var _staticRequire2 = _interopRequireDefault(_staticRequire); var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} @@ -47,8 +49,7 @@ function takeTokensAfterWhile(sourceCode, node, condition) { for (var i = 0; i < tokens.length; i++) { if (condition(tokens[i])) { result.push(tokens[i]); - } else - { + } else { break; } } @@ -61,8 +62,7 @@ function takeTokensBeforeWhile(sourceCode, node, condition) { for (var i = tokens.length - 1; i >= 0; i--) { if (condition(tokens[i])) { result.push(tokens[i]); - } else - { + } else { break; } } @@ -129,7 +129,17 @@ function findStartOfLineWithComments(sourceCode, node) { return result; } -function isPlainRequireModule(node) { +function isRequireExpression(expr) { + return expr != null && + expr.type === 'CallExpression' && + expr.callee != null && + expr.callee.name === 'require' && + expr.arguments != null && + expr.arguments.length === 1 && + expr.arguments[0].type === 'Literal'; +} + +function isSupportedRequireModule(node) { if (node.type !== 'VariableDeclaration') { return false; } @@ -137,16 +147,17 @@ function isPlainRequireModule(node) { return false; } var decl = node.declarations[0]; - var result = decl.id && ( + var isPlainRequire = decl.id && ( + decl.id.type === 'Identifier' || decl.id.type === 'ObjectPattern') && + isRequireExpression(decl.init); + var isRequireWithMemberExpression = decl.id && ( decl.id.type === 'Identifier' || decl.id.type === 'ObjectPattern') && decl.init != null && decl.init.type === 'CallExpression' && decl.init.callee != null && - decl.init.callee.name === 'require' && - decl.init.arguments != null && - decl.init.arguments.length === 1 && - decl.init.arguments[0].type === 'Literal'; - return result; + decl.init.callee.type === 'MemberExpression' && + isRequireExpression(decl.init.callee.object); + return isPlainRequire || isRequireWithMemberExpression; } function isPlainImportModule(node) { @@ -158,7 +169,7 @@ function isPlainImportEquals(node) { } function canCrossNodeWhileReorder(node) { - return isPlainRequireModule(node) || isPlainImportModule(node) || isPlainImportEquals(node); + return isSupportedRequireModule(node) || isPlainImportModule(node) || isPlainImportEquals(node); } function canReorderItems(firstNode, secondNode) { @@ -176,6 +187,16 @@ function canReorderItems(firstNode, secondNode) { return true; } +function makeImportDescription(node) { + if (node.node.importKind === 'type') { + return 'type import'; + } + if (node.node.importKind === 'typeof') { + return 'typeof import'; + } + return 'import'; +} + function fixOutOfOrder(context, firstNode, secondNode, order) { var sourceCode = context.getSourceCode(); @@ -193,7 +214,9 @@ function fixOutOfOrder(context, firstNode, secondNode, order) { newCode = newCode + '\n'; } - var message = '`' + String(secondNode.displayName) + '` import should occur ' + String(order) + ' import of `' + String(firstNode.displayName) + '`'; + var firstImport = String(makeImportDescription(firstNode)) + ' of `' + String(firstNode.displayName) + '`'; + var secondImport = '`' + String(secondNode.displayName) + '` ' + String(makeImportDescription(secondNode)); + var message = secondImport + ' should occur ' + String(order) + ' ' + firstImport; if (order === 'before') { context.report({ @@ -242,21 +265,63 @@ function makeOutOfOrderReport(context, imported) { reportOutOfOrder(context, imported, outOfOrder, 'before'); } -function getSorter(ascending) { - var multiplier = ascending ? 1 : -1; +var compareString = function compareString(a, b) { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; +}; + +/** Some parsers (languages without types) don't provide ImportKind */ +var DEAFULT_IMPORT_KIND = 'value'; +var getNormalizedValue = function getNormalizedValue(node, toLowerCase) { + var value = node.value; + return toLowerCase ? String(value).toLowerCase() : value; +}; + +function getSorter(alphabetizeOptions) { + var multiplier = alphabetizeOptions.order === 'asc' ? 1 : -1; + var orderImportKind = alphabetizeOptions.orderImportKind; + var multiplierImportKind = orderImportKind !== 'ignore' && ( + alphabetizeOptions.orderImportKind === 'asc' ? 1 : -1); + + return function () {function importsSorter(nodeA, nodeB) { + var importA = getNormalizedValue(nodeA, alphabetizeOptions.caseInsensitive); + var importB = getNormalizedValue(nodeB, alphabetizeOptions.caseInsensitive); + var result = 0; + + if (!(0, _arrayIncludes2['default'])(importA, '/') && !(0, _arrayIncludes2['default'])(importB, '/')) { + result = compareString(importA, importB); + } else { + var A = importA.split('/'); + var B = importB.split('/'); + var a = A.length; + var b = B.length; + + for (var i = 0; i < Math.min(a, b); i++) { + result = compareString(A[i], B[i]); + if (result) break; + } + + if (!result && a !== b) { + result = a < b ? -1 : 1; + } + } + + result = result * multiplier; - return function () {function importsSorter(importA, importB) { - var result = void 0; + // In case the paths are equal (result === 0), sort them by importKind + if (!result && multiplierImportKind) { + result = multiplierImportKind * compareString( + nodeA.node.importKind || DEAFULT_IMPORT_KIND, + nodeB.node.importKind || DEAFULT_IMPORT_KIND); - if (importA < importB) { - result = -1; - } else if (importA > importB) { - result = 1; - } else { - result = 0; } - return result * multiplier; + return result; }return importsSorter;}(); } @@ -269,21 +334,21 @@ function mutateRanksToAlphabetize(imported, alphabetizeOptions) { return acc; }, {}); - var groupRanks = Object.keys(groupedByRanks); + var sorterFn = getSorter(alphabetizeOptions); - var sorterFn = getSorter(alphabetizeOptions.order === 'asc'); - var comparator = alphabetizeOptions.caseInsensitive ? - function (a, b) {return sorterFn(String(a.value).toLowerCase(), String(b.value).toLowerCase());} : - function (a, b) {return sorterFn(a.value, b.value);}; + // sort group keys so that they can be iterated on in order + var groupRanks = Object.keys(groupedByRanks).sort(function (a, b) { + return a - b; + }); // sort imports locally within their group groupRanks.forEach(function (groupRank) { - groupedByRanks[groupRank].sort(comparator); + groupedByRanks[groupRank].sort(sorterFn); }); // assign globally unique rank to each import var newRank = 0; - var alphabetizedRanks = groupRanks.sort().reduce(function (acc, groupRank) { + var alphabetizedRanks = groupRanks.reduce(function (acc, groupRank) { groupedByRanks[groupRank].forEach(function (importedItem) { acc[String(importedItem.value) + '|' + String(importedItem.node.importKind)] = parseInt(groupRank, 10) + newRank; newRank += 1; @@ -338,7 +403,7 @@ function registerNode(context, importEntry, ranks, imported, excludedImportTypes } } -function isModuleLevelRequire(node) { +function getRequireBlock(node) { var n = node; // Handle cases like `const baz = require('foo').bar.baz` // and `const foo = require('foo')()` @@ -348,11 +413,13 @@ function isModuleLevelRequire(node) { { n = n.parent; } - return ( - n.parent.type === 'VariableDeclarator' && - n.parent.parent.type === 'VariableDeclaration' && - n.parent.parent.parent.type === 'Program'); - + if ( + n.parent.type === 'VariableDeclarator' && + n.parent.parent.type === 'VariableDeclaration' && + n.parent.parent.parent.type === 'Program') + { + return n.parent.parent.parent; + } } var types = ['builtin', 'external', 'internal', 'unknown', 'parent', 'sibling', 'index', 'object', 'type']; @@ -373,7 +440,7 @@ function convertGroupsToRanks(groups) { if (res[groupItem] !== undefined) { throw new Error('Incorrect configuration of the rule: `' + groupItem + '` is duplicated'); } - res[groupItem] = index; + res[groupItem] = index * 2; }); return res; }, {}); @@ -383,7 +450,7 @@ function convertGroupsToRanks(groups) { }); var ranks = omittedTypes.reduce(function (res, type) { - res[type] = groups.length; + res[type] = groups.length * 2; return res; }, rankObject); @@ -459,7 +526,7 @@ function removeNewLineAfterImport(context, currentImport, previousImport) { return undefined; } -function makeNewlinesBetweenReport(context, imported, newlinesBetweenImports) { +function makeNewlinesBetweenReport(context, imported, newlinesBetweenImports, distinctGroup) { var getNumberOfEmptyLinesBetween = function getNumberOfEmptyLinesBetween(currentImport, previousImport) { var linesBetweenImports = context.getSourceCode().lines.slice( previousImport.node.loc.end.line, @@ -468,27 +535,34 @@ function makeNewlinesBetweenReport(context, imported, newlinesBetweenImports) { return linesBetweenImports.filter(function (line) {return !line.trim().length;}).length; }; + var getIsStartOfDistinctGroup = function getIsStartOfDistinctGroup(currentImport, previousImport) { + return currentImport.rank - 1 >= previousImport.rank; + }; var previousImport = imported[0]; imported.slice(1).forEach(function (currentImport) { var emptyLinesBetween = getNumberOfEmptyLinesBetween(currentImport, previousImport); + var isStartOfDistinctGroup = getIsStartOfDistinctGroup(currentImport, previousImport); if (newlinesBetweenImports === 'always' || newlinesBetweenImports === 'always-and-inside-groups') { if (currentImport.rank !== previousImport.rank && emptyLinesBetween === 0) { - context.report({ - node: previousImport.node, - message: 'There should be at least one empty line between import groups', - fix: fixNewLineAfterImport(context, previousImport) }); - - } else if (currentImport.rank === previousImport.rank && - emptyLinesBetween > 0 && + if (distinctGroup || !distinctGroup && isStartOfDistinctGroup) { + context.report({ + node: previousImport.node, + message: 'There should be at least one empty line between import groups', + fix: fixNewLineAfterImport(context, previousImport) }); + + } + } else if (emptyLinesBetween > 0 && newlinesBetweenImports !== 'always-and-inside-groups') { - context.report({ - node: previousImport.node, - message: 'There should be no empty line within import group', - fix: removeNewLineAfterImport(context, currentImport, previousImport) }); + if (distinctGroup && currentImport.rank === previousImport.rank || !distinctGroup && !isStartOfDistinctGroup) { + context.report({ + node: previousImport.node, + message: 'There should be no empty line within import group', + fix: removeNewLineAfterImport(context, currentImport, previousImport) }); + } } } else if (emptyLinesBetween > 0) { context.report({ @@ -505,15 +579,21 @@ function makeNewlinesBetweenReport(context, imported, newlinesBetweenImports) { function getAlphabetizeConfig(options) { var alphabetize = options.alphabetize || {}; var order = alphabetize.order || 'ignore'; + var orderImportKind = alphabetize.orderImportKind || 'ignore'; var caseInsensitive = alphabetize.caseInsensitive || false; - return { order: order, caseInsensitive: caseInsensitive }; + return { order: order, orderImportKind: orderImportKind, caseInsensitive: caseInsensitive }; } +// TODO, semver-major: Change the default of "distinctGroup" from true to false +var defaultDistinctGroup = true; + module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Enforce a convention in module import order.', url: (0, _docsUrl2['default'])('order') }, @@ -528,6 +608,10 @@ module.exports = { pathGroupsExcludedImportTypes: { type: 'array' }, + distinctGroup: { + type: 'boolean', + 'default': defaultDistinctGroup }, + pathGroups: { type: 'array', items: { @@ -548,6 +632,7 @@ module.exports = { 'enum': ['after', 'before'] } }, + additionalProperties: false, required: ['pattern', 'group'] } }, @@ -567,6 +652,10 @@ module.exports = { 'default': false }, order: { + 'enum': ['ignore', 'asc', 'desc'], + 'default': 'ignore' }, + + orderImportKind: { 'enum': ['ignore', 'asc', 'desc'], 'default': 'ignore' } }, @@ -588,6 +677,7 @@ module.exports = { var newlinesBetweenImports = options['newlines-between'] || 'ignore'; var pathGroupsExcludedImportTypes = new Set(options['pathGroupsExcludedImportTypes'] || ['builtin', 'external', 'object']); var alphabetize = getAlphabetizeConfig(options); + var distinctGroup = options.distinctGroup == null ? defaultDistinctGroup : !!options.distinctGroup; var ranks = void 0; try {var _convertPathGroupsFor = @@ -607,7 +697,14 @@ module.exports = { }return Program;}() }; } - var imported = []; + var importMap = new Map(); + + function getBlockImports(node) { + if (!importMap.has(node)) { + importMap.set(node, []); + } + return importMap.get(node); + } return { ImportDeclaration: function () {function handleImports(node) { @@ -623,7 +720,7 @@ module.exports = { type: 'import' }, ranks, - imported, + getBlockImports(node.parent), pathGroupsExcludedImportTypes); } @@ -654,12 +751,16 @@ module.exports = { type: type }, ranks, - imported, + getBlockImports(node.parent), pathGroupsExcludedImportTypes); }return handleImports;}(), CallExpression: function () {function handleRequires(node) { - if (!(0, _staticRequire2['default'])(node) || !isModuleLevelRequire(node)) { + if (!(0, _staticRequire2['default'])(node)) { + return; + } + var block = getRequireBlock(node); + if (!block) { return; } var name = node.arguments[0].value; @@ -672,23 +773,25 @@ module.exports = { type: 'require' }, ranks, - imported, + getBlockImports(block), pathGroupsExcludedImportTypes); }return handleRequires;}(), 'Program:exit': function () {function reportAndReset() { - if (newlinesBetweenImports !== 'ignore') { - makeNewlinesBetweenReport(context, imported, newlinesBetweenImports); - } + importMap.forEach(function (imported) { + if (newlinesBetweenImports !== 'ignore') { + makeNewlinesBetweenReport(context, imported, newlinesBetweenImports, distinctGroup); + } - if (alphabetize.order !== 'ignore') { - mutateRanksToAlphabetize(imported, alphabetize); - } + if (alphabetize.order !== 'ignore') { + mutateRanksToAlphabetize(imported, alphabetize); + } - makeOutOfOrderReport(context, imported); + makeOutOfOrderReport(context, imported); + }); - imported = []; + importMap.clear(); }return reportAndReset;}() }; }return importOrderRule;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9vcmRlci5qcyJdLCJuYW1lcyI6WyJkZWZhdWx0R3JvdXBzIiwicmV2ZXJzZSIsImFycmF5IiwibWFwIiwidiIsIk9iamVjdCIsImFzc2lnbiIsInJhbmsiLCJnZXRUb2tlbnNPckNvbW1lbnRzQWZ0ZXIiLCJzb3VyY2VDb2RlIiwibm9kZSIsImNvdW50IiwiY3VycmVudE5vZGVPclRva2VuIiwicmVzdWx0IiwiaSIsImdldFRva2VuT3JDb21tZW50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emUgPSBvcHRpb25zLmFscGhhYmV0aXplIHx8IHt9O1xuICBjb25zdCBvcmRlciA9IGFscGhhYmV0aXplLm9yZGVyIHx8ICdpZ25vcmUnO1xuICBjb25zdCBjYXNlSW5zZW5zaXRpdmUgPSBhbHBoYWJldGl6ZS5jYXNlSW5zZW5zaXRpdmUgfHwgZmFsc2U7XG5cbiAgcmV0dXJuIHsgb3JkZXIsIGNhc2VJbnNlbnNpdGl2ZSB9O1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgbWV0YToge1xuICAgIHR5cGU6ICdzdWdnZXN0aW9uJyxcbiAgICBkb2NzOiB7XG4gICAgICB1cmw6IGRvY3NVcmwoJ29yZGVyJyksXG4gICAgfSxcblxuICAgIGZpeGFibGU6ICdjb2RlJyxcbiAgICBzY2hlbWE6IFtcbiAgICAgIHtcbiAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICBncm91cHM6IHtcbiAgICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBwYXRoR3JvdXBzRXhjbHVkZWRJbXBvcnRUeXBlczoge1xuICAgICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHBhdGhHcm91cHM6IHtcbiAgICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgICAgICAgIHBhdHRlcm46IHtcbiAgICAgICAgICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgcGF0dGVybk9wdGlvbnM6IHtcbiAgICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgZ3JvdXA6IHtcbiAgICAgICAgICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxuICAgICAgICAgICAgICAgICAgZW51bTogdHlwZXMsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXG4gICAgICAgICAgICAgICAgICBlbnVtOiBbJ2FmdGVyJywgJ2JlZm9yZSddLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHJlcXVpcmVkOiBbJ3BhdHRlcm4nLCAnZ3JvdXAnXSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICAnbmV3bGluZXMtYmV0d2Vlbic6IHtcbiAgICAgICAgICAgIGVudW06IFtcbiAgICAgICAgICAgICAgJ2lnbm9yZScsXG4gICAgICAgICAgICAgICdhbHdheXMnLFxuICAgICAgICAgICAgICAnYWx3YXlzLWFuZC1pbnNpZGUtZ3JvdXBzJyxcbiAgICAgICAgICAgICAgJ25ldmVyJyxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBhbHBoYWJldGl6ZToge1xuICAgICAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICAgIGNhc2VJbnNlbnNpdGl2ZToge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgICAgICAgICBkZWZhdWx0OiBmYWxzZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgb3JkZXI6IHtcbiAgICAgICAgICAgICAgICBlbnVtOiBbJ2lnbm9yZScsICdhc2MnLCAnZGVzYyddLFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6ICdpZ25vcmUnLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgIC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gIHJhbmtzID0ge1xuICAgICAgICBncm91cHMsXG4gICAgICAgIG9taXR0ZWRUeXBlcyxcbiAgICAgICAgcGF0aEdyb3VwcyxcbiAgICAgICAgbWF4UG9zaXRpb24sXG4gICAgICB9O1xuICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAvLyBNYWxmb3JtZWQgY29uZmlndXJhdGlvblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgUHJvZ3JhbTogZnVuY3Rpb24obm9kZSkge1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KG5vZGUsIGVycm9yLm1lc3NhZ2UpO1xuICAgICAgICB9LFxuICAgICAgfTtcbiAgICB9XG4gICAgbGV0IGltcG9ydGVkID0gW107XG5cbiAgICByZXR1cm4ge1xuICAgICAgSW1wb3J0RGVjbGFyYXRpb246IGZ1bmN0aW9uIGhhbmRsZUltcG9ydHMobm9kZSkge1xuICAgICAgICAvLyBJZ25vcmluZyB1bmFzc2lnbmVkIGltcG9ydHMgdW5sZXNzIHdhcm5PblVuYXNzaWduZWRJbXBvcnRzIGlzIHNldFxuICAgICAgICBpZiAobm9kZS5zcGVjaWZpZXJzLmxlbmd0aCB8fCBvcHRpb25zLndhcm5PblVuYXNzaWduZWRJbXBvcnRzKSB7XG4gICAgICAgICAgY29uc3QgbmFtZSA9IG5vZGUuc291cmNlLnZhbHVlO1xuICAgICAgICAgIHJlZ2lzdGVyTm9kZShcbiAgICAgICAgICAgIGNvbnRleHQsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgIHZhbHVlOiBuYW1lLFxuICAgICAgICAgICAgICBkaXNwbGF5TmFtZTogbmFtZSxcbiAgICAgICAgICAgICAgdHlwZTogJ2ltcG9ydCcsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcmFua3MsXG4gICAgICAgICAgICBpbXBvcnRlZCxcbiAgICAgICAgICAgIHBhdGhHcm91cHNFeGNsdWRlZEltcG9ydFR5cGVzXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFRTSW1wb3J0RXF1YWxzRGVjbGFyYXRpb246IGZ1bmN0aW9uIGhhbmRsZUltcG9ydHMobm9kZSkge1xuICAgICAgICBsZXQgZGlzcGxheU5hbWU7XG4gICAgICAgIGxldCB2YWx1ZTtcbiAgICAgICAgbGV0IHR5cGU7XG4gICAgICAgIC8vIHNraXAgXCJleHBvcnQgaW1wb3J0XCJzXG4gICAgICAgIGlmIChub2RlLmlzRXhwb3J0KSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmIChub2RlLm1vZHVsZVJlZmVyZW5jZS50eXBlID09PSAnVFNFeHRlcm5hbE1vZHVsZVJlZmVyZW5jZScpIHtcbiAgICAgICAgICB2YWx1ZSA9IG5vZGUubW9kdWxlUmVmZXJlbmNlLmV4cHJlc3Npb24udmFsdWU7XG4gICAgICAgICAgZGlzcGxheU5hbWUgPSB2YWx1ZTtcbiAgICAgICAgICB0eXBlID0gJ2ltcG9ydCc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFsdWUgPSAnJztcbiAgICAgICAgICBkaXNwbGF5TmFtZSA9IGNvbnRleHQuZ2V0U291cmNlQ29kZSgpLmdldFRleHQobm9kZS5tb2R1bGVSZWZlcmVuY2UpO1xuICAgICAgICAgIHR5cGUgPSAnaW1wb3J0Om9iamVjdCc7XG4gICAgICAgIH1cbiAgICAgICAgcmVnaXN0ZXJOb2RlKFxuICAgICAgICAgIGNvbnRleHQsXG4gICAgICAgICAge1xuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgICAgZGlzcGxheU5hbWUsXG4gICAgICAgICAgICB0eXBlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgcmFua3MsXG4gICAgICAgICAgaW1wb3J0ZWQsXG4gICAgICAgICAgcGF0aEdyb3Vwc0V4Y2x1ZGVkSW1wb3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PZk9yZGVyUmVwb3J0KGNvbnRleHQsIGltcG9ydGVkKTtcblxuICAgICAgICBpbXBvcnRlZCA9IFtdO1xuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9vcmRlci5qcyJdLCJuYW1lcyI6WyJkZWZhdWx0R3JvdXBzIiwicmV2ZXJzZSIsImFycmF5IiwibWFwIiwidiIsIk9iamVjdCIsImFzc2lnbiIsInJhbmsiLCJnZXRUb2tlbnNPckNvbW1lbnRzQWZ0ZXIiLCJzb3VyY2VDb2RlIiwibm9kZSIsImNvdW50IiwiY3VycmVudE5vZGVPclRva2VuIiwicmVzdWx0IiwiaSIsImdldFRva2VuT3JDb21tZW50QWZ0ZXIiLCJwdXNoIiwiZ2V0VG9rZW5zT3JDb21tZW50c0JlZm9yZSIsImdldFRva2VuT3JDb21tZW50QmVmb3JlIiwidGFrZVRva2Vuc0FmdGVyV2hpbGUiLCJjb25kaXRpb24iLCJ0b2tlbnMiLCJsZW5ndGgiLCJ0YWtlVG9rZW5zQmVmb3JlV2hpbGUiLCJmaW5kT3V0T2ZPcmRlciIsImltcG9ydGVkIiwibWF4U2VlblJhbmtOb2RlIiwiZmlsdGVyIiwiaW1wb3J0ZWRNb2R1bGUiLCJyZXMiLCJmaW5kUm9vdE5vZGUiLCJwYXJlbnQiLCJib2R5IiwiZmluZEVuZE9mTGluZVdpdGhDb21tZW50cyIsInRva2Vuc1RvRW5kT2ZMaW5lIiwiY29tbWVudE9uU2FtZUxpbmVBcyIsImVuZE9mVG9rZW5zIiwicmFuZ2UiLCJ0ZXh0IiwidG9rZW4iLCJ0eXBlIiwibG9jIiwic3RhcnQiLCJsaW5lIiwiZW5kIiwiZmluZFN0YXJ0T2ZMaW5lV2l0aENvbW1lbnRzIiwic3RhcnRPZlRva2VucyIsImlzUmV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XVsdERpc3RpbmN0R3JvdXAsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBwYXRoR3JvdXBzOiB7XG4gICAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgICAgaXRlbXM6IHtcbiAgICAgICAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICBwYXR0ZXJuOiB7XG4gICAgICAgICAgICAgICAgICB0eXBlOiAnc3RyaW5nJyxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHBhdHRlcm5PcHRpb25zOiB7XG4gICAgICAgICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGdyb3VwOiB7XG4gICAgICAgICAgICAgICAgICB0eXBlOiAnc3RyaW5nJyxcbiAgICAgICAgICAgICAgICAgIGVudW06IHR5cGVzLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxuICAgICAgICAgICAgICAgICAgZW51bTogWydhZnRlcicsICdiZWZvcmUnXSxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBhZGRpdGlvbmFsUHJvcGVydGllczogZmFsc2UsXG4gICAgICAgICAgICAgIHJlcXVpcmVkOiBbJ3BhdHRlcm4nLCAnZ3JvdXAnXSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICAnbmV3bGluZXMtYmV0d2Vlbic6IHtcbiAgICAgICAgICAgIGVudW06IFtcbiAgICAgICAgICAgICAgJ2lnbm9yZScsXG4gICAgICAgICAgICAgICdhbHdheXMnLFxuICAgICAgICAgICAgICAnYWx3YXlzLWFuZC1pbnNpZGUtZ3JvdXBzJyxcbiAgICAgICAgICAgICAgJ25ldmVyJyxcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICBhbHBoYWJldGl6ZToge1xuICAgICAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICAgIGNhc2VJbnNlbnNpdGl2ZToge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgICAgICAgICBkZWZhdWx0OiBmYWxzZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgb3JkZXI6IHtcbiAgICAgICAgICAgICAgICBlbnVtOiBbJ2lnbm9yZScsICdhc2MnLCAnZGVzYyddLFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6ICdpZ25vcmUnLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBvcmRlckltcG9ydEtpbmQ6IHtcbiAgICAgICAgICAgICAgICBlbnVtOiBbJ2lnbm9yZScsICdhc2MnLCAnZGVzYyddLFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6ICdpZ25vcmUnLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGFkZGl0aW9uYWxQcm9wZXJ0aWVzOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHdhcm5PblVuYXNzaWduZWRJbXBvcnRzOiB7XG4gICAgICAgICAgICB0eXBlOiAnYm9vbGVhbicsXG4gICAgICAgICAgICBkZWZhdWx0OiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgICBhZGRpdGlvbmFsUHJvcGVydGllczogZmFsc2UsXG4gICAgICB9LFxuICAgIF0sXG4gIH0sXG5cbiAgY3JlYXRlOiBmdW5jdGlvbiBpbXBvcnRPcmRlclJ1bGUoY29udGV4dCkge1xuICAgIGNvbnN0IG9wdGlvbnMgPSBjb250ZXh0Lm9wdGlvbnNbMF0gfHwge307XG4gICAgY29uc3Q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m1lc3NhZ2UpO1xuICAgICAgICB9LFxuICAgICAgfTtcbiAgICB9XG4gICAgY29uc3QgaW1wb3J0TWFwID0gbmV3IE1hcCgpO1xuXG4gICAgZnVuY3Rpb24gZ2V0QmxvY2tJbXBvcnRzKG5vZGUpIHtcbiAgICAgIGlmICghaW1wb3J0TWFwLmhhcyhub2RlKSkge1xuICAgICAgICBpbXBvcnRNYXAuc2V0KG5vZGUsIFtdKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbXBvcnRNYXAuZ2V0KG5vZGUpO1xuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBJbXBvcnREZWNsYXJhdGlvbjogZnVuY3Rpb24gaGFuZGxlSW1wb3J0cyhub2RlKSB7XG4gICAgICAgIC8vIElnbm9yaW5nIHVuYXNzaWduZWQgaW1wb3J0cyB1bmxlc3Mgd2Fybk9uVW5hc3NpZ25lZEltcG9ydHMgaXMgc2V0XG4gICAgICAgIGlmIChub2RlLnNwZWNpZmllcnMubGVuZ3RoIHx8IG9wdGlvbnMud2Fybk9uVW5hc3NpZ25lZEltcG9ydHMpIHtcbiAgICAgICAgICBjb25zdCBuYW1lID0gbm9kZS5zb3VyY2UudmFsdWU7XG4gICAgICAgICAgcmVnaXN0ZXJOb2RlKFxuICAgICAgICAgICAgY29udGV4dCxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgICAgdmFsdWU6IG5hbWUsXG4gICAgICAgICAgICAgIGRpc3BsYXlOYW1lOiBuYW1lLFxuICAgICAgICAgICAgICB0eXBlOiAnaW1wb3J0JyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByYW5rcyxcbiAgICAgICAgICAgIGdldEJsb2NrSW1wb3J0cyhub2RlLnBhcmVudCksXG4gICAgICAgICAgICBwYXRoR3JvdXBzRXhjbHVkZWRJbXBvcnRUeXBlcyxcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgVFNJbXBvcnRFcXVhbHNEZWNsYXJhdGlvbjogZnVuY3Rpb24gaGFuZGxlSW1wb3J0cyhub2RlKSB7XG4gICAgICAgIGxldCBkaXNwbGF5TmFtZTtcbiAgICAgICAgbGV0IHZhbHVlO1xuICAgICAgICBsZXQgdHlwZTtcbiAgICAgICAgLy8gc2tpcCBcImV4cG9ydCBpbXBvcnRcInNcbiAgICAgICAgaWYgKG5vZGUuaXNFeHBvcnQpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG5vZGUubW9kdWxlUmVmZXJlbmNlLnR5cGUgPT09ICdUU0V4dGVybmFsTW9kdWxlUmVmZXJlbmNlJykge1xuICAgICAgICAgIHZhbHVlID0gbm9kZS5tb2R1bGVSZWZlcmVuY2UuZXhwcmVzc2lvbi52YWx1ZTtcbiAgICAgICAgICBkaXNwbGF5TmFtZSA9IHZhbHVlO1xuICAgICAgICAgIHR5cGUgPSAnaW1wb3J0JztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB2YWx1ZSA9ICcnO1xuICAgICAgICAgIGRpc3BsYXlOYW1lID0gY29udGV4dC5nZXRTb3VyY2VDb2RlKCkuZ2V0VGV4dChub2RlLm1vZHVsZVJlZmVyZW5jZSk7XG4gICAgICAgICAgdHlwZSA9ICdpbXBvcnQ6b2JqZWN0JztcbiAgICAgICAgfVxuICAgICAgICByZWdpc3Rlck5vZGUoXG4gICAgICAgICAgY29udGV4dCxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgICBkaXNwbGF5TmFtZSxcbiAgICAgICAgICAgIHR5cGUsXG4gICAgICAgICAgfSxcbiAgICAgICAgICByYW5rcyxcbiAgICAgICAgICBnZXRCbG9ja0ltcG9ydHMobm9kZS5wYXJlbnQpLFxuICAgICAgICAgIHBhdGhHcm91cHNFeGNsdWRlZEltcG9ydFR5cGVzLFxuICAgICAgICApO1xuICAgICAgfSxcbiAgICAgIENhbGxFeHByZXNzaW9uOiBmdW5jdGlvbiBoYW5kbGVSZXF1aXJlcyhub2RlKSB7XG4gICAgICAgIGlmICghaXNTdGF0aWNSZXF1aXJlKG5vZGUpKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGJsb2NrID0gZ2V0UmVxdWlyZUJsb2NrKG5vZGUpO1xuICAgICAgICBpZiAoIWJsb2NrKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IG5hbWUgPSBub2RlLmFyZ3VtZW50c1swXS52YWx1ZTtcbiAgICAgICAgcmVnaXN0ZXJOb2RlKFxuICAgICAgICAgIGNvbnRleHQsXG4gICAgICAgICAge1xuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIHZhbHVlOiBuYW1lLFxuICAgICAgICAgICAgZGlzcGxheU5hbWU6IG5hbWUsXG4gICAgICAgICAgICB0eXBlOiAncmVxdWlyZScsXG4gICAgICAgICAgfSxcbiAgICAgICAgICByYW5rcyxcbiAgICAgICAgICBnZXRCbG9ja0ltcG9ydHMoYmxvY2spLFxuICAgICAgICAgIHBhdGhHcm91cHNFeGNsdWRlZEltcG9ydFR5cGVzLFxuICAgICAgICApO1xuICAgICAgfSxcbiAgICAgICdQcm9ncmFtOmV4aXQnOiBmdW5jdGlvbiByZXBvcnRBbmRSZXNldCgpIHtcbiAgICAgICAgaW1wb3J0TWFwLmZvckVhY2goKGltcG9ydGVkKSA9PiB7XG4gICAgICAgICAgaWYgKG5ld2xpbmVzQmV0d2VlbkltcG9ydHMgIT09ICdpZ25vcmUnKSB7XG4gICAgICAgICAgICBtYWtlTmV3bGluZXNCZXR3ZWVuUmVwb3J0KGNvbnRleHQsIGltcG9ydGVkLCBuZXdsaW5lc0JldHdlZW5JbXBvcnRzLCBkaXN0aW5jdEdyb3VwKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoYWxwaGFiZXRpemUub3JkZXIgIT09ICdpZ25vcmUnKSB7XG4gICAgICAgICAgICBtdXRhdGVSYW5rc1RvQWxwaGFiZXRpemUoaW1wb3J0ZWQsIGFscGhhYmV0aXplKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBtYWtlT3V0T2ZPcmRlclJlcG9ydChjb250ZXh0LCBpbXBvcnRlZCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGltcG9ydE1hcC5jbGVhcigpO1xuICAgICAgfSxcbiAgICB9O1xuICB9LFxufTtcbiJdfQ== \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js b/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js index 81bacf1aa..8dacb1ee4 100644 --- a/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js +++ b/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js @@ -2,13 +2,28 @@ var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} +var SINGLE_EXPORT_ERROR_MESSAGE = 'Prefer default export on a file with single export.'; +var ANY_EXPORT_ERROR_MESSAGE = 'Prefer default export to be present on every file that has export.'; + module.exports = { meta: { type: 'suggestion', docs: { + category: 'Style guide', + description: 'Prefer a default export if module exports a single name or multiple names.', url: (0, _docsUrl2['default'])('prefer-default-export') }, - schema: [] }, + schema: [{ + type: 'object', + properties: { + target: { + type: 'string', + 'enum': ['single', 'any'], + 'default': 'single' } }, + + + additionalProperties: false }] }, + create: function () {function create(context) { @@ -17,7 +32,8 @@ module.exports = { var hasStarExport = false; var hasTypeExport = false; var namedExportNode = null; - + // get options. by default we look into files with single export + var _ref = context.options[0] || {},_ref$target = _ref.target,target = _ref$target === undefined ? 'single' : _ref$target; function captureDeclaration(identifierOrPattern) { if (identifierOrPattern && identifierOrPattern.type === 'ObjectPattern') { // recursively capture @@ -40,7 +56,7 @@ module.exports = { }return ExportDefaultSpecifier;}(), 'ExportSpecifier': function () {function ExportSpecifier(node) { - if (node.exported.name === 'default') { + if ((node.exported.name || node.exported.value) === 'default') { hasDefaultExport = true; } else { specifierExportCount++; @@ -69,8 +85,7 @@ module.exports = { node.declaration.declarations.forEach(function (declaration) { captureDeclaration(declaration.id); }); - } else - { + } else { // captures 'export function foo() {}' syntax specifierExportCount++; } @@ -87,10 +102,15 @@ module.exports = { }return ExportAllDeclaration;}(), 'Program:exit': function () {function ProgramExit() { - if (specifierExportCount === 1 && !hasDefaultExport && !hasStarExport && !hasTypeExport) { - context.report(namedExportNode, 'Prefer default export.'); + if (hasDefaultExport || hasStarExport || hasTypeExport) { + return; + } + if (target === 'single' && specifierExportCount === 1) { + context.report(namedExportNode, SINGLE_EXPORT_ERROR_MESSAGE); + } else if (target === 'any' && specifierExportCount > 0) { + context.report(namedExportNode, ANY_EXPORT_ERROR_MESSAGE); } }return ProgramExit;}() }; }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9wcmVmZXItZGVmYXVsdC1leHBvcnQuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsInVybCIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJzcGVjaWZpZXJFeHBvcnRDb3VudCIsImhhc0RlZmF1bHRFeHBvcnQiLCJoYXNTdGFyRXhwb3J0IiwiaGFzVHlwZUV4cG9ydCIsIm5hbWVkRXhwb3J0Tm9kZSIsImNhcHR1cmVEZWNsYXJhdGlvbiIsImlkZW50aWZpZXJPclBhdHRlcm4iLCJwcm9wZXJ0aWVzIiwiZm9yRWFjaCIsInByb3BlcnR5IiwidmFsdWUiLCJlbGVtZW50cyIsIm5vZGUiLCJleHBvcnRlZCIsIm5hbWUiLCJkZWNsYXJhdGlvbiIsImRlY2xhcmF0aW9uc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tcbiAgICAgICAgICBjb250ZXh0LnJlcG9ydChuYW1lZEV4cG9ydE5vZGUsIEFOWV9FWFBPUlRfRVJST1JfTUVTU0FHRSk7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgfTtcbiAgfSxcbn07XG4iXX0= \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/lib/rules/unambiguous.js b/node_modules/eslint-plugin-import/lib/rules/unambiguous.js index b418731b2..e82aa7f36 100644 --- a/node_modules/eslint-plugin-import/lib/rules/unambiguous.js +++ b/node_modules/eslint-plugin-import/lib/rules/unambiguous.js @@ -10,6 +10,8 @@ var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_doc */module.exports = { meta: { type: 'suggestion', docs: { + category: 'Module systems', + description: 'Forbid potentially ambiguous parse goal (`script` vs. `module`).', url: (0, _docsUrl2['default'])('unambiguous') }, schema: [] }, @@ -33,4 +35,4 @@ var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_doc }return create;}() }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy91bmFtYmlndW91cy5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiLCJkb2NzIiwidXJsIiwic2NoZW1hIiwiY3JlYXRlIiwiY29udGV4dCIsInBhcnNlck9wdGlvbnMiLCJzb3VyY2VUeXBlIiwiUHJvZ3JhbSIsImFzdCIsInJlcG9ydCIsIm5vZGUiLCJtZXNzYWdlIl0sIm1hcHBpbmdzIjoiOzs7OztBQUtBO0FBQ0EscUMsaUpBTkE7Ozt5TEFRQUEsT0FBT0MsT0FBUCxHQUFpQixFQUNmQyxNQUFNO0FBQ0pDLFVBQU0sWUFERjtBQUVKQyxVQUFNO0FBQ0pDLFdBQUssMEJBQVEsYUFBUixDQURELEVBRkY7O0FBS0pDLFlBQVEsRUFMSixFQURTOzs7QUF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ge1xuICAgICAgcmV0dXJuIHt9O1xuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBQcm9ncmFtOiBmdW5jdGlvbiAoYXN0KSB7XG4gICAgICAgIGlmICghaXNNb2R1bGUoYXN0KSkge1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgIG5vZGU6IGFzdCxcbiAgICAgICAgICAgIG1lc3NhZ2U6ICdUaGlzIG1vZHVsZSBjb3VsZCBiZSBwYXJzZWQgYXMgYSB2YWxpZCBzY3JpcHQuJyxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICB9O1xuXG4gIH0sXG59O1xuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy91bmFtYmlndW91cy5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsInR5cGUiLCJkb2NzIiwiY2F0ZWdvcnkiLCJkZXNjcmlwdGlvbiIsInVybCIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJwYXJzZXJPcHRpb25zIiwic291cmNlVHlwZSIsIlByb2dyYW0iLCJhc3QiLCJyZXBvcnQiLCJub2RlIiwibWVzc2FnZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFLQTtBQUNBLHFDLGlKQU5BOzs7eUxBUUFBLE9BQU9DLE9BQVAsR0FBaUIsRUFDZkMsTUFBTTtBQUNKQyxVQUFNLFlBREY7QUFFSkMsVUFBTTtBQUNKQyxnQkFBVSxnQkFETjtBQUVKQyxtQkFBYSxrRUFGVDtBQUdKQyxXQUFLLDBCQUFRLGFBQVIsQ0FIRCxFQUZGOztBQU9KQyxZQUFRLEVBUEosRUFEUzs7O0FBV2ZDLFFBWGUsK0JBV1JDLE9BWFEsRUFXQztBQUNkO0FBQ0EsVUFBSUEsUUFBUUMsYUFBUixD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iAoY29udGV4dC5wYXJzZXJPcHRpb25zLnNvdXJjZVR5cGUgIT09ICdtb2R1bGUnKSB7XG4gICAgICByZXR1cm4ge307XG4gICAgfVxuXG4gICAgcmV0dXJuIHtcbiAgICAgIFByb2dyYW0oYXN0KSB7XG4gICAgICAgIGlmICghaXNNb2R1bGUoYXN0KSkge1xuICAgICAgICAgIGNvbnRleHQucmVwb3J0KHtcbiAgICAgICAgICAgIG5vZGU6IGFzdCxcbiAgICAgICAgICAgIG1lc3NhZ2U6ICdUaGlzIG1vZHVsZSBjb3VsZCBiZSBwYXJzZWQgYXMgYSB2YWxpZCBzY3JpcHQuJyxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICB9O1xuXG4gIH0sXG59O1xuIl19 \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/node_modules/.bin/semver b/node_modules/eslint-plugin-import/node_modules/.bin/semver new file mode 120000 index 000000000..5aaadf42c --- /dev/null +++ b/node_modules/eslint-plugin-import/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/eslint-plugin-import/node_modules/debug/.coveralls.yml b/node_modules/eslint-plugin-import/node_modules/debug/.coveralls.yml deleted file mode 100644 index 20a706858..000000000 --- a/node_modules/eslint-plugin-import/node_modules/debug/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/node_modules/eslint-plugin-import/node_modules/debug/.eslintrc b/node_modules/eslint-plugin-import/node_modules/debug/.eslintrc deleted file mode 100644 index 8a37ae2c2..000000000 --- a/node_modules/eslint-plugin-import/node_modules/debug/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "env": { - "browser": true, - "node": true - }, - "rules": { - "no-console": 0, - "no-empty": [1, { "allowEmptyCatch": true }] - }, - "extends": "eslint:recommended" -} diff --git a/node_modules/eslint-plugin-import/node_modules/debug/.npmignore b/node_modules/eslint-plugin-import/node_modules/debug/.npmignore deleted file mode 100644 index 5f60eecc8..000000000 --- a/node_modules/eslint-plugin-import/node_modules/debug/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -support -test -examples -example -*.sock -dist -yarn.lock -coverage -bower.json diff --git a/node_modules/eslint-plugin-import/node_modules/debug/.travis.yml b/node_modules/eslint-plugin-import/node_modules/debug/.travis.yml deleted file mode 100644 index 6c6090c3b..000000000 --- a/node_modules/eslint-plugin-import/node_modules/debug/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ - -language: node_js -node_js: - - "6" - - "5" - - "4" - -install: - - make node_modules - -script: - - make lint - - make test - - make coveralls diff --git a/node_modules/eslint-plugin-import/node_modules/debug/CHANGELOG.md b/node_modules/eslint-plugin-import/node_modules/debug/CHANGELOG.md index eadaa1895..820d21e33 100644 --- a/node_modules/eslint-plugin-import/node_modules/debug/CHANGELOG.md +++ b/node_modules/eslint-plugin-import/node_modules/debug/CHANGELOG.md @@ -1,4 +1,37 @@ +3.1.0 / 2017-09-26 +================== + + * Add `DEBUG_HIDE_DATE` env var (#486) + * Remove ReDoS regexp in %o formatter (#504) + * Remove "component" from package.json + * Remove `component.json` + * Ignore package-lock.json + * Examples: fix colors printout + * Fix: browser detection + * Fix: spelling mistake (#496, @EdwardBetts) + +3.0.1 / 2017-08-24 +================== + + * Fix: Disable colors in Edge and Internet Explorer (#489) + +3.0.0 / 2017-08-08 +================== + + * Breaking: Remove DEBUG_FD (#406) + * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418) + * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408) + * Addition: document `enabled` flag (#465) + * Addition: add 256 colors mode (#481) + * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440) + * Update: component: update "ms" to v2.0.0 + * Update: separate the Node and Browser tests in Travis-CI + * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots + * Update: separate Node.js and web browser examples for organization + * Update: update "browserify" to v14.4.0 + * Fix: fix Readme typo (#473) + 2.6.9 / 2017-09-22 ================== @@ -27,7 +60,7 @@ 2.6.4 / 2017-04-20 ================== - * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) + * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) * Chore: ignore bower.json in npm installations. (#437, @joaovieira) * Misc: update "ms" to v0.7.3 (@tootallnate) diff --git a/node_modules/eslint-plugin-import/node_modules/debug/Makefile b/node_modules/eslint-plugin-import/node_modules/debug/Makefile deleted file mode 100644 index 584da8bf9..000000000 --- a/node_modules/eslint-plugin-import/node_modules/debug/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 -THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) - -# BIN directory -BIN := $(THIS_DIR)/node_modules/.bin - -# Path -PATH := node_modules/.bin:$(PATH) -SHELL := /bin/bash - -# applications -NODE ?= $(shell which node) -YARN ?= $(shell which yarn) -PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) -BROWSERIFY ?= $(NODE) $(BIN)/browserify - -.FORCE: - -install: node_modules - -node_modules: package.json - @NODE_ENV= $(PKG) install - @touch node_modules - -lint: .FORCE - eslint browser.js debug.js index.js node.js - -test-node: .FORCE - istanbul cover node_modules/mocha/bin/_mocha -- test/**.js - -test-browser: .FORCE - mkdir -p dist - - @$(BROWSERIFY) \ - --standalone debug \ - . > dist/debug.js - - karma start --single-run - rimraf dist - -test: .FORCE - concurrently \ - "make test-node" \ - "make test-browser" - -coveralls: - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js - -.PHONY: all install clean distclean diff --git a/node_modules/eslint-plugin-import/node_modules/debug/README.md b/node_modules/eslint-plugin-import/node_modules/debug/README.md index f67be6b31..0ee7634dd 100644 --- a/node_modules/eslint-plugin-import/node_modules/debug/README.md +++ b/node_modules/eslint-plugin-import/node_modules/debug/README.md @@ -1,12 +1,11 @@ # debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + - -A tiny node.js debugging utility modelled after node core's debugging technique. - -**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** +A tiny JavaScript debugging utility modelled after Node.js core's debugging +technique. Works in Node.js and web browsers. ## Installation @@ -18,7 +17,7 @@ $ npm install debug `debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. -Example _app.js_: +Example [_app.js_](./examples/node/app.js): ```js var debug = require('debug')('http') @@ -27,7 +26,7 @@ var debug = require('debug')('http') // fake app -debug('booting %s', name); +debug('booting %o', name); http.createServer(function(req, res){ debug(req.method + ' ' + req.url); @@ -41,81 +40,148 @@ http.createServer(function(req, res){ require('./worker'); ``` -Example _worker.js_: +Example [_worker.js_](./examples/node/worker.js): ```js -var debug = require('debug')('worker'); +var a = require('debug')('worker:a') + , b = require('debug')('worker:b'); -setInterval(function(){ - debug('doing some work'); -}, 1000); +function work() { + a('doing lots of uninteresting work'); + setTimeout(work, Math.random() * 1000); +} + +work(); + +function workb() { + b('doing some work'); + setTimeout(workb, Math.random() * 2000); +} + +workb(); ``` - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: +The `DEBUG` environment variable is then used to enable these based on space or +comma-delimited names. + +Here are some examples: - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) +screen shot 2017-08-08 at 12 53 04 pm +screen shot 2017-08-08 at 12 53 38 pm +screen shot 2017-08-08 at 12 53 25 pm - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) +#### Windows command prompt notes -#### Windows note +##### CMD - On Windows the environment variable is set using the `set` command. +On Windows the environment variable is set using the `set` command. - ```cmd - set DEBUG=*,-not_this - ``` +```cmd +set DEBUG=*,-not_this +``` - Note that PowerShell uses different syntax to set environment variables. +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "*,-not_this" +``` - ```cmd - $env:DEBUG = "*,-not_this" - ``` +Example: + +```cmd +$env:DEBUG='app';node app.js +``` Then, run the program to be debugged as usual. +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + +## Namespace Colors + +Every debug instance has a color generated for it based on its namespace name. +This helps when visually parsing the debug output to identify which debug instance +a debug line belongs to. + +#### Node.js + +In Node.js, colors are enabled when stderr is a TTY. You also _should_ install +the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, +otherwise debug will only use a small handful of basic colors. + + + +#### Web Browser + +Colors are also enabled on "Web Inspectors" that understand the `%c` formatting +option. These are WebKit web inspectors, Firefox ([since version +31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) +and the Firebug plugin for Firefox (any version). + + + + ## Millisecond diff - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. +When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) +When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: + - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) ## Conventions - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". +If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. ## Wildcards - The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. +The `*` character may be used as a wildcard. Suppose for example your library has +debuggers named "connect:bodyParser", "connect:compress", "connect:session", +instead of listing all three with +`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do +`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". +You can also exclude specific debuggers by prefixing them with a "-" character. +For example, `DEBUG=*,-connect:*` would include all debuggers except those +starting with "connect:". ## Environment Variables - When running through Node.js, you can set a few environment variables that will - change the behavior of the debug logging: +When running through Node.js, you can set a few environment variables that will +change the behavior of the debug logging: | Name | Purpose | |-----------|-------------------------------------------------| | `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | | `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_DEPTH` | Object inspection depth. | | `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - __Note:__ The environment variables beginning with `DEBUG_` end up being - converted into an Options object that gets used with `%o`/`%O` formatters. - See the Node.js documentation for - [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) - for the complete list. +__Note:__ The environment variables beginning with `DEBUG_` end up being +converted into an Options object that gets used with `%o`/`%O` formatters. +See the Node.js documentation for +[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) +for the complete list. ## Formatters - - Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: +Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. +Below are the officially supported formatters: | Formatter | Representation | |-----------|----------------| @@ -126,9 +192,12 @@ Then, run the program to be debugged as usual. | `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | | `%%` | Single percent sign ('%'). This does not consume an argument. | + ### Custom formatters - You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: +You can add custom formatters by extending the `debug.formatters` object. +For example, if you wanted to add support for rendering a Buffer as hex with +`%h`, you could do something like: ```js const createDebug = require('debug') @@ -142,14 +211,16 @@ debug('this is hex: %h', new Buffer('hello world')) // foo this is hex: 68656c6c6f20776f726c6421 +0ms ``` -## Browser support - You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), - or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), - if you don't want to build it yourself. - Debug's enable state is currently persisted by `localStorage`. - Consider the situation shown below where you have `worker:a` and `worker:b`, - and wish to debug both. You can enable this using `localStorage.debug`: +## Browser Support + +You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), +or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), +if you don't want to build it yourself. + +Debug's enable state is currently persisted by `localStorage`. +Consider the situation shown below where you have `worker:a` and `worker:b`, +and wish to debug both. You can enable this using `localStorage.debug`: ```js localStorage.debug = 'worker:*' @@ -170,23 +241,12 @@ setInterval(function(){ }, 1200); ``` -#### Web Inspector Colors - - Colors are also enabled on "Web Inspectors" that understand the `%c` formatting - option. These are WebKit web inspectors, Firefox ([since version - 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) - and the Firebug plugin for Firefox (any version). - - Colored output looks something like: - - ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) - ## Output streams By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: -Example _stdout.js_: +Example [_stdout.js_](./examples/node/stdout.js): ```js var debug = require('debug'); @@ -208,13 +268,78 @@ error('now goes to stdout via console.info'); log('still goes to stdout, but via console.info now'); ``` +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +## Checking whether a debug target is enabled + +After you've created a debug instance, you can determine whether or not it is +enabled by checking the `enabled` property: + +```javascript +const debug = require('debug')('http'); + +if (debug.enabled) { + // do stuff... +} +``` + +You can also manually toggle this property to force the debug instance to be +enabled or disabled. + ## Authors - TJ Holowaychuk - Nathan Rajlich - Andrew Rhyne - + ## Backers Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] @@ -290,7 +415,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s (The MIT License) -Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> +Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/node_modules/eslint-plugin-import/node_modules/debug/component.json b/node_modules/eslint-plugin-import/node_modules/debug/component.json deleted file mode 100644 index 9de26410f..000000000 --- a/node_modules/eslint-plugin-import/node_modules/debug/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "debug", - "repo": "visionmedia/debug", - "description": "small debugging utility", - "version": "2.6.9", - "keywords": [ - "debug", - "log", - "debugger" - ], - "main": "src/browser.js", - "scripts": [ - "src/browser.js", - "src/debug.js" - ], - "dependencies": { - "rauchg/ms.js": "0.7.1" - } -} diff --git a/node_modules/eslint-plugin-import/node_modules/debug/karma.conf.js b/node_modules/eslint-plugin-import/node_modules/debug/karma.conf.js deleted file mode 100644 index 103a82d15..000000000 --- a/node_modules/eslint-plugin-import/node_modules/debug/karma.conf.js +++ /dev/null @@ -1,70 +0,0 @@ -// Karma configuration -// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) - -module.exports = function(config) { - config.set({ - - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '', - - - // frameworks to use - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['mocha', 'chai', 'sinon'], - - - // list of files / patterns to load in the browser - files: [ - 'dist/debug.js', - 'test/*spec.js' - ], - - - // list of files to exclude - exclude: [ - 'src/node.js' - ], - - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - }, - - // test results reporter to use - // possible values: 'dots', 'progress' - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], - - - // web server port - port: 9876, - - - // enable / disable colors in the output (reporters and logs) - colors: true, - - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - - - // start these browsers - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['PhantomJS'], - - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: false, - - // Concurrency level - // how many browser should be started simultaneous - concurrency: Infinity - }) -} diff --git a/node_modules/eslint-plugin-import/node_modules/debug/package.json b/node_modules/eslint-plugin-import/node_modules/debug/package.json index dc787ba76..191c81547 100644 --- a/node_modules/eslint-plugin-import/node_modules/debug/package.json +++ b/node_modules/eslint-plugin-import/node_modules/debug/package.json @@ -1,6 +1,6 @@ { "name": "debug", - "version": "2.6.9", + "version": "3.2.7", "repository": { "type": "git", "url": "git://github.com/visionmedia/debug.git" @@ -11,6 +11,13 @@ "log", "debugger" ], + "files": [ + "src", + "node.js", + "dist/debug.js", + "LICENSE", + "README.md" + ], "author": "TJ Holowaychuk ", "contributors": [ "Nathan Rajlich (http://n8.io)", @@ -18,32 +25,27 @@ ], "license": "MIT", "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.1" }, "devDependencies": { - "browserify": "9.0.3", + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "browserify": "14.4.0", "chai": "^3.5.0", "concurrently": "^3.1.0", - "coveralls": "^2.11.15", - "eslint": "^3.12.1", + "coveralls": "^3.0.2", "istanbul": "^0.4.5", - "karma": "^1.3.0", + "karma": "^3.0.0", "karma-chai": "^0.1.0", "karma-mocha": "^1.3.0", "karma-phantomjs-launcher": "^1.0.2", - "karma-sinon": "^1.0.5", - "mocha": "^3.2.0", + "mocha": "^5.2.0", "mocha-lcov-reporter": "^1.2.0", "rimraf": "^2.5.4", - "sinon": "^1.17.6", - "sinon-chai": "^2.8.0" + "xo": "^0.23.0" }, "main": "./src/index.js", "browser": "./src/browser.js", - "component": { - "scripts": { - "debug/index.js": "browser.js", - "debug/debug.js": "debug.js" - } - } + "unpkg": "./dist/debug.js" } diff --git a/node_modules/eslint-plugin-import/node_modules/debug/src/browser.js b/node_modules/eslint-plugin-import/node_modules/debug/src/browser.js index 710692493..c924b0ac4 100644 --- a/node_modules/eslint-plugin-import/node_modules/debug/src/browser.js +++ b/node_modules/eslint-plugin-import/node_modules/debug/src/browser.js @@ -1,33 +1,23 @@ +"use strict"; + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +/* eslint-env browser */ + /** * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. */ - -exports = module.exports = require('./debug'); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; -exports.storage = 'undefined' != typeof chrome - && 'undefined' != typeof chrome.storage - ? chrome.storage.local - : localstorage(); - +exports.storage = localstorage(); /** * Colors. */ -exports.colors = [ - 'lightseagreen', - 'forestgreen', - 'goldenrod', - 'dodgerblue', - 'darkorchid', - 'crimson' -]; - +exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; /** * Currently only WebKit-based Web Inspectors, Firefox >= v31, * and the Firebug extension (any Firefox version) are known @@ -35,79 +25,65 @@ exports.colors = [ * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ +// eslint-disable-next-line complexity function useColors() { // NB: In an Electron preload script, document will be defined but not fully // initialized. Since we know we're in Chrome, we'll just detect this case // explicitly - if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { return true; - } + } // Internet Explorer and Edge do not support colors. - // is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (err) { - return '[UnexpectedJSONParseError]: ' + err.message; - } -}; + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); +} /** * Colorize log arguments if enabled. * * @api public */ -function formatArgs(args) { - var useColors = this.useColors; - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); - if (!useColors) return; + if (!this.useColors) { + return; + } var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit') - - // the final "%c" is somewhat tricky, because there could be other + args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into + var index = 0; var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function(match) { - if ('%%' === match) return; + args[0].replace(/%[a-zA-Z%]/g, function (match) { + if (match === '%%') { + return; + } + index++; - if ('%c' === match) { - // we only are interested in the *last* %c + + if (match === '%c') { + // We only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); - args.splice(lastC, 0, c); } - /** * Invokes `console.log()` when available. * No-op when `console.log` is not a "function". @@ -115,14 +91,14 @@ function formatArgs(args) { * @api public */ + function log() { - // this hackery is required for IE8/9, where + var _console; + + // This hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' - return 'object' === typeof console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); + return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); } - /** * Save `namespaces`. * @@ -130,16 +106,18 @@ function log() { * @api private */ + function save(namespaces) { try { - if (null == namespaces) { - exports.storage.removeItem('debug'); + if (namespaces) { + exports.storage.setItem('debug', namespaces); } else { - exports.storage.debug = namespaces; + exports.storage.removeItem('debug'); } - } catch(e) {} + } catch (error) {// Swallow + // XXX (@Qix-) should we be logging these? + } } - /** * Load `namespaces`. * @@ -147,26 +125,23 @@ function save(namespaces) { * @api private */ + function load() { var r; - try { - r = exports.storage.debug; - } catch(e) {} + try { + r = exports.storage.getItem('debug'); + } catch (error) {} // Swallow + // XXX (@Qix-) should we be logging these? // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + + if (!r && typeof process !== 'undefined' && 'env' in process) { r = process.env.DEBUG; } return r; } - -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); - /** * Localstorage attempts to return the localstorage. * @@ -178,8 +153,28 @@ exports.enable(load()); * @api private */ + function localstorage() { try { - return window.localStorage; - } catch (e) {} + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) {// Swallow + // XXX (@Qix-) should we be logging these? + } } + +module.exports = require('./common')(exports); +var formatters = module.exports.formatters; +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; + diff --git a/node_modules/eslint-plugin-import/node_modules/debug/src/common.js b/node_modules/eslint-plugin-import/node_modules/debug/src/common.js new file mode 100644 index 000000000..e0de3fb53 --- /dev/null +++ b/node_modules/eslint-plugin-import/node_modules/debug/src/common.js @@ -0,0 +1,249 @@ +"use strict"; + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + Object.keys(env).forEach(function (key) { + createDebug[key] = env[key]; + }); + /** + * Active `debug` instances. + */ + + createDebug.instances = []; + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + + createDebug.formatters = {}; + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + + function selectColor(namespace) { + var hash = 0; + + for (var i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + + createDebug.selectColor = selectColor; + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + + function createDebug(namespace) { + var prevTime; + + function debug() { + // Disabled? + if (!debug.enabled) { + return; + } + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var self = debug; // Set `diff` timestamp + + var curr = Number(new Date()); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } // Apply any `formatters` transformations + + + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return match; + } + + index++; + var formatter = createDebug.formatters[format]; + + if (typeof formatter === 'function') { + var val = args[index]; + match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` + + args.splice(index, 1); + index--; + } + + return match; + }); // Apply env-specific formatting (colors, etc.) + + createDebug.formatArgs.call(self, args); + var logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; // Debug.formatArgs = formatArgs; + // debug.rawLog = rawLog; + // env-specific initialization logic for debug instances + + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + createDebug.instances.push(debug); + return debug; + } + + function destroy() { + var index = createDebug.instances.indexOf(this); + + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + + return false; + } + + function extend(namespace, delimiter) { + return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + } + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + + + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.names = []; + createDebug.skips = []; + var i; + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + + for (i = 0; i < createDebug.instances.length; i++) { + var instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + /** + * Disable debug output. + * + * @api public + */ + + + function disable() { + createDebug.enable(''); + } + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + + + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + var i; + var len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + + + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + + return val; + } + + createDebug.enable(createDebug.load()); + return createDebug; +} + +module.exports = setup; + diff --git a/node_modules/eslint-plugin-import/node_modules/debug/src/debug.js b/node_modules/eslint-plugin-import/node_modules/debug/src/debug.js deleted file mode 100644 index 6a5e3fc94..000000000 --- a/node_modules/eslint-plugin-import/node_modules/debug/src/debug.js +++ /dev/null @@ -1,202 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = require('ms'); - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - -exports.formatters = {}; - -/** - * Previous log timestamp. - */ - -var prevTime; - -/** - * Select a color. - * @param {String} namespace - * @return {Number} - * @api private - */ - -function selectColor(namespace) { - var hash = 0, i; - - for (i in namespace) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return exports.colors[Math.abs(hash) % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function createDebug(namespace) { - - function debug() { - // disabled? - if (!debug.enabled) return; - - var self = debug; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // turn the `arguments` into a proper Array - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %O - args.unshift('%O'); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // apply env-specific formatting (colors, etc.) - exports.formatArgs.call(self, args); - - var logFn = debug.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = exports.enabled(namespace); - debug.useColors = exports.useColors(); - debug.color = selectColor(namespace); - - // env-specific initialization logic for debug instances - if ('function' === typeof exports.init) { - exports.init(debug); - } - - return debug; -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - exports.names = []; - exports.skips = []; - - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (var i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/node_modules/eslint-plugin-import/node_modules/debug/src/index.js b/node_modules/eslint-plugin-import/node_modules/debug/src/index.js index e12cf4d58..021731593 100644 --- a/node_modules/eslint-plugin-import/node_modules/debug/src/index.js +++ b/node_modules/eslint-plugin-import/node_modules/debug/src/index.js @@ -1,10 +1,12 @@ +"use strict"; + /** - * Detect Electron renderer process, which is node, but we should + * Detect Electron renderer / nwjs process, which is node, but we should * treat as a browser. */ - -if (typeof process !== 'undefined' && process.type === 'renderer') { +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { module.exports = require('./browser.js'); } else { module.exports = require('./node.js'); } + diff --git a/node_modules/eslint-plugin-import/node_modules/debug/src/inspector-log.js b/node_modules/eslint-plugin-import/node_modules/debug/src/inspector-log.js deleted file mode 100644 index 60ea6c04a..000000000 --- a/node_modules/eslint-plugin-import/node_modules/debug/src/inspector-log.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = inspectorLog; - -// black hole -const nullStream = new (require('stream').Writable)(); -nullStream._write = () => {}; - -/** - * Outputs a `console.log()` to the Node.js Inspector console *only*. - */ -function inspectorLog() { - const stdout = console._stdout; - console._stdout = nullStream; - console.log.apply(console, arguments); - console._stdout = stdout; -} diff --git a/node_modules/eslint-plugin-import/node_modules/debug/src/node.js b/node_modules/eslint-plugin-import/node_modules/debug/src/node.js index b15109c90..1e6a5f16a 100644 --- a/node_modules/eslint-plugin-import/node_modules/debug/src/node.js +++ b/node_modules/eslint-plugin-import/node_modules/debug/src/node.js @@ -1,134 +1,112 @@ +"use strict"; + /** * Module dependencies. */ - var tty = require('tty'); -var util = require('util'); +var util = require('util'); /** * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. */ -exports = module.exports = require('./debug'); + exports.init = init; exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; - /** * Colors. */ exports.colors = [6, 2, 3, 4, 5, 1]; +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + var supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221]; + } +} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be. + /** * Build up the default `inspectOpts` object from the environment variables. * * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ + exports.inspectOpts = Object.keys(process.env).filter(function (key) { return /^debug_/i.test(key); }).reduce(function (obj, key) { - // camel-case - var prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); + // Camel-case + var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) { + return k.toUpperCase(); + }); // Coerce string value into JS value - // coerce string value into JS value var val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) val = true; - else if (/^(no|off|false|disabled)$/i.test(val)) val = false; - else if (val === 'null') val = null; - else val = Number(val); + + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } obj[prop] = val; return obj; }, {}); - -/** - * The file descriptor to write the `debug()` calls to. - * Set the `DEBUG_FD` env variable to override with another value. i.e.: - * - * $ DEBUG_FD=3 node script.js 3>debug.log - */ - -var fd = parseInt(process.env.DEBUG_FD, 10) || 2; - -if (1 !== fd && 2 !== fd) { - util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() -} - -var stream = 1 === fd ? process.stdout : - 2 === fd ? process.stderr : - createWritableStdioStream(fd); - /** * Is stdout a TTY? Colored output is enabled when `true`. */ function useColors() { - return 'colors' in exports.inspectOpts - ? Boolean(exports.inspectOpts.colors) - : tty.isatty(fd); + return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); } - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -exports.formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n').map(function(str) { - return str.trim() - }).join(' '); -}; - -/** - * Map %o to `util.inspect()`, allowing multiple lines if needed. - */ - -exports.formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - /** * Adds ANSI color escape codes if enabled. * * @api public */ + function formatArgs(args) { - var name = this.namespace; - var useColors = this.useColors; + var name = this.namespace, + useColors = this.useColors; if (useColors) { var c = this.color; - var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; - + var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c); + var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m"); args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m"); } else { - args[0] = new Date().toUTCString() - + ' ' + name + ' ' + args[0]; + args[0] = getDate() + name + ' ' + args[0]; } } +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + + return new Date().toISOString() + ' '; +} /** - * Invokes `util.format()` with the specified arguments and writes to `stream`. + * Invokes `util.format()` with the specified arguments and writes to stderr. */ + function log() { - return stream.write(util.format.apply(util, arguments) + '\n'); + return process.stderr.write(util.format.apply(util, arguments) + '\n'); } - /** * Save `namespaces`. * @@ -136,16 +114,16 @@ function log() { * @api private */ + function save(namespaces) { - if (null == namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { // If you set a process.env field to null or undefined, it gets cast to the // string 'null' or 'undefined'. Just delete instead. delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; } } - /** * Load `namespaces`. * @@ -153,78 +131,10 @@ function save(namespaces) { * @api private */ + function load() { return process.env.DEBUG; } - -/** - * Copied from `node/src/node.js`. - * - * XXX: It's lame that node doesn't expose this API out-of-the-box. It also - * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. - */ - -function createWritableStdioStream (fd) { - var stream; - var tty_wrap = process.binding('tty_wrap'); - - // Note stream._type is used for test-module-load-list.js - - switch (tty_wrap.guessHandleType(fd)) { - case 'TTY': - stream = new tty.WriteStream(fd); - stream._type = 'tty'; - - // Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - case 'FILE': - var fs = require('fs'); - stream = new fs.SyncWriteStream(fd, { autoClose: false }); - stream._type = 'fs'; - break; - - case 'PIPE': - case 'TCP': - var net = require('net'); - stream = new net.Socket({ - fd: fd, - readable: false, - writable: true - }); - - // FIXME Should probably have an option in net.Socket to create a - // stream from an existing fd which is writable only. But for now - // we'll just add this hack and set the `readable` member to false. - // Test: ./node test/fixtures/echo.js < /etc/passwd - stream.readable = false; - stream.read = null; - stream._type = 'pipe'; - - // FIXME Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - default: - // Probably an error on in uv_guess_handle() - throw new Error('Implement me. Unknown stream file type!'); - } - - // For supporting legacy API we put the FD here. - stream.fd = fd; - - stream._isStdio = true; - - return stream; -} - /** * Init logic for `debug` instances. * @@ -232,17 +142,36 @@ function createWritableStdioStream (fd) { * differently for a particular `debug` instance. */ -function init (debug) { - debug.inspectOpts = {}; +function init(debug) { + debug.inspectOpts = {}; var keys = Object.keys(exports.inspectOpts); + for (var i = 0; i < keys.length; i++) { debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; } } +module.exports = require('./common')(exports); +var formatters = module.exports.formatters; /** - * Enable namespaces listed in `process.env.DEBUG` initially. + * Map %o to `util.inspect()`, all on a single line. */ -exports.enable(load()); +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(function (str) { return str.trim(); }) + .join(' '); +}; +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + diff --git a/node_modules/eslint-plugin-import/node_modules/find-up/index.js b/node_modules/eslint-plugin-import/node_modules/find-up/index.js deleted file mode 100644 index 939c9553d..000000000 --- a/node_modules/eslint-plugin-import/node_modules/find-up/index.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; -const path = require('path'); -const locatePath = require('locate-path'); - -module.exports = (filename, opts) => { - opts = opts || {}; - - const startDir = path.resolve(opts.cwd || ''); - const root = path.parse(startDir).root; - - const filenames = [].concat(filename); - - return new Promise(resolve => { - (function find(dir) { - locatePath(filenames, {cwd: dir}).then(file => { - if (file) { - resolve(path.join(dir, file)); - } else if (dir === root) { - resolve(null); - } else { - find(path.dirname(dir)); - } - }); - })(startDir); - }); -}; - -module.exports.sync = (filename, opts) => { - opts = opts || {}; - - let dir = path.resolve(opts.cwd || ''); - const root = path.parse(dir).root; - - const filenames = [].concat(filename); - - // eslint-disable-next-line no-constant-condition - while (true) { - const file = locatePath.sync(filenames, {cwd: dir}); - - if (file) { - return path.join(dir, file); - } else if (dir === root) { - return null; - } - - dir = path.dirname(dir); - } -}; diff --git a/node_modules/eslint-plugin-import/node_modules/find-up/license b/node_modules/eslint-plugin-import/node_modules/find-up/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/eslint-plugin-import/node_modules/find-up/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/eslint-plugin-import/node_modules/find-up/package.json b/node_modules/eslint-plugin-import/node_modules/find-up/package.json deleted file mode 100644 index 7ec85bb79..000000000 --- a/node_modules/eslint-plugin-import/node_modules/find-up/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "find-up", - "version": "2.1.0", - "description": "Find a file by walking up parent directories", - "license": "MIT", - "repository": "sindresorhus/find-up", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "find", - "up", - "find-up", - "findup", - "look-up", - "look", - "file", - "search", - "match", - "package", - "resolve", - "parent", - "parents", - "folder", - "directory", - "dir", - "walk", - "walking", - "path" - ], - "dependencies": { - "locate-path": "^2.0.0" - }, - "devDependencies": { - "ava": "*", - "tempfile": "^1.1.1", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/eslint-plugin-import/node_modules/find-up/readme.md b/node_modules/eslint-plugin-import/node_modules/find-up/readme.md deleted file mode 100644 index b5ad69455..000000000 --- a/node_modules/eslint-plugin-import/node_modules/find-up/readme.md +++ /dev/null @@ -1,85 +0,0 @@ -# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master) - -> Find a file by walking up parent directories - - -## Install - -``` -$ npm install --save find-up -``` - - -## Usage - -``` -/ -└── Users - └── sindresorhus - ├── unicorn.png - └── foo - └── bar - ├── baz - └── example.js -``` - -```js -// example.js -const findUp = require('find-up'); - -findUp('unicorn.png').then(filepath => { - console.log(filepath); - //=> '/Users/sindresorhus/unicorn.png' -}); - -findUp(['rainbow.png', 'unicorn.png']).then(filepath => { - console.log(filepath); - //=> '/Users/sindresorhus/unicorn.png' -}); -``` - - -## API - -### findUp(filename, [options]) - -Returns a `Promise` for the filepath or `null`. - -### findUp([filenameA, filenameB], [options]) - -Returns a `Promise` for the first filepath found (by respecting the order) or `null`. - -### findUp.sync(filename, [options]) - -Returns a filepath or `null`. - -### findUp.sync([filenameA, filenameB], [options]) - -Returns the first filepath found (by respecting the order) or `null`. - -#### filename - -Type: `string` - -Filename of the file to find. - -#### options - -##### cwd - -Type: `string`
-Default: `process.cwd()` - -Directory to start from. - - -## Related - -- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module -- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file -- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-plugin-import/node_modules/locate-path/index.js b/node_modules/eslint-plugin-import/node_modules/locate-path/index.js deleted file mode 100644 index 32b108d19..000000000 --- a/node_modules/eslint-plugin-import/node_modules/locate-path/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -const path = require('path'); -const pathExists = require('path-exists'); -const pLocate = require('p-locate'); - -module.exports = (iterable, opts) => { - opts = Object.assign({ - cwd: process.cwd() - }, opts); - - return pLocate(iterable, el => pathExists(path.resolve(opts.cwd, el)), opts); -}; - -module.exports.sync = (iterable, opts) => { - opts = Object.assign({ - cwd: process.cwd() - }, opts); - - for (const el of iterable) { - if (pathExists.sync(path.resolve(opts.cwd, el))) { - return el; - } - } -}; diff --git a/node_modules/eslint-plugin-import/node_modules/locate-path/license b/node_modules/eslint-plugin-import/node_modules/locate-path/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/eslint-plugin-import/node_modules/locate-path/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/eslint-plugin-import/node_modules/locate-path/package.json b/node_modules/eslint-plugin-import/node_modules/locate-path/package.json deleted file mode 100644 index 17bcd7ff6..000000000 --- a/node_modules/eslint-plugin-import/node_modules/locate-path/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "locate-path", - "version": "2.0.0", - "description": "Get the first path that exists on disk of multiple paths", - "license": "MIT", - "repository": "sindresorhus/locate-path", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "locate", - "path", - "paths", - "file", - "files", - "exists", - "find", - "finder", - "search", - "searcher", - "array", - "iterable", - "iterator" - ], - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/eslint-plugin-import/node_modules/locate-path/readme.md b/node_modules/eslint-plugin-import/node_modules/locate-path/readme.md deleted file mode 100644 index f7b337bb2..000000000 --- a/node_modules/eslint-plugin-import/node_modules/locate-path/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path) - -> Get the first path that exists on disk of multiple paths - - -## Install - -``` -$ npm install --save locate-path -``` - - -## Usage - -Here we find the first file that exists on disk, in array order. - -```js -const locatePath = require('locate-path'); - -const files = [ - 'unicorn.png', - 'rainbow.png', // only this one actually exists on disk - 'pony.png' -]; - -locatePath(files).then(foundPath => { - console.log(foundPath); - //=> 'rainbow' -}); -``` - - -## API - -### locatePath(input, [options]) - -Returns a `Promise` for the first path that exists or `undefined` if none exists. - -#### input - -Type: `Iterable` - -Paths to check. - -#### options - -Type: `Object` - -##### concurrency - -Type: `number`
-Default: `Infinity`
-Minimum: `1` - -Number of concurrently pending promises. - -##### preserveOrder - -Type: `boolean`
-Default: `true` - -Preserve `input` order when searching. - -Disable this to improve performance if you don't care about the order. - -##### cwd - -Type: `string`
-Default: `process.cwd()` - -Current working directory. - -### locatePath.sync(input, [options]) - -Returns the first path that exists or `undefined` if none exists. - -#### input - -Type: `Iterable` - -Paths to check. - -#### options - -Type: `Object` - -##### cwd - -Same as above. - - -## Related - -- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-plugin-import/node_modules/ms/index.js b/node_modules/eslint-plugin-import/node_modules/ms/index.js deleted file mode 100644 index 6a522b16b..000000000 --- a/node_modules/eslint-plugin-import/node_modules/ms/index.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - if (ms >= d) { - return Math.round(ms / d) + 'd'; - } - if (ms >= h) { - return Math.round(ms / h) + 'h'; - } - if (ms >= m) { - return Math.round(ms / m) + 'm'; - } - if (ms >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - return plural(ms, d, 'day') || - plural(ms, h, 'hour') || - plural(ms, m, 'minute') || - plural(ms, s, 'second') || - ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) { - return; - } - if (ms < n * 1.5) { - return Math.floor(ms / n) + ' ' + name; - } - return Math.ceil(ms / n) + ' ' + name + 's'; -} diff --git a/node_modules/eslint-plugin-import/node_modules/ms/package.json b/node_modules/eslint-plugin-import/node_modules/ms/package.json deleted file mode 100644 index 6a31c81fa..000000000 --- a/node_modules/eslint-plugin-import/node_modules/ms/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "ms", - "version": "2.0.0", - "description": "Tiny milisecond conversion utility", - "repository": "zeit/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "3.19.0", - "expect.js": "0.3.1", - "husky": "0.13.3", - "lint-staged": "3.4.1", - "mocha": "3.4.1" - } -} diff --git a/node_modules/eslint-plugin-import/node_modules/ms/readme.md b/node_modules/eslint-plugin-import/node_modules/ms/readme.md deleted file mode 100644 index 84a9974cc..000000000 --- a/node_modules/eslint-plugin-import/node_modules/ms/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# ms - -[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) -[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -``` - -### Convert from milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(ms('10 hours')) // "10h" -``` - -### Time format written-out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [node](https://nodejs.org) and in the browser. -- If a number is supplied to `ms`, a string with a unit is returned. -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). -- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. - -## Caught a bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/node_modules/eslint-plugin-import/node_modules/p-limit/index.js b/node_modules/eslint-plugin-import/node_modules/p-limit/index.js deleted file mode 100644 index 873f0e70d..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-limit/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; -const pTry = require('p-try'); - -module.exports = concurrency => { - if (concurrency < 1) { - throw new TypeError('Expected `concurrency` to be a number from 1 and up'); - } - - const queue = []; - let activeCount = 0; - - const next = () => { - activeCount--; - - if (queue.length > 0) { - queue.shift()(); - } - }; - - return fn => new Promise((resolve, reject) => { - const run = () => { - activeCount++; - - pTry(fn).then( - val => { - resolve(val); - next(); - }, - err => { - reject(err); - next(); - } - ); - }; - - if (activeCount < concurrency) { - run(); - } else { - queue.push(run); - } - }); -}; diff --git a/node_modules/eslint-plugin-import/node_modules/p-limit/license b/node_modules/eslint-plugin-import/node_modules/p-limit/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-limit/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/eslint-plugin-import/node_modules/p-limit/package.json b/node_modules/eslint-plugin-import/node_modules/p-limit/package.json deleted file mode 100644 index 90db5794d..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-limit/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "p-limit", - "version": "1.3.0", - "description": "Run multiple promise-returning & async functions with limited concurrency", - "license": "MIT", - "repository": "sindresorhus/p-limit", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "limit", - "limited", - "concurrency", - "throttle", - "throat", - "rate", - "batch", - "ratelimit", - "task", - "queue", - "async", - "await", - "promises", - "bluebird" - ], - "dependencies": { - "p-try": "^1.0.0" - }, - "devDependencies": { - "ava": "*", - "delay": "^2.0.0", - "in-range": "^1.0.0", - "random-int": "^1.0.0", - "time-span": "^2.0.0", - "xo": "*" - } -} diff --git a/node_modules/eslint-plugin-import/node_modules/p-limit/readme.md b/node_modules/eslint-plugin-import/node_modules/p-limit/readme.md deleted file mode 100644 index 90129925c..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-limit/readme.md +++ /dev/null @@ -1,69 +0,0 @@ -# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit) - -> Run multiple promise-returning & async functions with limited concurrency - - -## Install - -``` -$ npm install p-limit -``` - - -## Usage - -```js -const pLimit = require('p-limit'); - -const limit = pLimit(1); - -const input = [ - limit(() => fetchSomething('foo')), - limit(() => fetchSomething('bar')), - limit(() => doSomething()) -]; - -(async () => { - // Only one promise is run at once - const result = await Promise.all(input); - console.log(result); -})(); -``` - - -## API - -### pLimit(concurrency) - -Returns a `limit` function. - -#### concurrency - -Type: `number`
-Minimum: `1` - -Concurrency limit. - -### limit(fn) - -Returns the promise returned by calling `fn`. - -#### fn - -Type: `Function` - -Promise-returning/async function. - - -## Related - -- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control -- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions -- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions -- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-plugin-import/node_modules/p-locate/index.js b/node_modules/eslint-plugin-import/node_modules/p-locate/index.js deleted file mode 100644 index 7461d665b..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-locate/index.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; -const pLimit = require('p-limit'); - -class EndError extends Error { - constructor(value) { - super(); - this.value = value; - } -} - -// the input can also be a promise, so we `Promise.all()` them both -const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0]))); - -module.exports = (iterable, tester, opts) => { - opts = Object.assign({ - concurrency: Infinity, - preserveOrder: true - }, opts); - - const limit = pLimit(opts.concurrency); - - // start all the promises concurrently with optional limit - const items = Array.from(iterable).map(el => [el, limit(() => Promise.resolve(el).then(tester))]); - - // check the promises either serially or concurrently - const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity); - - return Promise.all(items.map(el => checkLimit(() => finder(el)))) - .then(() => {}) - .catch(err => err instanceof EndError ? err.value : Promise.reject(err)); -}; diff --git a/node_modules/eslint-plugin-import/node_modules/p-locate/license b/node_modules/eslint-plugin-import/node_modules/p-locate/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-locate/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/eslint-plugin-import/node_modules/p-locate/package.json b/node_modules/eslint-plugin-import/node_modules/p-locate/package.json deleted file mode 100644 index 767002b38..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-locate/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "p-locate", - "version": "2.0.0", - "description": "Get the first fulfilled promise that satisfies the provided testing function", - "license": "MIT", - "repository": "sindresorhus/p-locate", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "locate", - "find", - "finder", - "search", - "searcher", - "test", - "array", - "collection", - "iterable", - "iterator", - "race", - "fulfilled", - "fastest", - "async", - "await", - "promises", - "bluebird" - ], - "dependencies": { - "p-limit": "^1.1.0" - }, - "devDependencies": { - "ava": "*", - "delay": "^1.3.1", - "in-range": "^1.0.0", - "time-span": "^1.0.0", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/eslint-plugin-import/node_modules/p-locate/readme.md b/node_modules/eslint-plugin-import/node_modules/p-locate/readme.md deleted file mode 100644 index 68b96a47e..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-locate/readme.md +++ /dev/null @@ -1,86 +0,0 @@ -# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate) - -> Get the first fulfilled promise that satisfies the provided testing function - -Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find). - - -## Install - -``` -$ npm install --save p-locate -``` - - -## Usage - -Here we find the first file that exists on disk, in array order. - -```js -const pathExists = require('path-exists'); -const pLocate = require('p-locate'); - -const files = [ - 'unicorn.png', - 'rainbow.png', // only this one actually exists on disk - 'pony.png' -]; - -pLocate(files, file => pathExists(file)).then(foundPath => { - console.log(foundPath); - //=> 'rainbow' -}); -``` - -*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.* - - -## API - -### pLocate(input, tester, [options]) - -Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. - -#### input - -Type: `Iterable` - -#### tester(element) - -Type: `Function` - -Expected to return a `Promise` or boolean. - -#### options - -Type: `Object` - -##### concurrency - -Type: `number`
-Default: `Infinity`
-Minimum: `1` - -Number of concurrently pending promises returned by `tester`. - -##### preserveOrder - -Type: `boolean`
-Default: `true` - -Preserve `input` order when searching. - -Disable this to improve performance if you don't care about the order. - - -## Related - -- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently -- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently -- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-plugin-import/node_modules/p-try/index.js b/node_modules/eslint-plugin-import/node_modules/p-try/index.js deleted file mode 100644 index efa2f7433..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-try/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = cb => new Promise(resolve => { - resolve(cb()); -}); diff --git a/node_modules/eslint-plugin-import/node_modules/p-try/license b/node_modules/eslint-plugin-import/node_modules/p-try/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-try/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/eslint-plugin-import/node_modules/p-try/package.json b/node_modules/eslint-plugin-import/node_modules/p-try/package.json deleted file mode 100644 index ba2513ade..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-try/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "p-try", - "version": "1.0.0", - "description": "`Promise#try()` ponyfill - Starts a promise chain", - "license": "MIT", - "repository": "sindresorhus/p-try", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "try", - "resolve", - "function", - "catch", - "async", - "await", - "promises", - "settled", - "ponyfill", - "polyfill", - "shim", - "bluebird" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/eslint-plugin-import/node_modules/p-try/readme.md b/node_modules/eslint-plugin-import/node_modules/p-try/readme.md deleted file mode 100644 index 8e5fdddbe..000000000 --- a/node_modules/eslint-plugin-import/node_modules/p-try/readme.md +++ /dev/null @@ -1,38 +0,0 @@ -# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try) - -> [`Promise#try()`](https://github.com/ljharb/proposal-promise-try) [ponyfill](https://ponyfill.com) - Starts a promise chain - -[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/) - - -## Install - -``` -$ npm install --save p-try -``` - - -## Usage - -```js -const pTry = require('p-try'); - -pTry(() => { - return synchronousFunctionThatMightThrow(); -}).then(value => { - console.log(value); -}).catch(error => { - console.error(error); -}); -``` - - -## Related - -- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/eslint-plugin-import/node_modules/path-exists/index.js b/node_modules/eslint-plugin-import/node_modules/path-exists/index.js deleted file mode 100644 index 16ae60acb..000000000 --- a/node_modules/eslint-plugin-import/node_modules/path-exists/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; -const fs = require('fs'); - -module.exports = fp => new Promise(resolve => { - fs.access(fp, err => { - resolve(!err); - }); -}); - -module.exports.sync = fp => { - try { - fs.accessSync(fp); - return true; - } catch (err) { - return false; - } -}; diff --git a/node_modules/eslint-plugin-import/node_modules/path-exists/license b/node_modules/eslint-plugin-import/node_modules/path-exists/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/eslint-plugin-import/node_modules/path-exists/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/eslint-plugin-import/node_modules/path-exists/package.json b/node_modules/eslint-plugin-import/node_modules/path-exists/package.json deleted file mode 100644 index efd56267e..000000000 --- a/node_modules/eslint-plugin-import/node_modules/path-exists/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "path-exists", - "version": "3.0.0", - "description": "Check if a path exists", - "license": "MIT", - "repository": "sindresorhus/path-exists", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "path", - "exists", - "exist", - "file", - "filepath", - "fs", - "filesystem", - "file-system", - "access", - "stat" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/eslint-plugin-import/node_modules/path-exists/readme.md b/node_modules/eslint-plugin-import/node_modules/path-exists/readme.md deleted file mode 100644 index 1b65fa705..000000000 --- a/node_modules/eslint-plugin-import/node_modules/path-exists/readme.md +++ /dev/null @@ -1,50 +0,0 @@ -# path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists) - -> Check if a path exists - -Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it. - -Never use this before handling a file though: - -> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there. - - -## Install - -``` -$ npm install --save path-exists -``` - - -## Usage - -```js -// foo.js -const pathExists = require('path-exists'); - -pathExists('foo.js').then(exists => { - console.log(exists); - //=> true -}); -``` - - -## API - -### pathExists(path) - -Returns a promise for a boolean of whether the path exists. - -### pathExists.sync(path) - -Returns a boolean of whether the path exists. - - -## Related - -- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/normalize-package-data/node_modules/semver/CHANGELOG.md b/node_modules/eslint-plugin-import/node_modules/semver/CHANGELOG.md similarity index 51% rename from node_modules/normalize-package-data/node_modules/semver/CHANGELOG.md rename to node_modules/eslint-plugin-import/node_modules/semver/CHANGELOG.md index 66304fdd2..f567dd3fe 100644 --- a/node_modules/normalize-package-data/node_modules/semver/CHANGELOG.md +++ b/node_modules/eslint-plugin-import/node_modules/semver/CHANGELOG.md @@ -1,5 +1,36 @@ # changes log +## 6.2.0 + +* Coerce numbers to strings when passed to semver.coerce() +* Add `rtl` option to coerce from right to left + +## 6.1.3 + +* Handle X-ranges properly in includePrerelease mode + +## 6.1.2 + +* Do not throw when testing invalid version strings + +## 6.1.1 + +* Add options support for semver.coerce() +* Handle undefined version passed to Range.test + +## 6.1.0 + +* Add semver.compareBuild function +* Support `*` in semver.intersects + +## 6.0 + +* Fix `intersects` logic. + + This is technically a bug fix, but since it is also a change to behavior + that may require users updating their code, it is marked as a major + version increment. + ## 5.7 * Add `minVersion` method diff --git a/node_modules/normalize-package-data/node_modules/semver/LICENSE b/node_modules/eslint-plugin-import/node_modules/semver/LICENSE similarity index 100% rename from node_modules/normalize-package-data/node_modules/semver/LICENSE rename to node_modules/eslint-plugin-import/node_modules/semver/LICENSE diff --git a/node_modules/normalize-package-data/node_modules/semver/README.md b/node_modules/eslint-plugin-import/node_modules/semver/README.md similarity index 91% rename from node_modules/normalize-package-data/node_modules/semver/README.md rename to node_modules/eslint-plugin-import/node_modules/semver/README.md index f8dfa5a0d..2293a14fd 100644 --- a/node_modules/normalize-package-data/node_modules/semver/README.md +++ b/node_modules/eslint-plugin-import/node_modules/semver/README.md @@ -4,7 +4,7 @@ semver(1) -- The semantic versioner for npm ## Install ```bash -npm install --save semver +npm install semver ```` ## Usage @@ -60,6 +60,12 @@ Options: Coerce a string into SemVer if possible (does not imply --loose) +--rtl + Coerce version strings right to left + +--ltr + Coerce version strings left to right (default) + Program exits successfully if any valid version satisfies all supplied ranges, and prints all satisfying versions. @@ -231,7 +237,7 @@ comparator. Allows minor-level changes if not. #### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` -Allows changes that do not modify the left-most non-zero digit in the +Allows changes that do not modify the left-most non-zero element in the `[major, minor, patch]` tuple. In other words, this allows patch and minor updates for versions `1.0.0` and above, patch updates for versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. @@ -354,6 +360,9 @@ strings that they parse. `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions in descending order when passed to `Array.sort()`. +* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions + are equal. Sorts in ascending order if passed to `Array.sort()`. + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. * `diff(v1, v2)`: Returns difference between two versions by the release type (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), or null if the versions are the same. @@ -396,7 +405,7 @@ range, use the `satisfies(version, range)` function. ### Coercion -* `coerce(version)`: Coerces a string to semver if possible +* `coerce(version, options)`: Coerces a string to semver if possible This aims to provide a very forgiving translation of a non-semver string to semver. It looks for the first digit in a string, and consumes all @@ -408,5 +417,27 @@ surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes is not valid). The maximum length for any semver component considered for coercion is 16 characters; longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value +semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). + +If the `options.rtl` flag is set, then `coerce` will return the right-most +coercible tuple that does not share an ending index with a longer coercible +tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not +`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of +any other overlapping SemVer tuple. + +### Clean + +* `clean(version)`: Clean a string to be a valid semver if possible + +This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. + +ex. +* `s.clean(' = v 2.1.5foo')`: `null` +* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean(' = v 2.1.5-foo')`: `null` +* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` +* `s.clean('=v2.1.5')`: `'2.1.5'` +* `s.clean(' =v2.1.5')`: `2.1.5` +* `s.clean(' 2.1.5 ')`: `'2.1.5'` +* `s.clean('~1.0.0')`: `null` diff --git a/node_modules/normalize-package-data/node_modules/semver/bin/semver b/node_modules/eslint-plugin-import/node_modules/semver/bin/semver.js similarity index 92% rename from node_modules/normalize-package-data/node_modules/semver/bin/semver rename to node_modules/eslint-plugin-import/node_modules/semver/bin/semver.js index 801e77f13..666034a75 100755 --- a/node_modules/normalize-package-data/node_modules/semver/bin/semver +++ b/node_modules/eslint-plugin-import/node_modules/semver/bin/semver.js @@ -19,6 +19,8 @@ var includePrerelease = false var coerce = false +var rtl = false + var identifier var semver = require('../semver') @@ -71,6 +73,12 @@ function main () { case '-c': case '--coerce': coerce = true break + case '--rtl': + rtl = true + break + case '--ltr': + rtl = false + break case '-h': case '--help': case '-?': return help() default: @@ -79,10 +87,10 @@ function main () { } } - var options = { loose: loose, includePrerelease: includePrerelease } + var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || { version: v }).version : v + return coerce ? (semver.coerce(v, options) || { version: v }).version : v }).filter(function (v) { return semver.valid(v) }) @@ -149,6 +157,12 @@ function help () { ' Coerce a string into SemVer if possible', ' (does not imply --loose)', '', + '--rtl', + ' Coerce version strings right to left', + '', + '--ltr', + ' Coerce version strings left to right (default)', + '', 'Program exits successfully if any valid version satisfies', 'all supplied ranges, and prints all satisfying versions.', '', diff --git a/node_modules/normalize-package-data/node_modules/semver/package.json b/node_modules/eslint-plugin-import/node_modules/semver/package.json similarity index 74% rename from node_modules/normalize-package-data/node_modules/semver/package.json rename to node_modules/eslint-plugin-import/node_modules/semver/package.json index 69d2db162..bdd442f50 100644 --- a/node_modules/normalize-package-data/node_modules/semver/package.json +++ b/node_modules/eslint-plugin-import/node_modules/semver/package.json @@ -1,21 +1,21 @@ { "name": "semver", - "version": "5.7.1", + "version": "6.3.0", "description": "The semantic version parser used by npm.", "main": "semver.js", "scripts": { "test": "tap", "preversion": "npm test", "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" + "postpublish": "git push origin --follow-tags" }, "devDependencies": { - "tap": "^13.0.0-rc.18" + "tap": "^14.3.1" }, "license": "ISC", "repository": "https://github.com/npm/node-semver", "bin": { - "semver": "./bin/semver" + "semver": "./bin/semver.js" }, "files": [ "bin", diff --git a/node_modules/normalize-package-data/node_modules/semver/range.bnf b/node_modules/eslint-plugin-import/node_modules/semver/range.bnf similarity index 100% rename from node_modules/normalize-package-data/node_modules/semver/range.bnf rename to node_modules/eslint-plugin-import/node_modules/semver/range.bnf diff --git a/node_modules/normalize-package-data/node_modules/semver/semver.js b/node_modules/eslint-plugin-import/node_modules/semver/semver.js similarity index 78% rename from node_modules/normalize-package-data/node_modules/semver/semver.js rename to node_modules/eslint-plugin-import/node_modules/semver/semver.js index d315d5d68..636fa4365 100644 --- a/node_modules/normalize-package-data/node_modules/semver/semver.js +++ b/node_modules/eslint-plugin-import/node_modules/semver/semver.js @@ -29,75 +29,80 @@ var MAX_SAFE_COMPONENT_LENGTH = 16 // The actual regexps go on exports.re var re = exports.re = [] var src = exports.src = [] +var t = exports.tokens = {} var R = 0 +function tok (n) { + t[n] = R++ +} + // The following Regular Expressions can be used for tokenizing, // validating, and parsing SemVer version strings. // ## Numeric Identifier // A single `0`, or a non-zero digit followed by zero or more digits. -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' +tok('NUMERICIDENTIFIER') +src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' +tok('NUMERICIDENTIFIERLOOSE') +src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' // ## Non-numeric Identifier // Zero or more digits, followed by a letter or hyphen, and then zero or // more letters, digits, or hyphens. -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' +tok('NONNUMERICIDENTIFIER') +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' // ## Main Version // Three dot-separated numeric identifiers. -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' +tok('MAINVERSION') +src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')' -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' +tok('MAINVERSIONLOOSE') +src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' // ## Pre-release Version Identifier // A numeric identifier, or a non-numeric identifier. -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' +tok('PRERELEASEIDENTIFIER') +src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' +tok('PRERELEASEIDENTIFIERLOOSE') +src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' // ## Pre-release Version // Hyphen, followed by one or more dot-separated pre-release version // identifiers. -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' +tok('PRERELEASE') +src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' +tok('PRERELEASELOOSE') +src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' +tok('BUILDIDENTIFIER') +src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata // identifiers. -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' +tok('BUILD') +src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' // ## Full Version String // A main version, followed optionally by a pre-release version and @@ -108,129 +113,133 @@ src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + // capturing group, because it should not ever be used in version // comparison. -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' +tok('FULL') +tok('FULLPLAIN') +src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + + src[t.PRERELEASE] + '?' + + src[t.BUILD] + '?' -src[FULL] = '^' + FULLPLAIN + '$' +src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' // like full, but allows v1.2.3 and =1.2.3, which people do sometimes. // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty // common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' +tok('LOOSEPLAIN') +src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + + src[t.PRERELEASELOOSE] + '?' + + src[t.BUILD] + '?' -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' +tok('LOOSE') +src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' +tok('GTLT') +src[t.GTLT] = '((?:<|>)?=?)' // Something like "2.*" or "1.2.x". // Note that "x.x" is a valid xRange identifer, meaning "any version" // Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + +tok('XRANGEIDENTIFIERLOOSE') +src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +tok('XRANGEIDENTIFIER') +src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + +tok('XRANGEPLAIN') +src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:' + src[t.PRERELEASE] + ')?' + + src[t.BUILD] + '?' + ')?)?' -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + +tok('XRANGEPLAINLOOSE') +src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[t.PRERELEASELOOSE] + ')?' + + src[t.BUILD] + '?' + ')?)?' -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' +tok('XRANGE') +src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' +tok('XRANGELOOSE') +src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' // Coercion. // Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + +tok('COERCE') +src[t.COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])' +tok('COERCERTL') +re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') // Tilde ranges. // Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' +tok('LONETILDE') +src[t.LONETILDE] = '(?:~>?)' -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') +tok('TILDETRIM') +src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' +re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') var tildeTrimReplace = '$1~' -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' +tok('TILDE') +src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' +tok('TILDELOOSE') +src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' // Caret ranges. // Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' +tok('LONECARET') +src[t.LONECARET] = '(?:\\^)' -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') +tok('CARETTRIM') +src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' +re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') var caretTrimReplace = '$1^' -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' +tok('CARET') +src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' +tok('CARETLOOSE') +src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' // A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' +tok('COMPARATORLOOSE') +src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' +tok('COMPARATOR') +src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' // An expression to strip any whitespace between the gtlt and the thing // it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' +tok('COMPARATORTRIM') +src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' // this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') +re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') var comparatorTrimReplace = '$1$2$3' // Something like `1.2.3 - 1.2.4` // Note that these all use the loose form, because they'll be // checked against either the strict or loose comparator form // later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + +tok('HYPHENRANGE') +src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + + '(' + src[t.XRANGEPLAIN] + ')' + '\\s*$' -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + +tok('HYPHENRANGELOOSE') +src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + + '(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s*$' // Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' +tok('STAR') +src[t.STAR] = '(<|>)?=?\\s*\\*' // Compile to actual regexp objects. // All are flag-free, unless they were created above with a flag. @@ -262,7 +271,7 @@ function parse (version, options) { return null } - var r = options.loose ? re[LOOSE] : re[FULL] + var r = options.loose ? re[t.LOOSE] : re[t.FULL] if (!r.test(version)) { return null } @@ -317,7 +326,7 @@ function SemVer (version, options) { this.options = options this.loose = !!options.loose - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) if (!m) { throw new TypeError('Invalid Version: ' + version) @@ -425,6 +434,30 @@ SemVer.prototype.comparePre = function (other) { } while (++i) } +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. SemVer.prototype.inc = function (release, identifier) { @@ -619,6 +652,13 @@ function compareLoose (a, b) { return compare(a, b, true) } +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + exports.rcompare = rcompare function rcompare (a, b, loose) { return compare(b, a, loose) @@ -627,14 +667,14 @@ function rcompare (a, b, loose) { exports.sort = sort function sort (list, loose) { return list.sort(function (a, b) { - return exports.compare(a, b, loose) + return exports.compareBuild(a, b, loose) }) } exports.rsort = rsort function rsort (list, loose) { return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) + return exports.compareBuild(b, a, loose) }) } @@ -747,14 +787,14 @@ function Comparator (comp, options) { var ANY = {} Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] var m = comp.match(r) if (!m) { throw new TypeError('Invalid comparator: ' + comp) } - this.operator = m[1] + this.operator = m[1] !== undefined ? m[1] : '' if (this.operator === '=') { this.operator = '' } @@ -774,12 +814,16 @@ Comparator.prototype.toString = function () { Comparator.prototype.test = function (version) { debug('Comparator.test', version, this.options.loose) - if (this.semver === ANY) { + if (this.semver === ANY || version === ANY) { return true } if (typeof version === 'string') { - version = new SemVer(version, this.options) + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } } return cmp(version, this.operator, this.semver, this.options) @@ -800,9 +844,15 @@ Comparator.prototype.intersects = function (comp, options) { var rangeTmp if (this.operator === '') { + if (this.value === '') { + return true + } rangeTmp = new Range(comp.value, options) return satisfies(this.value, rangeTmp, options) } else if (comp.operator === '') { + if (comp.value === '') { + return true + } rangeTmp = new Range(this.value, options) return satisfies(comp.semver, rangeTmp, options) } @@ -892,18 +942,18 @@ Range.prototype.parseRange = function (range) { var loose = this.options.loose range = range.trim() // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] range = range.replace(hr, hyphenReplace) debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) + range = range.replace(re[t.CARETTRIM], caretTrimReplace) // normalize spaces range = range.split(/\s+/).join(' ') @@ -911,7 +961,7 @@ Range.prototype.parseRange = function (range) { // At this point, the range is completely trimmed and // ready to be split into comparators. - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] var set = range.split(' ').map(function (comp) { return parseComparator(comp, this.options) }, this).join(' ').split(/\s+/) @@ -934,16 +984,40 @@ Range.prototype.intersects = function (range, options) { } return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) }) - }) + ) }) } +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + // Mostly just for testing and legacy API reasons exports.toComparators = toComparators function toComparators (range, options) { @@ -987,7 +1061,7 @@ function replaceTildes (comp, options) { } function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] return comp.replace(r, function (_, M, m, p, pr) { debug('tilde', comp, _, M, m, p, pr) var ret @@ -1028,7 +1102,7 @@ function replaceCarets (comp, options) { function replaceCaret (comp, options) { debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] return comp.replace(r, function (_, M, m, p, pr) { debug('caret', comp, _, M, m, p, pr) var ret @@ -1087,7 +1161,7 @@ function replaceXRanges (comp, options) { function replaceXRange (comp, options) { comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] return comp.replace(r, function (ret, gtlt, M, m, p, pr) { debug('xRange', comp, ret, gtlt, M, m, p, pr) var xM = isX(M) @@ -1099,10 +1173,14 @@ function replaceXRange (comp, options) { gtlt = '' } + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + if (xM) { if (gtlt === '>' || gtlt === '<') { // nothing is allowed - ret = '<0.0.0' + ret = '<0.0.0-0' } else { // nothing is forbidden ret = '*' @@ -1139,11 +1217,12 @@ function replaceXRange (comp, options) { } } - ret = gtlt + M + '.' + m + '.' + p + ret = gtlt + M + '.' + m + '.' + p + pr } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr } debug('xRange return', ret) @@ -1157,10 +1236,10 @@ function replaceXRange (comp, options) { function replaceStars (comp, options) { debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') + return comp.trim().replace(re[t.STAR], '') } -// This function is passed to string.replace(re[HYPHENRANGE]) +// This function is passed to string.replace(re[t.HYPHENRANGE]) // M, m, patch, prerelease, build // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do @@ -1200,7 +1279,11 @@ Range.prototype.test = function (version) { } if (typeof version === 'string') { - version = new SemVer(version, this.options) + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } } for (var i = 0; i < this.set.length; i++) { @@ -1462,22 +1545,52 @@ function intersects (r1, r2, options) { } exports.coerce = coerce -function coerce (version) { +function coerce (version, options) { if (version instanceof SemVer) { return version } + if (typeof version === 'number') { + version = String(version) + } + if (typeof version !== 'string') { return null } - var match = version.match(re[COERCE]) + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } - if (match == null) { + if (match === null) { return null } - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) } diff --git a/node_modules/eslint-plugin-import/package.json b/node_modules/eslint-plugin-import/package.json index e3bc5a8d9..299cf52b0 100644 --- a/node_modules/eslint-plugin-import/package.json +++ b/node_modules/eslint-plugin-import/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-import", - "version": "2.24.0", + "version": "2.27.5", "description": "Import with sanity.", "engines": { "node": ">=4" @@ -24,15 +24,16 @@ "copy-metafiles": "node --require babel-register ./scripts/copyMetafiles", "watch": "npm run tests-only -- -- --watch", "pretest": "linklocal", - "posttest": "eslint .", - "mocha": "cross-env BABEL_ENV=test nyc -s mocha", + "posttest": "eslint . && npm run update:eslint-docs -- --check", + "mocha": "cross-env BABEL_ENV=test nyc mocha", "tests-only": "npm run mocha tests/src", "test": "npm run tests-only", "test-compiled": "npm run prepublish && BABEL_ENV=testCompiled mocha --compilers js:babel-register tests/src", "test-all": "node --require babel-register ./scripts/testAll", "prepublishOnly": "safe-publish-latest && npm run build", "prepublish": "not-in-publish || npm run prepublishOnly", - "coveralls": "nyc report --reporter lcovonly && coveralls < ./coverage/lcov.info" + "preupdate:eslint-docs": "npm run build", + "update:eslint-docs": "eslint-doc-generator --rule-doc-title-format prefix-name --rule-doc-section-options false --rule-list-split meta.docs.category --ignore-config stage-0 --config-emoji recommended,☑️" }, "repository": { "type": "git", @@ -54,24 +55,24 @@ }, "homepage": "https://github.com/import-js/eslint-plugin-import", "devDependencies": { + "@angular-eslint/template-parser": "^13.2.1", "@eslint/import-test-order-redirect-scoped": "file:./tests/files/order-redirect-scoped", "@test-scope/some-module": "file:./tests/files/symlinked-module", - "@typescript-eslint/parser": "^2.23.0 || ^3.3.0", - "array.prototype.flatmap": "^1.2.4", + "@typescript-eslint/parser": "^2.23.0 || ^3.3.0 || ^4.29.3 || ^5.10.0", "babel-cli": "^6.26.0", "babel-core": "^6.26.3", "babel-eslint": "=8.0.3 || ^8.2.6", "babel-plugin-istanbul": "^4.1.6", "babel-plugin-module-resolver": "^2.7.1", "babel-preset-airbnb": "^2.6.0", - "babel-preset-es2015-argon": "latest", "babel-preset-flow": "^6.23.0", "babel-register": "^6.26.0", "babylon": "^6.18.0", - "chai": "^4.3.4", - "coveralls": "^3.1.0", + "chai": "^4.3.6", "cross-env": "^4.0.0", - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0", + "escope": "^3.6.0", + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", + "eslint-doc-generator": "^1.0.0", "eslint-import-resolver-node": "file:./resolvers/node", "eslint-import-resolver-typescript": "^1.0.2 || ^1.1.1", "eslint-import-resolver-webpack": "file:./resolvers/webpack", @@ -81,7 +82,7 @@ "eslint-plugin-import": "2.x", "eslint-plugin-json": "^2.1.2", "fs-copy-file-sync": "^1.1.1", - "glob": "^7.1.7", + "glob": "^7.2.0", "in-publish": "^2.0.1", "linklocal": "^2.8.2", "lodash.isarray": "^4.0.0", @@ -90,30 +91,29 @@ "nyc": "^11.9.0", "redux": "^3.7.2", "rimraf": "^2.7.1", - "safe-publish-latest": "^1.1.4", - "semver": "^6.3.0", + "safe-publish-latest": "^2.0.0", "sinon": "^2.4.1", - "typescript": "^2.8.1 || ~3.9.5", - "typescript-eslint-parser": "^15 || ^22.0.0" + "typescript": "^2.8.1 || ~3.9.5 || ~4.5.2", + "typescript-eslint-parser": "^15 || ^20 || ^22" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" }, "dependencies": { - "array-includes": "^3.1.3", - "array.prototype.flat": "^1.2.4", - "debug": "^2.6.9", + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.5", - "eslint-module-utils": "^2.6.2", - "find-up": "^2.0.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", "has": "^1.0.3", - "is-core-module": "^2.4.0", - "minimatch": "^3.0.4", - "object.values": "^1.1.3", - "pkg-up": "^2.0.0", - "read-pkg-up": "^3.0.0", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.9.0" + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" } } diff --git a/node_modules/for-each/.editorconfig b/node_modules/for-each/.editorconfig new file mode 100644 index 000000000..ac29adef0 --- /dev/null +++ b/node_modules/for-each/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/for-each/.eslintrc b/node_modules/for-each/.eslintrc new file mode 100644 index 000000000..2b8ea2a37 --- /dev/null +++ b/node_modules/for-each/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "indent": [2, 4], + "max-nested-callbacks": [2, 3], + "max-params": [2, 3], + "max-statements": [2, 14], + "no-invalid-this": [1], + "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], + } +} diff --git a/node_modules/for-each/.travis.yml b/node_modules/for-each/.travis.yml new file mode 100644 index 000000000..e9e54bda6 --- /dev/null +++ b/node_modules/for-each/.travis.yml @@ -0,0 +1,45 @@ +language: node_js +os: + - linux +node_js: + - "8" + - "7" + - "6" + - "5" + - "4" + - "iojs" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "node" + env: POSTTEST=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true + - env: COVERAGE=true diff --git a/node_modules/eslint-plugin-import/node_modules/ms/license.md b/node_modules/for-each/LICENSE similarity index 97% rename from node_modules/eslint-plugin-import/node_modules/ms/license.md rename to node_modules/for-each/LICENSE index 69b61253a..53f19aa77 100644 --- a/node_modules/eslint-plugin-import/node_modules/ms/license.md +++ b/node_modules/for-each/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Zeit, Inc. +Copyright (c) 2012 Raynos. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/for-each/README.md b/node_modules/for-each/README.md new file mode 100644 index 000000000..16dfbb6ea --- /dev/null +++ b/node_modules/for-each/README.md @@ -0,0 +1,43 @@ +# for-each [![build status][1]][2] + +[![browser support][3]][4] + +A better forEach. + +## Example + +Like `Array.prototype.forEach` but works on objects. + +```js +var forEach = require("for-each") + +forEach({ key: "value" }, function (value, key, object) { + /* code */ +}) +``` + +As a bonus, it's also a perfectly function shim/polyfill for arrays too! + +```js +var forEach = require("for-each") + +forEach([1, 2, 3], function (value, index, array) { + /* code */ +}) +``` + +## Installation + +`npm install for-each` + +## Contributors + + - Raynos + +## MIT Licenced + + [1]: https://secure.travis-ci.org/Raynos/for-each.png + [2]: http://travis-ci.org/Raynos/for-each + [3]: https://ci.testling.com/Raynos/for-each.png + [4]: https://ci.testling.com/Raynos/for-each + diff --git a/node_modules/for-each/index.js b/node_modules/for-each/index.js new file mode 100644 index 000000000..609ef9fcc --- /dev/null +++ b/node_modules/for-each/index.js @@ -0,0 +1,62 @@ +'use strict'; + +var isCallable = require('is-callable'); + +var toStr = Object.prototype.toString; +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var forEachArray = function forEachArray(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } +}; + +var forEachString = function forEachString(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + // no such thing as a sparse string. + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } +}; + +var forEachObject = function forEachObject(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } +}; + +var forEach = function forEach(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError('iterator must be a function'); + } + + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + + if (toStr.call(list) === '[object Array]') { + forEachArray(list, iterator, receiver); + } else if (typeof list === 'string') { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } +}; + +module.exports = forEach; diff --git a/node_modules/for-each/package.json b/node_modules/for-each/package.json new file mode 100644 index 000000000..f21d15e4c --- /dev/null +++ b/node_modules/for-each/package.json @@ -0,0 +1,65 @@ +{ + "name": "for-each", + "version": "0.3.3", + "description": "A better forEach", + "keywords": [], + "author": "Raynos ", + "repository": "git://github.com/Raynos/for-each.git", + "main": "index", + "homepage": "https://github.com/Raynos/for-each", + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/for-each/issues", + "email": "raynos2@gmail.com" + }, + "dependencies": { + "is-callable": "^1.1.3" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "eslint": "^4.19.1", + "nsp": "^3.2.1", + "tape": "^4.9.0" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/Raynos/for-each/raw/master/LICENSE" + } + ], + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "node test/test", + "posttest": "npm run security", + "lint": "eslint *.js test/*.js", + "security": "nsp check" + }, + "testling": { + "files": "test/test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + } +} diff --git a/node_modules/for-each/test/.eslintrc b/node_modules/for-each/test/.eslintrc new file mode 100644 index 000000000..a6c04b917 --- /dev/null +++ b/node_modules/for-each/test/.eslintrc @@ -0,0 +1,8 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": 0, + "no-magic-numbers": 0, + } +} diff --git a/node_modules/for-each/test/test.js b/node_modules/for-each/test/test.js new file mode 100644 index 000000000..8c9378728 --- /dev/null +++ b/node_modules/for-each/test/test.js @@ -0,0 +1,182 @@ +'use strict'; + +/* globals window */ + +var test = require('tape'); +var forEach = require('../'); + +test('forEach calls each iterator', function (t) { + var count = 0; + t.plan(4); + forEach({ a: 1, b: 2 }, function (value, key) { + if (count === 0) { + t.equal(value, 1); + t.equal(key, 'a'); + } else { + t.equal(value, 2); + t.equal(key, 'b'); + } + count += 1; + }); +}); + +test('forEach calls iterator with correct this value', function (t) { + var thisValue = {}; + + t.plan(1); + + forEach([0], function () { + t.equal(this, thisValue); + }, thisValue); +}); + +test('second argument: iterator', function (t) { + var arr = []; + t['throws'](function () { forEach(arr); }, TypeError, 'undefined is not a function'); + t['throws'](function () { forEach(arr, null); }, TypeError, 'null is not a function'); + t['throws'](function () { forEach(arr, ''); }, TypeError, 'string is not a function'); + t['throws'](function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); + t['throws'](function () { forEach(arr, true); }, TypeError, 'true is not a function'); + t['throws'](function () { forEach(arr, false); }, TypeError, 'false is not a function'); + t['throws'](function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); + t['throws'](function () { forEach(arr, 42); }, TypeError, '42 is not a function'); + t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); + t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); + if (typeof window !== 'undefined') { + t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); + } + t.end(); +}); + +test('array', function (t) { + var arr = [1, 2, 3]; + + t.test('iterates over every item', function (st) { + var index = 0; + forEach(arr, function () { index += 1; }); + st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(arr.length); + forEach(arr, function (item) { + st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(arr.length); + forEach(arr, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(arr.length); + forEach(arr, function (item, index, array) { + st.deepEqual(arr, array, 'array is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + forEach([], function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + +test('object', function (t) { + var obj = { + a: 1, + b: 2, + c: 3 + }; + var keys = ['a', 'b', 'c']; + + var F = function F() { + this.a = 1; + this.b = 2; + }; + F.prototype.c = 3; + var fKeys = ['a', 'b']; + + t.test('iterates over every object literal key', function (st) { + var counter = 0; + forEach(obj, function () { counter += 1; }); + st.equal(counter, keys.length, 'iterated ' + counter + ' times'); + st.end(); + }); + + t.test('iterates only over own keys', function (st) { + var counter = 0; + forEach(new F(), function () { counter += 1; }); + st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(keys.length); + forEach(obj, function (item) { + st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(keys.length); + forEach(obj, function (item, key) { + st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(keys.length); + forEach(obj, function (item, key, object) { + st.deepEqual(obj, object, 'object is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + forEach({}, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + +test('string', function (t) { + var str = 'str'; + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan((str.length * 2) + 1); + forEach(str, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + st.equal(str.charAt(index), item); + counter += 1; + }); + st.equal(counter, str.length, 'iterates ' + str.length + ' times'); + st.end(); + }); + t.end(); +}); diff --git a/node_modules/function.prototype.name/.editorconfig b/node_modules/function.prototype.name/.editorconfig new file mode 100644 index 000000000..bc228f826 --- /dev/null +++ b/node_modules/function.prototype.name/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/array.prototype.flat/.eslintignore b/node_modules/function.prototype.name/.eslintignore similarity index 100% rename from node_modules/array.prototype.flat/.eslintignore rename to node_modules/function.prototype.name/.eslintignore diff --git a/node_modules/function.prototype.name/.eslintrc b/node_modules/function.prototype.name/.eslintrc new file mode 100644 index 000000000..0b7dbb905 --- /dev/null +++ b/node_modules/function.prototype.name/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { "capIsNewExceptions": ["IsCallable"] }], + }, +} diff --git a/node_modules/function.prototype.name/.github/FUNDING.yml b/node_modules/function.prototype.name/.github/FUNDING.yml new file mode 100644 index 000000000..6a3b00c77 --- /dev/null +++ b/node_modules/function.prototype.name/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/function.prototype.name +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/function.prototype.name/.nycrc b/node_modules/function.prototype.name/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/function.prototype.name/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/function.prototype.name/CHANGELOG.md b/node_modules/function.prototype.name/CHANGELOG.md new file mode 100644 index 000000000..38b3ef10a --- /dev/null +++ b/node_modules/function.prototype.name/CHANGELOG.md @@ -0,0 +1,82 @@ +1.1.5 / 2021-10-01 +================= + * [Deps] update `es-abstract` + * [meta] use `prepublishOnly` script for npm 7+ + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `tape` + * [actions] update workflows + * [actions] use `node/install` instead of `node/run`; use `codecov` action + +1.1.4 / 2021-02-22 +================= + * [readme] remove travis badge + * [meta] remove audit-level + * [meta] gitignore coverage output + * [meta] do not publish github action workflow files + * [Deps] update `call-bind`, `es-abstract`, `functions-have-names` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-strict-mode`, `tape` + * [Tests] increase coverage + * [actions] update workflows + +1.1.3 / 2020-11-27 +================= + * [Deps] update `es-abstract`, `functions-have-names`; use `call-bind` where applicable + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `make-arrow-function`, `make-generator-function`; add `aud`, `make-async-function` + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests + * [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner + * [Tests] only audit prod deps + +1.1.2 / 2019-12-14 +================= + * [Refactor] use `es-abstract` + * [Deps] update `functions-have-names` + * [meta] add `funding` field + * [meta] fix repo capitalization + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` + * [Tests] use shared travis-ci configs + * [actions] add automatic rebasing / merge commit blocking + +1.1.1 / 2019-07-24 +================= + * [Refactor] use `functions-have-names` + * [meta] clean up package.json scripts + * [meta] update links + * [meta] create FUNDING.yml + * [Deps] update `is-callable`, `define-properties` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `safe-publish-latest`, `covert` + * [Tests] use `eccheck` over `editorconfig-tools` + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + * [Tests] up to `node` `v11.7`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9` + * [Test] remove `jscs` + +1.1.0 / 2017-12-31 +================= + * [New] add `auto` entry point + * [Deps] update `function-bind` + * [Dev Deps] update `uglify-register`, `tape`, `nsp`, `eslint`, `@ljharb/eslint-config`, `@es-shims/api` + * [Tests] up to `node` `v9.3`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS + +1.0.3 / 2017-07-21 +================= + * [Fix] be robust against function name mangling + * [Refactor] move function name detection to separate file + +1.0.2 / 2017-07-14 +================= + * [Refactor] shim: Remove unnecessary `!functionsHaveNames` check + +1.0.1 / 2017-07-11 +================= + * [Fix] in IE 9-11, we must rely on `.call` being available (#13) + * [Fix] ensure that `Function.prototype.name` does not erase the getter + * [Deps] update `is-callable` + * [Dev Deps] add `safe-publish-latest` + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `@es-shims/api` + * [Tests] up to `node` `v8.1`; `v7.10`, `v6.11`, `v4.8`; improve matrix; newer npm fails on older nodes + * [Tests] use `Object` to avoid function name inference in node 7 + +1.0.0 / 2016-02-27 +================= + * Initial release. diff --git a/node_modules/error-ex/LICENSE b/node_modules/function.prototype.name/LICENSE similarity index 88% rename from node_modules/error-ex/LICENSE rename to node_modules/function.prototype.name/LICENSE index 0a5f461a6..44f679ad4 100644 --- a/node_modules/error-ex/LICENSE +++ b/node_modules/function.prototype.name/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 JD Ballard +Copyright (c) 2016 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/function.prototype.name/README.md b/node_modules/function.prototype.name/README.md new file mode 100644 index 000000000..64aec9ad8 --- /dev/null +++ b/node_modules/function.prototype.name/README.md @@ -0,0 +1,42 @@ +# function.prototype.name [![Version Badge][2]][1] + +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +An ES2015 spec-compliant `Function.prototype.name` shim. Invoke its "shim" method to shim Function.prototype.name if it is unavailable. +*Note*: `Function#name` requires a true ES5 environment - specifically, one with ES5 getters. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES5-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/6.0/#sec-get-regexp.prototype.flags). + +Most common usage: + +## Example + +```js +var functionName = require('function.prototype.name'); +var assert = require('assert'); + +assert.equal(functionName(function foo() {}), 'foo'); + +functionName.shim(); +assert.equal(function foo() {}.name, 'foo'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/function.prototype.name +[2]: https://versionbadg.es/es-shims/Function.prototype.name.svg +[5]: https://david-dm.org/es-shims/Function.prototype.name.svg +[6]: https://david-dm.org/es-shims/Function.prototype.name +[7]: https://david-dm.org/es-shims/Function.prototype.name/dev-status.svg +[8]: https://david-dm.org/es-shims/Function.prototype.name#info=devDependencies +[11]: https://nodei.co/npm/function.prototype.name.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/function.prototype.name.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/function.prototype.name.svg +[downloads-url]: https://npm-stat.com/charts.html?package=function.prototype.name diff --git a/node_modules/function.prototype.name/auto.js b/node_modules/function.prototype.name/auto.js new file mode 100644 index 000000000..8ebf606cb --- /dev/null +++ b/node_modules/function.prototype.name/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/function.prototype.name/helpers/functionsHaveNames.js b/node_modules/function.prototype.name/helpers/functionsHaveNames.js new file mode 100644 index 000000000..0aa8532ea --- /dev/null +++ b/node_modules/function.prototype.name/helpers/functionsHaveNames.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = require('functions-have-names')(); + +// TODO: semver-major, remove diff --git a/node_modules/function.prototype.name/implementation.js b/node_modules/function.prototype.name/implementation.js new file mode 100644 index 000000000..03b49897f --- /dev/null +++ b/node_modules/function.prototype.name/implementation.js @@ -0,0 +1,43 @@ +'use strict'; + +var IsCallable = require('es-abstract/2021/IsCallable'); +var functionsHaveNames = require('functions-have-names')(); +var callBound = require('call-bind/callBound'); +var $functionToString = callBound('Function.prototype.toString'); +var $stringMatch = callBound('String.prototype.match'); + +var classRegex = /^class /; + +var isClass = function isClassConstructor(fn) { + if (IsCallable(fn)) { + return false; + } + if (typeof fn !== 'function') { + return false; + } + try { + var match = $stringMatch($functionToString(fn), classRegex); + return !!match; + } catch (e) {} + return false; +}; + +var regex = /\s*function\s+([^(\s]*)\s*/; + +var functionProto = Function.prototype; + +module.exports = function getName() { + if (!isClass(this) && !IsCallable(this)) { + throw new TypeError('Function.prototype.name sham getter called on non-function'); + } + if (functionsHaveNames) { + return this.name; + } + if (this === functionProto) { + return ''; + } + var str = $functionToString(this); + var match = $stringMatch(str, regex); + var name = match && match[1]; + return name; +}; diff --git a/node_modules/function.prototype.name/index.js b/node_modules/function.prototype.name/index.js new file mode 100644 index 000000000..ee9573a88 --- /dev/null +++ b/node_modules/function.prototype.name/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var define = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var bound = callBind(implementation); + +define(bound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = bound; diff --git a/node_modules/function.prototype.name/package.json b/node_modules/function.prototype.name/package.json new file mode 100644 index 000000000..452ac44da --- /dev/null +++ b/node_modules/function.prototype.name/package.json @@ -0,0 +1,80 @@ +{ + "name": "function.prototype.name", + "version": "1.1.5", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "An ES2015 spec-compliant `Function.prototype.name` shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "npm run eccheck", + "lint": "eslint .", + "postlint": "es-shim-api --bound", + "eccheck": "eclint check '*.js' '**/*.js'" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/Function.prototype.name.git" + }, + "keywords": [ + "Function.prototype.name", + "function", + "name", + "ES6", + "ES2015", + "shim", + "polyfill", + "es-shim API" + ], + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "devDependencies": { + "@es-shims/api": "^2.2.1", + "@ljharb/eslint-config": "^18.0.0", + "aud": "^1.1.5", + "eclint": "^2.8.1", + "eslint": "^7.32.0", + "for-each": "^0.3.3", + "has-strict-mode": "^1.0.1", + "make-arrow-function": "^1.2.0", + "make-async-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.1", + "uglify-register": "^1.0.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/11.6..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/function.prototype.name/polyfill.js b/node_modules/function.prototype.name/polyfill.js new file mode 100644 index 000000000..382fb9b6a --- /dev/null +++ b/node_modules/function.prototype.name/polyfill.js @@ -0,0 +1,7 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + return implementation; +}; diff --git a/node_modules/function.prototype.name/shim.js b/node_modules/function.prototype.name/shim.js new file mode 100644 index 000000000..587e3e94c --- /dev/null +++ b/node_modules/function.prototype.name/shim.js @@ -0,0 +1,35 @@ +'use strict'; + +var supportsDescriptors = require('define-properties').supportsDescriptors; +var functionsHaveNames = require('functions-have-names')(); +var getPolyfill = require('./polyfill'); +var defineProperty = Object.defineProperty; +var TypeErr = TypeError; + +module.exports = function shimName() { + var polyfill = getPolyfill(); + if (functionsHaveNames) { + return polyfill; + } + if (!supportsDescriptors) { + throw new TypeErr('Shimming Function.prototype.name support requires ES5 property descriptor support.'); + } + var functionProto = Function.prototype; + defineProperty(functionProto, 'name', { + configurable: true, + enumerable: false, + get: function () { + var name = polyfill.call(this); + if (this !== functionProto) { + defineProperty(this, 'name', { + configurable: true, + enumerable: false, + value: name, + writable: false + }); + } + return name; + } + }); + return polyfill; +}; diff --git a/node_modules/function.prototype.name/test/implementation.js b/node_modules/function.prototype.name/test/implementation.js new file mode 100644 index 000000000..7fdf95b7d --- /dev/null +++ b/node_modules/function.prototype.name/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var implementation = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(implementation), t); + + t.end(); +}); diff --git a/node_modules/function.prototype.name/test/index.js b/node_modules/function.prototype.name/test/index.js new file mode 100644 index 000000000..68e33af68 --- /dev/null +++ b/node_modules/function.prototype.name/test/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var getName = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('non-functions', function (st) { + st['throws'](function () { getName(); }, TypeError, 'undefined is not a function'); + st['throws'](function () { getName(null); }, TypeError, 'null is not a function'); + st['throws'](function () { getName(true); }, TypeError, 'true is not a function'); + st['throws'](function () { getName(false); }, TypeError, 'false is not a function'); + st['throws'](function () { getName('foo'); }, TypeError, '"foo" is not a function'); + st['throws'](function () { getName([]); }, TypeError, '[] is not a function'); + st['throws'](function () { getName({}); }, TypeError, '{} is not a function'); + st['throws'](function () { getName(/a/g); }, TypeError, '/a/g is not a function'); + st.end(); + }); + + runTests(getName, t); + + t.end(); +}); diff --git a/node_modules/function.prototype.name/test/shimmed.js b/node_modules/function.prototype.name/test/shimmed.js new file mode 100644 index 000000000..c2ed13a3d --- /dev/null +++ b/node_modules/function.prototype.name/test/shimmed.js @@ -0,0 +1,21 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var supportsDescriptors = require('define-properties').supportsDescriptors; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.test('enumerability', { skip: !supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(Function.prototype, 'name'), 'Function#name is not enumerable'); + et.equal(false, isEnumerable.call(function foo() {}, 'name'), 'a function’s name is not enumerable'); + et.end(); + }); + + runTests(function (fn) { return fn.name; }, t); + + t.end(); +}); diff --git a/node_modules/function.prototype.name/test/tests.js b/node_modules/function.prototype.name/test/tests.js new file mode 100644 index 000000000..323cf4164 --- /dev/null +++ b/node_modules/function.prototype.name/test/tests.js @@ -0,0 +1,60 @@ +'use strict'; + +var functionsHaveNames = require('functions-have-names')(); +var arrows = require('make-arrow-function').list(); +var generators = require('make-generator-function')(); +var asyncs = require('make-async-function').list(); +var forEach = require('for-each'); + +var foo = Object(function foo() {}); +var anon = Object(function () {}); +var evalled = Object(Function()); // eslint-disable-line no-new-func + +module.exports = function (getName, t) { + t.test('functions', function (st) { + if (functionsHaveNames) { + st.equal(getName(foo), foo.name, 'foo has name "foo"'); + st.equal(getName(anon), anon.name, 'anonymous function has name of empty string'); + st.equal(getName(evalled), evalled.name, 'eval-d function has name "anonymous" (or empty string)'); + } + st.equal(getName(foo), 'foo', 'foo has name "foo"'); + st.equal(getName(anon), '', 'anonymous function has name of empty string'); + var evalledName = getName(evalled); + st.equal(evalledName === 'anonymous' || evalledName === '', true, 'eval-d function has name "anonymous" (or empty string'); + st.end(); + }); + + t.test('arrow functions', { skip: arrows.length === 0 }, function (st) { + st.equal(true, functionsHaveNames, 'functions have names in any env with arrow functions'); + forEach(arrows, function (arrowFn) { + st.equal(getName(arrowFn), arrowFn.name, 'arrow function name matches for ' + arrowFn); + }); + st.end(); + }); + + t.test('generators', { skip: generators.length === 0 }, function (st) { + st.equal(true, functionsHaveNames, 'functions have names in any env with generator functions'); + forEach(generators, function (genFn) { + st.equal(getName(genFn), genFn.name, 'generator function name matches for ' + genFn); + }); + st.end(); + }); + + t.test('asyncs', { skip: asyncs.length === 0 }, function (st) { + st.equal(true, functionsHaveNames, 'functions have names in any env with async functions'); + forEach(asyncs, function (asyncFn) { + st.equal(getName(asyncFn), asyncFn.name, 'async function name matches for ' + asyncFn); + }); + st.end(); + }); + + t.test('Function.prototype.name', function (st) { + st.equal(getName(function before() {}), 'before', 'function prior to accessing Function.prototype has the right name'); + var protoName = getName(Function.prototype); + // on <= node v2.5, this is "Empty" - otherwise, the empty string + st.equal(protoName === '' || protoName === 'Empty', true, 'Function.prototype has the right name'); + st.equal(getName(function after() {}), 'after', 'function after accessing Function.prototype has the right name'); + + st.end(); + }); +}; diff --git a/node_modules/function.prototype.name/test/uglified.js b/node_modules/function.prototype.name/test/uglified.js new file mode 100644 index 000000000..77733abd8 --- /dev/null +++ b/node_modules/function.prototype.name/test/uglified.js @@ -0,0 +1,17 @@ +'use strict'; + +var test = require('tape'); +var runTests = require('./tests'); + +test('with uglify', function (t) { + /* eslint global-require: 0 */ + require('uglify-register/api').register({ + exclude: [/\/node_modules\//, /\/test\//], + uglify: { mangle: true } + }); + + var getName = require('../'); + runTests(getName, t); + + t.end(); +}); diff --git a/node_modules/functions-have-names/.editorconfig b/node_modules/functions-have-names/.editorconfig new file mode 100644 index 000000000..bc228f826 --- /dev/null +++ b/node_modules/functions-have-names/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/functions-have-names/.eslintrc b/node_modules/functions-have-names/.eslintrc new file mode 100644 index 000000000..2807df70c --- /dev/null +++ b/node_modules/functions-have-names/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": [2, "always"], + "id-length": 1, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "func-name-matching": 0, + }, + }, + ], +} diff --git a/node_modules/functions-have-names/.github/FUNDING.yml b/node_modules/functions-have-names/.github/FUNDING.yml new file mode 100644 index 000000000..1b81d18bc --- /dev/null +++ b/node_modules/functions-have-names/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/functions-have-names +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/functions-have-names/.nycrc b/node_modules/functions-have-names/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/functions-have-names/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/functions-have-names/CHANGELOG.md b/node_modules/functions-have-names/CHANGELOG.md new file mode 100644 index 000000000..1026b701d --- /dev/null +++ b/node_modules/functions-have-names/CHANGELOG.md @@ -0,0 +1,89 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.3](https://github.com/inspect-js/functions-have-names/compare/v1.2.2...v1.2.3) - 2022-04-19 + +### Fixed + +- [Fix] in IE 9-11, the descriptor is absent [`#11`](https://github.com/inspect-js/functions-have-names/issues/11) [`#25`](https://github.com/es-shims/RegExp.prototype.flags/issues/25) + +### Commits + +- [actions] reuse common workflows [`4ed274a`](https://github.com/inspect-js/functions-have-names/commit/4ed274a2441c7fd38ff6add741c309e268550d97) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`96dfcaa`](https://github.com/inspect-js/functions-have-names/commit/96dfcaaf1c9c5305f2b66ef69f9cddf1d9d9a578) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`9e674f8`](https://github.com/inspect-js/functions-have-names/commit/9e674f85520a93235e412a3fd7671d2356c6e45b) +- [readme] add github actions/codecov badges; update URLs [`d913f5b`](https://github.com/inspect-js/functions-have-names/commit/d913f5bf38ccab32d5fbea4a044b9cd93a4b9bec) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `safe-publish-latest`, `tape` [`f61058f`](https://github.com/inspect-js/functions-have-names/commit/f61058fe1e34f2cfa9235283a4fc6c0c0172c91a) +- [actions] update codecov uploader [`3348839`](https://github.com/inspect-js/functions-have-names/commit/33488394e7cadbf499bee4775c627c1370d033d0) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`ee1a321`](https://github.com/inspect-js/functions-have-names/commit/ee1a3211a40902af59aa629e3ac41ec36360dc1b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`b8dc1a2`](https://github.com/inspect-js/functions-have-names/commit/b8dc1a277b08362bebedfeba2faca8964f68283b) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`0e825c4`](https://github.com/inspect-js/functions-have-names/commit/0e825c4ba8525b02d9acaaf2511371f76c0562ce) +- [meta] use `prepublishOnly` script for npm 7+ [`9489d66`](https://github.com/inspect-js/functions-have-names/commit/9489d666c59702ea6bafd3ff611b3eadfee6570e) + +## [v1.2.2](https://github.com/inspect-js/functions-have-names/compare/v1.2.1...v1.2.2) - 2020-12-14 + +### Commits + +- [Tests] migrate tests to Github Actions [`39bf4fe`](https://github.com/inspect-js/functions-have-names/commit/39bf4fe5ae5b3610a80ba13726f3ee00e3c49e2f) +- [meta] do not publish github action workflow files [`45ab0cb`](https://github.com/inspect-js/functions-have-names/commit/45ab0cbdc0da2efd64f5deb9810be63009bac4a0) +- [readme] add docs, fix URLs [`fad3af6`](https://github.com/inspect-js/functions-have-names/commit/fad3af61e9cbc27f47d2097614f43c62ae1022dd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`82df94a`](https://github.com/inspect-js/functions-have-names/commit/82df94ae06f05a5fa321dda9b7d902ac9fc26424) +- [Tests] run `nyc` on all tests; use `tape` runner [`8038329`](https://github.com/inspect-js/functions-have-names/commit/8038329fec493043639d9d8c779141dcb7d00c2d) +- [actions] add automatic rebasing / merge commit blocking [`49795eb`](https://github.com/inspect-js/functions-have-names/commit/49795ebf38ae3ba724ff7ac5c53598ec66ab814b) +- [actions] add "Allow Edits" workflow [`2096fe6`](https://github.com/inspect-js/functions-have-names/commit/2096fe6d67d435c0e0da25f3cfe9ff02991c41e6) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`ec1c6fe`](https://github.com/inspect-js/functions-have-names/commit/ec1c6fe209419c722d732cd512e4375c48366392) +- [Dev Deps] update `auto-changelog`; add `aud` [`79fdb23`](https://github.com/inspect-js/functions-have-names/commit/79fdb23d1ed2b4125f443be193c37330e634e654) +- [Tests] only audit prod deps [`d9ca245`](https://github.com/inspect-js/functions-have-names/commit/d9ca2455e26a45994024d1027344c268a06818bd) +- [Dev Deps] update `auto-changelog`, `tape` [`ac026d4`](https://github.com/inspect-js/functions-have-names/commit/ac026d4bda77e9820b74456fc752d2069e5b8a7f) +- [Dev Deps] update `tape` [`a8c5ee3`](https://github.com/inspect-js/functions-have-names/commit/a8c5ee3622b487938462f82698dae3ceb32da1a7) +- [Dev Deps] update `@ljharb/eslint-config` [`b25fafd`](https://github.com/inspect-js/functions-have-names/commit/b25fafd0923dcf53c3aeca92268e497ffd96ec34) + +## [v1.2.1](https://github.com/inspect-js/functions-have-names/compare/v1.2.0...v1.2.1) - 2020-01-19 + +### Commits + +- [Tests] use shared travis-ci configs [`612823a`](https://github.com/inspect-js/functions-have-names/commit/612823a064b4be4c61a1e52d1009abed4a4fc4fb) +- [Fix] IE 8 has a broken `Object.getOwnPropertyDescriptor` [`ba01c22`](https://github.com/inspect-js/functions-have-names/commit/ba01c22795162b787a698950ea34250ce68a7bb1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`; add `safe-publish-latest` [`b28d9d2`](https://github.com/inspect-js/functions-have-names/commit/b28d9d2e8bc0b758671bcaf2f7aa0d4ad4b42046) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`a62fbd6`](https://github.com/inspect-js/functions-have-names/commit/a62fbd69a34a2b1d1860acfa2afc6dcc839bc180) +- [meta] add `funding` field [`8734a94`](https://github.com/inspect-js/functions-have-names/commit/8734a940e39acdf7619eb89e358746bd278b4c90) + +## [v1.2.0](https://github.com/inspect-js/functions-have-names/compare/v1.1.1...v1.2.0) - 2019-10-20 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog` [`7e07444`](https://github.com/inspect-js/functions-have-names/commit/7e0744437789641ea462005d2e350ef476aa7141) +- [New] add `boundFunctionsHaveNames()` [`05661be`](https://github.com/inspect-js/functions-have-names/commit/05661be26c3c260bb3984e433dc9cea3fd82f9ac) + +## [v1.1.1](https://github.com/inspect-js/functions-have-names/compare/v1.1.0...v1.1.1) - 2019-07-24 + +### Commits + +- [Tests] fix linting errors [`0cb8017`](https://github.com/inspect-js/functions-have-names/commit/0cb8017203ae37d1e019bb1c99120f3f56a266a5) +- [Tests] fix tests when name is not configurable [`38a8aee`](https://github.com/inspect-js/functions-have-names/commit/38a8aeee0403bd7aa7f35da76dc433cbcdd3f85a) +- [Fix] ensure function name mangling does not break detection [`f6926ab`](https://github.com/inspect-js/functions-have-names/commit/f6926abaaebc81366f73cf0c3f874ad7e4ba16d2) + +## [v1.1.0](https://github.com/inspect-js/functions-have-names/compare/v1.0.0...v1.1.0) - 2019-07-23 + +### Commits + +- [New] add `functionsHaveConfigurableNames` function on main export [`ce73f75`](https://github.com/inspect-js/functions-have-names/commit/ce73f75891640a462326df7266d90b09519a5fca) + +## v1.0.0 - 2019-07-22 + +### Commits + +- [Tests] add travis.yml [`06ed096`](https://github.com/inspect-js/functions-have-names/commit/06ed09681a3dc067094562e8d21a31400a782add) +- Initial commit [`ced60bd`](https://github.com/inspect-js/functions-have-names/commit/ced60bd089539eb228c68fc2ad7c7bc04b959b02) +- npm init [`79088ab`](https://github.com/inspect-js/functions-have-names/commit/79088ab607e7e91a402e198ab6d1837a317c6fa9) +- add tests [`c9e8e09`](https://github.com/inspect-js/functions-have-names/commit/c9e8e09c5153797c97c324cca4b837540eddeff8) +- [Tests] add `npm run lint` [`988b924`](https://github.com/inspect-js/functions-have-names/commit/988b924a8a49ea5c0f30d5aa2b2ea9add0b39474) +- [meta] create FUNDING.yml [`2e443ef`](https://github.com/inspect-js/functions-have-names/commit/2e443ef67748214d05898b3da76f908a7e2d7488) +- [meta] add version scripts [`52005e3`](https://github.com/inspect-js/functions-have-names/commit/52005e3794fd0799db5963a5359846798cb95c14) +- implementation [`b7b4942`](https://github.com/inspect-js/functions-have-names/commit/b7b49421ef69fb5e042194a650cb4f71bb4996e4) +- Only apps should have lockfiles [`81d2e04`](https://github.com/inspect-js/functions-have-names/commit/81d2e04e7a43cbff2e46e72781bb0693dbb67800) +- [Tests] use `npx aud` [`baa92d8`](https://github.com/inspect-js/functions-have-names/commit/baa92d8aba331fe8821663bc14baf2e11685474a) diff --git a/node_modules/functions-have-names/LICENSE b/node_modules/functions-have-names/LICENSE new file mode 100644 index 000000000..3900dd7e2 --- /dev/null +++ b/node_modules/functions-have-names/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/functions-have-names/README.md b/node_modules/functions-have-names/README.md new file mode 100644 index 000000000..70962607c --- /dev/null +++ b/node_modules/functions-have-names/README.md @@ -0,0 +1,40 @@ +# functions-have-names [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Does this JS environment support the `name` property on functions? + +## Example + +```js +var functionsHaveNames = require('functions-have-names'); +var assert = require('assert'); + +assert.equal(functionsHaveNames(), true); // will be `false` in IE 6-8 +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/functions-have-names +[npm-version-svg]: https://versionbadg.es/inspect-js/functions-have-names.svg +[deps-svg]: https://david-dm.org/inspect-js/functions-have-names.svg +[deps-url]: https://david-dm.org/inspect-js/functions-have-names +[dev-deps-svg]: https://david-dm.org/inspect-js/functions-have-names/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/functions-have-names#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/functions-have-names.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/functions-have-names.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/functions-have-names.svg +[downloads-url]: https://npm-stat.com/charts.html?package=functions-have-names +[codecov-image]: https://codecov.io/gh/inspect-js/functions-have-names/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/functions-have-names/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/functions-have-names +[actions-url]: https://github.com/inspect-js/functions-have-names/actions diff --git a/node_modules/functions-have-names/index.js b/node_modules/functions-have-names/index.js new file mode 100644 index 000000000..9d699dc19 --- /dev/null +++ b/node_modules/functions-have-names/index.js @@ -0,0 +1,31 @@ +'use strict'; + +var functionsHaveNames = function functionsHaveNames() { + return typeof function f() {}.name === 'string'; +}; + +var gOPD = Object.getOwnPropertyDescriptor; +if (gOPD) { + try { + gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + gOPD = null; + } +} + +functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() { + if (!functionsHaveNames() || !gOPD) { + return false; + } + var desc = gOPD(function () {}, 'name'); + return !!desc && !!desc.configurable; +}; + +var $bind = Function.prototype.bind; + +functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() { + return functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== ''; +}; + +module.exports = functionsHaveNames; diff --git a/node_modules/functions-have-names/package.json b/node_modules/functions-have-names/package.json new file mode 100644 index 000000000..95ffe9c08 --- /dev/null +++ b/node_modules/functions-have-names/package.json @@ -0,0 +1,55 @@ +{ + "name": "functions-have-names", + "version": "1.2.3", + "description": "Does this JS environment support the `name` property on functions?", + "main": "index.js", + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/functions-have-names.git" + }, + "keywords": [ + "function", + "name", + "es5", + "names", + "functions", + "ie" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/functions-have-names/issues" + }, + "homepage": "https://github.com/inspect-js/functions-have-names#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/functions-have-names/test/index.js b/node_modules/functions-have-names/test/index.js new file mode 100644 index 000000000..0d451ce62 --- /dev/null +++ b/node_modules/functions-have-names/test/index.js @@ -0,0 +1,65 @@ +'use strict'; + +var test = require('tape'); + +var hasNames = require('../'); + +test('named functions', function (t) { + function f() {} // eslint-disable-line func-style + var g = function h() {}; + + t.equal(typeof hasNames, 'function', 'is a function'); + t.equal(hasNames(), f.name === 'f' && g.name === 'h', 'functions have names or not as expected'); + + t.end(); +}); + +var oDP = Object.defineProperty; +if (oDP) { + try { + oDP({}, 'a', { value: 1 }); + } catch (e) { + oDP = null; + } +} + +test('functionsHaveConfigurableNames', function (t) { + t.equal(typeof hasNames.functionsHaveConfigurableNames, 'function', 'is a function'); + + if (hasNames()) { + var fn = function f() {}; + if (oDP) { + try { + oDP(fn, 'name', { configurable: true, value: 'foo' }); + } catch (e) {} + if (fn.name === 'f') { + t.equal(hasNames.functionsHaveConfigurableNames(), false, 'function names are not configurable'); + } else if (fn.name === 'foo') { + t.equal(hasNames.functionsHaveConfigurableNames(), true, 'function names are not configurable'); + } else { + t.fail('functions have names, but something surprising has happened. Please report this!'); + } + } else { + t.equal(hasNames.functionsHaveConfigurableNames(), false, 'function names are not configurable'); + } + } else { + t.equal(hasNames.functionsHaveConfigurableNames(), false, 'functions do not have names'); + } + + t.end(); +}); + +test('boundFunctionsHaveNames', function (t) { + t.equal(typeof hasNames.boundFunctionsHaveNames, 'function', 'is a function'); + + var fn = function f() {}; + if (typeof fn.bind !== 'function') { + t.equal(hasNames.boundFunctionsHaveNames(), false, 'bound functions do not have names, because .bind does not exist'); + } else if (hasNames()) { + t.equal(hasNames.boundFunctionsHaveNames(), fn.bind().name !== '', 'bound functions have names'); + } else { + t.equal(hasNames.boundFunctionsHaveNames(), false, 'bound functions do not have names, because none do'); + } + + t.end(); +}); diff --git a/node_modules/get-intrinsic/.eslintrc b/node_modules/get-intrinsic/.eslintrc index d04e4839f..0ab0876eb 100644 --- a/node_modules/get-intrinsic/.eslintrc +++ b/node_modules/get-intrinsic/.eslintrc @@ -8,26 +8,21 @@ "es2017": true, "es2020": true, "es2021": true, - }, - - "globals": { - "AggregateError": false, + "es2022": true, }, "rules": { "array-bracket-newline": 0, - "array-element-newline": 0, "complexity": 0, "eqeqeq": [2, "allow-null"], "func-name-matching": 0, "id-length": 0, - "max-lines-per-function": [2, 80], + "max-lines-per-function": [2, 90], "max-params": [2, 4], "max-statements": 0, "max-statements-per-line": [2, { "max": 2 }], "multiline-comment-style": 0, "no-magic-numbers": 0, - "operator-linebreak": [2, "before"], "sort-keys": 0, }, @@ -35,7 +30,6 @@ { "files": "test/**", "rules": { - "max-lines-per-function": 0, "new-cap": 0, }, }, diff --git a/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc index 1826526e0..bdd626ce9 100644 --- a/node_modules/get-intrinsic/.nycrc +++ b/node_modules/get-intrinsic/.nycrc @@ -2,10 +2,6 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, "exclude": [ "coverage", "test" diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md index 32502ec1f..1bb52d384 100644 --- a/node_modules/get-intrinsic/CHANGELOG.md +++ b/node_modules/get-intrinsic/CHANGELOG.md @@ -5,6 +5,40 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.1.3](https://github.com/ljharb/get-intrinsic/compare/v1.1.2...v1.1.3) - 2022-09-12 + +### Commits + +- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `tape` [`07ff291`](https://github.com/ljharb/get-intrinsic/commit/07ff291816406ebe5a12d7f16965bde0942dd688) +- [Fix] properly check for % signs [`50ac176`](https://github.com/ljharb/get-intrinsic/commit/50ac1760fe99c227e64eabde76e9c0e44cd881b5) + +## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08 + +### Fixed + +- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16) + +### Commits + +- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d) +- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5) +- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de) +- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d) +- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932) +- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8) +- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496) +- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97) +- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d) +- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd) +- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5) +- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20) +- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359) + ## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03 ### Fixed diff --git a/node_modules/get-intrinsic/README.md b/node_modules/get-intrinsic/README.md index 335a3b49b..3aa0bba40 100644 --- a/node_modules/get-intrinsic/README.md +++ b/node_modules/get-intrinsic/README.md @@ -1,5 +1,7 @@ # get-intrinsic [![Version Badge][npm-version-svg]][package-url] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] @@ -53,7 +55,7 @@ Simply clone the repo, `npm install`, and run `npm test` Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. [package-url]: https://npmjs.org/package/get-intrinsic -[npm-version-svg]: http://versionbadg.es/ljharb/get-intrinsic.svg +[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg [deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg [deps-url]: https://david-dm.org/ljharb/get-intrinsic [dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg @@ -63,3 +65,7 @@ Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/se [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg [downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic +[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic +[actions-url]: https://github.com/ljharb/get-intrinsic/actions diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js index d6c06c281..3c3d93eb7 100644 --- a/node_modules/get-intrinsic/index.js +++ b/node_modules/get-intrinsic/index.js @@ -202,6 +202,7 @@ var $concat = bind.call(Function.call, Array.prototype.concat); var $spliceApply = bind.call(Function.apply, Array.prototype.splice); var $replace = bind.call(Function.call, String.prototype.replace); var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; @@ -257,6 +258,9 @@ module.exports = function GetIntrinsic(name, allowMissing) { throw new $TypeError('"allowMissing" argument must be a boolean'); } + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } var parts = stringToPath(name); var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json index 5172972d4..8dadb7dcb 100644 --- a/node_modules/get-intrinsic/package.json +++ b/node_modules/get-intrinsic/package.json @@ -1,6 +1,6 @@ { "name": "get-intrinsic", - "version": "1.1.1", + "version": "1.1.3", "description": "Get and robustly cache all JS language-level intrinsics at first require time", "main": "index.js", "exports": { @@ -13,6 +13,9 @@ "./package.json": "./package.json" }, "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", "prelint": "evalmd README.md", "lint": "eslint --ext=.js,.mjs .", "pretest": "npm run lint", @@ -45,22 +48,24 @@ }, "homepage": "https://github.com/ljharb/get-intrinsic#readme", "devDependencies": { - "@ljharb/eslint-config": "^17.5.0", - "aud": "^1.1.3", - "auto-changelog": "^2.2.1", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", "call-bind": "^1.0.2", - "es-abstract": "^1.18.0-next.2", - "es-value-fixtures": "^1.0.0", - "eslint": "^7.19.0", + "es-abstract": "^1.20.2", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", "evalmd": "^0.0.19", - "foreach": "^2.0.5", - "has-bigints": "^1.0.1", + "for-each": "^0.3.3", "make-async-function": "^1.0.0", "make-async-generator-function": "^1.0.0", "make-generator-function": "^2.0.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "object-inspect": "^1.9.0", - "tape": "^5.1.1" + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.0" }, "auto-changelog": { "output": "CHANGELOG.md", @@ -73,6 +78,14 @@ "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" + }, + "testling": { + "files": "test/GetIntrinsic.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] } } diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js index 695e3ad41..7e0ea30f6 100644 --- a/node_modules/get-intrinsic/test/GetIntrinsic.js +++ b/node_modules/get-intrinsic/test/GetIntrinsic.js @@ -3,16 +3,17 @@ var GetIntrinsic = require('../'); var test = require('tape'); -var forEach = require('foreach'); +var forEach = require('for-each'); var debug = require('object-inspect'); var generatorFns = require('make-generator-function')(); var asyncFns = require('make-async-function').list(); var asyncGenFns = require('make-async-generator-function')(); +var mockProperty = require('mock-property'); var callBound = require('call-bind/callBound'); var v = require('es-value-fixtures'); var $gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor'); -var defineProperty = require('es-abstract/test/helpers/defineProperty'); +var DefinePropertyOrThrow = require('es-abstract/2021/DefinePropertyOrThrow'); var $isProto = callBound('%Object.prototype.isPrototypeOf%'); @@ -66,6 +67,18 @@ test('throws', function (t) { "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)" ); + t['throws']( + function () { GetIntrinsic('%Array.prototype%garbage%'); }, + SyntaxError, + 'Throws with extra percent signs' + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%push%'); }, + SyntaxError, + 'Throws with extra percent signs, even on an existing intrinsic' + ); + forEach(v.nonStrings, function (nonString) { t['throws']( function () { GetIntrinsic(nonString); }, @@ -123,15 +136,15 @@ test('dotted paths', function (t) { '%ObjProto_toString%', 'ObjProto_toString' ], function (name) { - defineProperty(Object.prototype, 'toString', { - value: function toString() { + DefinePropertyOrThrow(Object.prototype, 'toString', { + '[[Value]]': function toString() { return original.apply(this, arguments); } }); st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); }); - defineProperty(Object.prototype, 'toString', { value: original }); + DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original }); st.end(); }); @@ -144,15 +157,16 @@ test('dotted paths', function (t) { '%ObjectPrototype.propertyIsEnumerable%', 'ObjectPrototype.propertyIsEnumerable' ], function (name) { - // eslint-disable-next-line no-extend-native - Object.prototype.propertyIsEnumerable = function propertyIsEnumerable() { - return original.apply(this, arguments); - }; + var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', { + value: function propertyIsEnumerable() { + return original.apply(this, arguments); + } + }); st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); + + restore(); }); - // eslint-disable-next-line no-extend-native - Object.prototype.propertyIsEnumerable = original; st.end(); }); diff --git a/node_modules/es-abstract/.eslintignore b/node_modules/get-symbol-description/.eslintignore similarity index 100% rename from node_modules/es-abstract/.eslintignore rename to node_modules/get-symbol-description/.eslintignore diff --git a/node_modules/get-symbol-description/.eslintrc b/node_modules/get-symbol-description/.eslintrc new file mode 100644 index 000000000..e824dabcc --- /dev/null +++ b/node_modules/get-symbol-description/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/get-symbol-description/.github/FUNDING.yml b/node_modules/get-symbol-description/.github/FUNDING.yml new file mode 100644 index 000000000..499729c5c --- /dev/null +++ b/node_modules/get-symbol-description/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/symbol-description +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-symbol-description/.nycrc b/node_modules/get-symbol-description/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/get-symbol-description/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-symbol-description/CHANGELOG.md b/node_modules/get-symbol-description/CHANGELOG.md new file mode 100644 index 000000000..1e1c0794f --- /dev/null +++ b/node_modules/get-symbol-description/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2021-08-17 + +### Commits + +- Initial commit: pulled from es-abstract [`6e34a05`](https://github.com/inspect-js/get-symbol-description/commit/6e34a05ef10ce8620078cf4cecbe276c1fc1ae77) +- Initial commit [`3862092`](https://github.com/inspect-js/get-symbol-description/commit/3862092248d8ffa071ec90ec39d73e8be14ba6f1) +- [meta] do not publish github action workflow files [`9d1e2b9`](https://github.com/inspect-js/get-symbol-description/commit/9d1e2b94dd97664da5d0666985a3695c23f45865) +- npm init [`5051b32`](https://github.com/inspect-js/get-symbol-description/commit/5051b3221829f364c44b4d5e9a0c35aab3247f6a) +- Only apps should have lockfiles [`b866d1c`](https://github.com/inspect-js/get-symbol-description/commit/b866d1c4b4029277618d968cfb3cbe00f012d1a7) diff --git a/node_modules/get-symbol-description/LICENSE b/node_modules/get-symbol-description/LICENSE new file mode 100644 index 000000000..7948bc02a --- /dev/null +++ b/node_modules/get-symbol-description/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/get-symbol-description/README.md b/node_modules/get-symbol-description/README.md new file mode 100644 index 000000000..c44e72aa1 --- /dev/null +++ b/node_modules/get-symbol-description/README.md @@ -0,0 +1,43 @@ +# get-symbol-description [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible. + +## Example + +```js +var getSymbolDescription = require('get-symbol-description'); +var assert = require('assert'); + +assert(getSymbolDescription(Symbol()) === undefined); +assert(getSymbolDescription(Symbol('')) === ''); // or `undefined`, if in an engine that lacks name inference from concise method +assert(getSymbolDescription(Symbol('foo')) === 'foo'); +assert(getSymbolDescription(Symbol.iterator) === 'Symbol.iterator'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/get-symbol-description +[2]: https://versionbadg.es/inspect-js/get-symbol-description.svg +[5]: https://david-dm.org/inspect-js/get-symbol-description.svg +[6]: https://david-dm.org/inspect-js/get-symbol-description +[7]: https://david-dm.org/inspect-js/get-symbol-description/dev-status.svg +[8]: https://david-dm.org/inspect-js/get-symbol-description#info=devDependencies +[11]: https://nodei.co/npm/get-symbol-description.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/get-symbol-description.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/get-symbol-description.svg +[downloads-url]: https://npm-stat.com/charts.html?package=get-symbol-description +[codecov-image]: https://codecov.io/gh/inspect-js/get-symbol-description/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/get-symbol-description/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/get-symbol-description +[actions-url]: https://github.com/inspect-js/get-symbol-description/actions diff --git a/node_modules/get-symbol-description/getInferredName.js b/node_modules/get-symbol-description/getInferredName.js new file mode 100644 index 000000000..2dab6e77b --- /dev/null +++ b/node_modules/get-symbol-description/getInferredName.js @@ -0,0 +1,10 @@ +'use strict'; + +var getInferredName; +try { + // eslint-disable-next-line no-new-func + getInferredName = Function('s', 'return { [s]() {} }[s].name;'); +} catch (e) {} + +var inferred = function () {}; +module.exports = getInferredName && inferred.name === 'inferred' ? getInferredName : null; diff --git a/node_modules/get-symbol-description/index.js b/node_modules/get-symbol-description/index.js new file mode 100644 index 000000000..05d067fc1 --- /dev/null +++ b/node_modules/get-symbol-description/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBound = require('call-bind/callBound'); + +var $SyntaxError = GetIntrinsic('%SyntaxError%'); +var getGlobalSymbolDescription = GetIntrinsic('%Symbol.keyFor%', true); +var thisSymbolValue = callBound('%Symbol.prototype.valueOf%', true); +var symToStr = callBound('Symbol.prototype.toString', true); + +var getInferredName = require('./getInferredName'); + +/* eslint-disable consistent-return */ +module.exports = callBound('%Symbol.prototype.description%', true) || function getSymbolDescription(symbol) { + if (!thisSymbolValue) { + throw new $SyntaxError('Symbols are not supported in this environment'); + } + + // will throw if not a symbol primitive or wrapper object + var sym = thisSymbolValue(symbol); + + if (getInferredName) { + var name = getInferredName(sym); + if (name === '') { + return; + } + return name.slice(1, -1); // name.slice('['.length, -']'.length); + } + + var desc; + if (getGlobalSymbolDescription) { + desc = getGlobalSymbolDescription(sym); + if (typeof desc === 'string') { + return desc; + } + } + + desc = symToStr(sym).slice(7, -1); // str.slice('Symbol('.length, -')'.length); + if (desc) { + return desc; + } +}; diff --git a/node_modules/get-symbol-description/package.json b/node_modules/get-symbol-description/package.json new file mode 100644 index 000000000..2767c42eb --- /dev/null +++ b/node_modules/get-symbol-description/package.json @@ -0,0 +1,71 @@ +{ + "name": "get-symbol-description", + "version": "1.0.0", + "description": "Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./getInferredName": "./getInferredName.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=.js,.mjs .", + "postlint": "evalmd README.md", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/get-symbol-description.git" + }, + "keywords": [ + "symbol", + "ecmascript", + "javascript", + "description" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/get-symbol-description/issues" + }, + "homepage": "https://github.com/inspect-js/get-symbol-description#readme", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "es-value-fixtures": "^1.2.1", + "eslint": "^7.32.0", + "evalmd": "^0.0.19", + "foreach": "^2.0.5", + "has": "^1.0.3", + "nyc": "^10.3.2", + "object-inspect": "^1.11.0", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.1" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/es-abstract/test/helpers/getSymbolDescription.js b/node_modules/get-symbol-description/test/index.js similarity index 92% rename from node_modules/es-abstract/test/helpers/getSymbolDescription.js rename to node_modules/get-symbol-description/test/index.js index 05be3bbbf..d5363c2b9 100644 --- a/node_modules/es-abstract/test/helpers/getSymbolDescription.js +++ b/node_modules/get-symbol-description/test/index.js @@ -4,10 +4,10 @@ var test = require('tape'); var debug = require('object-inspect'); var forEach = require('foreach'); var has = require('has'); - var v = require('es-value-fixtures'); -var getSymbolDescription = require('../../helpers/getSymbolDescription'); -var getInferredName = require('../../helpers/getInferredName'); + +var getSymbolDescription = require('../'); +var getInferredName = require('../getInferredName'); test('getSymbolDescription', function (t) { t.test('no symbols', { skip: v.hasSymbols }, function (st) { diff --git a/node_modules/globalthis/.eslintrc b/node_modules/globalthis/.eslintrc new file mode 100644 index 000000000..afbd40a7d --- /dev/null +++ b/node_modules/globalthis/.eslintrc @@ -0,0 +1,18 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "browser": true, + "node": true, + }, + + "ignorePatterns": [ + "dist", + ], + + "rules": { + "max-statements-per-line": [2, { "max": 2 }] + } +} diff --git a/node_modules/globalthis/.nycrc b/node_modules/globalthis/.nycrc new file mode 100644 index 000000000..726d82ba2 --- /dev/null +++ b/node_modules/globalthis/.nycrc @@ -0,0 +1,10 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "dist", + "test" + ] +} diff --git a/node_modules/globalthis/CHANGELOG.md b/node_modules/globalthis/CHANGELOG.md new file mode 100644 index 000000000..b2962da9a --- /dev/null +++ b/node_modules/globalthis/CHANGELOG.md @@ -0,0 +1,96 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.3](https://github.com/es-shims/globalThis/compare/v1.0.2...v1.0.3) - 2022-05-07 + +### Commits + +- [actions] reuse common workflows [`65891e4`](https://github.com/es-shims/globalThis/commit/65891e4d285ae04e216ff01160cff861e0e41a4f) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`82f8481`](https://github.com/es-shims/globalThis/commit/82f84815027f666f625e1ccb41f723800a05d016) +- [meta] use `npmignore` to autogenerate an npmignore file [`53afc39`](https://github.com/es-shims/globalThis/commit/53afc39bfd3eb262c5e6e9dfd25e4f81f3578c1c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`03169d4`](https://github.com/es-shims/globalThis/commit/03169d4254c9ef177d6537becca5b0b56df50d91) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`4986e3e`](https://github.com/es-shims/globalThis/commit/4986e3e20c5f664601871a0fac68c1efd0a68472) +- [actions] update codecov uploader [`15c4b06`](https://github.com/es-shims/globalThis/commit/15c4b062b1a9434dbec93604ed31b6893d11d458) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`8b04a74`](https://github.com/es-shims/globalThis/commit/8b04a749d3cb2f825920beb700899f0c13ad2fb8) +- [Fix] `globalThis` should be writable [`8759985`](https://github.com/es-shims/globalThis/commit/87599852d5f91e2e1f06e424cdefcd443ec98476) +- [readme] add github actions/codecov badges [`0263f0d`](https://github.com/es-shims/globalThis/commit/0263f0debfa982b928fcd301b11fe3e3193bf33d) +- [Dev Deps] update `aud`, `eslint`, `tape` [`e88d296`](https://github.com/es-shims/globalThis/commit/e88d296bb026633bdd1be2e1542903a5d0107cd8) +- [meta] use `prepublishOnly` script for npm 7+ [`c81fde6`](https://github.com/es-shims/globalThis/commit/c81fde6a9e44345e56dada588e16db736809ddd9) +- [Tests] nycignore `dist` [`bde0c0d`](https://github.com/es-shims/globalThis/commit/bde0c0df46f684316ab414da1487a0cd2efe3eeb) +- [meta] gitignore coverage output [`79f73f8`](https://github.com/es-shims/globalThis/commit/79f73f8b0c1180567fba473f92c07d71efd4dd0b) + +## [v1.0.2](https://github.com/es-shims/globalThis/compare/v1.0.1...v1.0.2) - 2021-02-22 + +### Commits + +- [Tests] migrate tests to Github Actions [`a3f50f7`](https://github.com/es-shims/globalThis/commit/a3f50f77a392c0ffdaca18fb5881743b874d0a6f) +- [meta] do not publish github action workflow files [`eb5c787`](https://github.com/es-shims/globalThis/commit/eb5c7879317cd7f1fde52228660be8e779c9d4e3) +- [Tests] add `implementation` est; run `es-shim-api` in postlint; use `tape` runner [`c9dd792`](https://github.com/es-shims/globalThis/commit/c9dd792d492ec9744a5e5d5033e919b94d441bac) +- [Tests] fix native tests [`6b76dff`](https://github.com/es-shims/globalThis/commit/6b76dff3af3fe9bcd7b24d48c6ba55116169e840) +- [Tests] run `nyc` on all tests [`0407f79`](https://github.com/es-shims/globalThis/commit/0407f79f64bf9fc30111f3bf4dff7e4205331fb6) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape`, `browserify` [`b8cc020`](https://github.com/es-shims/globalThis/commit/b8cc020e5ecc2d5a5a5b4160aabc60cc42d50c03) +- [actions] add "Allow Edits" workflow [`e2854df`](https://github.com/es-shims/globalThis/commit/e2854df653667b16ff34a7a0a7b677231dfe2b02) +- [readme] remove travis badge [`262eb76`](https://github.com/es-shims/globalThis/commit/262eb76e4e0d3f2df354cc6aff1b18f50c7b147f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`; add `safe-publish-latest` [`3c76883`](https://github.com/es-shims/globalThis/commit/3c7688325f6aa050afe3ed978e423e70974e4d3b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`7276123`](https://github.com/es-shims/globalThis/commit/727612396262fc22275f44159ec5b39115dc359f) +- [actions] update workflows [`bcb0f42`](https://github.com/es-shims/globalThis/commit/bcb0f42c319cf19746e03a6667cf25d3e835f46e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`5485851`](https://github.com/es-shims/globalThis/commit/548585148e874d6eb0b0463526a88e8b64e7c5eb) +- [Dev Deps] update `auto-changelog`, `tape` [`6a01da3`](https://github.com/es-shims/globalThis/commit/6a01da3f321983d1970d793711d31cf8508ef94d) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7a07f4e`](https://github.com/es-shims/globalThis/commit/7a07f4ebc5580933b40bbe67f357632e0f7d5586) +- [meta] only run the build script in publish [`797e492`](https://github.com/es-shims/globalThis/commit/797e492519ed0bf6270537290e69ca0456790575) +- [meta] combine duplicate `prepublish` scripts [`92bbef0`](https://github.com/es-shims/globalThis/commit/92bbef0f91f6e91163186f68b5f5f1ffd26c479d) +- [Dev Deps] update `auto-changelog`; add `aud` [`be6dbec`](https://github.com/es-shims/globalThis/commit/be6dbecefddb40493c5568a2cbe83f74e2e0385f) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bfd54f8`](https://github.com/es-shims/globalThis/commit/bfd54f8388758e7dec618dc34956e7075a7c15f0) +- [Tests] only audit prod deps [`0f64b47`](https://github.com/es-shims/globalThis/commit/0f64b47acfa812affbacbe487fcb0f6c02eccc25) + +## [v1.0.1](https://github.com/es-shims/globalThis/compare/v1.0.0...v1.0.1) - 2019-12-15 + +### Fixed + +- [Refactor] only use `global` in node; only check browser globals in browsers [`#2`](https://github.com/es-shims/globalThis/issues/2) + +### Commits + +- [Tests] use shared travis-ci configs [`edb1cc9`](https://github.com/es-shims/globalThis/commit/edb1cc9d900a40e8c1732264b6e85d4f9760920c) +- [Tests] remove `jscs` [`1847ac2`](https://github.com/es-shims/globalThis/commit/1847ac2487e2c13cf8bf717211c6a93fe60831f9) +- [meta] add `auto-changelog` [`933c381`](https://github.com/es-shims/globalThis/commit/933c381083890965ac848d3da21ed9e910cc09cf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `tape` [`93310bc`](https://github.com/es-shims/globalThis/commit/93310bc01ddacbe23a93b3022daebc9b6f6ae8c3) +- [actions] add automatic rebasing / merge commit blocking [`231dec5`](https://github.com/es-shims/globalThis/commit/231dec511c42e1509035d176e2451c55de20bfe7) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `covert`, `is`, `tape` [`e50c1f6`](https://github.com/es-shims/globalThis/commit/e50c1f6d2d45c66f53ffda471bbf62c08ed15c9b) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`4abd340`](https://github.com/es-shims/globalThis/commit/4abd3400fc8942963e77515d0cf2fbcac3cb7bc8) +- [meta] add `funding` field [`2d1f9eb`](https://github.com/es-shims/globalThis/commit/2d1f9eb00b2dea46f6de7d563b31db17f44f1899) +- [meta] remove unused deps [`5bd6bef`](https://github.com/es-shims/globalThis/commit/5bd6befefbaf0c7e6f70eb3c1919b5c5a271d29d) +- readme: Fix casing + phrasing [`66379cc`](https://github.com/es-shims/globalThis/commit/66379ccf5008f7676aac5f3dec1ea2fe55e3516c) +- [Deps] update `define-properties`, `object-keys` [`4585e5a`](https://github.com/es-shims/globalThis/commit/4585e5ab461093ab6c62ce0b22b959925e8f818c) +- fix issue with Webpack's CaseSensitivePathsPlugin [`842e84e`](https://github.com/es-shims/globalThis/commit/842e84e0096c9eea660c78fd19c9c07799b81537) + +## v1.0.0 - 2018-08-10 + +### Commits + +- Dotfiles. [`f01b02d`](https://github.com/es-shims/globalThis/commit/f01b02d315865c812e5b9158f71bb18f3b153def) +- [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm`; improve matrix [`ed1fa5d`](https://github.com/es-shims/globalThis/commit/ed1fa5d473d933b3270410b658183dc1c556a663) +- Tests [`ab99527`](https://github.com/es-shims/globalThis/commit/ab99527e3c434e89dd40f8cba3b0e2e976156611) +- [breaking] update property name, rename repo [`be42e3d`](https://github.com/es-shims/globalThis/commit/be42e3dce08b62a78260d487f62fa69b410d7918) +- package.json [`ca43a36`](https://github.com/es-shims/globalThis/commit/ca43a363e3ce0dbc2d4623169f8cb3d792f8bc84) +- implementation [`80b5a40`](https://github.com/es-shims/globalThis/commit/80b5a403ef532254b2af46ec3ba5f442a308a57d) +- read me [`f6df9b3`](https://github.com/es-shims/globalThis/commit/f6df9b3b69977f04e080d1720ba1203c13447884) +- Rename `System.global` to `global` [`fa8503c`](https://github.com/es-shims/globalThis/commit/fa8503cf94afe84b3729dd5b0e9f73f481fb1fee) +- Initial commit [`99f1dc3`](https://github.com/es-shims/globalThis/commit/99f1dc328d0b4c52a550037de0139d5452ac01de) +- [Tests] up to `node` `v6.7`, `v5.12`, `v4.6`; improve test matrix [`712ec0e`](https://github.com/es-shims/globalThis/commit/712ec0e545d1603c4e23f4ff1acb066cc4a3c9ee) +- [Dev Deps] update `browserify`, `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`73278bd`](https://github.com/es-shims/globalThis/commit/73278bd638d1e762eb7415350a738f5d345896f5) +- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `browserify`, `eslint`, `for-each`, `is`, `nsp`, `tape` [`75fa992`](https://github.com/es-shims/globalThis/commit/75fa9929be81afec43895c02e33d0b8a78f11d1f) +- [Dev Deps] update `browserify`, `is`, `tape`, `nsp`, `eslint` [`b223e86`](https://github.com/es-shims/globalThis/commit/b223e86d0868efb1f0c966370ff2f822516d6956) +- [Tests] fix linting; remove parallelshell [`271b329`](https://github.com/es-shims/globalThis/commit/271b329d174b94c08913060752a2e9f9116fe5b8) +- [Deps] update `function-bind`, `object-keys` [`002d0c5`](https://github.com/es-shims/globalThis/commit/002d0c5685a83f97e014a8a07134eb621794c649) +- Only apps should have lockfiles [`960f1d0`](https://github.com/es-shims/globalThis/commit/960f1d00598cbba5427849c863eb10b8de82fb1b) +- [Tests] on `node` `v10.8` [`37fad9d`](https://github.com/es-shims/globalThis/commit/37fad9db9860c654efe0a32ec187f21730d5fed8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`df28dfe`](https://github.com/es-shims/globalThis/commit/df28dfe7f0daf3db95a536a6ce64062bd706185d) +- [New] add `auto` entry point [`86eb2ab`](https://github.com/es-shims/globalThis/commit/86eb2ab4c4dc2babff20ac436cf7fb7f8da7d2f2) +- [Dev Deps] update `eslint` [`1bdc1aa`](https://github.com/es-shims/globalThis/commit/1bdc1aacfb94dcdc7bb61688c7634c435012e35d) +- [Deps] update `object-keys` [`72cdbf5`](https://github.com/es-shims/globalThis/commit/72cdbf596b16103ee711d52b2b645b42efc08c51) +- Update most common usage to invoke the function upon being required [`5026296`](https://github.com/es-shims/globalThis/commit/502629660da2c21cfb0f8ca233e2b9d427c052fe) diff --git a/node_modules/eslint-module-utils/node_modules/p-locate/license b/node_modules/globalthis/LICENSE similarity index 85% rename from node_modules/eslint-module-utils/node_modules/p-locate/license rename to node_modules/globalthis/LICENSE index 654d0bfe9..44f679ad4 100644 --- a/node_modules/eslint-module-utils/node_modules/p-locate/license +++ b/node_modules/globalthis/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) 2016 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/globalthis/README.md b/node_modules/globalthis/README.md new file mode 100644 index 000000000..6abffa033 --- /dev/null +++ b/node_modules/globalthis/README.md @@ -0,0 +1,70 @@ +# globalThis [![Version Badge][npm-version-svg]][npm-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][npm-url] + +An ECMAScript spec-compliant polyfill/shim for `globalThis`. Invoke its "shim" method to shim `globalThis` if it is unavailable. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec proposal](https://github.com/tc39/proposal-global). + +Most common usage: +```js +var globalThis = require('globalthis')(); // returns native globalThis if compliant + /* or */ +var globalThis = require('globalthis/polyfill')(); // returns native globalThis if compliant +``` + +## Example + +```js +var assert = require('assert'); + +// the below function is not CSP-compliant, but reliably gets the +// global object in sloppy mode in every engine. +var getGlobal = Function('return this'); + +assert.equal(globalThis, getGlobal()); +``` + +```js +/* when `globalThis` is not present */ +var shimmedGlobal = require('globalthis').shim(); + /* or */ +var shimmedGlobal = require('globalthis/shim')(); + +assert.equal(shimmedGlobal, globalThis); +assert.equal(shimmedGlobal, getGlobal()); +``` + +```js +/* when `globalThis` is present */ +var shimmedGlobal = require('globalthis').shim(); + +assert.equal(shimmedGlobal, globalThis); +assert.equal(shimmedGlobal, getGlobal()); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[npm-url]: https://npmjs.org/package/globalthis +[npm-version-svg]: https://versionbadg.es/ljharb/globalThis.svg +[deps-svg]: https://david-dm.org/ljharb/globalThis.svg?theme=shields.io +[deps-url]: https://david-dm.org/ljharb/globalThis +[dev-deps-svg]: https://david-dm.org/ljharb/globalThis/dev-status.svg?theme=shields.io +[dev-deps-url]: https://david-dm.org/ljharb/globalThis#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/globalthis.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/globalthis.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/globalthis.svg +[downloads-url]: https://npm-stat.com/charts.html?package=globalthis +[codecov-image]: https://codecov.io/gh/es-shims/globalThis/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/globalThis/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/globalThis +[actions-url]: https://github.com/es-shims/globalThis/actions diff --git a/node_modules/globalthis/auto.js b/node_modules/globalthis/auto.js new file mode 100644 index 000000000..8ebf606cb --- /dev/null +++ b/node_modules/globalthis/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/globalthis/implementation.browser.js b/node_modules/globalthis/implementation.browser.js new file mode 100644 index 000000000..746a274d9 --- /dev/null +++ b/node_modules/globalthis/implementation.browser.js @@ -0,0 +1,11 @@ +/* eslint no-negated-condition: 0, no-new-func: 0 */ + +'use strict'; + +if (typeof self !== 'undefined') { + module.exports = self; +} else if (typeof window !== 'undefined') { + module.exports = window; +} else { + module.exports = Function('return this')(); +} diff --git a/node_modules/globalthis/implementation.js b/node_modules/globalthis/implementation.js new file mode 100644 index 000000000..46b8ceb3a --- /dev/null +++ b/node_modules/globalthis/implementation.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = global; diff --git a/node_modules/globalthis/index.js b/node_modules/globalthis/index.js new file mode 100644 index 000000000..7c73cef2e --- /dev/null +++ b/node_modules/globalthis/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var defineProperties = require('define-properties'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var polyfill = getPolyfill(); + +var getGlobal = function () { return polyfill; }; + +defineProperties(getGlobal, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = getGlobal; diff --git a/node_modules/globalthis/package.json b/node_modules/globalthis/package.json new file mode 100644 index 000000000..ce70d4d3a --- /dev/null +++ b/node_modules/globalthis/package.json @@ -0,0 +1,97 @@ +{ + "name": "globalthis", + "version": "1.0.3", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ECMAScript spec-compliant polyfill/shim for `globalThis`", + "license": "MIT", + "main": "index.js", + "browser": { + "./implementation": "./implementation.browser.js" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest && npm run build", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound --property", + "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/System.global.git" + }, + "keywords": [ + "window", + "self", + "global", + "globalThis", + "System.global", + "global object", + "global this value", + "ECMAScript", + "es-shim API", + "polyfill", + "shim" + ], + "dependencies": { + "define-properties": "^1.1.3" + }, + "devDependencies": { + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "browserify": "^16.5.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "is": "^3.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + "browserShim.js", + ".github/workflows" + ] + } +} diff --git a/node_modules/globalthis/polyfill.js b/node_modules/globalthis/polyfill.js new file mode 100644 index 000000000..e2e706bd5 --- /dev/null +++ b/node_modules/globalthis/polyfill.js @@ -0,0 +1,10 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = function getPolyfill() { + if (typeof global !== 'object' || !global || global.Math !== Math || global.Array !== Array) { + return implementation; + } + return global; +}; diff --git a/node_modules/globalthis/shim.js b/node_modules/globalthis/shim.js new file mode 100644 index 000000000..7ccf455d3 --- /dev/null +++ b/node_modules/globalthis/shim.js @@ -0,0 +1,22 @@ +'use strict'; + +var define = require('define-properties'); +var getPolyfill = require('./polyfill'); + +module.exports = function shimGlobal() { + var polyfill = getPolyfill(); + if (define.supportsDescriptors) { + var descriptor = Object.getOwnPropertyDescriptor(polyfill, 'globalThis'); + if (!descriptor || (descriptor.configurable && (descriptor.enumerable || !descriptor.writable || globalThis !== polyfill))) { // eslint-disable-line max-len + Object.defineProperty(polyfill, 'globalThis', { + configurable: true, + enumerable: false, + value: polyfill, + writable: true + }); + } + } else if (typeof globalThis !== 'object' || globalThis !== polyfill) { + polyfill.globalThis = polyfill; + } + return polyfill; +}; diff --git a/node_modules/globalthis/test/implementation.js b/node_modules/globalthis/test/implementation.js new file mode 100644 index 000000000..36f1275bf --- /dev/null +++ b/node_modules/globalthis/test/implementation.js @@ -0,0 +1,11 @@ +'use strict'; + +var implementation = require('../implementation'); +var test = require('tape'); +var runTests = require('./tests'); + +test('implementation', function (t) { + runTests(implementation, t); + + t.end(); +}); diff --git a/node_modules/globalthis/test/index.js b/node_modules/globalthis/test/index.js new file mode 100644 index 000000000..dac0a10a6 --- /dev/null +++ b/node_modules/globalthis/test/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var systemGlobal = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + runTests(systemGlobal(), t); + + t.end(); +}); diff --git a/node_modules/globalthis/test/native.js b/node_modules/globalthis/test/native.js new file mode 100644 index 000000000..7a085ab0a --- /dev/null +++ b/node_modules/globalthis/test/native.js @@ -0,0 +1,26 @@ +'use strict'; + +var test = require('tape'); +var defineProperties = require('define-properties'); +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var missing = {}; +var theGlobal = typeof globalThis === 'object' ? globalThis : missing; + +var runTests = require('./tests'); + +test('native', { todo: theGlobal === missing }, function (t) { + if (theGlobal !== missing) { + t.equal(typeof theGlobal, 'object', 'globalThis is an object'); + t.equal('globalThis' in theGlobal, true, 'globalThis is in globalThis'); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(theGlobal, 'globalThis'), 'globalThis is not enumerable'); + et.end(); + }); + + runTests(theGlobal, t); + } + + t.end(); +}); diff --git a/node_modules/globalthis/test/shimmed.js b/node_modules/globalthis/test/shimmed.js new file mode 100644 index 000000000..24b3f34d2 --- /dev/null +++ b/node_modules/globalthis/test/shimmed.js @@ -0,0 +1,29 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var runTests = require('./tests'); + +test('shimmed', function (t) { + t.equal(typeof globalThis, 'object', 'globalThis is an object'); + t.equal('globalThis' in globalThis, true, 'globalThis is in globalThis'); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(globalThis, 'globalThis'), 'globalThis.globalThis is not enumerable'); + et.end(); + }); + + t.test('writability', { skip: !defineProperties.supportsDescriptors }, function (wt) { + var desc = Object.getOwnPropertyDescriptor(globalThis, 'globalThis'); + wt.equal(desc.writable, true, 'globalThis.globalThis is writable'); + wt.end(); + }); + + runTests(globalThis.globalThis, t); + + t.end(); +}); diff --git a/node_modules/globalthis/test/tests.js b/node_modules/globalthis/test/tests.js new file mode 100644 index 000000000..218964054 --- /dev/null +++ b/node_modules/globalthis/test/tests.js @@ -0,0 +1,36 @@ +/* jscs:disable requireUseStrict */ +/* eslint strict: 0, max-statements: 0 */ + +module.exports = function (theGlobal, t) { + t.equal(typeof theGlobal, 'object', 'is an object'); + + t.test('built-in globals', function (st) { + st.equal(theGlobal.Math, Math, 'Math is on the global'); + st.equal(theGlobal.JSON, JSON, 'JSON is on the global'); + st.equal(theGlobal.String, String, 'String is on the global'); + st.equal(theGlobal.Array, Array, 'Array is on the global'); + st.equal(theGlobal.Number, Number, 'Number is on the global'); + st.equal(theGlobal.Boolean, Boolean, 'Boolean is on the global'); + st.equal(theGlobal.Object, Object, 'Object is on the global'); + st.equal(theGlobal.Function, Function, 'Function is on the global'); + st.equal(theGlobal.Date, Date, 'Date is on the global'); + st.equal(theGlobal.RegExp, RegExp, 'RegExp is on the global'); + + if (typeof Symbol === 'undefined') { + st.comment('# SKIP Symbol is not supported'); + } else { + st.equal(theGlobal.Symbol, Symbol, 'Symbol is on the global'); + } + st.end(); + }); + + t.test('custom property', function (st) { + var key = 'random_custom_key_' + new Date().getTime(); + var semaphore = {}; + /* eslint no-eval: 1 */ + eval(key + ' = semaphore;'); + st.equal(theGlobal[key], semaphore, 'global variable ends up on the global object'); + delete theGlobal[key]; // eslint-disable-line no-param-reassign + st.end(); + }); +}; diff --git a/node_modules/gopd/.eslintrc b/node_modules/gopd/.eslintrc new file mode 100644 index 000000000..e2550c0fb --- /dev/null +++ b/node_modules/gopd/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-style": [2, "declaration"], + "id-length": 0, + "multiline-comment-style": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/gopd/.github/FUNDING.yml b/node_modules/gopd/.github/FUNDING.yml new file mode 100644 index 000000000..94a44a8e8 --- /dev/null +++ b/node_modules/gopd/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/gopd +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/gopd/CHANGELOG.md b/node_modules/gopd/CHANGELOG.md new file mode 100644 index 000000000..f111eb178 --- /dev/null +++ b/node_modules/gopd/CHANGELOG.md @@ -0,0 +1,25 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/ljharb/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01 + +### Commits + +- [Fix] actually export gOPD instead of dP [`4b624bf`](https://github.com/ljharb/gopd/commit/4b624bfbeff788c5e3ff16d9443a83627847234f) + +## v1.0.0 - 2022-11-01 + +### Commits + +- Initial implementation, tests, readme [`0911e01`](https://github.com/ljharb/gopd/commit/0911e012cd642092bd88b732c161c58bf4f20bea) +- Initial commit [`b84e33f`](https://github.com/ljharb/gopd/commit/b84e33f5808a805ac57ff88d4247ad935569acbe) +- [actions] add reusable workflows [`12ae28a`](https://github.com/ljharb/gopd/commit/12ae28ae5f50f86e750215b6e2188901646d0119) +- npm init [`280118b`](https://github.com/ljharb/gopd/commit/280118badb45c80b4483836b5cb5315bddf6e582) +- [meta] add `auto-changelog` [`bb78de5`](https://github.com/ljharb/gopd/commit/bb78de5639a180747fb290c28912beaaf1615709) +- [meta] create FUNDING.yml; add `funding` in package.json [`11c22e6`](https://github.com/ljharb/gopd/commit/11c22e6355bb01f24e7fac4c9bb3055eb5b25002) +- [meta] use `npmignore` to autogenerate an npmignore file [`4f4537a`](https://github.com/ljharb/gopd/commit/4f4537a843b39f698c52f072845092e6fca345bb) +- Only apps should have lockfiles [`c567022`](https://github.com/ljharb/gopd/commit/c567022a18573aa7951cf5399445d9840e23e98b) diff --git a/node_modules/gopd/LICENSE b/node_modules/gopd/LICENSE new file mode 100644 index 000000000..6abfe1434 --- /dev/null +++ b/node_modules/gopd/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/gopd/README.md b/node_modules/gopd/README.md new file mode 100644 index 000000000..784e56a09 --- /dev/null +++ b/node_modules/gopd/README.md @@ -0,0 +1,40 @@ +# gopd [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation. + +## Usage + +```javascript +var gOPD = require('gopd'); +var assert = require('assert'); + +if (gOPD) { + assert.equal(typeof gOPD, 'function', 'descriptors supported'); + // use gOPD like Object.getOwnPropertyDescriptor here +} else { + assert.ok(!gOPD, 'descriptors not supported'); +} +``` + +[package-url]: https://npmjs.org/package/gopd +[npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg +[deps-svg]: https://david-dm.org/ljharb/gopd.svg +[deps-url]: https://david-dm.org/ljharb/gopd +[dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/gopd.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/gopd.svg +[downloads-url]: https://npm-stat.com/charts.html?package=gopd +[codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/gopd/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd +[actions-url]: https://github.com/ljharb/gopd/actions diff --git a/node_modules/gopd/index.js b/node_modules/gopd/index.js new file mode 100644 index 000000000..fb6d3bbef --- /dev/null +++ b/node_modules/gopd/index.js @@ -0,0 +1,16 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; diff --git a/node_modules/gopd/package.json b/node_modules/gopd/package.json new file mode 100644 index 000000000..7879d9622 --- /dev/null +++ b/node_modules/gopd/package.json @@ -0,0 +1,71 @@ +{ + "name": "gopd", + "version": "1.0.1", + "description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "postlint": "evalmd README.md", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/gopd.git" + }, + "keywords": [ + "ecmascript", + "javascript", + "getownpropertydescriptor", + "property", + "descriptor" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/gopd/issues" + }, + "homepage": "https://github.com/ljharb/gopd#readme", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/gopd/test/index.js b/node_modules/gopd/test/index.js new file mode 100644 index 000000000..0376bfbad --- /dev/null +++ b/node_modules/gopd/test/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var test = require('tape'); +var gOPD = require('../'); + +test('gOPD', function (t) { + t.test('supported', { skip: !gOPD }, function (st) { + st.equal(typeof gOPD, 'function', 'is a function'); + + var obj = { x: 1 }; + st.ok('x' in obj, 'property exists'); + + var desc = gOPD(obj, 'x'); + st.deepEqual( + desc, + { + configurable: true, + enumerable: true, + value: 1, + writable: true + }, + 'descriptor is as expected' + ); + + st.end(); + }); + + t.test('not supported', { skip: gOPD }, function (st) { + st.notOk(gOPD, 'is falsy'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/has-bigints/.eslintrc b/node_modules/has-bigints/.eslintrc index 699b23b6d..3b5d9e90e 100644 --- a/node_modules/has-bigints/.eslintrc +++ b/node_modules/has-bigints/.eslintrc @@ -2,8 +2,4 @@ "root": true, "extends": "@ljharb", - - "rules": { - "operator-linebreak": [2, "before"], - }, } diff --git a/node_modules/has-bigints/.nycrc b/node_modules/has-bigints/.nycrc index 1826526e0..bdd626ce9 100644 --- a/node_modules/has-bigints/.nycrc +++ b/node_modules/has-bigints/.nycrc @@ -2,10 +2,6 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, "exclude": [ "coverage", "test" diff --git a/node_modules/has-bigints/CHANGELOG.md b/node_modules/has-bigints/CHANGELOG.md index 48f9dc239..ef24d1e09 100644 --- a/node_modules/has-bigints/CHANGELOG.md +++ b/node_modules/has-bigints/CHANGELOG.md @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.0.2](https://github.com/inspect-js/has-bigints/compare/v1.0.1...v1.0.2) - 2022-04-19 + +### Commits + +- [actions] reuse common workflows [`a655b7f`](https://github.com/inspect-js/has-bigints/commit/a655b7f7733ba2de078b3a59a704c2795440d08c) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`730a2e5`](https://github.com/inspect-js/has-bigints/commit/730a2e53d3f5f82ac43a11cb9753b11445d06d58) +- [readme] add github actions/codecov badges; update URLs [`9a83788`](https://github.com/inspect-js/has-bigints/commit/9a8378861917b41ebb360a9d8ab3d39aa33acf7b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`b1edc52`](https://github.com/inspect-js/has-bigints/commit/b1edc522ef6c23556e55b9c81b65fe884d1e2cc4) +- [actions] update codecov uploader [`cbb1bd0`](https://github.com/inspect-js/has-bigints/commit/cbb1bd0eff486070a19283238da6afd33ca73b4b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`8717e6d`](https://github.com/inspect-js/has-bigints/commit/8717e6d6ae6b5010aea1fac5e48dfdfaf35d8c72) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `safe-publish-latest`, `tape` [`5f70eab`](https://github.com/inspect-js/has-bigints/commit/5f70eab763118d40415f13e47446ea5c011fbe18) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`a1446bc`](https://github.com/inspect-js/has-bigints/commit/a1446bc3e806ce3911c73d6fbdd981f461c41019) +- [meta] use `prepublishOnly` script for npm 7+ [`f2dd197`](https://github.com/inspect-js/has-bigints/commit/f2dd19716a06ca7a971644761e864f0435db278e) +- [actions] use checkout v3 [`1ba72f1`](https://github.com/inspect-js/has-bigints/commit/1ba72f19ada076791ff193aca9d8537388d67ddb) +- [Refactor] use a global variable to get the original BigInt instead of a global property [`a7ccfac`](https://github.com/inspect-js/has-bigints/commit/a7ccfac0414e56dadd263fd07c0b5141388df502) +- [actions] skip `npm ls` on older nodes [`62d31e7`](https://github.com/inspect-js/has-bigints/commit/62d31e79658b16391458d0728e0dacbee8694ebb) + ## [v1.0.1](https://github.com/inspect-js/has-bigints/compare/v1.0.0...v1.0.1) - 2020-12-13 ### Commits diff --git a/node_modules/has-bigints/README.md b/node_modules/has-bigints/README.md index 384707985..69414e425 100644 --- a/node_modules/has-bigints/README.md +++ b/node_modules/has-bigints/README.md @@ -1,11 +1,13 @@ -# has-bigints [![Version Badge][2]][1] +# has-bigints [![Version Badge][npm-version-svg]][package-url] -[![dependency status][5]][6] -[![dev dependency status][7]][8] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] -[![npm badge][11]][1] +[![npm badge][npm-badge-png]][package-url] Determine if the JS environment has BigInt support. @@ -20,16 +22,18 @@ hasBigInts() === true; // if the environment has native BigInt support. Not poly ## Tests Simply clone the repo, `npm install`, and run `npm test` -[1]: https://npmjs.org/package/has-bigints -[2]: https://versionbadg.es/ljharb/has-bigints.svg -[5]: https://david-dm.org/ljharb/has-bigints.svg -[6]: https://david-dm.org/ljharb/has-bigints -[7]: https://david-dm.org/ljharb/has-bigints/dev-status.svg -[8]: https://david-dm.org/ljharb/has-bigints#info=devDependencies -[9]: https://ci.testling.com/ljharb/has-bigints.png -[10]: https://ci.testling.com/ljharb/has-bigints -[11]: https://nodei.co/npm/has-bigints.png?downloads=true&stars=true +[package-url]: https://npmjs.org/package/has-bigints +[npm-version-svg]: https://versionbadg.es/inspect-js/has-bigints.svg +[deps-svg]: https://david-dm.org/inspect-js/has-bigints.svg +[deps-url]: https://david-dm.org/inspect-js/has-bigints +[dev-deps-svg]: https://david-dm.org/inspect-js/has-bigints/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/has-bigints#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/has-bigints.png?downloads=true&stars=true [license-image]: https://img.shields.io/npm/l/has-bigints.svg [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/has-bigints.svg [downloads-url]: https://npm-stat.com/charts.html?package=has-bigints +[codecov-image]: https://codecov.io/gh/inspect-js/has-bigints/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-bigints/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-bigints +[actions-url]: https://github.com/inspect-js/has-bigints/actions diff --git a/node_modules/has-bigints/index.js b/node_modules/has-bigints/index.js index dd9af1df5..894237404 100644 --- a/node_modules/has-bigints/index.js +++ b/node_modules/has-bigints/index.js @@ -1,6 +1,6 @@ 'use strict'; -var $BigInt = global.BigInt; +var $BigInt = typeof BigInt !== 'undefined' && BigInt; module.exports = function hasNativeBigInts() { return typeof $BigInt === 'function' diff --git a/node_modules/has-bigints/package.json b/node_modules/has-bigints/package.json index 2a74a71f2..d133da9bb 100644 --- a/node_modules/has-bigints/package.json +++ b/node_modules/has-bigints/package.json @@ -1,12 +1,13 @@ { "name": "has-bigints", - "version": "1.0.1", + "version": "1.0.2", "description": "Determine if the JS environment has BigInt support.", "main": "index.js", "scripts": { "version": "auto-changelog && git add CHANGELOG.md", "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", - "prepublish": "not-in-publish || safe-publish-latest", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", "lint": "eslint --ext=js,mjs .", "pretest": "npm run lint", "tests-only": "nyc tape 'test/**/*.js'", @@ -33,14 +34,14 @@ }, "homepage": "https://github.com/ljharb/has-bigints#readme", "devDependencies": { - "@ljharb/eslint-config": "^17.3.0", - "aud": "^1.1.3", - "auto-changelog": "^2.2.1", - "eslint": "^7.15.0", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", "in-publish": "^2.0.1", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.0.1" + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" }, "auto-changelog": { "output": "CHANGELOG.md", diff --git a/node_modules/has-property-descriptors/.eslintrc b/node_modules/has-property-descriptors/.eslintrc new file mode 100644 index 000000000..2fcc002b0 --- /dev/null +++ b/node_modules/has-property-descriptors/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "id-length": 0, + "new-cap": [2, { + "capIsNewExceptions": ["GetIntrinsic"], + }], + }, +} diff --git a/node_modules/has-property-descriptors/.github/FUNDING.yml b/node_modules/has-property-descriptors/.github/FUNDING.yml new file mode 100644 index 000000000..817aacf1f --- /dev/null +++ b/node_modules/has-property-descriptors/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-property-descriptors +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-property-descriptors/.nycrc b/node_modules/has-property-descriptors/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/has-property-descriptors/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-property-descriptors/CHANGELOG.md b/node_modules/has-property-descriptors/CHANGELOG.md new file mode 100644 index 000000000..ae64b47b2 --- /dev/null +++ b/node_modules/has-property-descriptors/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-04-14 + +### Commits + +- Initial implementation, tests [`303559f`](https://github.com/inspect-js/has-property-descriptors/commit/303559f2a72dfe7111573a1aec475ed4a184c35a) +- Initial commit [`3a7ca2d`](https://github.com/inspect-js/has-property-descriptors/commit/3a7ca2dc49f1fff0279a28bb16265e7615e14749) +- read me [`dd73dce`](https://github.com/inspect-js/has-property-descriptors/commit/dd73dce09d89d0f7a4a6e3b1e562a506f979a767) +- npm init [`c1e6557`](https://github.com/inspect-js/has-property-descriptors/commit/c1e655779de632d68cb944c50da6b71bcb7b8c85) +- Only apps should have lockfiles [`e72f7c6`](https://github.com/inspect-js/has-property-descriptors/commit/e72f7c68de534b2d273ee665f8b18d4ecc7f70b0) diff --git a/node_modules/has-property-descriptors/LICENSE b/node_modules/has-property-descriptors/LICENSE new file mode 100644 index 000000000..2e7b9a3ea --- /dev/null +++ b/node_modules/has-property-descriptors/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/has-property-descriptors/README.md b/node_modules/has-property-descriptors/README.md new file mode 100644 index 000000000..d81fbd99e --- /dev/null +++ b/node_modules/has-property-descriptors/README.md @@ -0,0 +1,43 @@ +# has-property-descriptors [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD. + +## Example + +```js +var hasPropertyDescriptors = require('has-property-descriptors'); +var assert = require('assert'); + +assert.equal(hasPropertyDescriptors(), true); // will be `false` in IE 6-8, and ES5 engines + +// Arrays can not have their length `[[Defined]]` in some engines +assert.equal(hasPropertyDescriptors.hasArrayLengthDefineBug(), false); // will be `true` in Firefox 4-22, and node v0.6 +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/has-property-descriptors +[npm-version-svg]: https://versionbadg.es/inspect-js/has-property-descriptors.svg +[deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors.svg +[deps-url]: https://david-dm.org/inspect-js/has-property-descriptors +[dev-deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/has-property-descriptors#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/has-property-descriptors.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-property-descriptors.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-property-descriptors.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-property-descriptors +[codecov-image]: https://codecov.io/gh/inspect-js/has-property-descriptors/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-property-descriptors/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-property-descriptors +[actions-url]: https://github.com/inspect-js/has-property-descriptors/actions diff --git a/node_modules/has-property-descriptors/index.js b/node_modules/has-property-descriptors/index.js new file mode 100644 index 000000000..8e30683e3 --- /dev/null +++ b/node_modules/has-property-descriptors/index.js @@ -0,0 +1,33 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; diff --git a/node_modules/has-property-descriptors/package.json b/node_modules/has-property-descriptors/package.json new file mode 100644 index 000000000..2773d35ee --- /dev/null +++ b/node_modules/has-property-descriptors/package.json @@ -0,0 +1,70 @@ +{ + "name": "has-property-descriptors", + "version": "1.0.0", + "description": "Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/has-property-descriptors.git" + }, + "keywords": [ + "property", + "descriptors", + "has", + "environment", + "env", + "defineProperty", + "getOwnPropertyDescriptor" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/has-property-descriptors/issues" + }, + "homepage": "https://github.com/inspect-js/has-property-descriptors#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "evalmd": "^0.0.19", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/has-property-descriptors/test/index.js b/node_modules/has-property-descriptors/test/index.js new file mode 100644 index 000000000..7f02bd3e6 --- /dev/null +++ b/node_modules/has-property-descriptors/test/index.js @@ -0,0 +1,57 @@ +'use strict'; + +var test = require('tape'); + +var hasPropertyDescriptors = require('../'); + +var sentinel = {}; + +test('hasPropertyDescriptors', function (t) { + t.equal(typeof hasPropertyDescriptors, 'function', 'is a function'); + t.equal(typeof hasPropertyDescriptors.hasArrayLengthDefineBug, 'function', '`hasArrayLengthDefineBug` property is a function'); + + var yes = hasPropertyDescriptors(); + t.test('property descriptors', { skip: !yes }, function (st) { + var o = { a: sentinel }; + + st.deepEqual( + Object.getOwnPropertyDescriptor(o, 'a'), + { + configurable: true, + enumerable: true, + value: sentinel, + writable: true + }, + 'has expected property descriptor' + ); + + Object.defineProperty(o, 'a', { enumerable: false, writable: false }); + + st.deepEqual( + Object.getOwnPropertyDescriptor(o, 'a'), + { + configurable: true, + enumerable: false, + value: sentinel, + writable: false + }, + 'has expected property descriptor after [[Define]]' + ); + + st.end(); + }); + + var arrayBug = hasPropertyDescriptors.hasArrayLengthDefineBug(); + t.test('defining array lengths', { skip: !yes || arrayBug }, function (st) { + var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays + st.equal(arr.length, 3, 'array starts with length 3'); + + Object.defineProperty(arr, 'length', { value: 5 }); + + st.equal(arr.length, 5, 'array ends with length 5'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/has-proto/.eslintrc b/node_modules/has-proto/.eslintrc new file mode 100644 index 000000000..3b5d9e90e --- /dev/null +++ b/node_modules/has-proto/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/has-proto/.github/FUNDING.yml b/node_modules/has-proto/.github/FUNDING.yml new file mode 100644 index 000000000..613705c7e --- /dev/null +++ b/node_modules/has-proto/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-proto +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-proto/CHANGELOG.md b/node_modules/has-proto/CHANGELOG.md new file mode 100644 index 000000000..c350e809b --- /dev/null +++ b/node_modules/has-proto/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/inspect-js/has-proto/compare/v1.0.0...v1.0.1) - 2022-12-21 + +### Commits + +- [meta] correct URLs and description [`ef34483`](https://github.com/inspect-js/has-proto/commit/ef34483ca0d35680f271b6b96e35526151b25dfc) +- [patch] add an additional criteria [`e81959e`](https://github.com/inspect-js/has-proto/commit/e81959ed7c7a77fbf459f00cb4ef824f1099497f) +- [Dev Deps] update `aud` [`2bec2c4`](https://github.com/inspect-js/has-proto/commit/2bec2c47b072b122ff5443fba0263f6dc649531f) + +## v1.0.0 - 2022-12-12 + +### Commits + +- Initial implementation, tests, readme [`6886fea`](https://github.com/inspect-js/has-proto/commit/6886fea578f67daf69a7920b2eb7637ea6ebb0bc) +- Initial commit [`99129c8`](https://github.com/inspect-js/has-proto/commit/99129c8f42471ac89cb681ba9cb9d52a583eb94f) +- npm init [`2844ad8`](https://github.com/inspect-js/has-proto/commit/2844ad8e75b84d66a46765b3bab9d2e8ea692e10) +- Only apps should have lockfiles [`c65bc5e`](https://github.com/inspect-js/has-proto/commit/c65bc5e40b9004463f7336d47c67245fb139a36a) diff --git a/node_modules/has-proto/LICENSE b/node_modules/has-proto/LICENSE new file mode 100644 index 000000000..2e7b9a3ea --- /dev/null +++ b/node_modules/has-proto/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/has-proto/README.md b/node_modules/has-proto/README.md new file mode 100644 index 000000000..145676547 --- /dev/null +++ b/node_modules/has-proto/README.md @@ -0,0 +1,38 @@ +# has-proto [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Does this environment have the ability to set the [[Prototype]] of an object on creation with `__proto__`? + +## Example + +```js +var hasProto = require('has-proto'); +var assert = require('assert'); + +assert.equal(typeof hasProto(), 'boolean'); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/has-proto +[npm-version-svg]: https://versionbadg.es/inspect-js/has-proto.svg +[deps-svg]: https://david-dm.org/inspect-js/has-proto.svg +[deps-url]: https://david-dm.org/inspect-js/has-proto +[dev-deps-svg]: https://david-dm.org/inspect-js/has-proto/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/has-proto#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/has-proto.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-proto.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-proto.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-proto +[codecov-image]: https://codecov.io/gh/inspect-js/has-proto/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-proto/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-proto +[actions-url]: https://github.com/inspect-js/has-proto/actions diff --git a/node_modules/has-proto/index.js b/node_modules/has-proto/index.js new file mode 100644 index 000000000..d3e4be4eb --- /dev/null +++ b/node_modules/has-proto/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var test = { + foo: {} +}; + +var $Object = Object; + +module.exports = function hasProto() { + return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); +}; diff --git a/node_modules/has-proto/package.json b/node_modules/has-proto/package.json new file mode 100644 index 000000000..6fbde42ea --- /dev/null +++ b/node_modules/has-proto/package.json @@ -0,0 +1,74 @@ +{ + "name": "has-proto", + "version": "1.0.1", + "description": "Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/has-proto.git" + }, + "keywords": [ + "prototype", + "proto", + "set", + "get", + "__proto__", + "getPrototypeOf", + "setPrototypeOf", + "has" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/has-proto/issues" + }, + "homepage": "https://github.com/inspect-js/has-proto#readme", + "testling": { + "files": "test/index.js" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/has-proto/test/index.js b/node_modules/has-proto/test/index.js new file mode 100644 index 000000000..5da1a3aa6 --- /dev/null +++ b/node_modules/has-proto/test/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var test = require('tape'); +var hasProto = require('../'); + +test('hasProto', function (t) { + var result = hasProto(); + t.equal(typeof result, 'boolean', 'returns a boolean (' + result + ')'); + + var obj = { __proto__: null }; + if (result) { + t.notOk('toString' in obj, 'null object lacks toString'); + } else { + t.ok('toString' in obj, 'without proto, null object has toString'); + t.equal(obj.__proto__, null); // eslint-disable-line no-proto + } + + t.end(); +}); diff --git a/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc index 1826526e0..bdd626ce9 100644 --- a/node_modules/has-symbols/.nycrc +++ b/node_modules/has-symbols/.nycrc @@ -2,10 +2,6 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, "exclude": [ "coverage", "test" diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md index 852ca0420..cd532a2b4 100644 --- a/node_modules/has-symbols/CHANGELOG.md +++ b/node_modules/has-symbols/CHANGELOG.md @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) +- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) +- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) +- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) +- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) +- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) +- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) +- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) +- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) + ## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 ### Fixed diff --git a/node_modules/has-symbols/README.md b/node_modules/has-symbols/README.md index 3875d7e58..33905f0fc 100644 --- a/node_modules/has-symbols/README.md +++ b/node_modules/has-symbols/README.md @@ -1,5 +1,7 @@ # has-symbols [![Version Badge][2]][1] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][5]][6] [![dev dependency status][7]][8] [![License][license-image]][license-url] @@ -38,3 +40,7 @@ Simply clone the repo, `npm install`, and run `npm test` [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg [downloads-url]: https://npm-stat.com/charts.html?package=has-symbols +[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols +[actions-url]: https://github.com/inspect-js/has-symbols/actions diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json index 625471987..3da92dd8f 100644 --- a/node_modules/has-symbols/package.json +++ b/node_modules/has-symbols/package.json @@ -1,26 +1,11 @@ { "name": "has-symbols", - "version": "1.0.2", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], + "version": "1.0.3", "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", - "license": "MIT", "main": "index.js", "scripts": { - "prepublish": "safe-publish-latest", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", "pretest": "npm run --silent lint", "test": "npm run tests-only", "posttest": "aud --production", @@ -48,16 +33,36 @@ "core-js", "ES6" ], + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/has-symbols/issues" + }, + "homepage": "https://github.com/ljharb/has-symbols#readme", "devDependencies": { - "@ljharb/eslint-config": "^17.5.1", - "aud": "^1.1.4", - "auto-changelog": "^2.2.1", + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", "core-js": "^2.6.12", - "eslint": "^7.20.0", + "eslint": "=8.8.0", "get-own-property-symbols": "^0.9.5", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.2.0" + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" }, "testling": { "files": "test/index.js", diff --git a/node_modules/has-tostringtag/.eslintrc b/node_modules/has-tostringtag/.eslintrc new file mode 100644 index 000000000..2d9a66a8a --- /dev/null +++ b/node_modules/has-tostringtag/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "multiline-comment-style": 0, + } +} diff --git a/node_modules/has-tostringtag/.github/FUNDING.yml b/node_modules/has-tostringtag/.github/FUNDING.yml new file mode 100644 index 000000000..7a450e708 --- /dev/null +++ b/node_modules/has-tostringtag/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-tostringtag +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-tostringtag/CHANGELOG.md b/node_modules/has-tostringtag/CHANGELOG.md new file mode 100644 index 000000000..39fb77cf7 --- /dev/null +++ b/node_modules/has-tostringtag/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2021-08-05 + +### Commits + +- Tests [`6b6f573`](https://github.com/inspect-js/has-tostringtag/commit/6b6f5734dc2058badb300ff0783efdad95fe1a65) +- Initial commit [`2f8190e`](https://github.com/inspect-js/has-tostringtag/commit/2f8190e799fac32ba9b95a076c0255e01d7ce475) +- [meta] do not publish github action workflow files [`6e08cc4`](https://github.com/inspect-js/has-tostringtag/commit/6e08cc4e0fea7ec71ef66e70734b2af2c4a8b71b) +- readme [`94bed6c`](https://github.com/inspect-js/has-tostringtag/commit/94bed6c9560cbbfda034f8d6c260bb7b0db33c1a) +- npm init [`be67840`](https://github.com/inspect-js/has-tostringtag/commit/be67840ab92ee7adb98bcc65261975543f815fa5) +- Implementation [`c4914ec`](https://github.com/inspect-js/has-tostringtag/commit/c4914ecc51ddee692c85b471ae0a5d8123030fbf) +- [meta] use `auto-changelog` [`4aaf768`](https://github.com/inspect-js/has-tostringtag/commit/4aaf76895ae01d7b739f2b19f967ef2372506cd7) +- Only apps should have lockfiles [`bc4d99e`](https://github.com/inspect-js/has-tostringtag/commit/bc4d99e4bf494afbaa235c5f098df6e642edf724) +- [meta] add `safe-publish-latest` [`6523c05`](https://github.com/inspect-js/has-tostringtag/commit/6523c05c9b87140f3ae74c9daf91633dd9ff4e1f) diff --git a/node_modules/has-tostringtag/LICENSE b/node_modules/has-tostringtag/LICENSE new file mode 100644 index 000000000..7948bc02a --- /dev/null +++ b/node_modules/has-tostringtag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/has-tostringtag/README.md b/node_modules/has-tostringtag/README.md new file mode 100644 index 000000000..67a5e929d --- /dev/null +++ b/node_modules/has-tostringtag/README.md @@ -0,0 +1,46 @@ +# has-tostringtag [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams. + +## Example + +```js +var hasSymbolToStringTag = require('has-tostringtag'); + +hasSymbolToStringTag() === true; // if the environment has native Symbol.toStringTag support. Not polyfillable, not forgeable. + +var hasSymbolToStringTagKinda = require('has-tostringtag/shams'); +hasSymbolToStringTagKinda() === true; // if the environment has a Symbol.toStringTag sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-tostringtag +[2]: https://versionbadg.es/inspect-js/has-tostringtag.svg +[5]: https://david-dm.org/inspect-js/has-tostringtag.svg +[6]: https://david-dm.org/inspect-js/has-tostringtag +[7]: https://david-dm.org/inspect-js/has-tostringtag/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-tostringtag#info=devDependencies +[11]: https://nodei.co/npm/has-tostringtag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-tostringtag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-tostringtag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-tostringtag +[codecov-image]: https://codecov.io/gh/inspect-js/has-tostringtag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-tostringtag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-tostringtag +[actions-url]: https://github.com/inspect-js/has-tostringtag/actions diff --git a/node_modules/has-tostringtag/index.js b/node_modules/has-tostringtag/index.js new file mode 100644 index 000000000..d626b7a82 --- /dev/null +++ b/node_modules/has-tostringtag/index.js @@ -0,0 +1,7 @@ +'use strict'; + +var hasSymbols = require('has-symbols'); + +module.exports = function hasToStringTag() { + return hasSymbols() && typeof Symbol.toStringTag === 'symbol'; +}; diff --git a/node_modules/has-tostringtag/package.json b/node_modules/has-tostringtag/package.json new file mode 100644 index 000000000..6fa9232a8 --- /dev/null +++ b/node_modules/has-tostringtag/package.json @@ -0,0 +1,84 @@ +{ + "name": "has-tostringtag", + "version": "1.0.0", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams.", + "license": "MIT", + "main": "index.js", + "exports": { + ".": "./index.js", + "./shams": "./shams.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", + "test:stock": "nyc node test", + "test:staging": "nyc node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/has-tostringtag.git" + }, + "bugs": { + "url": "https://github.com/inspect-js/has-tostringtag/issues" + }, + "homepage": "https://github.com/inspect-js/has-tostringtag#readme", + "keywords": [ + "javascript", + "ecmascript", + "symbol", + "symbols", + "tostringtag", + "Symbol.toStringTag" + ], + "dependencies": { + "has-symbols": "^1.0.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^17.6.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "core-js": "^2.6.12", + "eslint": "^7.32.0", + "get-own-property-symbols": "^0.9.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/has-tostringtag/shams.js b/node_modules/has-tostringtag/shams.js new file mode 100644 index 000000000..8b7e40117 --- /dev/null +++ b/node_modules/has-tostringtag/shams.js @@ -0,0 +1,7 @@ +'use strict'; + +var hasSymbols = require('has-symbols/shams'); + +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; diff --git a/node_modules/has-tostringtag/test/index.js b/node_modules/has-tostringtag/test/index.js new file mode 100644 index 000000000..0679afdfa --- /dev/null +++ b/node_modules/has-tostringtag/test/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var test = require('tape'); +var hasSymbolToStringTag = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbolToStringTag, 'function', 'is a function'); + t.equal(typeof hasSymbolToStringTag(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbol.toStringTag exists', { skip: !hasSymbolToStringTag() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbol.toStringTag does not exist', { skip: hasSymbolToStringTag() }, function (t) { + t.equal(typeof Symbol === 'undefined' ? 'undefined' : typeof Symbol.toStringTag, 'undefined', 'global Symbol.toStringTag is undefined'); + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/shams/core-js.js b/node_modules/has-tostringtag/test/shams/core-js.js new file mode 100644 index 000000000..692b86eb9 --- /dev/null +++ b/node_modules/has-tostringtag/test/shams/core-js.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol') { + test('has native Symbol.toStringTag support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol.toStringTag, 'symbol'); + t.end(); + }); + return; +} + +var hasSymbolToStringTag = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasToStringTagAfter = hasSymbolToStringTag(); + t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js b/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js new file mode 100644 index 000000000..489fe8363 --- /dev/null +++ b/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbolToStringTag = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasToStringTagAfter = hasSymbolToStringTag(); + t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/tests.js b/node_modules/has-tostringtag/test/tests.js new file mode 100644 index 000000000..0dae885c0 --- /dev/null +++ b/node_modules/has-tostringtag/test/tests.js @@ -0,0 +1,14 @@ +'use strict'; + +// eslint-disable-next-line consistent-return +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + t.ok(Symbol.toStringTag, 'Symbol.toStringTag exists'); + + if (typeof Symbol !== 'function' || !Symbol.toStringTag) { return false; } + + var obj = {}; + obj[Symbol.toStringTag] = 'test'; + + t.equal(Object.prototype.toString.call(obj), '[object test]'); +}; diff --git a/node_modules/hosted-git-info/CHANGELOG.md b/node_modules/hosted-git-info/CHANGELOG.md deleted file mode 100644 index 6987fb4ae..000000000 --- a/node_modules/hosted-git-info/CHANGELOG.md +++ /dev/null @@ -1,151 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [2.8.9](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9) (2021-04-07) - - -### Bug Fixes - -* backport regex fix from [#76](https://github.com/npm/hosted-git-info/issues/76) ([29adfe5](https://github.com/npm/hosted-git-info/commit/29adfe5)), closes [#84](https://github.com/npm/hosted-git-info/issues/84) - - - - -## [2.8.8](https://github.com/npm/hosted-git-info/compare/v2.8.7...v2.8.8) (2020-02-29) - - -### Bug Fixes - -* [#61](https://github.com/npm/hosted-git-info/issues/61) & [#65](https://github.com/npm/hosted-git-info/issues/65) addressing issues w/ url.URL implmentation which regressed node 6 support ([5038b18](https://github.com/npm/hosted-git-info/commit/5038b18)), closes [#66](https://github.com/npm/hosted-git-info/issues/66) - - - - -## [2.8.7](https://github.com/npm/hosted-git-info/compare/v2.8.6...v2.8.7) (2020-02-26) - - -### Bug Fixes - -* Do not attempt to use url.URL when unavailable ([2d0bb66](https://github.com/npm/hosted-git-info/commit/2d0bb66)), closes [#61](https://github.com/npm/hosted-git-info/issues/61) [#62](https://github.com/npm/hosted-git-info/issues/62) -* Do not pass scp-style URLs to the WhatWG url.URL ([f2cdfcf](https://github.com/npm/hosted-git-info/commit/f2cdfcf)), closes [#60](https://github.com/npm/hosted-git-info/issues/60) - - - - -## [2.8.6](https://github.com/npm/hosted-git-info/compare/v2.8.5...v2.8.6) (2020-02-25) - - - - -## [2.8.5](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.5) (2019-10-07) - - -### Bug Fixes - -* updated pathmatch for gitlab ([e8325b5](https://github.com/npm/hosted-git-info/commit/e8325b5)), closes [#51](https://github.com/npm/hosted-git-info/issues/51) -* updated pathmatch for gitlab ([ffe056f](https://github.com/npm/hosted-git-info/commit/ffe056f)) - - - - -## [2.8.4](https://github.com/npm/hosted-git-info/compare/v2.8.3...v2.8.4) (2019-08-12) - - - - -## [2.8.3](https://github.com/npm/hosted-git-info/compare/v2.8.2...v2.8.3) (2019-08-12) - - - - -## [2.8.2](https://github.com/npm/hosted-git-info/compare/v2.8.1...v2.8.2) (2019-08-05) - - -### Bug Fixes - -* http protocol use sshurl by default ([3b1d629](https://github.com/npm/hosted-git-info/commit/3b1d629)), closes [#48](https://github.com/npm/hosted-git-info/issues/48) - - - - -## [2.8.1](https://github.com/npm/hosted-git-info/compare/v2.8.0...v2.8.1) (2019-08-05) - - -### Bug Fixes - -* ignore noCommittish on tarball url generation ([5d4a8d7](https://github.com/npm/hosted-git-info/commit/5d4a8d7)) -* use gist tarball url that works for anonymous gists ([1692435](https://github.com/npm/hosted-git-info/commit/1692435)) - - - - -# [2.8.0](https://github.com/npm/hosted-git-info/compare/v2.7.1...v2.8.0) (2019-08-05) - - -### Bug Fixes - -* Allow slashes in gitlab project section ([bbcf7b2](https://github.com/npm/hosted-git-info/commit/bbcf7b2)), closes [#46](https://github.com/npm/hosted-git-info/issues/46) [#43](https://github.com/npm/hosted-git-info/issues/43) -* **git-host:** disallow URI-encoded slash (%2F) in `path` ([3776fa5](https://github.com/npm/hosted-git-info/commit/3776fa5)), closes [#44](https://github.com/npm/hosted-git-info/issues/44) -* **gitlab:** Do not URL encode slashes in project name for GitLab https URL ([cbf04f9](https://github.com/npm/hosted-git-info/commit/cbf04f9)), closes [#47](https://github.com/npm/hosted-git-info/issues/47) -* do not allow invalid gist urls ([d5cf830](https://github.com/npm/hosted-git-info/commit/d5cf830)) -* **cache:** Switch to lru-cache to save ourselves from unlimited memory consumption ([e518222](https://github.com/npm/hosted-git-info/commit/e518222)), closes [#38](https://github.com/npm/hosted-git-info/issues/38) - - -### Features - -* give these objects a name ([60abaea](https://github.com/npm/hosted-git-info/commit/60abaea)) - - - - -## [2.7.1](https://github.com/npm/hosted-git-info/compare/v2.7.0...v2.7.1) (2018-07-07) - - -### Bug Fixes - -* **index:** Guard against non-string types ([5bc580d](https://github.com/npm/hosted-git-info/commit/5bc580d)) -* **parse:** Crash on strings that parse to having no host ([c931482](https://github.com/npm/hosted-git-info/commit/c931482)), closes [#35](https://github.com/npm/hosted-git-info/issues/35) - - - - -# [2.7.0](https://github.com/npm/hosted-git-info/compare/v2.6.1...v2.7.0) (2018-07-06) - - -### Bug Fixes - -* **github tarball:** update github tarballtemplate ([6efd582](https://github.com/npm/hosted-git-info/commit/6efd582)), closes [#34](https://github.com/npm/hosted-git-info/issues/34) -* **gitlab docs:** switched to lowercase anchors for readmes ([701bcd1](https://github.com/npm/hosted-git-info/commit/701bcd1)) - - -### Features - -* **all:** Support www. prefixes on hostnames ([3349575](https://github.com/npm/hosted-git-info/commit/3349575)), closes [#32](https://github.com/npm/hosted-git-info/issues/32) - - - - -## [2.6.1](https://github.com/npm/hosted-git-info/compare/v2.6.0...v2.6.1) (2018-06-25) - -### Bug Fixes - -* **Revert:** "compat: remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25))" ([cce5a62](https://github.com/npm/hosted-git-info/commit/cce5a62)) -* **Revert:** "git-host: fix forgotten extend()" ([a815ec9](https://github.com/npm/hosted-git-info/commit/a815ec9)) - - - - -# [2.6.0](https://github.com/npm/hosted-git-info/compare/v2.5.0...v2.6.0) (2018-03-07) - - -### Bug Fixes - -* **compat:** remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25)) ([627ab55](https://github.com/npm/hosted-git-info/commit/627ab55)) -* **git-host:** fix forgotten extend() ([eba1f7b](https://github.com/npm/hosted-git-info/commit/eba1f7b)) - - -### Features - -* **browse:** fragment support for browse() ([#28](https://github.com/npm/hosted-git-info/issues/28)) ([cd5e5bb](https://github.com/npm/hosted-git-info/commit/cd5e5bb)) diff --git a/node_modules/hosted-git-info/LICENSE b/node_modules/hosted-git-info/LICENSE deleted file mode 100644 index 45055763d..000000000 --- a/node_modules/hosted-git-info/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/hosted-git-info/README.md b/node_modules/hosted-git-info/README.md deleted file mode 100644 index 7b723f6b9..000000000 --- a/node_modules/hosted-git-info/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# hosted-git-info - -This will let you identify and transform various git hosts URLs between -protocols. It also can tell you what the URL is for the raw path for -particular file for direct access without git. - -## Example - -```javascript -var hostedGitInfo = require("hosted-git-info") -var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git", opts) -/* info looks like: -{ - type: "github", - domain: "github.com", - user: "npm", - project: "hosted-git-info" -} -*/ -``` - -If the URL can't be matched with a git host, `null` will be returned. We -can match git, ssh and https urls. Additionally, we can match ssh connect -strings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg, -`github:npm/hosted-git-info`). Github specifically, is detected in the case -of a third, unprefixed, form: `npm/hosted-git-info`. - -If it does match, the returned object has properties of: - -* info.type -- The short name of the service -* info.domain -- The domain for git protocol use -* info.user -- The name of the user/org on the git host -* info.project -- The name of the project on the git host - -## Version Contract - -The major version will be bumped any time… - -* The constructor stops accepting URLs that it previously accepted. -* A method is removed. -* A method can no longer accept the number and type of arguments it previously accepted. -* A method can return a different type than it currently returns. - -Implications: - -* I do not consider the specific format of the urls returned from, say - `.https()` to be a part of the contract. The contract is that it will - return a string that can be used to fetch the repo via HTTPS. But what - that string looks like, specifically, can change. -* Dropping support for a hosted git provider would constitute a breaking - change. - -## Usage - -### var info = hostedGitInfo.fromUrl(gitSpecifier[, options]) - -* *gitSpecifer* is a URL of a git repository or a SCP-style specifier of one. -* *options* is an optional object. It can have the following properties: - * *noCommittish* — If true then committishes won't be included in generated URLs. - * *noGitPlus* — If true then `git+` won't be prefixed on URLs. - -## Methods - -All of the methods take the same options as the `fromUrl` factory. Options -provided to a method override those provided to the constructor. - -* info.file(path, opts) - -Given the path of a file relative to the repository, returns a URL for -directly fetching it from the githost. If no committish was set then -`master` will be used as the default. - -For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")` -would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json` - -* info.shortcut(opts) - -eg, `github:npm/hosted-git-info` - -* info.browse(path, fragment, opts) - -eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`, -`https://github.com/npm/hosted-git-info/tree/v1.2.0/package.json`, -`https://github.com/npm/hosted-git-info/tree/v1.2.0/REAMDE.md#supported-hosts` - -* info.bugs(opts) - -eg, `https://github.com/npm/hosted-git-info/issues` - -* info.docs(opts) - -eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme` - -* info.https(opts) - -eg, `git+https://github.com/npm/hosted-git-info.git` - -* info.sshurl(opts) - -eg, `git+ssh://git@github.com/npm/hosted-git-info.git` - -* info.ssh(opts) - -eg, `git@github.com:npm/hosted-git-info.git` - -* info.path(opts) - -eg, `npm/hosted-git-info` - -* info.tarball(opts) - -eg, `https://github.com/npm/hosted-git-info/archive/v1.2.0.tar.gz` - -* info.getDefaultRepresentation() - -Returns the default output type. The default output type is based on the -string you passed in to be parsed - -* info.toString(opts) - -Uses the getDefaultRepresentation to call one of the other methods to get a URL for -this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give -you a normalized version of the URL that still uses the same protocol. - -Shortcuts will still be returned as shortcuts, but the special case github -form of `org/project` will be normalized to `github:org/project`. - -SSH connect strings will be normalized into `git+ssh` URLs. - -## Supported hosts - -Currently this supports Github, Bitbucket and Gitlab. Pull requests for -additional hosts welcome. diff --git a/node_modules/hosted-git-info/git-host-info.js b/node_modules/hosted-git-info/git-host-info.js deleted file mode 100644 index 8147e3348..000000000 --- a/node_modules/hosted-git-info/git-host-info.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict' - -var gitHosts = module.exports = { - github: { - // First two are insecure and generally shouldn't be used any more, but - // they are still supported. - 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'github.com', - 'treepath': 'tree', - 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', - 'bugstemplate': 'https://{domain}/{user}/{project}/issues', - 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', - 'tarballtemplate': 'https://codeload.{domain}/{user}/{project}/tar.gz/{committish}' - }, - bitbucket: { - 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'bitbucket.org', - 'treepath': 'src', - 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz' - }, - gitlab: { - 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'gitlab.com', - 'treepath': 'tree', - 'bugstemplate': 'https://{domain}/{user}/{project}/issues', - 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}', - 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}', - 'pathmatch': /^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/ - }, - gist: { - 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], - 'domain': 'gist.github.com', - 'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]{32,})(?:[.]git)?$/, - 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', - 'bugstemplate': 'https://{domain}/{project}', - 'gittemplate': 'git://{domain}/{project}.git{#committish}', - 'sshtemplate': 'git@{domain}:/{project}.git{#committish}', - 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}', - 'browsetemplate': 'https://{domain}/{project}{/committish}', - 'browsefiletemplate': 'https://{domain}/{project}{/committish}{#path}', - 'docstemplate': 'https://{domain}/{project}{/committish}', - 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', - 'shortcuttemplate': '{type}:{project}{#committish}', - 'pathtemplate': '{project}{#committish}', - 'tarballtemplate': 'https://codeload.github.com/gist/{project}/tar.gz/{committish}', - 'hashformat': function (fragment) { - return 'file-' + formatHashFragment(fragment) - } - } -} - -var gitHostDefaults = { - 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', - 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', - 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', - 'browsefiletemplate': 'https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}', - 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme', - 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}', - 'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}', - 'shortcuttemplate': '{type}:{user}/{project}{#committish}', - 'pathtemplate': '{user}/{project}{#committish}', - 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/, - 'hashformat': formatHashFragment -} - -Object.keys(gitHosts).forEach(function (name) { - Object.keys(gitHostDefaults).forEach(function (key) { - if (gitHosts[name][key]) return - gitHosts[name][key] = gitHostDefaults[key] - }) - gitHosts[name].protocols_re = RegExp('^(' + - gitHosts[name].protocols.map(function (protocol) { - return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1') - }).join('|') + '):$') -}) - -function formatHashFragment (fragment) { - return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-') -} diff --git a/node_modules/hosted-git-info/git-host.js b/node_modules/hosted-git-info/git-host.js deleted file mode 100644 index 9616fbaa6..000000000 --- a/node_modules/hosted-git-info/git-host.js +++ /dev/null @@ -1,156 +0,0 @@ -'use strict' -var gitHosts = require('./git-host-info.js') -/* eslint-disable node/no-deprecated-api */ - -// copy-pasta util._extend from node's source, to avoid pulling -// the whole util module into peoples' webpack bundles. -/* istanbul ignore next */ -var extend = Object.assign || function _extend (target, source) { - // Don't do anything if source isn't an object - if (source === null || typeof source !== 'object') return target - - var keys = Object.keys(source) - var i = keys.length - while (i--) { - target[keys[i]] = source[keys[i]] - } - return target -} - -module.exports = GitHost -function GitHost (type, user, auth, project, committish, defaultRepresentation, opts) { - var gitHostInfo = this - gitHostInfo.type = type - Object.keys(gitHosts[type]).forEach(function (key) { - gitHostInfo[key] = gitHosts[type][key] - }) - gitHostInfo.user = user - gitHostInfo.auth = auth - gitHostInfo.project = project - gitHostInfo.committish = committish - gitHostInfo.default = defaultRepresentation - gitHostInfo.opts = opts || {} -} - -GitHost.prototype.hash = function () { - return this.committish ? '#' + this.committish : '' -} - -GitHost.prototype._fill = function (template, opts) { - if (!template) return - var vars = extend({}, opts) - vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : '' - opts = extend(extend({}, this.opts), opts) - var self = this - Object.keys(this).forEach(function (key) { - if (self[key] != null && vars[key] == null) vars[key] = self[key] - }) - var rawAuth = vars.auth - var rawcommittish = vars.committish - var rawFragment = vars.fragment - var rawPath = vars.path - var rawProject = vars.project - Object.keys(vars).forEach(function (key) { - var value = vars[key] - if ((key === 'path' || key === 'project') && typeof value === 'string') { - vars[key] = value.split('/').map(function (pathComponent) { - return encodeURIComponent(pathComponent) - }).join('/') - } else { - vars[key] = encodeURIComponent(value) - } - }) - vars['auth@'] = rawAuth ? rawAuth + '@' : '' - vars['#fragment'] = rawFragment ? '#' + this.hashformat(rawFragment) : '' - vars.fragment = vars.fragment ? vars.fragment : '' - vars['#path'] = rawPath ? '#' + this.hashformat(rawPath) : '' - vars['/path'] = vars.path ? '/' + vars.path : '' - vars.projectPath = rawProject.split('/').map(encodeURIComponent).join('/') - if (opts.noCommittish) { - vars['#committish'] = '' - vars['/tree/committish'] = '' - vars['/committish'] = '' - vars.committish = '' - } else { - vars['#committish'] = rawcommittish ? '#' + rawcommittish : '' - vars['/tree/committish'] = vars.committish - ? '/' + vars.treepath + '/' + vars.committish - : '' - vars['/committish'] = vars.committish ? '/' + vars.committish : '' - vars.committish = vars.committish || 'master' - } - var res = template - Object.keys(vars).forEach(function (key) { - res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]) - }) - if (opts.noGitPlus) { - return res.replace(/^git[+]/, '') - } else { - return res - } -} - -GitHost.prototype.ssh = function (opts) { - return this._fill(this.sshtemplate, opts) -} - -GitHost.prototype.sshurl = function (opts) { - return this._fill(this.sshurltemplate, opts) -} - -GitHost.prototype.browse = function (P, F, opts) { - if (typeof P === 'string') { - if (typeof F !== 'string') { - opts = F - F = null - } - return this._fill(this.browsefiletemplate, extend({ - fragment: F, - path: P - }, opts)) - } else { - return this._fill(this.browsetemplate, P) - } -} - -GitHost.prototype.docs = function (opts) { - return this._fill(this.docstemplate, opts) -} - -GitHost.prototype.bugs = function (opts) { - return this._fill(this.bugstemplate, opts) -} - -GitHost.prototype.https = function (opts) { - return this._fill(this.httpstemplate, opts) -} - -GitHost.prototype.git = function (opts) { - return this._fill(this.gittemplate, opts) -} - -GitHost.prototype.shortcut = function (opts) { - return this._fill(this.shortcuttemplate, opts) -} - -GitHost.prototype.path = function (opts) { - return this._fill(this.pathtemplate, opts) -} - -GitHost.prototype.tarball = function (opts_) { - var opts = extend({}, opts_, { noCommittish: false }) - return this._fill(this.tarballtemplate, opts) -} - -GitHost.prototype.file = function (P, opts) { - return this._fill(this.filetemplate, extend({ path: P }, opts)) -} - -GitHost.prototype.getDefaultRepresentation = function () { - return this.default -} - -GitHost.prototype.toString = function (opts) { - if (this.default && typeof this[this.default] === 'function') return this[this.default](opts) - return this.sshurl(opts) -} diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js deleted file mode 100644 index 088577225..000000000 --- a/node_modules/hosted-git-info/index.js +++ /dev/null @@ -1,148 +0,0 @@ -'use strict' -var url = require('url') -var gitHosts = require('./git-host-info.js') -var GitHost = module.exports = require('./git-host.js') - -var protocolToRepresentationMap = { - 'git+ssh:': 'sshurl', - 'git+https:': 'https', - 'ssh:': 'sshurl', - 'git:': 'git' -} - -function protocolToRepresentation (protocol) { - return protocolToRepresentationMap[protocol] || protocol.slice(0, -1) -} - -var authProtocols = { - 'git:': true, - 'https:': true, - 'git+https:': true, - 'http:': true, - 'git+http:': true -} - -var cache = {} - -module.exports.fromUrl = function (giturl, opts) { - if (typeof giturl !== 'string') return - var key = giturl + JSON.stringify(opts || {}) - - if (!(key in cache)) { - cache[key] = fromUrl(giturl, opts) - } - - return cache[key] -} - -function fromUrl (giturl, opts) { - if (giturl == null || giturl === '') return - var url = fixupUnqualifiedGist( - isGitHubShorthand(giturl) ? 'github:' + giturl : giturl - ) - var parsed = parseGitUrl(url) - var shortcutMatch = url.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/) - var matches = Object.keys(gitHosts).map(function (gitHostName) { - try { - var gitHostInfo = gitHosts[gitHostName] - var auth = null - if (parsed.auth && authProtocols[parsed.protocol]) { - auth = parsed.auth - } - var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null - var user = null - var project = null - var defaultRepresentation = null - if (shortcutMatch && shortcutMatch[1] === gitHostName) { - user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]) - project = decodeURIComponent(shortcutMatch[3].replace(/\.git$/, '')) - defaultRepresentation = 'shortcut' - } else { - if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return - if (!gitHostInfo.protocols_re.test(parsed.protocol)) return - if (!parsed.path) return - var pathmatch = gitHostInfo.pathmatch - var matched = parsed.path.match(pathmatch) - if (!matched) return - /* istanbul ignore else */ - if (matched[1] !== null && matched[1] !== undefined) { - user = decodeURIComponent(matched[1].replace(/^:/, '')) - } - project = decodeURIComponent(matched[2]) - defaultRepresentation = protocolToRepresentation(parsed.protocol) - } - return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts) - } catch (ex) { - /* istanbul ignore else */ - if (ex instanceof URIError) { - } else throw ex - } - }).filter(function (gitHostInfo) { return gitHostInfo }) - if (matches.length !== 1) return - return matches[0] -} - -function isGitHubShorthand (arg) { - // Note: This does not fully test the git ref format. - // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html - // - // The only way to do this properly would be to shell out to - // git-check-ref-format, and as this is a fast sync function, - // we don't want to do that. Just let git fail if it turns - // out that the commit-ish is invalid. - // GH usernames cannot start with . or - - return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg) -} - -function fixupUnqualifiedGist (giturl) { - // necessary for round-tripping gists - var parsed = url.parse(giturl) - if (parsed.protocol === 'gist:' && parsed.host && !parsed.path) { - return parsed.protocol + '/' + parsed.host - } else { - return giturl - } -} - -function parseGitUrl (giturl) { - var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/) - if (!matched) { - var legacy = url.parse(giturl) - // If we don't have url.URL, then sorry, this is just not fixable. - // This affects Node <= 6.12. - if (legacy.auth && typeof url.URL === 'function') { - // git urls can be in the form of scp-style/ssh-connect strings, like - // git+ssh://user@host.com:some/path, which the legacy url parser - // supports, but WhatWG url.URL class does not. However, the legacy - // parser de-urlencodes the username and password, so something like - // https://user%3An%40me:p%40ss%3Aword@x.com/ becomes - // https://user:n@me:p@ss:word@x.com/ which is all kinds of wrong. - // Pull off just the auth and host, so we dont' get the confusing - // scp-style URL, then pass that to the WhatWG parser to get the - // auth properly escaped. - var authmatch = giturl.match(/[^@]+@[^:/]+/) - /* istanbul ignore else - this should be impossible */ - if (authmatch) { - var whatwg = new url.URL(authmatch[0]) - legacy.auth = whatwg.username || '' - if (whatwg.password) legacy.auth += ':' + whatwg.password - } - } - return legacy - } - return { - protocol: 'git+ssh:', - slashes: true, - auth: matched[1], - host: matched[2], - port: null, - hostname: matched[2], - hash: matched[4], - search: null, - query: null, - pathname: '/' + matched[3], - path: '/' + matched[3], - href: 'git+ssh://' + matched[1] + '@' + matched[2] + - '/' + matched[3] + (matched[4] || '') - } -} diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json deleted file mode 100644 index 8cc554c3e..000000000 --- a/node_modules/hosted-git-info/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "hosted-git-info", - "version": "2.8.9", - "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", - "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/hosted-git-info.git" - }, - "keywords": [ - "git", - "github", - "bitbucket", - "gitlab" - ], - "author": "Rebecca Turner (http://re-becca.org)", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/hosted-git-info/issues" - }, - "homepage": "https://github.com/npm/hosted-git-info", - "scripts": { - "prerelease": "npm t", - "postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags", - "posttest": "standard", - "release": "standard-version -s", - "test:coverage": "tap --coverage-report=html -J --coverage=90 --no-esm test/*.js", - "test": "tap -J --coverage=90 --no-esm test/*.js" - }, - "devDependencies": { - "standard": "^11.0.1", - "standard-version": "^4.4.0", - "tap": "^12.7.0" - }, - "files": [ - "index.js", - "git-host.js", - "git-host-info.js" - ] -} diff --git a/node_modules/internal-slot/.editorconfig b/node_modules/internal-slot/.editorconfig new file mode 100644 index 000000000..bc228f826 --- /dev/null +++ b/node_modules/internal-slot/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/get-intrinsic/.eslintignore b/node_modules/internal-slot/.eslintignore similarity index 100% rename from node_modules/get-intrinsic/.eslintignore rename to node_modules/internal-slot/.eslintignore diff --git a/node_modules/internal-slot/.eslintrc b/node_modules/internal-slot/.eslintrc new file mode 100644 index 000000000..c42d8f2f7 --- /dev/null +++ b/node_modules/internal-slot/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-params": [2, 3], + "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], + "no-magic-numbers": 0, + }, +} diff --git a/node_modules/internal-slot/.github/FUNDING.yml b/node_modules/internal-slot/.github/FUNDING.yml new file mode 100644 index 000000000..8dc96e28f --- /dev/null +++ b/node_modules/internal-slot/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/internal-slot +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/internal-slot/.nycrc b/node_modules/internal-slot/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/internal-slot/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/internal-slot/CHANGELOG.md b/node_modules/internal-slot/CHANGELOG.md new file mode 100644 index 000000000..968b4e79c --- /dev/null +++ b/node_modules/internal-slot/CHANGELOG.md @@ -0,0 +1,79 @@ +### Changelog + +All notable changes to this project will be documented in this file. Dates are displayed in UTC. + +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). + +#### [v1.0.4](https://github.com/ljharb/internal-slot/compare/v1.0.3...v1.0.4) + +> 13 December 2022 + +- [actions] reuse common workflows [`82a1aee`](https://github.com/ljharb/internal-slot/commit/82a1aee603bce8627930597edb3a04b4970ed151) +- [meta] use `npmignore` to autogenerate an npmignore file [`56f7e71`](https://github.com/ljharb/internal-slot/commit/56f7e7182dd934dd6c1b80497a110670d02a91b9) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`e25ff67`](https://github.com/ljharb/internal-slot/commit/e25ff67d568f77c1b66168957d82b080779e1c0a) +- [actions] update rebase action to use reusable workflow [`227e81e`](https://github.com/ljharb/internal-slot/commit/227e81eaef7230a265103ef1ef0618d2920c3f30) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `foreach`, `object-inspect`, `tape` [`fc9f319`](https://github.com/ljharb/internal-slot/commit/fc9f319d136ddf2e79910390d1e7ad279d41cc01) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`0a72a0f`](https://github.com/ljharb/internal-slot/commit/0a72a0f389511b41645f441da19257a266cb37f7) +- [actions] update codecov uploader [`e2b993f`](https://github.com/ljharb/internal-slot/commit/e2b993f143278a30424ebd5526019e59828989d0) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`8f0ab80`](https://github.com/ljharb/internal-slot/commit/8f0ab808afdd458001c35c828962dc714d824754) +- [actions] update checkout action [`8da4b91`](https://github.com/ljharb/internal-slot/commit/8da4b91c3454671da2e53a831ca0928147965a09) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@safe-publish-latest`, `tape` [`7ab37aa`](https://github.com/ljharb/internal-slot/commit/7ab37aabf01ded2605fa583a9866b62172f82e30) +- [readme] add github actions/codecov badges [`71234be`](https://github.com/ljharb/internal-slot/commit/71234bef4ef99e2f17d72ae3a1b7c0522519b7d7) +- [Fix] `assert`: throw on a nonexistent slot even when an object already has other slots [`12580bd`](https://github.com/ljharb/internal-slot/commit/12580bd26fe9f8603566e9e076092b5e1fb7340b) +- [Tests] use `for-each` instead of `foreach` [`7229df0`](https://github.com/ljharb/internal-slot/commit/7229df01666ccb022dde82686d84b97b7bcfc53a) +- [meta] use `prepublishOnly` script for npm 7+ [`8728872`](https://github.com/ljharb/internal-slot/commit/8728872cfbd735d3ae87e885c081a08d5b26edf0) +- [Deps] update `get-intrinsic` [`1b7088f`](https://github.com/ljharb/internal-slot/commit/1b7088fa970c33757816b08357814bdbf6d722b6) +- [Deps] update `get-intrinsic` [`063621e`](https://github.com/ljharb/internal-slot/commit/063621ec99d1b9262d3898c0ecad0e1e98be5f75) + +#### [v1.0.3](https://github.com/ljharb/internal-slot/compare/v1.0.2...v1.0.3) + +> 26 January 2021 + +- [Tests] use shared travis-ci configs [`0ef2263`](https://github.com/ljharb/internal-slot/commit/0ef22634fa2269d9df0d784aca3c5748e8eabd3b) +- [Tests] migrate tests to Github Actions [`6253915`](https://github.com/ljharb/internal-slot/commit/6253915d28721df2eda5630849bc6b57647e3ee2) +- [meta] do not publish github action workflow files [`ef94e55`](https://github.com/ljharb/internal-slot/commit/ef94e555727ed6a649ef64010904fe89a468d459) +- [Tests] run `nyc` on all tests; use `tape` runner [`917d6ca`](https://github.com/ljharb/internal-slot/commit/917d6ca630cdcd6b4da9a2c300c6a3abb6e724fe) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`8dcb6fe`](https://github.com/ljharb/internal-slot/commit/8dcb6fe01d6a45e1af17a9dace95ca47c99b4328) +- [actions] add "Allow Edits" workflow [`7aa3e86`](https://github.com/ljharb/internal-slot/commit/7aa3e86edb0149fd882717481885760aeb28474e) +- [Refactor] use `get-intrinsic` instead of `es-abstract`; update `side-channel` [`11ad17d`](https://github.com/ljharb/internal-slot/commit/11ad17d4255adcbc55fd4eca0bf6733bac59f1bf) +- [readme] remove travis badge [`5b75452`](https://github.com/ljharb/internal-slot/commit/5b754523aa07e8f67d0135df75059a18047292bb) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`d531688`](https://github.com/ljharb/internal-slot/commit/d5316880956b4dd83e6b6c9ab48fdd8171a4a268) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`c76fa91`](https://github.com/ljharb/internal-slot/commit/c76fa91a7e623a738e22332bee4e985aea41122e) +- [Dev Deps] update `eslint`, `tape` [`e733ccd`](https://github.com/ljharb/internal-slot/commit/e733ccd68e81c72ef2e02726e001895053de7887) +- [Dev Deps] update `auto-changelog`; add `aud` [`df20bf5`](https://github.com/ljharb/internal-slot/commit/df20bf5d3943a533c20799d8cc1449997e85d53b) +- [meta] fix autochangelog [`e89e6f1`](https://github.com/ljharb/internal-slot/commit/e89e6f1ff9f10f386e6400b586db78ad9c0f1309) +- [Tests] only audit prod deps [`71317b9`](https://github.com/ljharb/internal-slot/commit/71317b95ec6bbd9877807da0c0316ee9f5f30fab) +- [Deps] update `es-abstract` [`c17ccf4`](https://github.com/ljharb/internal-slot/commit/c17ccf45f4cb0d3b7a1536e9cd3a7ff9a7dafd21) +- [Dev Deps] update `tape` [`d81ae03`](https://github.com/ljharb/internal-slot/commit/d81ae030a0e8f58cee00f752601ce60405a93d78) +- [Deps] update `es-abstract` [`b56303b`](https://github.com/ljharb/internal-slot/commit/b56303b4c3af7a510f9f51860895a46fd2e14752) +- [Deps] update `es-abstract` [`9996d1c`](https://github.com/ljharb/internal-slot/commit/9996d1cf3507750c7a6845a2fb0d0f849ea898a1) + +#### [v1.0.2](https://github.com/ljharb/internal-slot/compare/v1.0.1...v1.0.2) + +> 20 December 2019 + +- [Deps] update `es-abstract`, `side-channel` [`5c9df03`](https://github.com/ljharb/internal-slot/commit/5c9df03a25518f5c482cff4e1447a26fa071df9a) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7820f98`](https://github.com/ljharb/internal-slot/commit/7820f984e523a64ddf3068c4e5631abf61eb1ea4) + +#### [v1.0.1](https://github.com/ljharb/internal-slot/compare/v1.0.0...v1.0.1) + +> 1 December 2019 + +- [Refactor] use `side-channel` package [`d38639f`](https://github.com/ljharb/internal-slot/commit/d38639f0a3cdb5090711179d0e78df857ecbd5d3) +- [actions] add automatic rebasing / merge commit blocking [`74267e6`](https://github.com/ljharb/internal-slot/commit/74267e6e591e18ba39186cb99139d3fd7a757c9f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest` [`b042eef`](https://github.com/ljharb/internal-slot/commit/b042eefc067b830bbd370833f7f21754e802b0b2) +- [Deps] update `es-abstract` [`98cf4e8`](https://github.com/ljharb/internal-slot/commit/98cf4e86c1bfe99eda7b11a8ea70394368f33e4f) + +#### v1.0.0 + +> 20 October 2019 + +- Tests [`b50fa41`](https://github.com/ljharb/internal-slot/commit/b50fa41b6f47aba39ac4cb733658580974a0b00a) +- implementation [`c5a59f3`](https://github.com/ljharb/internal-slot/commit/c5a59f3753677f81aa12a0226d3b1187846d06dd) +- Initial commit [`15ebe4d`](https://github.com/ljharb/internal-slot/commit/15ebe4dc6d46885f67969d64c9c3e705780963f8) +- readme [`382a3f5`](https://github.com/ljharb/internal-slot/commit/382a3f53d8975e6488373a0fc2abcdc7c4c44247) +- npm init [`d5e7c97`](https://github.com/ljharb/internal-slot/commit/d5e7c977ef694e89c245fd11165f63c06a7a5040) +- [meta] add FUNDING.yml [`685b608`](https://github.com/ljharb/internal-slot/commit/685b6087613f6735f4411a558500d92f8a3ec3f2) +- [meta] add `auto-changelog`, `safe-publish-latest` [`f8fdf1c`](https://github.com/ljharb/internal-slot/commit/f8fdf1c3f0c592f71746da6d7f8bea18f8946dda) +- [Tests] add `npm run lint` [`baaaa09`](https://github.com/ljharb/internal-slot/commit/baaaa09ab6e5bc5fcc0e7c76e10c55aa18f4ca7e) +- Only apps should have lockfiles [`dfa7efa`](https://github.com/ljharb/internal-slot/commit/dfa7efa3d5cd23261cb75c2adab6ee3c06790fee) diff --git a/node_modules/internal-slot/LICENSE b/node_modules/internal-slot/LICENSE new file mode 100644 index 000000000..3900dd7e2 --- /dev/null +++ b/node_modules/internal-slot/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/internal-slot/README.md b/node_modules/internal-slot/README.md new file mode 100644 index 000000000..73d9852e5 --- /dev/null +++ b/node_modules/internal-slot/README.md @@ -0,0 +1,58 @@ +# internal-slot [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Truly private storage, akin to the JS spec’s concept of internal slots. + +Uses a WeakMap when available; a Map when not; and a regular object in even older engines. Performance and garbage collection behavior will reflect the environment’s capabilities accordingly. + +## Example + +```js +var SLOT = require('internal-slot'); +var assert = require('assert'); + +var o = {}; + +assert.throws(function () { SLOT.assert(o, 'foo'); }); + +assert.equal(SLOT.has(o, 'foo'), false); +assert.equal(SLOT.get(o, 'foo'), undefined); + +SLOT.set(o, 'foo', 42); + +assert.equal(SLOT.has(o, 'foo'), true); +assert.equal(SLOT.get(o, 'foo'), 42); + +assert.doesNotThrow(function () { SLOT.assert(o, 'foo'); }); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/internal-slot +[npm-version-svg]: https://versionbadg.es/ljharb/internal-slot.svg +[deps-svg]: https://david-dm.org/ljharb/internal-slot.svg +[deps-url]: https://david-dm.org/ljharb/internal-slot +[dev-deps-svg]: https://david-dm.org/ljharb/internal-slot/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/internal-slot#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/internal-slot.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/internal-slot.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/internal-slot.svg +[downloads-url]: https://npm-stat.com/charts.html?package=internal-slot +[codecov-image]: https://codecov.io/gh/ljharb/internal-slot/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/internal-slot/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/internal-slot +[actions-url]: https://github.com/ljharb/internal-slot/actions diff --git a/node_modules/internal-slot/index.js b/node_modules/internal-slot/index.js new file mode 100644 index 000000000..97d44545a --- /dev/null +++ b/node_modules/internal-slot/index.js @@ -0,0 +1,62 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var has = require('has'); +var channel = require('side-channel')(); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var SLOT = { + assert: function (O, slot) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + channel.assert(O); + if (!SLOT.has(O, slot)) { + throw new $TypeError('`slot` is not present on `O`'); + } + }, + get: function (O, slot) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + var slots = channel.get(O); + return slots && slots['$' + slot]; + }, + has: function (O, slot) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + var slots = channel.get(O); + return !!slots && has(slots, '$' + slot); + }, + set: function (O, slot, V) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new $TypeError('`O` is not an object'); + } + if (typeof slot !== 'string') { + throw new $TypeError('`slot` must be a string'); + } + var slots = channel.get(O); + if (!slots) { + slots = {}; + channel.set(O, slots); + } + slots['$' + slot] = V; + } +}; + +if (Object.freeze) { + Object.freeze(SLOT); +} + +module.exports = SLOT; diff --git a/node_modules/internal-slot/package.json b/node_modules/internal-slot/package.json new file mode 100644 index 000000000..7f5251268 --- /dev/null +++ b/node_modules/internal-slot/package.json @@ -0,0 +1,71 @@ +{ + "name": "internal-slot", + "version": "1.0.4", + "description": "ES spec-like internal slots", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "pretest": "npm run lint", + "lint": "eslint .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/internal-slot.git" + }, + "keywords": [ + "internal", + "slot", + "internal slot", + "ecmascript", + "es", + "spec", + "private", + "data", + "private data", + "weakmap" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/internal-slot/issues" + }, + "homepage": "https://github.com/ljharb/internal-slot#readme", + "engines": { + "node": ">= 0.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/internal-slot/test/index.js b/node_modules/internal-slot/test/index.js new file mode 100644 index 000000000..d1db994ae --- /dev/null +++ b/node_modules/internal-slot/test/index.js @@ -0,0 +1,121 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); + +var SLOT = require('../'); + +test('assert', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.assert(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.assert({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + t['throws']( + function () { SLOT.assert({}, 'whatever'); }, + TypeError, + 'nonexistent slot throws' + ); + + var o = {}; + SLOT.set(o, 'x'); + t.doesNotThrow(function () { SLOT.assert(o, 'x'); }, 'existent slot noops'); + t['throws'](function () { SLOT.assert(o, 'y'); }, 'thing with a slot throws on a nonexistent slot'); + + t.end(); +}); + +test('has', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.has(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.has({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + var o = {}; + + t.equal(SLOT.has(o, 'nonexistent'), false, 'nonexistent slot yields false'); + + SLOT.set(o, 'foo'); + t.equal(SLOT.has(o, 'foo'), true, 'existent slot yields true'); + + t.end(); +}); + +test('get', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.get(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.get({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + var o = {}; + t.equal(SLOT.get(o, 'nonexistent'), undefined, 'nonexistent slot is undefined'); + + var v = {}; + SLOT.set(o, 'f', v); + t.equal(SLOT.get(o, 'f'), v, '"get" retrieves value set by "set"'); + + t.end(); +}); + +test('set', function (t) { + forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { + t['throws']( + function () { SLOT.set(primitive, ''); }, + TypeError, + inspect(primitive) + ' is not an Object' + ); + }); + + forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { + t['throws']( + function () { SLOT.set({}, nonString); }, + TypeError, + inspect(nonString) + ' is not a String' + ); + }); + + var o = function () {}; + t.equal(SLOT.get(o, 'f'), undefined, 'slot not set'); + + SLOT.set(o, 'f', 42); + t.equal(SLOT.get(o, 'f'), 42, 'slot was set'); + + SLOT.set(o, 'f', Infinity); + t.equal(SLOT.get(o, 'f'), Infinity, 'slot was set again'); + + t.end(); +}); diff --git a/node_modules/is-array-buffer/.eslintrc b/node_modules/is-array-buffer/.eslintrc new file mode 100644 index 000000000..46f3b120b --- /dev/null +++ b/node_modules/is-array-buffer/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/is-array-buffer/.github/FUNDING.yml b/node_modules/is-array-buffer/.github/FUNDING.yml new file mode 100644 index 000000000..61d7d6ce5 --- /dev/null +++ b/node_modules/is-array-buffer/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-array-buffer +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-array-buffer/.nycrc b/node_modules/is-array-buffer/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/is-array-buffer/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-array-buffer/CHANGELOG.md b/node_modules/is-array-buffer/CHANGELOG.md new file mode 100644 index 000000000..c4de67339 --- /dev/null +++ b/node_modules/is-array-buffer/CHANGELOG.md @@ -0,0 +1,50 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v3.0.1](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.0...v3.0.1) - 2023-01-05 + +### Commits + +- [Fix] in node 0.8, TAs do not coerce Uint8Arrays to an ArrayBuffer properly [`e488763`](https://github.com/fengyuanchen/is-array-buffer/commit/e48876346f446825dad619e55dcc830ed93f2853) +- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8eebfa2`](https://github.com/fengyuanchen/is-array-buffer/commit/8eebfa21881f3a9fa5094f8c486f00e496658ea9) + +## [v3.0.0](https://github.com/fengyuanchen/is-array-buffer/compare/v2.0.0...v3.0.0) - 2023-01-04 + +### Commits + +- [Breaking] replace package implementation [`b65f929`](https://github.com/fengyuanchen/is-array-buffer/commit/b65f929d856d2a42f043be0f5a0fc2e067370ed1) +- Initial implementation, tests, readme [`06afa73`](https://github.com/fengyuanchen/is-array-buffer/commit/06afa73e775960802ea9257cc6b4cdf768c72d3f) +- Initial commit [`051813f`](https://github.com/fengyuanchen/is-array-buffer/commit/051813f15e3cbf515e2447306761dd9c42819150) +- npm init [`946d3de`](https://github.com/fengyuanchen/is-array-buffer/commit/946d3de82b15471fb2c00a4a2a5a52eb0515eb04) +- [meta] use `npmignore` to autogenerate an npmignore file [`ca4c446`](https://github.com/fengyuanchen/is-array-buffer/commit/ca4c446f37daf5ab8cc590f2194574c2706561ed) +- Only apps should have lockfiles [`be7d8eb`](https://github.com/fengyuanchen/is-array-buffer/commit/be7d8eb09dc5033c04df85d7ba9a8714f4e54357) +- docs: fix badge link [`9ea7fb6`](https://github.com/fengyuanchen/is-array-buffer/commit/9ea7fb638e79f8938161b3b7370cb965d8e93a8b) + + + +## 2.0.0 (Feb 12, 2021) + +- Refactor in TypeScript. +- Drop the `dist` directory. +- Drop the UMD bundled file. +- Add a declaration file for TypeScript. + +## 1.0.1 (Apr 1, 2018) + +- Improve code style. + +## 1.0.0 (Jul 25, 2017) + +- Supports UMD, CommonJS and ES Module. + +## 0.1.0 (Nov 28, 2015) + +- Check if ArrayBuffer is defined first. + +## 0.0.1 (Nov 11, 2015) + +- Initial release. diff --git a/node_modules/is-array-buffer/LICENSE b/node_modules/is-array-buffer/LICENSE new file mode 100644 index 000000000..a9b309c22 --- /dev/null +++ b/node_modules/is-array-buffer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2015 Chen Gengyuan, Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/is-array-buffer/README.md b/node_modules/is-array-buffer/README.md new file mode 100644 index 000000000..7b0292f6d --- /dev/null +++ b/node_modules/is-array-buffer/README.md @@ -0,0 +1,56 @@ +# is-array-buffer [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value a JS ArrayBuffer? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag. + +## Example + +```js +var assert = require('assert'); +var isArrayBuffer = require('is-array-buffer'); + +assert(!isArrayBuffer(function () {})); +assert(!isArrayBuffer(null)); +assert(!isArrayBuffer(function* () { yield 42; return Infinity; }); +assert(!isArrayBuffer(Symbol('foo'))); +assert(!isArrayBuffer(1n)); +assert(!isArrayBuffer(Object(1n))); + +assert(!isArrayBuffer(new Set())); +assert(!isArrayBuffer(new WeakSet())); +assert(!isArrayBuffer(new Map())); +assert(!isArrayBuffer(new WeakMap())); +assert(!isArrayBuffer(new WeakRef({}))); +assert(!isArrayBuffer(new FinalizationRegistry(() => {}))); +assert(!isArrayBuffer(new SharedArrayBuffer())); + +assert(isArrayBuffer(new ArrayBuffer())); + +class MyArrayBuffer extends ArrayBuffer {} +assert(isArrayBuffer(new MyArrayBuffer())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-array-buffer +[npm-version-svg]: https://versionbadg.es/inspect-js/is-array-buffer.svg +[deps-svg]: https://david-dm.org/inspect-js/is-array-buffer.svg +[deps-url]: https://david-dm.org/inspect-js/is-array-buffer +[dev-deps-svg]: https://david-dm.org/inspect-js/is-array-buffer/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-array-buffer#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-array-buffer.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-array-buffer.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-array-buffer.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-array-buffer +[codecov-image]: https://codecov.io/gh/inspect-js/is-array-buffer/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-array-buffer/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-array-buffer +[actions-url]: https://github.com/inspect-js/is-array-buffer/actions diff --git a/node_modules/is-array-buffer/index.js b/node_modules/is-array-buffer/index.js new file mode 100644 index 000000000..e869205de --- /dev/null +++ b/node_modules/is-array-buffer/index.js @@ -0,0 +1,43 @@ +'use strict'; + +var callBind = require('call-bind'); +var callBound = require('call-bind/callBound'); +var GetIntrinsic = require('get-intrinsic'); +var isTypedArray = require('is-typed-array'); + +var $ArrayBuffer = GetIntrinsic('ArrayBuffer', true); +var $Float32Array = GetIntrinsic('Float32Array', true); +var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true); + +// in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method +var abSlice = $ArrayBuffer && !$byteLength && new $ArrayBuffer().slice; +var $abSlice = abSlice && callBind(abSlice); + +module.exports = $byteLength || $abSlice + ? function isArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + if ($byteLength) { + $byteLength(obj); + } else { + $abSlice(obj, 0); + } + return true; + } catch (e) { + return false; + } + } + : $Float32Array + // in node 0.8, ArrayBuffers have no prototype or own methods + ? function IsArrayBuffer(obj) { + try { + return (new $Float32Array(obj)).buffer === obj && !isTypedArray(obj); + } catch (e) { + return false; + } + } + : function isArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; diff --git a/node_modules/is-array-buffer/package.json b/node_modules/is-array-buffer/package.json new file mode 100644 index 000000000..1f89314ec --- /dev/null +++ b/node_modules/is-array-buffer/package.json @@ -0,0 +1,78 @@ +{ + "name": "is-array-buffer", + "version": "3.0.1", + "description": "Is this value a JS ArrayBuffer?", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only --", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-array-buffer.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "is", + "arraybuffer", + "array", + "buffer" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-array-buffer/issues" + }, + "homepage": "https://github.com/inspect-js/is-array-buffer#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.1", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.5", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "2.0.1" + }, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-array-buffer/test/index.js b/node_modules/is-array-buffer/test/index.js new file mode 100644 index 000000000..10a60e769 --- /dev/null +++ b/node_modules/is-array-buffer/test/index.js @@ -0,0 +1,41 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); +var v = require('es-value-fixtures'); +var availableTypedArrays = require('available-typed-arrays')(); + +var isArrayBuffer = require('..'); + +test('isArrayBuffer', function (t) { + t.equal(typeof isArrayBuffer, 'function', 'is a function'); + + var nonABs = v.primitives.concat( + v.objects, + typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer() : [] + ); + forEach(nonABs, function (nonAB) { + t.equal(isArrayBuffer(nonAB), false, inspect(nonAB) + ' is not an ArrayBuffer'); + }); + + t.test('actual ArrayBuffer instances', { skip: typeof ArrayBuffer === 'undefined' }, function (st) { + var ab = new ArrayBuffer(); + + st.equal(isArrayBuffer(ab), true, inspect(ab) + ' is an ArrayBuffer'); + + st.end(); + }); + + t.test('Typed Arrays', { skip: availableTypedArrays.length === 0 }, function (st) { + forEach(availableTypedArrays, function (TypedArray) { + var ta = new global[TypedArray](0); + st.equal(isArrayBuffer(ta.buffer), true, inspect(ta.buffer) + ', the TA\'s buffer, is an ArrayBuffer'); + st.equal(isArrayBuffer(ta), false, inspect(ta) + ' is not an ArrayBuffer'); + }); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-arrayish/.istanbul.yml b/node_modules/is-arrayish/.istanbul.yml deleted file mode 100644 index 19fbec32b..000000000 --- a/node_modules/is-arrayish/.istanbul.yml +++ /dev/null @@ -1,4 +0,0 @@ -instrumentation: - excludes: - - test.js - - test/**/* diff --git a/node_modules/is-arrayish/.npmignore b/node_modules/is-arrayish/.npmignore deleted file mode 100644 index 8d5eacb3e..000000000 --- a/node_modules/is-arrayish/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -/coverage/ -/test.js -/test/ -*.sw[a-p] -/node_modules/ diff --git a/node_modules/is-arrayish/.travis.yml b/node_modules/is-arrayish/.travis.yml deleted file mode 100644 index 5a0424350..000000000 --- a/node_modules/is-arrayish/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js - -script: - - node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register - - cat coverage/lcov.info | node_modules/.bin/coveralls -node_js: - - "0.10" - - "0.11" - - "0.12" - - "iojs" -os: - - linux - - osx - -notifications: - slack: - secure: oOt8QGzdrPDsTMcyahtIq5Q+0U1iwfgJgFCxBLsomQ0bpIMn+y5m4viJydA2UinHPGc944HS3LMZS9iKQyv+DjTgbhUyNXqeVjtxCwRe37f5rKQlXVvdfmjHk2kln4H8DcK3r5Qd/+2hd9BeMsp2GImTrkRSud1CZQlhhe5IgZOboSoWpGVMMy1iazWT06tAtiB2LRVhmsdUaFZDWAhGZ+UAvCPf+mnBOAylIj+U0GDrofhfTi25RK0gddG2f/p2M1HCu49O6wECGWkt2hVei233DkNJyLLLJVcvmhf+aXkV5TjMyaoxh/HdcV4DrA7KvYuWmWWKsINa9hlwAsdd/FYmJ6PjRkKWas2JoQ1C+qOzDxyQvn3CaUZFKD99pdsq0rBBZujqXQKZZ/hWb/CE74BI6fKmqQkiEPaD/7uADj04FEg6HVBZaMCyauOaK5b3VC97twbALZ1qVxYV6mU+zSEvnUbpnjjvRO0fSl9ZHA+rzkW73kX3GmHY0wAozEZbSy7QLuZlQ2QtHmBLr+APaGMdL1sFF9qFfzqKy0WDbSE0WS6hpAEJpTsjYmeBrnI8UmK3m++iEgyQPvZoH9LhUT+ek7XIfHZMe04BmC6wuO24/RfpmR6bQK9VMarFCYlBiWxg/z30vkP0KTpUi3o/cqFm7/Noxc0i2LVqM3E0Sy4= diff --git a/node_modules/is-arrayish/README.md b/node_modules/is-arrayish/README.md deleted file mode 100644 index 7d360724c..000000000 --- a/node_modules/is-arrayish/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish) -> Determines if an object can be used like an Array - -## Example -```javascript -var isArrayish = require('is-arrayish'); - -isArrayish([]); // true -isArrayish({__proto__: []}); // true -isArrayish({}); // false -isArrayish({length:10}); // false -``` - -## License -Licensed under the [MIT License](http://opensource.org/licenses/MIT). -You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/is-arrayish/index.js b/node_modules/is-arrayish/index.js deleted file mode 100644 index 5b971868b..000000000 --- a/node_modules/is-arrayish/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = function isArrayish(obj) { - if (!obj) { - return false; - } - - return obj instanceof Array || Array.isArray(obj) || - (obj.length >= 0 && obj.splice instanceof Function); -}; diff --git a/node_modules/is-arrayish/package.json b/node_modules/is-arrayish/package.json deleted file mode 100644 index 8b2d1c308..000000000 --- a/node_modules/is-arrayish/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "is-arrayish", - "description": "Determines if an object can be used as an array", - "version": "0.2.1", - "author": "Qix (http://github.com/qix-)", - "keywords": [ - "is", - "array", - "duck", - "type", - "arrayish", - "similar", - "proto", - "prototype", - "type" - ], - "license": "MIT", - "scripts": { - "pretest": "xo", - "test": "mocha --compilers coffee:coffee-script/register" - }, - "repository": { - "type": "git", - "url": "https://github.com/qix-/node-is-arrayish.git" - }, - "devDependencies": { - "coffee-script": "^1.9.3", - "coveralls": "^2.11.2", - "istanbul": "^0.3.17", - "mocha": "^2.2.5", - "should": "^7.0.1", - "xo": "^0.6.1" - } -} diff --git a/node_modules/is-bigint/.eslintrc b/node_modules/is-bigint/.eslintrc index c8872383e..1283fcf6e 100644 --- a/node_modules/is-bigint/.eslintrc +++ b/node_modules/is-bigint/.eslintrc @@ -3,10 +3,6 @@ "extends": "@ljharb", - "globals": { - "BigInt": true, - }, - "rules": { "new-cap": [2, { "capIsNewExceptions": ["BigInt"] }], "operator-linebreak": [2, "before"], diff --git a/node_modules/is-bigint/CHANGELOG.md b/node_modules/is-bigint/CHANGELOG.md index b62ddcf11..c1b0271ef 100644 --- a/node_modules/is-bigint/CHANGELOG.md +++ b/node_modules/is-bigint/CHANGELOG.md @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.0.4](https://github.com/inspect-js/is-bigint/compare/v1.0.3...v1.0.4) - 2021-08-11 + +### Commits + +- [eslint] remove unnecessary eslintrc file [`7220aa5`](https://github.com/inspect-js/is-bigint/commit/7220aa515c51649b48ba57bb77f92d85e27557d8) +- [readme] add github actions/codecov badges [`053a071`](https://github.com/inspect-js/is-bigint/commit/053a07123511eef5a91fd7889ae2d8323fbcf7d7) +- [Deps] add `has-bigints` as a runtime dependency [`0fc3c9d`](https://github.com/inspect-js/is-bigint/commit/0fc3c9d5165f62500ea9c27943cb302df65432f7) +- [Dev Deps] update `tape` [`145f11d`](https://github.com/inspect-js/is-bigint/commit/145f11d1d285d92b3144f48178fe0fb3b2f828d9) + +## [v1.0.3](https://github.com/inspect-js/is-bigint/compare/v1.0.2...v1.0.3) - 2021-08-06 + +### Commits + +- [Tests] use `has-tostringtag` for easier checking of Symbol.toStringTag [`3b44080`](https://github.com/inspect-js/is-bigint/commit/3b440801b69689d907b33184134f00d7e8a35f9f) +- [Dev Deps] update `auto-changelog`, `eslint`, `object-inspect`, `tape` [`e4d4a6c`](https://github.com/inspect-js/is-bigint/commit/e4d4a6c2ab743b52eda906abd1ed4b0608952533) +- [Fix] use `has-bigints` for more robust BigInt detection [`7bb9d7a`](https://github.com/inspect-js/is-bigint/commit/7bb9d7ab42214c12ce25e9f0cfe2af769388c3bb) + ## [v1.0.2](https://github.com/inspect-js/is-bigint/compare/v1.0.1...v1.0.2) - 2021-05-04 ### Commits diff --git a/node_modules/is-bigint/README.md b/node_modules/is-bigint/README.md index 1bf8c5f93..d64549fca 100644 --- a/node_modules/is-bigint/README.md +++ b/node_modules/is-bigint/README.md @@ -1,5 +1,7 @@ # is-bigint [![Version Badge][2]][1] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][5]][6] [![dev dependency status][7]][8] [![License][license-image]][license-url] @@ -36,3 +38,7 @@ Simply clone the repo, `npm install`, and run `npm test` [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/is-bigint.svg [downloads-url]: https://npm-stat.com/charts.html?package=is-bigint +[codecov-image]: https://codecov.io/gh/inspect-js/is-bigint/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-bigint/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-bigint +[actions-url]: https://github.com/inspect-js/is-bigint/actions diff --git a/node_modules/is-bigint/index.js b/node_modules/is-bigint/index.js index 6ce59c8ac..8da47d743 100644 --- a/node_modules/is-bigint/index.js +++ b/node_modules/is-bigint/index.js @@ -1,6 +1,8 @@ 'use strict'; -if (typeof BigInt === 'function') { +var hasBigInts = require('has-bigints')(); + +if (hasBigInts) { var bigIntValueOf = BigInt.prototype.valueOf; var tryBigInt = function tryBigIntObject(value) { try { diff --git a/node_modules/is-bigint/package.json b/node_modules/is-bigint/package.json index ac61df249..47197d590 100644 --- a/node_modules/is-bigint/package.json +++ b/node_modules/is-bigint/package.json @@ -1,6 +1,6 @@ { "name": "is-bigint", - "version": "1.0.2", + "version": "1.0.4", "description": "Is this value an ES BigInt?", "main": "index.js", "scripts": { @@ -33,16 +33,19 @@ "url": "https://github.com/inspect-js/is-bigint/issues" }, "homepage": "https://github.com/inspect-js/is-bigint#readme", + "dependencies": { + "has-bigints": "^1.0.1" + }, "devDependencies": { "@ljharb/eslint-config": "^17.6.0", "aud": "^1.1.5", - "auto-changelog": "^2.2.1", - "eslint": "^7.25.0", + "auto-changelog": "^2.3.0", + "eslint": "^7.32.0", "has-symbols": "^1.0.2", "nyc": "^10.3.2", - "object-inspect": "^1.10.2", + "object-inspect": "^1.11.0", "safe-publish-latest": "^1.1.4", - "tape": "^5.2.2" + "tape": "^5.3.1" }, "auto-changelog": { "output": "CHANGELOG.md", diff --git a/node_modules/is-bigint/test/index.js b/node_modules/is-bigint/test/index.js index 069f73d76..21537d6a3 100644 --- a/node_modules/is-bigint/test/index.js +++ b/node_modules/is-bigint/test/index.js @@ -2,7 +2,11 @@ var test = require('tape'); var inspect = require('object-inspect'); -var isBigInt = require('..'); +var hasBigInts = require('has-bigints')(); +var hasSymbols = require('has-symbols')(); +var hasToStringTag = require('has-tostringtag/shams')(); + +var isBigInt = require('../'); var debug = function (v, m) { return inspect(v) + ' ' + m; }; @@ -13,9 +17,6 @@ var forEach = function (arr, func) { } }; -var hasSymbols = require('has-symbols')(); -var hasBigInts = typeof BigInt === 'function'; - test('non-BigInt values', function (t) { var nonBigInts = [ true, @@ -50,7 +51,7 @@ test('faked BigInt values', function (t) { st.end(); }); - t.test('faked @@toStringTag', { skip: !hasBigInts || !hasSymbols || !Symbol.toStringTag }, function (st) { + t.test('faked @@toStringTag', { skip: !hasBigInts || !hasToStringTag }, function (st) { var fakeBigInt = { valueOf: function () { return BigInt(42); } }; fakeBigInt[Symbol.toStringTag] = 'BigInt'; st.equal(false, isBigInt(fakeBigInt), 'object with fake BigInt @@toStringTag and valueOf returning a BigInt is not a BigInt'); diff --git a/node_modules/is-boolean-object/CHANGELOG.md b/node_modules/is-boolean-object/CHANGELOG.md index 25a891ad0..f789bdb0c 100644 --- a/node_modules/is-boolean-object/CHANGELOG.md +++ b/node_modules/is-boolean-object/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.1.2](https://github.com/inspect-js/is-boolean-object/compare/v1.1.1...v1.1.2) - 2021-08-05 + +### Commits + +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`6d319ea`](https://github.com/inspect-js/is-boolean-object/commit/6d319eac0ba237f7ba440a1fc4b32d007b1b0cf3) +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4f85bef`](https://github.com/inspect-js/is-boolean-object/commit/4f85bef244f8fdd9ab99db0afe0b8fa00c853709) + ## [v1.1.1](https://github.com/inspect-js/is-boolean-object/compare/v1.1.0...v1.1.1) - 2021-05-07 ### Commits diff --git a/node_modules/is-boolean-object/index.js b/node_modules/is-boolean-object/index.js index 0cd8e7777..e1011f6c3 100644 --- a/node_modules/is-boolean-object/index.js +++ b/node_modules/is-boolean-object/index.js @@ -13,7 +13,7 @@ var tryBooleanObject = function booleanBrandCheck(value) { } }; var boolClass = '[object Boolean]'; -var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; +var hasToStringTag = require('has-tostringtag/shams')(); module.exports = function isBoolean(value) { if (typeof value === 'boolean') { diff --git a/node_modules/is-boolean-object/package.json b/node_modules/is-boolean-object/package.json index d1d8396d1..ca0d6451a 100644 --- a/node_modules/is-boolean-object/package.json +++ b/node_modules/is-boolean-object/package.json @@ -1,6 +1,6 @@ { "name": "is-boolean-object", - "version": "1.1.1", + "version": "1.1.2", "author": "Jordan Harband ", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -38,21 +38,22 @@ "is-boolean" ], "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "devDependencies": { "@ljharb/eslint-config": "^17.6.0", "aud": "^1.1.5", - "auto-changelog": "^2.2.1", - "core-js": "^3.12.0", + "auto-changelog": "^2.3.0", + "core-js": "^3.16.0", "eclint": "^2.8.1", - "eslint": "^7.25.0", + "eslint": "^7.32.0", "foreach": "^2.0.5", "indexof": "^0.0.1", "is": "^3.3.0", "nyc": "^10.3.2", "safe-publish-latest": "^1.1.4", - "tape": "^5.2.2" + "tape": "^5.3.0" }, "testling": { "files": "test.js", diff --git a/node_modules/is-boolean-object/test/index.js b/node_modules/is-boolean-object/test/index.js index 9ca4b34ec..cd4c44fec 100644 --- a/node_modules/is-boolean-object/test/index.js +++ b/node_modules/is-boolean-object/test/index.js @@ -2,7 +2,7 @@ var test = require('tape'); var isBoolean = require('../'); -var hasSymbols = require('has-symbols/shams')(); +var hasToStringTag = require('has-tostringtag/shams')(); test('not Booleans', function (t) { t.test('primitives', function (st) { @@ -29,7 +29,7 @@ test('not Booleans', function (t) { t.end(); }); -test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { var fakeBoolean = { toString: function () { return 'true'; }, valueOf: function () { return true; } diff --git a/node_modules/is-callable/.editorconfig b/node_modules/is-callable/.editorconfig index 462363112..f5f56790d 100644 --- a/node_modules/is-callable/.editorconfig +++ b/node_modules/is-callable/.editorconfig @@ -14,8 +14,18 @@ indent_style = space indent_size = 2 max_line_length = off +[README.md] +indent_style = off +indent_size = off +max_line_length = off + [*.json] max_line_length = off [Makefile] max_line_length = off + +[coverage*/**/*] +indent_style = off +indent_size = off +max_line_length = off diff --git a/node_modules/is-callable/.eslintrc b/node_modules/is-callable/.eslintrc index 631b8f369..ce033bfe5 100644 --- a/node_modules/is-callable/.eslintrc +++ b/node_modules/is-callable/.eslintrc @@ -5,17 +5,6 @@ "rules": { "id-length": 0, - "max-statements": [2, 14], "max-statements-per-line": [2, { "max": 2 }], - "operator-linebreak": [2, "before"], }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "no-throw-literal": 0, - }, - }, - ], } diff --git a/node_modules/is-callable/.github/main.workflow b/node_modules/is-callable/.github/main.workflow deleted file mode 100644 index 04944811f..000000000 --- a/node_modules/is-callable/.github/main.workflow +++ /dev/null @@ -1,14 +0,0 @@ -workflow "Autorebase branch on merge commits" { - on = "push" - resolves = ["rebase"] -} - -workflow "Autorebase PR on merge commits" { - on = "pull_request" - resolves = ["rebase"] -} - - action "rebase" { - uses = "ljharb/rebase@latest" - secrets = ["GITHUB_TOKEN"] -} diff --git a/node_modules/is-callable/.istanbul.yml b/node_modules/is-callable/.istanbul.yml deleted file mode 100644 index 9affe0bc3..000000000 --- a/node_modules/is-callable/.istanbul.yml +++ /dev/null @@ -1,47 +0,0 @@ -verbose: false -instrumentation: - root: . - extensions: - - .js - - .jsx - default-excludes: true - excludes: [] - variable: __coverage__ - compact: true - preserve-comments: false - complete-copy: false - save-baseline: false - baseline-file: ./coverage/coverage-baseline.raw.json - include-all-sources: false - include-pid: false - es-modules: false - auto-wrap: false -reporting: - print: summary - reports: - - html - dir: ./coverage - summarizer: pkg - report-config: {} - watermarks: - statements: [50, 80] - functions: [50, 80] - branches: [50, 80] - lines: [50, 80] -hooks: - hook-run-in-context: false - post-require-hook: null - handle-sigint: false -check: - global: - statements: 100 - lines: 100 - branches: 100 - functions: 100 - excludes: [] - each: - statements: 100 - lines: 100 - branches: 100 - functions: 100 - excludes: [] diff --git a/node_modules/is-callable/.nycrc b/node_modules/is-callable/.nycrc index 1826526e0..bdd626ce9 100644 --- a/node_modules/is-callable/.nycrc +++ b/node_modules/is-callable/.nycrc @@ -2,10 +2,6 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, "exclude": [ "coverage", "test" diff --git a/node_modules/is-callable/CHANGELOG.md b/node_modules/is-callable/CHANGELOG.md index 6b88f5b7f..32788cda9 100644 --- a/node_modules/is-callable/CHANGELOG.md +++ b/node_modules/is-callable/CHANGELOG.md @@ -1,3 +1,67 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.7](https://github.com/inspect-js/is-callable/compare/v1.2.6...v1.2.7) - 2022-09-23 + +### Commits + +- [Fix] recognize `document.all` in IE 6-10 [`06c1db2`](https://github.com/inspect-js/is-callable/commit/06c1db2b9b2e0f28428e1293eb572f8f93871ec7) +- [Tests] improve logic for FF 20-35 [`0f7d9b9`](https://github.com/inspect-js/is-callable/commit/0f7d9b9c7fe149ca87e71f0a125ade251a6a578c) +- [Fix] handle `document.all` in FF 27 (and +, probably) [`696c661`](https://github.com/inspect-js/is-callable/commit/696c661b8c0810c2d05ab172f1607f4e77ddf81e) +- [Tests] fix proxy tests in FF 42-63 [`985df0d`](https://github.com/inspect-js/is-callable/commit/985df0dd36f8cfe6f1993657b7c0f4cfc19dae30) +- [readme] update tested browsers [`389e919`](https://github.com/inspect-js/is-callable/commit/389e919493b1cb2010126b0411e5291bf76169bd) +- [Fix] detect `document.all` in Opera 12.16 [`b9f1022`](https://github.com/inspect-js/is-callable/commit/b9f1022b3d7e466b7f09080bd64c253caf644325) +- [Fix] HTML elements: properly report as callable in Opera 12.16 [`17391fe`](https://github.com/inspect-js/is-callable/commit/17391fe02b895777c4337be28dca3b364b743b34) +- [Tests] fix inverted logic in FF3 test [`056ebd4`](https://github.com/inspect-js/is-callable/commit/056ebd48790f46ca18ff5b12f51b44c08ccc3595) + +## [v1.2.6](https://github.com/inspect-js/is-callable/compare/v1.2.5...v1.2.6) - 2022-09-14 + +### Commits + +- [Fix] work for `document.all` in Firefox 3 and IE 6-8 [`015132a`](https://github.com/inspect-js/is-callable/commit/015132aaef886ec777b5b3593ef4ce461dd0c7d4) +- [Test] skip function toString check for nullish values [`8698116`](https://github.com/inspect-js/is-callable/commit/8698116f95eb59df8b48ec8e4585fc1cdd8cae9f) +- [readme] add "supported engines" section [`0442207`](https://github.com/inspect-js/is-callable/commit/0442207a89a1554d41ba36daf21862ef7ccbd500) +- [Tests] skip one of the fixture objects in FF 3.6 [`a501141`](https://github.com/inspect-js/is-callable/commit/a5011410bc6edb276c6ec8b47ce5c5d83c4bee15) +- [Tests] allow `class` constructor tests to fail in FF v45 - v54, which has undetectable classes [`b12e4a4`](https://github.com/inspect-js/is-callable/commit/b12e4a4d8c438678bd7710f9f896680150766b51) +- [Fix] Safari 4: regexes should not be considered callable [`4b732ff`](https://github.com/inspect-js/is-callable/commit/4b732ffa34346db3f0193ea4e46b7d4e637e6c82) +- [Fix] properly recognize `document.all` in Safari 4 [`3193735`](https://github.com/inspect-js/is-callable/commit/319373525dc4603346661641840cd9a3e0613136) + +## [v1.2.5](https://github.com/inspect-js/is-callable/compare/v1.2.4...v1.2.5) - 2022-09-11 + +### Commits + +- [actions] reuse common workflows [`5bb4b32`](https://github.com/inspect-js/is-callable/commit/5bb4b32dc93987328ab4f396601f751c4a7abd62) +- [meta] better `eccheck` command [`b9bd597`](https://github.com/inspect-js/is-callable/commit/b9bd597322b6e3a24c74c09881ca73e1d9f9f485) +- [meta] use `npmignore` to autogenerate an npmignore file [`3192d38`](https://github.com/inspect-js/is-callable/commit/3192d38527c7fc461d05d5aa93d47628e658bc45) +- [Fix] for HTML constructors, always use `tryFunctionObject` even in pre-toStringTag browsers [`3076ea2`](https://github.com/inspect-js/is-callable/commit/3076ea21d1f6ecc1cb711dcf1da08f257892c72b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `available-typed-arrays`, `object-inspect`, `safe-publish-latest`, `tape` [`8986746`](https://github.com/inspect-js/is-callable/commit/89867464c42adc5cd375ee074a4574b0295442cb) +- [meta] add `auto-changelog` [`7dda9d0`](https://github.com/inspect-js/is-callable/commit/7dda9d04e670a69ae566c8fa596da4ff4371e615) +- [Fix] properly report `document.all` [`da90b2b`](https://github.com/inspect-js/is-callable/commit/da90b2b68dc4f33702c2e01ad07b4f89bcb60984) +- [actions] update codecov uploader [`c8f847c`](https://github.com/inspect-js/is-callable/commit/c8f847c90e04e54ff73c7cfae86e96e94990e324) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`899ae00`](https://github.com/inspect-js/is-callable/commit/899ae00b6abd10d81fc8bc7f02b345fd885d5f56) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-value-fixtures`, `object-inspect`, `tape` [`344e913`](https://github.com/inspect-js/is-callable/commit/344e913b149609bf741aa7345fa32dc0b90d8893) +- [meta] remove greenkeeper config [`737dce5`](https://github.com/inspect-js/is-callable/commit/737dce5590b1abb16183a63cb9d7d26920b3b394) +- [meta] npmignore coverage output [`680a883`](https://github.com/inspect-js/is-callable/commit/680a8839071bf36a419fe66e1ced7a3303c27b28) + + +1.2.4 / 2021-08-05 +================= + * [Fix] use `has-tostringtag` approach to behave correctly in the presence of symbol shams + * [readme] fix repo URLs + * [readme] add actions and codecov badges + * [readme] remove defunct badges + * [meta] ignore eclint checking coverage output + * [meta] use `prepublishOnly` script for npm 7+ + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [actions] remove unused workflow file + * [Tests] run `nyc` on all tests; use `tape` runner + * [Tests] use `available-typed-arrays`, `for-each`, `has-symbols`, `object-inspect` + * [Dev Deps] update `available-typed-arrays`, `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` + 1.2.3 / 2021-01-31 ================= * [Fix] `document.all` is callable (do not use `document.all`!) diff --git a/node_modules/is-callable/README.md b/node_modules/is-callable/README.md index b5c965c47..4f2b6d6f4 100644 --- a/node_modules/is-callable/README.md +++ b/node_modules/is-callable/README.md @@ -1,6 +1,7 @@ # is-callable [![Version Badge][2]][1] -[![Build Status][3]][4] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][5]][6] [![dev dependency status][7]][8] [![License][license-image]][license-url] @@ -8,10 +9,24 @@ [![npm badge][11]][1] -[![browser support][9]][10] - Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag. +## Supported engines +Automatically tested in every minor version of node. + +Manually tested in: + - Safari: v4 - v15 (4, 5, 5.1, 6.0.5, 6.2, 7.1, 8, 9.1.3, 10.1.2, 11.1.2, 12.1, 13.1.2, 14.1.2, 15.3, 15.6.1) + - Note: Safari 9 has `class`, but `Function.prototype.toString` hides that progeny and makes them look like functions, so `class` constructors will be reported by this package as callable, when they are not in fact callable. + - Chrome: v15 - v81, v83 - v106(every integer version) + - Note: This includes Edge v80+ and Opera v15+, which matches Chrome + - Firefox: v3, v3.6, v4 - v105 (every integer version) + - Note: v45 - v54 has `class`, but `Function.prototype.toString` hides that progeny and makes them look like functions, so `class` constructors will be reported by this package as callable, when they are not in fact callable. + - Note: in v42 - v63, `Function.prototype.toString` throws on HTML element constructors, or a Proxy to a function + - Note: in v20 - v35, HTML element constructors are not callable, despite having typeof `function`. + - Note: in v19, `document.all` is not callable. + - IE: v6 - v11(every integer version + - Opera: v11.1, v11.5, v11.6, v12.1, v12.14, v12.15, v12.16, v15+ v15+ matches Chrome + ## Example ```js @@ -52,17 +67,17 @@ npm install is-callable Simply clone the repo, `npm install`, and run `npm test` [1]: https://npmjs.org/package/is-callable -[2]: http://versionbadg.es/ljharb/is-callable.svg -[3]: https://travis-ci.org/ljharb/is-callable.svg -[4]: https://travis-ci.org/ljharb/is-callable -[5]: https://david-dm.org/ljharb/is-callable.svg -[6]: https://david-dm.org/ljharb/is-callable -[7]: https://david-dm.org/ljharb/is-callable/dev-status.svg -[8]: https://david-dm.org/ljharb/is-callable#info=devDependencies -[9]: https://ci.testling.com/ljharb/is-callable.png -[10]: https://ci.testling.com/ljharb/is-callable +[2]: https://versionbadg.es/inspect-js/is-callable.svg +[5]: https://david-dm.org/inspect-js/is-callable.svg +[6]: https://david-dm.org/inspect-js/is-callable +[7]: https://david-dm.org/inspect-js/is-callable/dev-status.svg +[8]: https://david-dm.org/inspect-js/is-callable#info=devDependencies [11]: https://nodei.co/npm/is-callable.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/is-callable.svg +[license-image]: https://img.shields.io/npm/l/is-callable.svg [license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/is-callable.svg -[downloads-url]: http://npm-stat.com/charts.html?package=is-callable +[downloads-image]: https://img.shields.io/npm/dm/is-callable.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-callable +[codecov-image]: https://codecov.io/gh/inspect-js/is-callable/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-callable/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-callable +[actions-url]: https://github.com/inspect-js/is-callable/actions diff --git a/node_modules/is-callable/index.js b/node_modules/is-callable/index.js index f36d71db1..f2a89f848 100644 --- a/node_modules/is-callable/index.js +++ b/node_modules/is-callable/index.js @@ -43,32 +43,59 @@ var tryFunctionObject = function tryFunctionToStr(value) { } }; var toStr = Object.prototype.toString; +var objectClass = '[object Object]'; var fnClass = '[object Function]'; var genClass = '[object GeneratorFunction]'; -var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; -/* globals document: false */ -var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {}; +var ddaClass = '[object HTMLAllCollection]'; // IE 11 +var ddaClass2 = '[object HTML document.all class]'; +var ddaClass3 = '[object HTMLCollection]'; // IE 9-10 +var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` + +var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing + +var isDDA = function isDocumentDotAll() { return false; }; +if (typeof document === 'object') { + // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly + var all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + /* globals document: false */ + // in IE 6-8, typeof document.all is "object" and it's truthy + if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { + try { + var str = toStr.call(value); + return ( + str === ddaClass + || str === ddaClass2 + || str === ddaClass3 // opera 12.16 + || str === objectClass // IE 6-8 + ) && value('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + return false; + }; + } +} module.exports = reflectApply ? function isCallable(value) { - if (value === documentDotAll) { return true; } + if (isDDA(value)) { return true; } if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } - if (typeof value === 'function' && !value.prototype) { return true; } try { reflectApply(value, null, badArrayLike); } catch (e) { if (e !== isCallableMarker) { return false; } } - return !isES6ClassFn(value); + return !isES6ClassFn(value) && tryFunctionObject(value); } : function isCallable(value) { - if (value === documentDotAll) { return true; } + if (isDDA(value)) { return true; } if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } - if (typeof value === 'function' && !value.prototype) { return true; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = toStr.call(value); - return strClass === fnClass || strClass === genClass; + if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; } + return tryFunctionObject(value); }; diff --git a/node_modules/is-callable/package.json b/node_modules/is-callable/package.json index 3c8dbebbe..a982cbe80 100644 --- a/node_modules/is-callable/package.json +++ b/node_modules/is-callable/package.json @@ -1,6 +1,6 @@ { "name": "is-callable", - "version": "1.2.3", + "version": "1.2.7", "author": { "name": "Jordan Harband", "email": "ljharb@gmail.com", @@ -20,27 +20,21 @@ "license": "MIT", "main": "index.js", "scripts": { - "prepublish": "safe-publish-latest", + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", "pretest": "npm run --silent lint", - "test": "npm run --silent tests-only", - "posttest": "npx aud --production", - "tests-only": "npm run --silent test:stock && npm run --silent test:staging", - "test:stock": "node test", - "test:staging": "node --es-staging test", - "coverage": "npm run --silent istanbul", - "covert": "covert test", - "covert:quiet": "covert test --quiet", - "istanbul": "npm run --silent istanbul:clean && npm run --silent istanbul:std && npm run --silent istanbul:harmony && npm run --silent istanbul:merge && istanbul check", - "istanbul:clean": "rimraf coverage coverage-std coverage-harmony", - "istanbul:merge": "istanbul-merge --out coverage/coverage.raw.json coverage-harmony/coverage.raw.json coverage-std/coverage.raw.json && istanbul report html", - "istanbul:harmony": "node --harmony ./node_modules/istanbul/lib/cli.js cover test --dir coverage-harmony", - "istanbul:std": "istanbul cover test --report html --dir coverage-std", - "prelint": "eclint check *", - "lint": "eslint ." + "test": "npm run tests-only --", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs ." }, "repository": { "type": "git", - "url": "git://github.com/ljharb/is-callable.git" + "url": "git://github.com/inspect-js/is-callable.git" }, "keywords": [ "Function", @@ -54,22 +48,25 @@ "toStringTag", "@@toStringTag" ], - "dependencies": {}, "devDependencies": { - "@ljharb/eslint-config": "^17.5.0", - "aud": "^1.1.3", - "covert": "^1.1.1", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "available-typed-arrays": "^1.0.5", "eclint": "^2.8.1", - "eslint": "^7.19.0", - "foreach": "^2.0.5", - "istanbul": "1.1.0-alpha.1", - "istanbul-merge": "^1.1.1", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "has-tostringtag": "^1.0.0", "make-arrow-function": "^1.2.0", "make-async-function": "^1.0.0", "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", "rimraf": "^2.7.1", - "safe-publish-latest": "^1.1.4", - "tape": "^5.1.1" + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.0" }, "testling": { "files": "test/index.js", @@ -92,9 +89,18 @@ "engines": { "node": ">= 0.4" }, - "greenkeeper": { + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "v1.2.5" + }, + "publishConfig": { "ignore": [ - "rimraf" + ".github/workflows" ] } } diff --git a/node_modules/is-callable/test/index.js b/node_modules/is-callable/test/index.js index 2eacb0ee5..bfe5db5c5 100644 --- a/node_modules/is-callable/test/index.js +++ b/node_modules/is-callable/test/index.js @@ -1,11 +1,14 @@ 'use strict'; -/* globals Proxy */ /* eslint no-magic-numbers: 1 */ var test = require('tape'); var isCallable = require('../'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; +var hasToStringTag = require('has-tostringtag/shams')(); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var inspect = require('object-inspect'); +var typedArrayNames = require('available-typed-arrays')(); var generators = require('make-generator-function')(); var arrows = require('make-arrow-function').list(); var asyncs = require('make-async-function').list(); @@ -15,7 +18,16 @@ try { weirdlyCommentedArrowFn = Function('return cl/*/**/=>/**/ass - 1;')(); /* eslint-enable no-new-func */ } catch (e) { /**/ } -var forEach = require('foreach'); + +var isIE68 = !(0 in [undefined]); +var isFirefox = typeof window !== 'undefined' && ('netscape' in window) && (/ rv:/).test(navigator.userAgent); +var fnToStringCoerces; +try { + Function.prototype.toString.call(v.uncoercibleFnObject); + fnToStringCoerces = true; +} catch (e) { + fnToStringCoerces = false; +} var noop = function () {}; var classFake = function classFake() { }; // eslint-disable-line func-name-matching @@ -36,11 +48,8 @@ if (typeof Proxy === 'function') { proxy(); String(proxy); } catch (_) { - // If `Reflect` is supported, then `Function.prototype.toString` isn't used for callability detection. - if (typeof Reflect !== 'object') { - // Older engines throw a `TypeError` when `Function.prototype.toString` is called on a Proxy object. - proxy = null; - } + // Older engines throw a `TypeError` when `Function.prototype.toString` is called on a Proxy object. + proxy = null; } } @@ -56,6 +65,7 @@ var invokeFunction = function invokeFunctionString(str) { }; var classConstructor = invokeFunction('"use strict"; return class Foo {}'); +var hasDetectableClasses = classConstructor && Function.prototype.toString.call(classConstructor) === 'class Foo {}'; var commentedClass = invokeFunction('"use strict"; return class/*kkk*/\n//blah\n Bar\n//blah\n {}'); var commentedClassOneLine = invokeFunction('"use strict"; return class/**/A{}'); @@ -63,46 +73,51 @@ var classAnonymous = invokeFunction('"use strict"; return class{}'); var classAnonymousCommentedOneLine = invokeFunction('"use strict"; return class/*/*/{}'); test('not callables', function (t) { - t.test('non-number/string primitives', function (st) { - st.notOk(isCallable(), 'undefined is not callable'); - st.notOk(isCallable(null), 'null is not callable'); - st.notOk(isCallable(false), 'false is not callable'); - st.notOk(isCallable(true), 'true is not callable'); - st.end(); - }); - - t.notOk(isCallable([]), 'array is not callable'); - t.notOk(isCallable({}), 'object is not callable'); - t.notOk(isCallable(/a/g), 'regex literal is not callable'); - t.notOk(isCallable(new RegExp('a', 'g')), 'regex object is not callable'); - t.notOk(isCallable(new Date()), 'new Date() is not callable'); - - t.test('numbers', function (st) { - st.notOk(isCallable(42), 'number is not callable'); - st.notOk(isCallable(Object(42)), 'number object is not callable'); - st.notOk(isCallable(NaN), 'NaN is not callable'); - st.notOk(isCallable(Infinity), 'Infinity is not callable'); - st.end(); - }); - - t.test('strings', function (st) { - st.notOk(isCallable('foo'), 'string primitive is not callable'); - st.notOk(isCallable(Object('foo')), 'string object is not callable'); - st.end(); + t.notOk(isCallable(), 'implicit undefined is not callable'); + + forEach(v.nonFunctions.concat([ + Object(42), + Object('foo'), + NaN, + [], + /a/g, + new RegExp('a', 'g'), + new Date() + ]), function (nonFunction) { + if (fnToStringCoerces && nonFunction === v.coercibleFnObject) { + t.comment('FF 3.6 has a Function toString that coerces its receiver, so this test is skipped'); + return; + } + if (nonFunction != null) { // eslint-disable-line eqeqeq + if (isFirefox) { + // Firefox 3 throws some kind of *object* here instead of a proper error + t['throws']( + function () { Function.prototype.toString.call(nonFunction); }, + inspect(nonFunction) + ' can not be used with Function toString' + ); + } else { + t['throws']( + function () { Function.prototype.toString.call(nonFunction); }, + TypeError, + inspect(nonFunction) + ' can not be used with Function toString' + ); + } + } + t.equal(isCallable(nonFunction), false, inspect(nonFunction) + ' is not callable'); }); t.test('non-function with function in its [[Prototype]] chain', function (st) { var Foo = function Bar() {}; Foo.prototype = noop; - st.equal(true, isCallable(Foo), 'sanity check: Foo is callable'); - st.equal(false, isCallable(new Foo()), 'instance of Foo is not callable'); + st.equal(isCallable(Foo), true, 'sanity check: Foo is callable'); + st.equal(isCallable(new Foo()), false, 'instance of Foo is not callable'); st.end(); }); t.end(); }); -test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { var fakeFunction = { toString: function () { return String(return3); }, valueOf: return3 @@ -114,18 +129,6 @@ test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) t.end(); }); -var typedArrayNames = [ - 'Int8Array', - 'Uint8Array', - 'Uint8ClampedArray', - 'Int16Array', - 'Uint16Array', - 'Int32Array', - 'Uint32Array', - 'Float32Array', - 'Float64Array' -]; - test('Functions', function (t) { t.ok(isCallable(noop), 'function is callable'); t.ok(isCallable(classFake), 'function with name containing "class" is callable'); @@ -134,14 +137,9 @@ test('Functions', function (t) { t.end(); }); -test('Typed Arrays', function (st) { +test('Typed Arrays', { skip: typedArrayNames.length === 0 }, function (st) { forEach(typedArrayNames, function (typedArray) { - /* istanbul ignore if : covered in node 0.6 */ - if (typeof global[typedArray] === 'undefined') { - st.comment('# SKIP typed array "' + typedArray + '" not supported'); - } else { - st.ok(isCallable(global[typedArray]), typedArray + ' is callable'); - } + st.ok(isCallable(global[typedArray]), typedArray + ' is callable'); }); st.end(); }); @@ -161,7 +159,12 @@ test('Arrow functions', { skip: arrows.length === 0 }, function (t) { t.end(); }); -test('"Class" constructors', { skip: !classConstructor || !commentedClass || !commentedClassOneLine || !classAnonymous }, function (t) { +test('"Class" constructors', { + skip: !classConstructor || !commentedClass || !commentedClassOneLine || !classAnonymous, todo: !hasDetectableClasses +}, function (t) { + if (!hasDetectableClasses) { + t.comment('WARNING: This engine does not support detectable classes'); + } t.notOk(isCallable(classConstructor), 'class constructors are not callable'); t.notOk(isCallable(commentedClass), 'class constructors with comments in the signature are not callable'); t.notOk(isCallable(commentedClassOneLine), 'one-line class constructors with comments in the signature are not callable'); @@ -178,7 +181,7 @@ test('`async function`s', { skip: asyncs.length === 0 }, function (t) { }); test('proxies of functions', { skip: !proxy }, function (t) { - t.ok(isCallable(proxy), 'proxies of functions are callable'); + t.equal(isCallable(proxy), true, 'proxies of functions are callable'); t.end(); }); @@ -189,10 +192,53 @@ test('throwing functions', function (t) { t.ok(isCallable(thrower), 'a function that throws is callable'); }); -/* globals document: false */ -test('document.all', { skip: typeof document !== 'object' }, function (t) { - t.notOk(isCallable(document), 'document is not callable'); - t.ok(isCallable(document.all), 'document.all is callable'); +test('DOM', function (t) { + /* eslint-env browser */ + + t.test('document.all', { skip: typeof document !== 'object' }, function (st) { + st.notOk(isCallable(document), 'document is not callable'); + + var all = document.all; + var isFF3 = !isIE68 && Object.prototype.toString(all) === Object.prototype.toString.call(document.all); // this test is true in IE 6-8 also + var expected = false; + if (!isFF3) { + try { + expected = document.all('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + st.equal(isCallable(document.all), expected, 'document.all is ' + (isFF3 ? 'not ' : '') + 'callable'); + + st.end(); + }); + + forEach([ + 'HTMLElement', + 'HTMLAnchorElement' + ], function (name) { + var constructor = global[name]; + + t.test(name, { skip: !constructor }, function (st) { + st.match(typeof constructor, /^(?:function|object)$/, name + ' is a function or object'); + + var callable = isCallable(constructor); + st.equal(typeof callable, 'boolean'); + + if (callable) { + st.doesNotThrow( + function () { Function.prototype.toString.call(constructor); }, + 'anything this library claims is callable should be accepted by Function toString' + ); + } else { + st['throws']( + function () { Function.prototype.toString.call(constructor); }, + TypeError, + 'anything this library claims is not callable should not be accepted by Function toString' + ); + } + + st.end(); + }); + }); t.end(); }); diff --git a/node_modules/is-core-module/.eslintignore b/node_modules/is-core-module/.eslintignore deleted file mode 100644 index 404abb221..000000000 --- a/node_modules/is-core-module/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/is-core-module/.eslintrc b/node_modules/is-core-module/.eslintrc index 9c7d5168a..f2e072681 100644 --- a/node_modules/is-core-module/.eslintrc +++ b/node_modules/is-core-module/.eslintrc @@ -3,13 +3,13 @@ "root": true, "rules": { "func-style": 1, - "operator-linebreak": [2, "before"], }, "overrides": [ { "files": "test/**", "rules": { "global-require": 0, + "max-depth": 0, "max-lines-per-function": 0, "no-negated-condition": 0, }, diff --git a/node_modules/is-core-module/CHANGELOG.md b/node_modules/is-core-module/CHANGELOG.md index 1445627fb..a2ff25426 100644 --- a/node_modules/is-core-module/CHANGELOG.md +++ b/node_modules/is-core-module/CHANGELOG.md @@ -5,6 +5,67 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v2.11.0](https://github.com/inspect-js/is-core-module/compare/v2.10.0...v2.11.0) - 2022-10-18 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`3360011`](https://github.com/inspect-js/is-core-module/commit/33600118857b46177178072fba2affcdeb009d12) +- [Dev Deps] update `aud`, `tape` [`651c6b0`](https://github.com/inspect-js/is-core-module/commit/651c6b0cc2799d4130866cf43ad333dcade3d26c) +- [New] `inspector/promises` and `node:inspector/promises` is now available in node 19 [`22d332f`](https://github.com/inspect-js/is-core-module/commit/22d332fe22ac050305444e0781ff85af819abcb0) + +## [v2.10.0](https://github.com/inspect-js/is-core-module/compare/v2.9.0...v2.10.0) - 2022-08-03 + +### Commits + +- [New] `node:test` is now available in node ^16.17 [`e8fd36e`](https://github.com/inspect-js/is-core-module/commit/e8fd36e9b86c917775a07cc473b62a3294f459f2) +- [Tests] improve skip message [`c014a4c`](https://github.com/inspect-js/is-core-module/commit/c014a4c0cd6eb15fff573ae4709191775e70cab4) + +## [v2.9.0](https://github.com/inspect-js/is-core-module/compare/v2.8.1...v2.9.0) - 2022-04-19 + +### Commits + +- [New] add `node:test`, in node 18+ [`f853eca`](https://github.com/inspect-js/is-core-module/commit/f853eca801d0a7d4e1dbb670f1b6d9837d9533c5) +- [Tests] use `mock-property` [`03b3644`](https://github.com/inspect-js/is-core-module/commit/03b3644dff4417f4ba5a7d0aa0138f5f6b3e5c46) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`7c0e2d0`](https://github.com/inspect-js/is-core-module/commit/7c0e2d06ed2a89acf53abe2ab34d703ed5b03455) +- [meta] simplify "exports" [`d6ed201`](https://github.com/inspect-js/is-core-module/commit/d6ed201eba7fbba0e59814a9050fc49a6e9878c8) + +## [v2.8.1](https://github.com/inspect-js/is-core-module/compare/v2.8.0...v2.8.1) - 2022-01-05 + +### Commits + +- [actions] reuse common workflows [`cd2cf9b`](https://github.com/inspect-js/is-core-module/commit/cd2cf9b3b66c8d328f65610efe41e9325db7716d) +- [Fix] update node 0.4 results [`062195d`](https://github.com/inspect-js/is-core-module/commit/062195d89f0876a88b95d378b43f7fcc1205bc5b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0790b62`](https://github.com/inspect-js/is-core-module/commit/0790b6222848c6167132f9f73acc3520fa8d1298) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7d139a6`](https://github.com/inspect-js/is-core-module/commit/7d139a6d767709eabf0a0251e074ec1fb230c06e) +- [Tests] run `nyc` in `tests-only`, not `test` [`780e8a0`](https://github.com/inspect-js/is-core-module/commit/780e8a049951c71cf78b1707f0871c48a28bde14) + +## [v2.8.0](https://github.com/inspect-js/is-core-module/compare/v2.7.0...v2.8.0) - 2021-10-14 + +### Commits + +- [actions] update codecov uploader [`0cfe94e`](https://github.com/inspect-js/is-core-module/commit/0cfe94e106a7d005ea03e008c0a21dec13a77904) +- [New] add `readline/promises` to node v17+ [`4f78c30`](https://github.com/inspect-js/is-core-module/commit/4f78c3008b1b58b4db6dc91d99610b1bc859da7e) +- [Tests] node ^14.18 supports `node:` prefixes for CJS [`43e2f17`](https://github.com/inspect-js/is-core-module/commit/43e2f177452cea2f0eaf34f61b5407217bbdb6f4) + +## [v2.7.0](https://github.com/inspect-js/is-core-module/compare/v2.6.0...v2.7.0) - 2021-09-27 + +### Commits + +- [New] node `v14.18` added `node:`-prefixed core modules to `require` [`6d943ab`](https://github.com/inspect-js/is-core-module/commit/6d943abe81382b9bbe344384d80fbfebe1cc0526) +- [Tests] add coverage for Object.prototype pollution [`c6baf5f`](https://github.com/inspect-js/is-core-module/commit/c6baf5f942311a1945c1af41167bb80b84df2af7) +- [Dev Deps] update `@ljharb/eslint-config` [`6717f00`](https://github.com/inspect-js/is-core-module/commit/6717f000d063ea57beb772bded36c2f056ac404c) +- [eslint] fix linter warning [`594c10b`](https://github.com/inspect-js/is-core-module/commit/594c10bb7d39d7eb00925c90924199ff596184b2) +- [meta] add `sideEffects` flag [`c32cfa5`](https://github.com/inspect-js/is-core-module/commit/c32cfa5195632944c4dd4284a142b8476e75be13) + +## [v2.6.0](https://github.com/inspect-js/is-core-module/compare/v2.5.0...v2.6.0) - 2021-08-17 + +### Commits + +- [Dev Deps] update `eslint`, `tape` [`6cc928f`](https://github.com/inspect-js/is-core-module/commit/6cc928f8a4bba66aeeccc4f6beeac736d4bd3081) +- [New] add `stream/consumers` to node `>= 16.7` [`a1a423e`](https://github.com/inspect-js/is-core-module/commit/a1a423e467e4cc27df180234fad5bab45943e67d) +- [Refactor] Remove duplicated `&&` operand [`86faea7`](https://github.com/inspect-js/is-core-module/commit/86faea738213a2433c62d1098488dc9314dca832) +- [Tests] include prereleases [`a4da7a6`](https://github.com/inspect-js/is-core-module/commit/a4da7a6abf7568e2aa4fd98e69452179f1850963) + ## [v2.5.0](https://github.com/inspect-js/is-core-module/compare/v2.4.0...v2.5.0) - 2021-07-12 ### Commits diff --git a/node_modules/is-core-module/core.json b/node_modules/is-core-module/core.json index 773222f6b..d73579c43 100644 --- a/node_modules/is-core-module/core.json +++ b/node_modules/is-core-module/core.json @@ -1,132 +1,139 @@ { "assert": true, - "node:assert": ">= 16", + "node:assert": [">= 14.18 && < 15", ">= 16"], "assert/strict": ">= 15", "node:assert/strict": ">= 16", "async_hooks": ">= 8", - "node:async_hooks": ">= 16", - "buffer_ieee754": "< 0.9.7", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", "buffer": true, - "node:buffer": ">= 16", + "node:buffer": [">= 14.18 && < 15", ">= 16"], "child_process": true, - "node:child_process": ">= 16", - "cluster": true, - "node:cluster": ">= 16", + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], "console": true, - "node:console": ">= 16", + "node:console": [">= 14.18 && < 15", ">= 16"], "constants": true, - "node:constants": ">= 16", + "node:constants": [">= 14.18 && < 15", ">= 16"], "crypto": true, - "node:crypto": ">= 16", + "node:crypto": [">= 14.18 && < 15", ">= 16"], "_debug_agent": ">= 1 && < 8", "_debugger": "< 8", "dgram": true, - "node:dgram": ">= 16", + "node:dgram": [">= 14.18 && < 15", ">= 16"], "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], - "node:diagnostics_channel": ">= 16", + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], "dns": true, - "node:dns": ">= 16", + "node:dns": [">= 14.18 && < 15", ">= 16"], "dns/promises": ">= 15", "node:dns/promises": ">= 16", "domain": ">= 0.7.12", - "node:domain": ">= 16", + "node:domain": [">= 14.18 && < 15", ">= 16"], "events": true, - "node:events": ">= 16", + "node:events": [">= 14.18 && < 15", ">= 16"], "freelist": "< 6", "fs": true, - "node:fs": ">= 16", + "node:fs": [">= 14.18 && < 15", ">= 16"], "fs/promises": [">= 10 && < 10.1", ">= 14"], - "node:fs/promises": ">= 16", + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], "_http_agent": ">= 0.11.1", - "node:_http_agent": ">= 16", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], "_http_client": ">= 0.11.1", - "node:_http_client": ">= 16", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], "_http_common": ">= 0.11.1", - "node:_http_common": ">= 16", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], "_http_incoming": ">= 0.11.1", - "node:_http_incoming": ">= 16", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], "_http_outgoing": ">= 0.11.1", - "node:_http_outgoing": ">= 16", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], "_http_server": ">= 0.11.1", - "node:_http_server": ">= 16", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], "http": true, - "node:http": ">= 16", + "node:http": [">= 14.18 && < 15", ">= 16"], "http2": ">= 8.8", - "node:http2": ">= 16", + "node:http2": [">= 14.18 && < 15", ">= 16"], "https": true, - "node:https": ">= 16", + "node:https": [">= 14.18 && < 15", ">= 16"], "inspector": ">= 8", - "node:inspector": ">= 16", + "node:inspector": [">= 14.18 && < 15", ">= 16"], + "inspector/promises": [">= 19"], + "node:inspector/promises": [">= 19"], "_linklist": "< 8", "module": true, - "node:module": ">= 16", + "node:module": [">= 14.18 && < 15", ">= 16"], "net": true, - "node:net": ">= 16", + "node:net": [">= 14.18 && < 15", ">= 16"], "node-inspect/lib/_inspect": ">= 7.6 && < 12", "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", "os": true, - "node:os": ">= 16", + "node:os": [">= 14.18 && < 15", ">= 16"], "path": true, - "node:path": ">= 16", + "node:path": [">= 14.18 && < 15", ">= 16"], "path/posix": ">= 15.3", "node:path/posix": ">= 16", "path/win32": ">= 15.3", "node:path/win32": ">= 16", "perf_hooks": ">= 8.5", - "node:perf_hooks": ">= 16", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], "process": ">= 1", - "node:process": ">= 16", - "punycode": true, - "node:punycode": ">= 16", + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], "querystring": true, - "node:querystring": ">= 16", + "node:querystring": [">= 14.18 && < 15", ">= 16"], "readline": true, - "node:readline": ">= 16", + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", "repl": true, - "node:repl": ">= 16", + "node:repl": [">= 14.18 && < 15", ">= 16"], "smalloc": ">= 0.11.5 && < 3", "_stream_duplex": ">= 0.9.4", - "node:_stream_duplex": ">= 16", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], "_stream_transform": ">= 0.9.4", - "node:_stream_transform": ">= 16", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], "_stream_wrap": ">= 1.4.1", - "node:_stream_wrap": ">= 16", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], "_stream_passthrough": ">= 0.9.4", - "node:_stream_passthrough": ">= 16", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], "_stream_readable": ">= 0.9.4", - "node:_stream_readable": ">= 16", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], "_stream_writable": ">= 0.9.4", - "node:_stream_writable": ">= 16", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], "stream": true, - "node:stream": ">= 16", + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", "stream/promises": ">= 15", "node:stream/promises": ">= 16", "stream/web": ">= 16.5", "node:stream/web": ">= 16.5", "string_decoder": true, - "node:string_decoder": ">= 16", - "sys": [">= 0.6 && < 0.7", ">= 0.8"], - "node:sys": ">= 16", + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "node:test": [">= 16.17 && < 17", ">= 18"], "timers": true, - "node:timers": ">= 16", + "node:timers": [">= 14.18 && < 15", ">= 16"], "timers/promises": ">= 15", "node:timers/promises": ">= 16", "_tls_common": ">= 0.11.13", - "node:_tls_common": ">= 16", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], "_tls_legacy": ">= 0.11.3 && < 10", "_tls_wrap": ">= 0.11.3", - "node:_tls_wrap": ">= 16", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], "tls": true, - "node:tls": ">= 16", + "node:tls": [">= 14.18 && < 15", ">= 16"], "trace_events": ">= 10", - "node:trace_events": ">= 16", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], "tty": true, - "node:tty": ">= 16", + "node:tty": [">= 14.18 && < 15", ">= 16"], "url": true, - "node:url": ">= 16", + "node:url": [">= 14.18 && < 15", ">= 16"], "util": true, - "node:util": ">= 16", + "node:util": [">= 14.18 && < 15", ">= 16"], "util/types": ">= 15.3", "node:util/types": ">= 16", "v8/tools/arguments": ">= 10 && < 12", @@ -137,12 +144,12 @@ "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], "v8": ">= 1", - "node:v8": ">= 16", + "node:v8": [">= 14.18 && < 15", ">= 16"], "vm": true, - "node:vm": ">= 16", + "node:vm": [">= 14.18 && < 15", ">= 16"], "wasi": ">= 13.4 && < 13.5", "worker_threads": ">= 11.7", - "node:worker_threads": ">= 16", - "zlib": true, - "node:zlib": ">= 16" + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] } diff --git a/node_modules/is-core-module/index.js b/node_modules/is-core-module/index.js index f5a69cf76..f9637e0e7 100644 --- a/node_modules/is-core-module/index.js +++ b/node_modules/is-core-module/index.js @@ -44,7 +44,7 @@ function versionIncluded(nodeVersion, specifierValue) { } var current = typeof nodeVersion === 'undefined' - ? process.versions && process.versions.node && process.versions.node + ? process.versions && process.versions.node : nodeVersion; if (typeof current !== 'string') { diff --git a/node_modules/is-core-module/package.json b/node_modules/is-core-module/package.json index b890ae791..5b893c0d2 100644 --- a/node_modules/is-core-module/package.json +++ b/node_modules/is-core-module/package.json @@ -1,24 +1,21 @@ { "name": "is-core-module", - "version": "2.5.0", + "version": "2.11.0", "description": "Is this specifier a node.js core module?", "main": "index.js", + "sideEffects": false, "exports": { - ".": [ - { - "default": "./index.js" - }, - "./index.js" - ], + ".": "./index.js", "./package.json": "./package.json" }, "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", "prepublish": "not-in-publish || npm run prepublishOnly", "prepublishOnly": "safe-publish-latest", "lint": "eslint .", "pretest": "npm run lint", - "tests-only": "tape 'test/**/*.js'", - "test": "nyc npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", "posttest": "aud --production", "version": "auto-changelog && git add CHANGELOG.md", "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" @@ -48,14 +45,16 @@ "has": "^1.0.3" }, "devDependencies": { - "@ljharb/eslint-config": "^17.6.0", - "aud": "^1.1.5", - "auto-changelog": "^2.3.0", - "eslint": "^7.30.0", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", + "safe-publish-latest": "^2.0.0", "semver": "^6.3.0", - "tape": "^5.2.2" + "tape": "^5.6.1" }, "auto-changelog": { "output": "CHANGELOG.md", @@ -64,5 +63,10 @@ "commitLimit": false, "backfillLimit": false, "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github" + ] } } diff --git a/node_modules/is-core-module/test/index.js b/node_modules/is-core-module/test/index.js index 281c7e9a4..912808b9d 100644 --- a/node_modules/is-core-module/test/index.js +++ b/node_modules/is-core-module/test/index.js @@ -3,10 +3,12 @@ var test = require('tape'); var keys = require('object-keys'); var semver = require('semver'); +var mockProperty = require('mock-property'); + var isCore = require('../'); var data = require('../core.json'); -var supportsNodePrefix = semver.satisfies(process.versions.node, '>= 16'); +var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true }); test('core modules', function (t) { t.test('isCore()', function (st) { @@ -42,7 +44,7 @@ test('core modules', function (t) { t.test('core via repl module', { skip: !data.repl }, function (st) { var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle if (!libs) { - st.skip('module.builtinModules does not exist'); + st.skip('repl._builtinLibs does not exist'); } else { for (var i = 0; i < libs.length; ++i) { var mod = libs[i]; @@ -51,16 +53,18 @@ test('core modules', function (t) { function () { require(mod); }, // eslint-disable-line no-loop-func 'requiring ' + mod + ' does not throw' ); - if (supportsNodePrefix) { - st.doesNotThrow( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' does not throw' - ); - } else { - st['throws']( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' throws' - ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } } } } @@ -79,6 +83,10 @@ test('core modules', function (t) { 'v8/tools/tickprocessor', 'v8/tools/profile' ]; + // see https://github.com/nodejs/node/issues/42785 + if (semver.satisfies(process.version, '>= 18')) { + libs = libs.concat('node:test'); + } for (var i = 0; i < libs.length; ++i) { var mod = libs[i]; if (excludeList.indexOf(mod) === -1) { @@ -87,16 +95,18 @@ test('core modules', function (t) { function () { require(mod); }, // eslint-disable-line no-loop-func 'requiring ' + mod + ' does not throw' ); - if (supportsNodePrefix) { - st.doesNotThrow( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' does not throw' - ); - } else { - st['throws']( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' throws' - ); + if (mod.slice(0, 5) !== 'node:') { + if (supportsNodePrefix) { + st.doesNotThrow( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' does not throw' + ); + } else { + st['throws']( + function () { require('node:' + mod); }, // eslint-disable-line no-loop-func + 'requiring node:' + mod + ' throws' + ); + } } } } @@ -104,5 +114,20 @@ test('core modules', function (t) { st.end(); }); + t.test('Object.prototype pollution', function (st) { + var nonKey = 'not a core module'; + st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); + st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); + st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); + st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); + + st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); + st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); + st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data'); + st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies'); + + st.end(); + }); + t.end(); }); diff --git a/node_modules/is-date-object/.jscs.json b/node_modules/is-date-object/.jscs.json deleted file mode 100644 index b4d9b8b40..000000000 --- a/node_modules/is-date-object/.jscs.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "es3": true, - - "additionalRules": [], - - "requireSemicolons": true, - - "disallowMultipleSpaces": true, - - "disallowIdentifierNames": [], - - "requireCurlyBraces": { - "allExcept": [], - "keywords": ["if", "else", "for", "while", "do", "try", "catch"] - }, - - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], - - "disallowSpaceAfterKeywords": [], - - "disallowSpaceBeforeComma": true, - "disallowSpaceAfterComma": false, - "disallowSpaceBeforeSemicolon": true, - - "disallowNodeTypes": [ - "DebuggerStatement", - "ForInStatement", - "LabeledStatement", - "SwitchCase", - "SwitchStatement", - "WithStatement" - ], - - "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, - - "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, - "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, - "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, - "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, - - "requireSpaceBetweenArguments": true, - - "disallowSpacesInsideParentheses": true, - - "disallowSpacesInsideArrayBrackets": true, - - "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, - - "disallowSpaceAfterObjectKeys": true, - - "requireCommaBeforeLineBreak": true, - - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "requireSpaceAfterPrefixUnaryOperators": [], - - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - "requireSpaceBeforePostfixUnaryOperators": [], - - "disallowSpaceBeforeBinaryOperators": [], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], - "disallowSpaceAfterBinaryOperators": [], - - "disallowImplicitTypeConversion": ["binary", "string"], - - "disallowKeywords": ["with", "eval"], - - "requireKeywordsOnNewLine": [], - "disallowKeywordsOnNewLine": ["else"], - - "requireLineFeedAtFileEnd": true, - - "disallowTrailingWhitespace": true, - - "disallowTrailingComma": true, - - "excludeFiles": ["node_modules/**", "vendor/**"], - - "disallowMultipleLineStrings": true, - - "requireDotNotation": { "allExcept": ["keywords"] }, - - "requireParenthesesAroundIIFE": true, - - "validateLineBreaks": "LF", - - "validateQuoteMarks": { - "escape": true, - "mark": "'" - }, - - "disallowOperatorBeforeLineBreak": [], - - "requireSpaceBeforeKeywords": [ - "do", - "for", - "if", - "else", - "switch", - "case", - "try", - "catch", - "finally", - "while", - "with", - "return" - ], - - "validateAlignedFunctionParameters": { - "lineBreakAfterOpeningBraces": true, - "lineBreakBeforeClosingBraces": true - }, - - "requirePaddingNewLinesBeforeExport": true, - - "validateNewlineAfterArrayElements": { - "maximum": 1 - }, - - "requirePaddingNewLinesAfterUseStrict": true, - - "disallowArrowFunctions": true, - - "disallowMultiLineTernary": true, - - "validateOrderInObjectKeys": "asc-insensitive", - - "disallowIdenticalDestructuringNames": true, - - "disallowNestedTernaries": { "maxLevel": 1 }, - - "requireSpaceAfterComma": { "allExcept": ["trailing"] }, - "requireAlignedMultilineParams": false, - - "requireSpacesInGenerator": { - "afterStar": true - }, - - "disallowSpacesInGenerator": { - "beforeStar": true - }, - - "disallowVar": false, - - "requireArrayDestructuring": false, - - "requireEnhancedObjectLiterals": false, - - "requireObjectDestructuring": false, - - "requireEarlyReturn": false, - - "requireCapitalizedConstructorsNew": { - "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] - }, - - "requireImportAlphabetized": false, - - "requireSpaceBeforeObjectValues": true, - "requireSpaceBeforeDestructuredValues": true, - - "disallowSpacesInsideTemplateStringPlaceholders": true, - - "disallowArrayDestructuringReturn": false, - - "requireNewlineBeforeSingleStatementsInIf": false, - - "disallowUnusedVariables": true, - - "requireSpacesInsideImportedObjectBraces": true, - - "requireUseStrict": true -} - diff --git a/node_modules/is-date-object/CHANGELOG.md b/node_modules/is-date-object/CHANGELOG.md index 0f4fbbd95..49f624a42 100644 --- a/node_modules/is-date-object/CHANGELOG.md +++ b/node_modules/is-date-object/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.0.5](https://github.com/inspect-js/is-date-object/compare/v1.0.4...v1.0.5) - 2021-08-05 + +### Commits + +- [meta] remove `.jscs.json` [`31c731c`](https://github.com/inspect-js/is-date-object/commit/31c731c5efc5b1b86e6426d904373dc6225b929f) +- [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams [`17a6df4`](https://github.com/inspect-js/is-date-object/commit/17a6df4a3ab9bcb1395a638ced14f571f9549427) +- [Dev Deps] update `eslint`, `auto-changelog`, `tape` [`79db3af`](https://github.com/inspect-js/is-date-object/commit/79db3af1a745042a0a11e03c7dd7db910b5e0d01) + ## [v1.0.4](https://github.com/inspect-js/is-date-object/compare/v1.0.3...v1.0.4) - 2021-05-07 ### Commits diff --git a/node_modules/is-date-object/index.js b/node_modules/is-date-object/index.js index 996c5bb16..11628f3bb 100644 --- a/node_modules/is-date-object/index.js +++ b/node_modules/is-date-object/index.js @@ -12,7 +12,7 @@ var tryDateObject = function tryDateGetDayCall(value) { var toStr = Object.prototype.toString; var dateClass = '[object Date]'; -var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; +var hasToStringTag = require('has-tostringtag/shams')(); module.exports = function isDateObject(value) { if (typeof value !== 'object' || value === null) { diff --git a/node_modules/is-date-object/package.json b/node_modules/is-date-object/package.json index 0807cdaca..5c2b607d6 100644 --- a/node_modules/is-date-object/package.json +++ b/node_modules/is-date-object/package.json @@ -1,6 +1,6 @@ { "name": "is-date-object", - "version": "1.0.4", + "version": "1.0.5", "author": "Jordan Harband", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -31,18 +31,21 @@ "@@toStringTag", "Date object" ], + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "devDependencies": { "@ljharb/eslint-config": "^17.6.0", "aud": "^1.1.5", - "auto-changelog": "^2.2.1", + "auto-changelog": "^2.3.0", "core-js": "^3.12.0", - "eslint": "^7.26.0", + "eslint": "^7.32.0", "foreach": "^2.0.5", "indexof": "^0.0.1", "is": "^3.3.0", "nyc": "^10.3.2", "safe-publish-latest": "^1.1.4", - "tape": "^5.2.2" + "tape": "^5.3.0" }, "testling": { "files": "test/index.js", diff --git a/node_modules/is-date-object/test/index.js b/node_modules/is-date-object/test/index.js index 3b2d93f5e..5279dad06 100644 --- a/node_modules/is-date-object/test/index.js +++ b/node_modules/is-date-object/test/index.js @@ -2,7 +2,7 @@ var test = require('tape'); var isDate = require('../'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator !== 'undefined'; +var hasToStringTag = require('has-tostringtag/shams')(); test('not Dates', function (t) { t.notOk(isDate(), 'undefined is not Date'); @@ -19,7 +19,7 @@ test('not Dates', function (t) { t.end(); }); -test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { var realDate = new Date(); var fakeDate = { toString: function () { return String(realDate); }, diff --git a/node_modules/is-negative-zero/.eslintrc b/node_modules/is-negative-zero/.eslintrc index 9079df723..f858c0ab1 100644 --- a/node_modules/is-negative-zero/.eslintrc +++ b/node_modules/is-negative-zero/.eslintrc @@ -4,8 +4,6 @@ "extends": "@ljharb", "rules": { - "max-statements": [2, 14], - "no-extra-parens": [1], "no-magic-numbers": 0 } } diff --git a/node_modules/is-negative-zero/.github/FUNDING.yml b/node_modules/is-negative-zero/.github/FUNDING.yml new file mode 100644 index 000000000..e34502b1c --- /dev/null +++ b/node_modules/is-negative-zero/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: ljharb +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-negative-zero +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-negative-zero/.github/workflows/node-4+.yml b/node_modules/is-negative-zero/.github/workflows/node-4+.yml deleted file mode 100644 index ba174e1d6..000000000 --- a/node_modules/is-negative-zero/.github/workflows/node-4+.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: 'Tests: node.js' - -on: [pull_request, push] - -jobs: - matrix: - runs-on: ubuntu-latest - outputs: - latest: ${{ steps.set-matrix.outputs.requireds }} - minors: ${{ steps.set-matrix.outputs.optionals }} - steps: - - uses: ljharb/actions/node/matrix@main - id: set-matrix - with: - preset: '>=4' - - latest: - needs: [matrix] - name: 'latest minors' - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.latest) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - minors: - needs: [matrix, latest] - name: 'non-latest minors' - continue-on-error: true - if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.minors) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - - node: - name: 'node 4+' - needs: [latest, minors] - runs-on: ubuntu-latest - steps: - - run: 'echo tests completed' diff --git a/node_modules/is-negative-zero/.github/workflows/node-iojs.yml b/node_modules/is-negative-zero/.github/workflows/node-iojs.yml deleted file mode 100644 index f707c3cfc..000000000 --- a/node_modules/is-negative-zero/.github/workflows/node-iojs.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: 'Tests: node.js (io.js)' - -on: [pull_request, push] - -jobs: - matrix: - runs-on: ubuntu-latest - outputs: - latest: ${{ steps.set-matrix.outputs.requireds }} - minors: ${{ steps.set-matrix.outputs.optionals }} - steps: - - uses: ljharb/actions/node/matrix@main - id: set-matrix - with: - preset: 'iojs' - - latest: - needs: [matrix] - name: 'latest minors' - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.latest) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - skip-ls-check: true - - minors: - needs: [matrix, latest] - name: 'non-latest minors' - continue-on-error: true - if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.minors) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - skip-ls-check: true - - node: - name: 'io.js' - needs: [latest, minors] - runs-on: ubuntu-latest - steps: - - run: 'echo tests completed' diff --git a/node_modules/is-negative-zero/.github/workflows/node-pretest.yml b/node_modules/is-negative-zero/.github/workflows/node-pretest.yml deleted file mode 100644 index 3921e0ae6..000000000 --- a/node_modules/is-negative-zero/.github/workflows/node-pretest.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: 'Tests: pretest/posttest' - -on: [pull_request, push] - -jobs: - pretest: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run pretest' - with: - node-version: 'lts/*' - command: 'pretest' - - posttest: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run posttest' - with: - node-version: 'lts/*' - command: 'posttest' diff --git a/node_modules/is-negative-zero/.github/workflows/node-zero.yml b/node_modules/is-negative-zero/.github/workflows/node-zero.yml deleted file mode 100644 index 2435bf2cc..000000000 --- a/node_modules/is-negative-zero/.github/workflows/node-zero.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: 'Tests: node.js (0.x)' - -on: [pull_request, push] - -jobs: - matrix: - runs-on: ubuntu-latest - outputs: - stable: ${{ steps.set-matrix.outputs.requireds }} - unstable: ${{ steps.set-matrix.outputs.optionals }} - steps: - - uses: ljharb/actions/node/matrix@main - id: set-matrix - with: - preset: '0.x' - - stable: - needs: [matrix] - name: 'stable minors' - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.stable) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} - skip-ls-check: true - - unstable: - needs: [matrix, stable] - name: 'unstable minors' - continue-on-error: true - if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.unstable) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} - skip-ls-check: true - - node: - name: 'node 0.x' - needs: [stable, unstable] - runs-on: ubuntu-latest - steps: - - run: 'echo tests completed' diff --git a/node_modules/is-negative-zero/.github/workflows/rebase.yml b/node_modules/is-negative-zero/.github/workflows/rebase.yml deleted file mode 100644 index 027aed079..000000000 --- a/node_modules/is-negative-zero/.github/workflows/rebase.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Automatic Rebase - -on: [pull_request_target] - -jobs: - _: - name: "Automatic Rebase" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/rebase@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/is-negative-zero/.github/workflows/require-allow-edits.yml b/node_modules/is-negative-zero/.github/workflows/require-allow-edits.yml deleted file mode 100644 index 549d7b482..000000000 --- a/node_modules/is-negative-zero/.github/workflows/require-allow-edits.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Require “Allow Edits” - -on: [pull_request_target] - -jobs: - _: - name: "Require “Allow Edits”" - - runs-on: ubuntu-latest - - steps: - - uses: ljharb/require-allow-edits@main diff --git a/node_modules/is-negative-zero/.nycrc b/node_modules/is-negative-zero/.nycrc index 1826526e0..bdd626ce9 100644 --- a/node_modules/is-negative-zero/.nycrc +++ b/node_modules/is-negative-zero/.nycrc @@ -2,10 +2,6 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, "exclude": [ "coverage", "test" diff --git a/node_modules/is-negative-zero/CHANGELOG.md b/node_modules/is-negative-zero/CHANGELOG.md index 71d9b9a94..d00e7261e 100644 --- a/node_modules/is-negative-zero/CHANGELOG.md +++ b/node_modules/is-negative-zero/CHANGELOG.md @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v2.0.2](https://github.com/inspect-js/is-negative-zero/compare/v2.0.1...v2.0.2) - 2021-12-10 + +### Commits + +- [actions] reuse common workflows [`ece923d`](https://github.com/inspect-js/is-negative-zero/commit/ece923d6b50820b7832150957774047da43d1743) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`3a26f43`](https://github.com/inspect-js/is-negative-zero/commit/3a26f435434bbfb8a254ddd32d6079bf50263121) +- [meta] do not publish workflow files [`2cea0c2`](https://github.com/inspect-js/is-negative-zero/commit/2cea0c20c7f8b167bb6064f916f3285642bf5ab1) +- [readme] add github actions/codecov badges; update URLs [`0c0be3e`](https://github.com/inspect-js/is-negative-zero/commit/0c0be3eb148ccf9d764e8ed515ef0e1d0ffeed9d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`a93d16e`](https://github.com/inspect-js/is-negative-zero/commit/a93d16eddf46cad6bc9b71a92968ce758e6f4ea4) +- [meta] create FUNDING.yml [`b4f425e`](https://github.com/inspect-js/is-negative-zero/commit/b4f425e49edb8c4aa1efa6ba34c2d5c1150b2a26) +- [actions] update codecov uploader [`7999db3`](https://github.com/inspect-js/is-negative-zero/commit/7999db3bff3f0f9cc729529940b9077a586822e2) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `safe-publish-latest`, `tape` [`140e4d9`](https://github.com/inspect-js/is-negative-zero/commit/140e4d95eda9ad821608c28a5f705d84a906096d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`23a8b6d`](https://github.com/inspect-js/is-negative-zero/commit/23a8b6d257cea0b8a608b2319739562ecbc6ba75) +- [readme] add actions and codecov badges [`fe92126`](https://github.com/inspect-js/is-negative-zero/commit/fe9212634346ced7a45905d958cb85d129e4c10b) +- [readme] fix repo URLs [`50c428e`](https://github.com/inspect-js/is-negative-zero/commit/50c428e423e5861a6c231440b8b3e746cbf6230f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`688155f`](https://github.com/inspect-js/is-negative-zero/commit/688155ff0214da72cbafa4c438c3b9629265d82b) +- [meta] use `prepublishOnly` script for npm 7+ [`83171f9`](https://github.com/inspect-js/is-negative-zero/commit/83171f9131aed266f475d7a3283d9c2fc77e1436) +- [actions] update workflows [`e9823db`](https://github.com/inspect-js/is-negative-zero/commit/e9823db3054887d8bb5b3f2c8f698b93cdce7d82) + ## [v2.0.1](https://github.com/inspect-js/is-negative-zero/compare/v2.0.0...v2.0.1) - 2020-12-04 ### Commits diff --git a/node_modules/is-negative-zero/README.md b/node_modules/is-negative-zero/README.md index b60b4d36f..e8193a488 100644 --- a/node_modules/is-negative-zero/README.md +++ b/node_modules/is-negative-zero/README.md @@ -1,11 +1,13 @@ -# is-negative-zero [![Version Badge][2]][1] +# is-negative-zero [![Version Badge][npm-version-svg]][package-url] -[![dependency status][5]][6] -[![dev dependency status][7]][8] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] -[![npm badge][11]][1] +[![npm badge][npm-badge-png]][package-url] Is this value negative zero? === will lie to you. @@ -35,17 +37,18 @@ assert.ok(isNegativeZero(-0)); ## Tests Simply clone the repo, `npm install`, and run `npm test` -[1]: https://npmjs.org/package/is-negative-zero -[2]: http://versionbadg.es/inspect-js/is-negative-zero.svg -[3]: https://travis-ci.org/inspect-js/is-negative-zero.svg -[4]: https://travis-ci.org/inspect-js/is-negative-zero -[5]: https://david-dm.org/inspect-js/is-negative-zero.svg -[6]: https://david-dm.org/inspect-js/is-negative-zero -[7]: https://david-dm.org/inspect-js/is-negative-zero/dev-status.svg -[8]: https://david-dm.org/inspect-js/is-negative-zero#info=devDependencies -[11]: https://nodei.co/npm/is-negative-zero.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/is-negative-zero.svg +[package-url]: https://npmjs.org/package/is-negative-zero +[npm-version-svg]: https://versionbadg.es/inspect-js/is-negative-zero.svg +[deps-svg]: https://david-dm.org/inspect-js/is-negative-zero.svg +[deps-url]: https://david-dm.org/inspect-js/is-negative-zero +[dev-deps-svg]: https://david-dm.org/inspect-js/is-negative-zero/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-negative-zero#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-negative-zero.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-negative-zero.svg [license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/is-negative-zero.svg -[downloads-url]: http://npm-stat.com/charts.html?package=is-negative-zero - +[downloads-image]: https://img.shields.io/npm/dm/is-negative-zero.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-negative-zero +[codecov-image]: https://codecov.io/gh/inspect-js/is-negative-zero/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-negative-zero/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-negative-zero +[actions-url]: https://github.com/inspect-js/is-negative-zero/actions diff --git a/node_modules/is-negative-zero/package.json b/node_modules/is-negative-zero/package.json index 3be2bf0ec..3bf370c62 100644 --- a/node_modules/is-negative-zero/package.json +++ b/node_modules/is-negative-zero/package.json @@ -1,6 +1,6 @@ { "name": "is-negative-zero", - "version": "2.0.1", + "version": "2.0.2", "description": "Is this value negative zero? === will lie to you", "author": "Jordan Harband ", "funding": { @@ -9,12 +9,13 @@ "license": "MIT", "main": "index.js", "scripts": { - "prepublish": "safe-publish-latest", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", "pretest": "npm run lint", "test": "npm run tests-only", "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "npx aud --production", - "lint": "eslint .", + "posttest": "aud --production", + "lint": "eslint --ext=js,mjs .", "version": "auto-changelog && git add CHANGELOG.md", "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, @@ -36,15 +37,14 @@ "0", "-0" ], - "dependencies": {}, "devDependencies": { - "@ljharb/eslint-config": "^17.3.0", - "aud": "^1.1.3", - "auto-changelog": "^2.2.1", - "eslint": "^7.14.0", + "@ljharb/eslint-config": "^20.0.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.4.1", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.0.1" + "safe-publish-latest": "^2.0.0", + "tape": "^5.3.2" }, "testling": { "files": "test/index.js", diff --git a/node_modules/is-number-object/.editorconfig b/node_modules/is-number-object/.editorconfig index bc228f826..4e36aeeec 100644 --- a/node_modules/is-number-object/.editorconfig +++ b/node_modules/is-number-object/.editorconfig @@ -18,3 +18,6 @@ max_line_length = off [Makefile] max_line_length = off + +[CHANGELOG.md] +max_line_length = off diff --git a/node_modules/is-number-object/.eslintignore b/node_modules/is-number-object/.eslintignore deleted file mode 100644 index 404abb221..000000000 --- a/node_modules/is-number-object/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/is-number-object/.eslintrc b/node_modules/is-number-object/.eslintrc index a6dec9472..c7933f4d7 100644 --- a/node_modules/is-number-object/.eslintrc +++ b/node_modules/is-number-object/.eslintrc @@ -6,4 +6,11 @@ "rules": { "func-name-matching": 0, }, + + "overrides": [ + { + "files": "test-core-js.js", + "extends": "@ljharb/eslint-config/tests", + }, + ], } diff --git a/node_modules/is-number-object/.nycrc b/node_modules/is-number-object/.nycrc index bdd626ce9..a69aa2d82 100644 --- a/node_modules/is-number-object/.nycrc +++ b/node_modules/is-number-object/.nycrc @@ -4,6 +4,7 @@ "reporter": ["text-summary", "text", "html", "json"], "exclude": [ "coverage", - "test" + "test", + "test-corejs.js" ] } diff --git a/node_modules/is-number-object/CHANGELOG.md b/node_modules/is-number-object/CHANGELOG.md index d6954eb12..028b484a3 100644 --- a/node_modules/is-number-object/CHANGELOG.md +++ b/node_modules/is-number-object/CHANGELOG.md @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.0.7](https://github.com/inspect-js/is-number-object/compare/v1.0.6...v1.0.7) - 2022-04-01 + +### Commits + +- [actions] reuse common workflows [`8f9a1b0`](https://github.com/inspect-js/is-number-object/commit/8f9a1b040a435a5c5d12150952d0e6f96d4f713a) +- [meta] better `eccheck` command [`9dc8dff`](https://github.com/inspect-js/is-number-object/commit/9dc8dff273e4d0b954fd4f2a2eacc849d321b646) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`c50ecbf`](https://github.com/inspect-js/is-number-object/commit/c50ecbfc7577c69324fca4d2b40dd354c5156be9) +- [actions] update codecov uploader [`f1a2560`](https://github.com/inspect-js/is-number-object/commit/f1a2560d4a996abea90f7a792069a35359869b67) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js`, `tape` [`4b06ace`](https://github.com/inspect-js/is-number-object/commit/4b06aceeba2ebf0887af020aa89caad8950e5f47) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `core-js`, `tape` [`3dc0e8b`](https://github.com/inspect-js/is-number-object/commit/3dc0e8b0fcc96a9bc9936e9a62a523fe67bafca5) +- [meta] add `bugs`/`homepage` package.json fields [`d7e0bcf`](https://github.com/inspect-js/is-number-object/commit/d7e0bcf1fe1b4a48d6500266c8b4058c854fecba) + +## [v1.0.6](https://github.com/inspect-js/is-number-object/compare/v1.0.5...v1.0.6) - 2021-08-05 + +### Commits + +- [Tests] run tests with core-js as well [`5177312`](https://github.com/inspect-js/is-number-object/commit/51773120b18e27bfe8a3bd228ef2e21f5802f338) +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`ca2b31d`](https://github.com/inspect-js/is-number-object/commit/ca2b31d81c5d7d9b11e812dee58cd627a6d634e2) +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`50950f9`](https://github.com/inspect-js/is-number-object/commit/50950f962a4b1188c478f6034194d7eb4314c884) + ## [v1.0.5](https://github.com/inspect-js/is-number-object/compare/v1.0.4...v1.0.5) - 2021-05-07 ### Commits diff --git a/node_modules/is-number-object/index.js b/node_modules/is-number-object/index.js index 637a4b98e..9107c31c0 100644 --- a/node_modules/is-number-object/index.js +++ b/node_modules/is-number-object/index.js @@ -11,7 +11,7 @@ var tryNumberObject = function tryNumberObject(value) { }; var toStr = Object.prototype.toString; var numClass = '[object Number]'; -var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; +var hasToStringTag = require('has-tostringtag/shams')(); module.exports = function isNumberObject(value) { if (typeof value === 'number') { diff --git a/node_modules/is-number-object/package.json b/node_modules/is-number-object/package.json index fe1a494f7..59ea2ac8c 100644 --- a/node_modules/is-number-object/package.json +++ b/node_modules/is-number-object/package.json @@ -1,22 +1,22 @@ { "name": "is-number-object", - "version": "1.0.5", + "version": "1.0.7", "author": "Jordan Harband ", "funding": { "url": "https://github.com/sponsors/ljharb" }, "description": "Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", - "license": "MIT", "main": "index.js", "scripts": { "prepublishOnly": "safe-publish-latest", "prepublish": "not-in-publish || npm run prepublishOnly", "pretest": "npm run lint", "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx aud --production", - "lint": "eslint .", - "eccheck": "eclint check *.js **/*.js > /dev/null", + "test:corejs": "nyc tape test-corejs.js", + "test": "npm run tests-only && npm run test:corejs", + "posttest": "aud --production", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", "version": "auto-changelog && git add CHANGELOG.md", "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, @@ -31,20 +31,24 @@ "@@toStringTag", "Number object" ], + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-number-object/issues" + }, + "homepage": "https://github.com/inspect-js/is-number-object#readme", "devDependencies": { - "@ljharb/eslint-config": "^17.6.0", - "aud": "^1.1.5", - "auto-changelog": "^2.2.1", - "core-js": "^3.12.0", + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "core-js": "^3.21.1", "eclint": "^2.8.1", - "eslint": "^7.25.0", + "eslint": "=8.8.0", "foreach": "^2.0.5", - "has-symbols": "^1.0.2", "indexof": "^0.0.1", "is": "^3.3.0", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.2.2" + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" }, "testling": { "files": "test/index.js", @@ -74,5 +78,8 @@ "commitLimit": false, "backfillLimit": false, "hideCredit": true + }, + "dependencies": { + "has-tostringtag": "^1.0.0" } } diff --git a/node_modules/is-number-object/test/corejs.js b/node_modules/is-number-object/test/corejs.js deleted file mode 100644 index 73f0c89cb..000000000 --- a/node_modules/is-number-object/test/corejs.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -require('core-js'); - -require('./'); diff --git a/node_modules/is-number-object/test/index.js b/node_modules/is-number-object/test/index.js index 04ada7dd2..bca48b28e 100644 --- a/node_modules/is-number-object/test/index.js +++ b/node_modules/is-number-object/test/index.js @@ -2,7 +2,7 @@ var test = require('tape'); var isNumber = require('../'); -var hasSymbols = require('has-symbols/shams')(); +var hasToStringTag = require('has-tostringtag/shams')(); test('not Numbers', function (t) { t.notOk(isNumber(), 'undefined is not Number'); @@ -19,7 +19,7 @@ test('not Numbers', function (t) { t.end(); }); -test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { var fakeNumber = { toString: function () { return '7'; }, valueOf: function () { return 42; } diff --git a/node_modules/is-regex/CHANGELOG.md b/node_modules/is-regex/CHANGELOG.md index 3b2a48c0d..b7496b212 100644 --- a/node_modules/is-regex/CHANGELOG.md +++ b/node_modules/is-regex/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.1.4](https://github.com/inspect-js/is-regex/compare/v1.1.3...v1.1.4) - 2021-08-05 + +### Commits + +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4b17cad`](https://github.com/inspect-js/is-regex/commit/4b17cad8496b1ae621b18335fa3afe94d0c65e83) +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`2dad4af`](https://github.com/inspect-js/is-regex/commit/2dad4afffa15f07cbbf7675b77d1f650c92652c4) + ## [v1.1.3](https://github.com/inspect-js/is-regex/compare/v1.1.2...v1.1.3) - 2021-05-07 ### Commits diff --git a/node_modules/is-regex/index.js b/node_modules/is-regex/index.js index 80a2d335f..19780f4b5 100644 --- a/node_modules/is-regex/index.js +++ b/node_modules/is-regex/index.js @@ -1,8 +1,7 @@ 'use strict'; var callBound = require('call-bind/callBound'); -var hasSymbols = require('has-symbols/shams')(); -var hasToStringTag = hasSymbols && !!Symbol.toStringTag; +var hasToStringTag = require('has-tostringtag/shams')(); var has; var $exec; var isRegexMarker; diff --git a/node_modules/is-regex/package.json b/node_modules/is-regex/package.json index 39644c95a..8b8e87329 100644 --- a/node_modules/is-regex/package.json +++ b/node_modules/is-regex/package.json @@ -1,6 +1,6 @@ { "name": "is-regex", - "version": "1.1.3", + "version": "1.1.4", "description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", "author": "Jordan Harband ", "funding": { @@ -40,19 +40,19 @@ ], "dependencies": { "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" + "has-tostringtag": "^1.0.0" }, "devDependencies": { "@ljharb/eslint-config": "^17.6.0", "aud": "^1.1.5", - "auto-changelog": "^2.2.1", - "core-js": "^3.12.0", + "auto-changelog": "^2.3.0", + "core-js": "^3.16.0", "eclint": "^2.8.1", - "eslint": "^7.26.0", + "eslint": "^7.32.0", "foreach": "^2.0.5", "nyc": "^10.3.2", "safe-publish-latest": "^1.1.4", - "tape": "^5.2.2" + "tape": "^5.3.0" }, "testling": { "files": "test/index.js", diff --git a/node_modules/is-regex/test/index.js b/node_modules/is-regex/test/index.js index 93ea4e4ac..f6c08023a 100644 --- a/node_modules/is-regex/test/index.js +++ b/node_modules/is-regex/test/index.js @@ -1,7 +1,6 @@ 'use strict'; -var hasSymbols = require('has-symbols/shams')(); -var hasToStringTag = hasSymbols && !!Symbol.toStringTag; +var hasToStringTag = require('has-tostringtag/shams')(); var forEach = require('foreach'); var test = require('tape'); var isRegex = require('..'); diff --git a/node_modules/has-bigints/.eslintignore b/node_modules/is-shared-array-buffer/.eslintignore similarity index 100% rename from node_modules/has-bigints/.eslintignore rename to node_modules/is-shared-array-buffer/.eslintignore diff --git a/node_modules/is-shared-array-buffer/.eslintrc b/node_modules/is-shared-array-buffer/.eslintrc new file mode 100644 index 000000000..3b5d9e90e --- /dev/null +++ b/node_modules/is-shared-array-buffer/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/is-shared-array-buffer/.github/FUNDING.yml b/node_modules/is-shared-array-buffer/.github/FUNDING.yml new file mode 100644 index 000000000..61db3c4f9 --- /dev/null +++ b/node_modules/is-shared-array-buffer/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-shared-array-buffer +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-shared-array-buffer/.nycrc b/node_modules/is-shared-array-buffer/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/is-shared-array-buffer/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-shared-array-buffer/CHANGELOG.md b/node_modules/is-shared-array-buffer/CHANGELOG.md new file mode 100644 index 000000000..6536f8fbc --- /dev/null +++ b/node_modules/is-shared-array-buffer/CHANGELOG.md @@ -0,0 +1,44 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/inspect-js/is-shared-array-buffer/compare/v1.0.1...v1.0.2) - 2022-04-01 + +### Commits + +- [actions] reuse common workflows [`48d01e6`](https://github.com/inspect-js/is-shared-array-buffer/commit/48d01e690f76c92f5c9072fbcb9b6215402db8a7) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7b0e12a`](https://github.com/inspect-js/is-shared-array-buffer/commit/7b0e12a4e8f5db8eac586be68c879119a4a12e7a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`8d57a8e`](https://github.com/inspect-js/is-shared-array-buffer/commit/8d57a8e1d9ce093f04f83e196ca7c80a02617939) +- [readme] update URLs [`dca4d27`](https://github.com/inspect-js/is-shared-array-buffer/commit/dca4d27d35352309da5abb4feb584158004008cf) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`2a7bb99`](https://github.com/inspect-js/is-shared-array-buffer/commit/2a7bb990610d7f6c058bdae7f21c49cc7276848f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`389c6db`](https://github.com/inspect-js/is-shared-array-buffer/commit/389c6db4311a85a84fd4cb75646f26023b0c1685) +- [actions] update codecov uploader [`b9661f9`](https://github.com/inspect-js/is-shared-array-buffer/commit/b9661f9ac2e1e002372b9b1e136faca837a6647f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect` [`f99cd48`](https://github.com/inspect-js/is-shared-array-buffer/commit/f99cd4827e23bc893ed711cbffe28f3e51a4d401) +- [readme] add actions and codecov badges [`9515ed2`](https://github.com/inspect-js/is-shared-array-buffer/commit/9515ed2184a3ed1ce913b92b5092884dad5ac794) +- [Fix] add missing `call-bind` dependency [`cff5358`](https://github.com/inspect-js/is-shared-array-buffer/commit/cff53582740f9f053ec67e1acbf2bafc83bdb7b5) +- [meta] add `safe-publish-latest`; use `prepublishOnly` script for npm 7+ [`ba0b719`](https://github.com/inspect-js/is-shared-array-buffer/commit/ba0b7190a42d4290d31a5fce215e874da573dd77) + +## [v1.0.1](https://github.com/inspect-js/is-shared-array-buffer/compare/v1.0.0...v1.0.1) - 2021-03-04 + +### Commits + +- [readme] fix repo URLs [`37c38f3`](https://github.com/inspect-js/is-shared-array-buffer/commit/37c38f347392da177197dd2fd518b61240a56203) + +## v1.0.0 - 2021-03-04 + +### Commits + +- [Tests] add tests [`9c7b806`](https://github.com/inspect-js/is-shared-array-buffer/commit/9c7b806ab1528814308a7420f8198644f55c916f) +- Initial commit [`4e65c5e`](https://github.com/inspect-js/is-shared-array-buffer/commit/4e65c5ecdaa255162bc6507de4ff98cea2472e3b) +- [meta] do not publish github action workflow files [`ac3693d`](https://github.com/inspect-js/is-shared-array-buffer/commit/ac3693db8ec26db5444ef4b46aa38a81e8841d30) +- readme [`7a984d0`](https://github.com/inspect-js/is-shared-array-buffer/commit/7a984d0db73b77943f6731098134e3351a36793b) +- npm init [`a586c99`](https://github.com/inspect-js/is-shared-array-buffer/commit/a586c99316f3c8ae4fd5125621ea933e97a1bf1b) +- [actions] add automatic rebasing / merge commit blocking [`184fe62`](https://github.com/inspect-js/is-shared-array-buffer/commit/184fe622680d523e89ac322fa1a52dbba46a8fc0) +- Implementation [`207e26d`](https://github.com/inspect-js/is-shared-array-buffer/commit/207e26d1128930f28384cb213b38d69fd52bbd7c) +- [meta] create `FUNDING.yml`; add "funding" field [`3cad3fc`](https://github.com/inspect-js/is-shared-array-buffer/commit/3cad3fc9509f91fbc71e84565529f53a94d538d4) +- [meta] add auto-changelog [`31f1f2c`](https://github.com/inspect-js/is-shared-array-buffer/commit/31f1f2cbcd616d6c09089d62198d5cc775053324) +- [Tests] add `npm run lint` [`2e5146e`](https://github.com/inspect-js/is-shared-array-buffer/commit/2e5146e18f44533382a781fa09a50d4f47caa0e5) +- Only apps should have lockfiles [`7b2adfa`](https://github.com/inspect-js/is-shared-array-buffer/commit/7b2adfad6dcd95271ab6ba34658a9a1a21dbeacf) diff --git a/node_modules/is-shared-array-buffer/LICENSE b/node_modules/is-shared-array-buffer/LICENSE new file mode 100644 index 000000000..7948bc02a --- /dev/null +++ b/node_modules/is-shared-array-buffer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/is-shared-array-buffer/README.md b/node_modules/is-shared-array-buffer/README.md new file mode 100644 index 000000000..c2b671062 --- /dev/null +++ b/node_modules/is-shared-array-buffer/README.md @@ -0,0 +1,58 @@ +# is-shared-array-buffer [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value a JS SharedArrayBuffer? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag. + +## Example + +```js +var assert = require('assert'); +var isSharedArrayBuffer = require('is-shared-array-buffer'); + +assert(!isSharedArrayBuffer(function () {})); +assert(!isSharedArrayBuffer(null)); +assert(!isSharedArrayBuffer(function* () { yield 42; return Infinity; }); +assert(!isSharedArrayBuffer(Symbol('foo'))); +assert(!isSharedArrayBuffer(1n)); +assert(!isSharedArrayBuffer(Object(1n))); + +assert(!isSharedArrayBuffer(new Set())); +assert(!isSharedArrayBuffer(new WeakSet())); +assert(!isSharedArrayBuffer(new Map())); +assert(!isSharedArrayBuffer(new WeakMap())); +assert(!isSharedArrayBuffer(new WeakRef({}))); +assert(!isSharedArrayBuffer(new FinalizationRegistry(() => {}))); +assert(!isSharedArrayBuffer(new ArrayBuffer())); + +assert(isSharedArrayBuffer(new SharedArrayBuffer())); + +class MySharedArrayBuffer extends SharedArrayBuffer {} +assert(isSharedArrayBuffer(new MySharedArrayBuffer())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-shared-array-buffer +[npm-version-svg]: https://versionbadg.es/inspect-js/is-shared-array-buffer.svg +[deps-svg]: https://david-dm.org/inspect-js/is-shared-array-buffer.svg +[deps-url]: https://david-dm.org/inspect-js/is-shared-array-buffer +[dev-deps-svg]: https://david-dm.org/inspect-js/is-shared-array-buffer/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-shared-array-buffer#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-shared-array-buffer.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-shared-array-buffer.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-shared-array-buffer.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-shared-array-buffer +[codecov-image]: https://codecov.io/gh/inspect-js/is-shared-array-buffer/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-shared-array-buffer/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-shared-array-buffer +[actions-url]: https://github.com/inspect-js/is-shared-array-buffer/actions diff --git a/node_modules/is-shared-array-buffer/index.js b/node_modules/is-shared-array-buffer/index.js new file mode 100644 index 000000000..870430470 --- /dev/null +++ b/node_modules/is-shared-array-buffer/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $byteLength = callBound('SharedArrayBuffer.prototype.byteLength', true); + +module.exports = $byteLength + ? function isSharedArrayBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + try { + $byteLength(obj); + return true; + } catch (e) { + return false; + } + } + : function isSharedArrayBuffer(obj) { // eslint-disable-line no-unused-vars + return false; + }; diff --git a/node_modules/is-shared-array-buffer/package.json b/node_modules/is-shared-array-buffer/package.json new file mode 100644 index 000000000..f109cd379 --- /dev/null +++ b/node_modules/is-shared-array-buffer/package.json @@ -0,0 +1,70 @@ +{ + "name": "is-shared-array-buffer", + "version": "1.0.2", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "Is this value a JS SharedArrayBuffer?", + "license": "MIT", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only --", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-shared-array-buffer.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "is", + "sharedarraybuffer", + "shared", + "array", + "buffer" + ], + "bugs": { + "url": "https://github.com/inspect-js/is-shared-array-buffer/issues" + }, + "homepage": "https://github.com/inspect-js/is-shared-array-buffer#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.2.1", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "nyc": "^10.3.2", + "object-inspect": "^1.12.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "call-bind": "^1.0.2" + } +} diff --git a/node_modules/is-shared-array-buffer/test/index.js b/node_modules/is-shared-array-buffer/test/index.js new file mode 100644 index 000000000..9bc2c5621 --- /dev/null +++ b/node_modules/is-shared-array-buffer/test/index.js @@ -0,0 +1,27 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); +var v = require('es-value-fixtures'); + +var isSharedArrayBuffer = require('..'); + +test('isSharedArrayBuffer', function (t) { + t.equal(typeof isSharedArrayBuffer, 'function', 'is a function'); + + var nonSABs = v.primitives.concat(v.objects); + forEach(nonSABs, function (nonSAB) { + t.equal(isSharedArrayBuffer(nonSAB), false, inspect(nonSAB) + ' is not a SharedArrayBuffer'); + }); + + t.test('actual SharedArrayBuffer instances', { skip: typeof SharedArrayBuffer === 'undefined' }, function (st) { + var sab = new SharedArrayBuffer(); + + st.equal(isSharedArrayBuffer(sab), true, inspect(sab) + ' is a SharedArrayBuffer'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-string/CHANGELOG.md b/node_modules/is-string/CHANGELOG.md index 9334c53a0..6f6204383 100644 --- a/node_modules/is-string/CHANGELOG.md +++ b/node_modules/is-string/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +## [v1.0.7](https://github.com/inspect-js/is-string/compare/v1.0.6...v1.0.7) - 2021-08-05 + +### Commits + +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`d973ffd`](https://github.com/inspect-js/is-string/commit/d973ffd2268e10c0e2cd4f0c57ecf8ce0a8d8578) +- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4bfaabf`](https://github.com/inspect-js/is-string/commit/4bfaabf877e874ca21d2c44be26f13add8ee2761) + ## [v1.0.6](https://github.com/inspect-js/is-string/compare/v1.0.5...v1.0.6) - 2021-05-07 ### Commits diff --git a/node_modules/is-string/index.js b/node_modules/is-string/index.js index 5f77f03d2..f44f7bbba 100644 --- a/node_modules/is-string/index.js +++ b/node_modules/is-string/index.js @@ -11,7 +11,7 @@ var tryStringObject = function tryStringObject(value) { }; var toStr = Object.prototype.toString; var strClass = '[object String]'; -var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; +var hasToStringTag = require('has-tostringtag/shams')(); module.exports = function isString(value) { if (typeof value === 'string') { diff --git a/node_modules/is-string/package.json b/node_modules/is-string/package.json index 49758a337..d4343968f 100644 --- a/node_modules/is-string/package.json +++ b/node_modules/is-string/package.json @@ -1,6 +1,6 @@ { "name": "is-string", - "version": "1.0.6", + "version": "1.0.7", "author": "Jordan Harband ", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -33,19 +33,22 @@ "@@toStringTag", "String object" ], + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "devDependencies": { "@ljharb/eslint-config": "^17.6.0", "aud": "^1.1.5", - "auto-changelog": "^2.2.1", - "core-js": "^3.12.0", + "auto-changelog": "^2.3.0", + "core-js": "^3.16.0", "eclint": "^2.8.1", - "eslint": "^7.26.0", + "eslint": "^7.32.0", "foreach": "^2.0.5", "indexof": "^0.0.1", "is": "^3.3.0", "nyc": "^10.3.2", "safe-publish-latest": "^1.1.4", - "tape": "^5.2.2" + "tape": "^5.3.0" }, "testling": { "files": "test/index.js", diff --git a/node_modules/is-string/test/index.js b/node_modules/is-string/test/index.js index 8fbba42a6..5239dfa4c 100644 --- a/node_modules/is-string/test/index.js +++ b/node_modules/is-string/test/index.js @@ -2,7 +2,7 @@ var test = require('tape'); var isString = require('../'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator !== 'undefined'; +var hasToStringTag = require('has-tostringtag/shams')(); test('not Strings', function (t) { t.notOk(isString(), 'undefined is not String'); @@ -22,7 +22,7 @@ test('not Strings', function (t) { t.end(); }); -test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { var fakeString = { toString: function () { return '7'; }, valueOf: function () { return '42'; } diff --git a/node_modules/is-typed-array/.editorconfig b/node_modules/is-typed-array/.editorconfig new file mode 100644 index 000000000..bc228f826 --- /dev/null +++ b/node_modules/is-typed-array/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/is-typed-array/.eslintrc b/node_modules/is-typed-array/.eslintrc new file mode 100644 index 000000000..34a62620e --- /dev/null +++ b/node_modules/is-typed-array/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "globals": { + "globalThis": false + }, + + "rules": { + "max-statements-per-line": [2, { "max": 2 }] + }, +} diff --git a/node_modules/is-typed-array/.github/FUNDING.yml b/node_modules/is-typed-array/.github/FUNDING.yml new file mode 100644 index 000000000..7dd24b969 --- /dev/null +++ b/node_modules/is-typed-array/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-typed-array +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-typed-array/.nycrc b/node_modules/is-typed-array/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/is-typed-array/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-typed-array/CHANGELOG.md b/node_modules/is-typed-array/CHANGELOG.md new file mode 100644 index 000000000..b01c3d99d --- /dev/null +++ b/node_modules/is-typed-array/CHANGELOG.md @@ -0,0 +1,120 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.10](https://github.com/inspect-js/is-typed-array/compare/v1.1.9...v1.1.10) - 2022-11-02 + +### Commits + +- [meta] add `auto-changelog` [`cf6d86b`](https://github.com/inspect-js/is-typed-array/commit/cf6d86bf2f693eca357439d4d12e76d641f91f92) +- [actions] update rebase action to use reusable workflow [`8da51a5`](https://github.com/inspect-js/is-typed-array/commit/8da51a5dce6d2442ae31ccbc2be136f2e04d6bef) +- [Dev Deps] update `aud`, `is-callable`, `object-inspect`, `tape` [`554e3de`](https://github.com/inspect-js/is-typed-array/commit/554e3deec59dec926d0badc628e589ab363e465b) +- [Refactor] use `gopd` instead of an `es-abstract` helper` [`cdaa465`](https://github.com/inspect-js/is-typed-array/commit/cdaa465d5f94bfc9e32475e31209e1c2458a9603) +- [Deps] update `es-abstract` [`677ae4b`](https://github.com/inspect-js/is-typed-array/commit/677ae4b3c8323b59d6650a9254ab945045c33f79) + + + +1.1.9 / 2022-05-13 +================= + * [Refactor] use `foreach` instead of `for-each` + * [readme] markdown URL cleanup + * [Deps] update `es-abstract` + * [meta] use `npmignore` to autogenerate an npmignore file + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` + * [actions] reuse common workflows + * [actions] update codecov uploader + +1.1.8 / 2021-08-30 +================= + * [Refactor] use `globalThis` if available (#53) + * [Deps] update `available-typed-arrays` + * [Dev Deps] update `@ljharb/eslint-config` + +1.1.7 / 2021-08-07 +================= + * [Fix] if Symbol.toStringTag exists but is not present, use Object.prototype.toString + * [Dev Deps] update `is-callable`, `tape` + +1.1.6 / 2021-08-05 +================= + * [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams + * [readme] add actions and codecov badges + * [meta] use `prepublishOnly` script for npm 7+ + * [Deps] update `available-typed-arrays`, `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` + * [actions] use `node/install` instead of `node/run`; use `codecov` action + +1.1.5 / 2021-02-14 +================= + * [meta] do not publish github action workflow files or nyc output + * [Deps] update `call-bind`, `es-abstract` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `is-callable`, `tape` + +1.1.4 / 2020-12-05 +================= + * [readme] fix repo URLs, remove defunct badges + * [Deps] update `available-typed-arrays`, `es-abstract`; use `call-bind` where applicable + * [meta] gitignore nyc output + * [meta] only audit prod deps + * [actions] add "Allow Edits" workflow + * [actions] switch Automatic Rebase workflow to `pull_request_target` event + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `make-arrow-function`, `make-generator-function`, `object-inspect`, `tape`; add `aud` + * [Tests] migrate tests to Github Actions + * [Tests] run `nyc` on all tests + +1.1.3 / 2020-01-24 +================= + * [Refactor] use `es-abstract`’s `callBound`, `available-typed-arrays`, `has-symbols` + +1.1.2 / 2020-01-20 +================= + * [Fix] in envs without Symbol.toStringTag, dc8a8cc made arrays return `true` + * [Tests] add `evalmd` to `prelint` + +1.1.1 / 2020-01-18 +================= + * [Robustness] don’t rely on Array.prototype.indexOf existing + * [meta] remove unused Makefile and associated utilities + * [meta] add `funding` field; create FUNDING.yml + * [actions] add automatic rebasing / merge commit blocking + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `replace`, `semver`, `tape`; add `safe-publish-latest` + * [Tests] use shared travis-ci configs + * [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops + +1.1.0 / 2019-02-16 +================= + * [New] add `BigInt64Array` and `BigUint64Array` + * [Refactor] use an array instead of an object for storing Typed Array names + * [meta] ignore `test.html` + * [Tests] up to `node` `v11.10`, `v10.15`, `v8.15`, `v7.10`, `v6.16`, `v5.10`, `v4.9` + * [Tests] remove `jscs` + * [Tests] use `npm audit` instead of `nsp` + * [Dev Deps] update `eslint`,` @ljharb/eslint-config`, `is-callable`, `tape`, `replace`, `semver` + * [Dev Deps] remove unused eccheck script + dep + +1.0.4 / 2016-03-19 +================= + * [Fix] `Symbol.toStringTag` is on the super-`[[Prototype]]` of Float32Array, not the `[[Prototype]]` (#3) + * [Tests] up to `node` `v5.9`, `v4.4` + * [Tests] use pretest/posttest for linting/security + * [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `is-callable` + +1.0.3 / 2015-10-13 +================= + * [Deps] Add missing `foreach` dependency (#1) + +1.0.2 / 2015-10-05 +================= + * [Deps] Remove unneeded "isarray" dependency + * [Dev Deps] update `eslint`, `@ljharb/eslint-config` + +1.0.1 / 2015-10-02 +================= + * Rerelease: avoid instanceof and the constructor property; work cross-realm; work with Symbol.toStringTag. + +1.0.0 / 2015-05-06 +================= + * Initial release. diff --git a/node_modules/is-typed-array/LICENSE b/node_modules/is-typed-array/LICENSE new file mode 100644 index 000000000..b43df444e --- /dev/null +++ b/node_modules/is-typed-array/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/is-typed-array/README.md b/node_modules/is-typed-array/README.md new file mode 100644 index 000000000..507525720 --- /dev/null +++ b/node_modules/is-typed-array/README.md @@ -0,0 +1,70 @@ +# is-typed-array [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag. + +## Example + +```js +var isTypedArray = require('is-typed-array'); +var assert = require('assert'); + +assert.equal(false, isTypedArray(undefined)); +assert.equal(false, isTypedArray(null)); +assert.equal(false, isTypedArray(false)); +assert.equal(false, isTypedArray(true)); +assert.equal(false, isTypedArray([])); +assert.equal(false, isTypedArray({})); +assert.equal(false, isTypedArray(/a/g)); +assert.equal(false, isTypedArray(new RegExp('a', 'g'))); +assert.equal(false, isTypedArray(new Date())); +assert.equal(false, isTypedArray(42)); +assert.equal(false, isTypedArray(NaN)); +assert.equal(false, isTypedArray(Infinity)); +assert.equal(false, isTypedArray(new Number(42))); +assert.equal(false, isTypedArray('foo')); +assert.equal(false, isTypedArray(Object('foo'))); +assert.equal(false, isTypedArray(function () {})); +assert.equal(false, isTypedArray(function* () {})); +assert.equal(false, isTypedArray(x => x * x)); +assert.equal(false, isTypedArray([])); + +assert.ok(isTypedArray(new Int8Array())); +assert.ok(isTypedArray(new Uint8Array())); +assert.ok(isTypedArray(new Uint8ClampedArray())); +assert.ok(isTypedArray(new Int16Array())); +assert.ok(isTypedArray(new Uint16Array())); +assert.ok(isTypedArray(new Int32Array())); +assert.ok(isTypedArray(new Uint32Array())); +assert.ok(isTypedArray(new Float32Array())); +assert.ok(isTypedArray(new Float64Array())); +assert.ok(isTypedArray(new BigInt64Array())); +assert.ok(isTypedArray(new BigUint64Array())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-typed-array +[npm-version-svg]: https://versionbadg.es/inspect-js/is-typed-array.svg +[deps-svg]: https://david-dm.org/inspect-js/is-typed-array.svg +[deps-url]: https://david-dm.org/inspect-js/is-typed-array +[dev-deps-svg]: https://david-dm.org/inspect-js/is-typed-array/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-typed-array#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/is-typed-array.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/is-typed-array.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-typed-array.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-typed-array +[codecov-image]: https://codecov.io/gh/inspect-js/is-typed-array/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-typed-array/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-typed-array +[actions-url]: https://github.com/inspect-js/is-typed-array/actions diff --git a/node_modules/is-typed-array/index.js b/node_modules/is-typed-array/index.js new file mode 100644 index 000000000..befb8c523 --- /dev/null +++ b/node_modules/is-typed-array/index.js @@ -0,0 +1,60 @@ +'use strict'; + +var forEach = require('for-each'); +var availableTypedArrays = require('available-typed-arrays'); +var callBound = require('call-bind/callBound'); + +var $toString = callBound('Object.prototype.toString'); +var hasToStringTag = require('has-tostringtag/shams')(); +var gOPD = require('gopd'); + +var g = typeof globalThis === 'undefined' ? global : globalThis; +var typedArrays = availableTypedArrays(); + +var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; +}; +var $slice = callBound('String.prototype.slice'); +var toStrTags = {}; +var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof'); +if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + descriptor = gOPD(superProto, Symbol.toStringTag); + } + toStrTags[typedArray] = descriptor.get; + } + }); +} + +var tryTypedArrays = function tryAllTypedArrays(value) { + var anyTrue = false; + forEach(toStrTags, function (getter, typedArray) { + if (!anyTrue) { + try { + anyTrue = getter.call(value) === typedArray; + } catch (e) { /**/ } + } + }); + return anyTrue; +}; + +module.exports = function isTypedArray(value) { + if (!value || typeof value !== 'object') { return false; } + if (!hasToStringTag || !(Symbol.toStringTag in value)) { + var tag = $slice($toString(value), 8, -1); + return $indexOf(typedArrays, tag) > -1; + } + if (!gOPD) { return false; } + return tryTypedArrays(value); +}; diff --git a/node_modules/is-typed-array/package.json b/node_modules/is-typed-array/package.json new file mode 100644 index 000000000..d76353097 --- /dev/null +++ b/node_modules/is-typed-array/package.json @@ -0,0 +1,118 @@ +{ + "name": "is-typed-array", + "version": "1.1.10", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run --silent lint", + "test": "npm run tests-only && npm run test:harmony", + "tests-only": "nyc tape test", + "test:harmony": "nyc node --harmony --es-staging test", + "posttest": "npx aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/is-typed-array.git" + }, + "keywords": [ + "array", + "TypedArray", + "typed array", + "is", + "typed", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "ES6", + "toStringTag", + "Symbol.toStringTag", + "@@toStringTag" + ], + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true, + "startingVersion": "1.1.10" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/is-typed-array/test/index.js b/node_modules/is-typed-array/test/index.js new file mode 100644 index 000000000..8e7a16b08 --- /dev/null +++ b/node_modules/is-typed-array/test/index.js @@ -0,0 +1,103 @@ +'use strict'; + +var test = require('tape'); +var isTypedArray = require('../'); +var isCallable = require('is-callable'); +var hasToStringTag = require('has-tostringtag/shams')(); +var generators = require('make-generator-function')(); +var arrowFn = require('make-arrow-function')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + st.notOk(isTypedArray(), 'undefined is not typed array'); + st.notOk(isTypedArray(null), 'null is not typed array'); + st.notOk(isTypedArray(false), 'false is not typed array'); + st.notOk(isTypedArray(true), 'true is not typed array'); + st.end(); + }); + + t.notOk(isTypedArray({}), 'object is not typed array'); + t.notOk(isTypedArray(/a/g), 'regex literal is not typed array'); + t.notOk(isTypedArray(new RegExp('a', 'g')), 'regex object is not typed array'); + t.notOk(isTypedArray(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.notOk(isTypedArray(42), 'number is not typed array'); + st.notOk(isTypedArray(Object(42)), 'number object is not typed array'); + st.notOk(isTypedArray(NaN), 'NaN is not typed array'); + st.notOk(isTypedArray(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.notOk(isTypedArray('foo'), 'string primitive is not typed array'); + st.notOk(isTypedArray(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.notOk(isTypedArray(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.notOk(isTypedArray(genFn), 'generator function ' + inspect(genFn) + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.notOk(isTypedArray(arrowFn), 'arrow function is not typed array'); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + forEach(typedArrayNames, function (typedArray) { + if (typeof global[typedArray] === 'function') { + var fakeTypedArray = []; + fakeTypedArray[Symbol.toStringTag] = typedArray; + t.notOk(isTypedArray(fakeTypedArray), 'faked ' + typedArray + ' is not typed array'); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); + +test('non-Typed Arrays', function (t) { + t.notOk(isTypedArray([]), '[] is not typed array'); + t.end(); +}); + +test('Typed Arrays', function (t) { + forEach(typedArrayNames, function (typedArray) { + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var arr = new TypedArray(10); + t.ok(isTypedArray(arr), 'new ' + typedArray + '(10) is typed array'); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/node_modules/has-symbols/.eslintignore b/node_modules/is-weakref/.eslintignore similarity index 100% rename from node_modules/has-symbols/.eslintignore rename to node_modules/is-weakref/.eslintignore diff --git a/node_modules/is-weakref/.eslintrc b/node_modules/is-weakref/.eslintrc new file mode 100644 index 000000000..3b5d9e90e --- /dev/null +++ b/node_modules/is-weakref/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/is-weakref/.github/FUNDING.yml b/node_modules/is-weakref/.github/FUNDING.yml new file mode 100644 index 000000000..a9ccddf2a --- /dev/null +++ b/node_modules/is-weakref/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/is-weakref +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-weakref/.nycrc b/node_modules/is-weakref/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/is-weakref/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/is-weakref/CHANGELOG.md b/node_modules/is-weakref/CHANGELOG.md new file mode 100644 index 000000000..573938d10 --- /dev/null +++ b/node_modules/is-weakref/CHANGELOG.md @@ -0,0 +1,54 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/inspect-js/is-weakref/compare/v1.0.1...v1.0.2) - 2021-12-10 + +### Commits + +- [actions] reuse common workflows [`2375b1f`](https://github.com/inspect-js/is-weakref/commit/2375b1f9798b08c7af98481bbb38b4105835dacf) +- [meta] do not publish workflow files [`4c1be42`](https://github.com/inspect-js/is-weakref/commit/4c1be423afacabf2f3aa9e8bf02f668bdeaf3a20) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7ec78ce`](https://github.com/inspect-js/is-weakref/commit/7ec78ce58c7553469eee97ae82fe147dfccde611) +- [readme] update URLs [`6306f09`](https://github.com/inspect-js/is-weakref/commit/6306f09a7df388150fb1d0b855b6f9e60165a457) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`7a1601e`](https://github.com/inspect-js/is-weakref/commit/7a1601e93ae50a791751a96d33073f5e65f3d3c9) +- [readme] add actions and codecov badges [`67ecd14`](https://github.com/inspect-js/is-weakref/commit/67ecd14b8b0192456932d1d54838accbf90ff5c0) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`1a5013b`](https://github.com/inspect-js/is-weakref/commit/1a5013bddcb9edc23025571810f9a2eebda53683) +- [actions] update codecov uploader [`b57b037`](https://github.com/inspect-js/is-weakref/commit/b57b037a547f3ecfa3d3f079a8015ec005c7181b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`da49017`](https://github.com/inspect-js/is-weakref/commit/da49017800d628c9bcd2f094d49783d6ee649c50) +- [meta] simplify "exports" [`9b88835`](https://github.com/inspect-js/is-weakref/commit/9b8883585506c135a3fcb9f55d0944a13b4eb3e6) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`c7e77f4`](https://github.com/inspect-js/is-weakref/commit/c7e77f495308f3385adfaa1f4ac78a2632e0bcde) +- [Dev Deps] update `eslint` [`417b29e`](https://github.com/inspect-js/is-weakref/commit/417b29e7ceacebe24aef15422544443f4b59e181) +- [meta] add `safe-publish-latest`; use `prepublishOnly` script for npm 7+ [`b1b99f4`](https://github.com/inspect-js/is-weakref/commit/b1b99f45e0977d10f8472e9272e48a696145c2b1) +- [Deps] update `call-bind` [`aea342e`](https://github.com/inspect-js/is-weakref/commit/aea342e9e301deeb938e62b92a37cf991c5f7dbc) +- [actions] update workflows [`786c2d3`](https://github.com/inspect-js/is-weakref/commit/786c2d3dd4486acec09786220d3dd9fd48e70e93) + +## [v1.0.1](https://github.com/inspect-js/is-weakref/compare/v1.0.0...v1.0.1) - 2020-12-04 + +### Commits + +- [Tests] migrate tests to Github Actions [`05b4faa`](https://github.com/inspect-js/is-weakref/commit/05b4faa167c67f42c792e35c07adcb6b87e7dea0) +- [Tests] run `nyc` on all tests [`8df2e4b`](https://github.com/inspect-js/is-weakref/commit/8df2e4bd66bb6b7d55f389f28e6bb167fe1deb5a) +- [actions] add "Allow Edits" workflow [`4a716b8`](https://github.com/inspect-js/is-weakref/commit/4a716b8fcc025fe889a0f09ccaee7a9f748b1c66) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect` [`be23cf3`](https://github.com/inspect-js/is-weakref/commit/be23cf305f46db8b1c8a26d1c74b096fdba00056) +- [Refactor] use `call-bind` instead of `es-abstract` [`a933a96`](https://github.com/inspect-js/is-weakref/commit/a933a9643ddf7cddfd9f9f3cf44d675cc4c86ce5) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4473ed2`](https://github.com/inspect-js/is-weakref/commit/4473ed2e73fed47cd2fa42b8d9cac17e941d2c08) +- [readme] remove travis badge [`bd3bfcd`](https://github.com/inspect-js/is-weakref/commit/bd3bfcd2c187099d2215232a7621fb960e1e2807) + +## v1.0.0 - 2020-08-01 + +### Commits + +- Initial commit [`dd86394`](https://github.com/inspect-js/is-weakref/commit/dd86394d7da000724c6e17c79077879c381e9ea3) +- readme [`f4defca`](https://github.com/inspect-js/is-weakref/commit/f4defcac48d1d99b019b596ab26bd868de1adfe9) +- Tests [`13d8139`](https://github.com/inspect-js/is-weakref/commit/13d8139dedf424239daf357261c39d3f8c33d662) +- npm init [`55a2bb7`](https://github.com/inspect-js/is-weakref/commit/55a2bb7c53b893396a51da969e352702cafe9a0e) +- Implementation [`1ec84e3`](https://github.com/inspect-js/is-weakref/commit/1ec84e36de4315d44c8da540faa27836832bb0f3) +- [meta] add auto-changelog [`ab9ce44`](https://github.com/inspect-js/is-weakref/commit/ab9ce44be717312c5221bf3d2f3f6d2dd8c6ac88) +- [actions] add automatic rebasing / merge commit blocking [`3d3f4d5`](https://github.com/inspect-js/is-weakref/commit/3d3f4d54bed6e455b2a0d0f20c87d454bf78af26) +- [meta] add "funding"; create `FUNDING.yml` [`f35ef3d`](https://github.com/inspect-js/is-weakref/commit/f35ef3de16eb06447acf3c39bdc164ba0e7bdf45) +- [Tests] add `npm run lint` [`af2123d`](https://github.com/inspect-js/is-weakref/commit/af2123d4754c14f7befa66ba01e1d72858723651) +- [Tests] use shared travis-ci configs [`042b4de`](https://github.com/inspect-js/is-weakref/commit/042b4dec08d882ae9137f4ad05ae24a1457da0f8) +- Only apps should have lockfiles [`fcae604`](https://github.com/inspect-js/is-weakref/commit/fcae604cb1422faae9311dd4219032895c0a9a2e) diff --git a/node_modules/is-weakref/LICENSE b/node_modules/is-weakref/LICENSE new file mode 100644 index 000000000..707437b57 --- /dev/null +++ b/node_modules/is-weakref/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/is-weakref/README.md b/node_modules/is-weakref/README.md new file mode 100644 index 000000000..abbb978bf --- /dev/null +++ b/node_modules/is-weakref/README.md @@ -0,0 +1,52 @@ +# is-weakref [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag. + +## Example + +```js +var isWeakRef = require('is-weakref'); +assert(!isWeakRef(function () {})); +assert(!isWeakRef(null)); +assert(!isWeakRef(function* () { yield 42; return Infinity; }); +assert(!isWeakRef(Symbol('foo'))); +assert(!isWeakRef(1n)); +assert(!isWeakRef(Object(1n))); + +assert(!isWeakRef(new Set())); +assert(!isWeakRef(new WeakSet())); +assert(!isWeakRef(new Map())); +assert(!isWeakRef(new WeakMap())); + +assert(isWeakRef(new WeakRef({}))); + +class MyWeakRef extends WeakRef {} +assert(isWeakRef(new MyWeakRef({}))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/is-weakref +[npm-version-svg]: https://versionbadg.es/inspect-js/is-weakref.svg +[deps-svg]: https://david-dm.org/inspect-js/is-weakref.svg +[deps-url]: https://david-dm.org/inspect-js/is-weakref +[dev-deps-svg]: https://david-dm.org/inspect-js/is-weakref/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/is-weakref#info=devDependencies +[license-image]: https://img.shields.io/npm/l/is-weakref.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/is-weakref.svg +[downloads-url]: https://npm-stat.com/charts.html?package=is-weakref +[codecov-image]: https://codecov.io/gh/inspect-js/is-weakref/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/is-weakref/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-weakref +[actions-url]: https://github.com/inspect-js/is-weakref/actions diff --git a/node_modules/is-weakref/index.js b/node_modules/is-weakref/index.js new file mode 100644 index 000000000..90769f8ac --- /dev/null +++ b/node_modules/is-weakref/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); + +var $deref = callBound('WeakRef.prototype.deref', true); + +module.exports = typeof WeakRef === 'undefined' + ? function isWeakRef(value) { // eslint-disable-line no-unused-vars + return false; + } + : function isWeakRef(value) { + if (!value || typeof value !== 'object') { + return false; + } + try { + $deref(value); + return true; + } catch (e) { + return false; + } + }; diff --git a/node_modules/is-weakref/package.json b/node_modules/is-weakref/package.json new file mode 100644 index 000000000..1e458ab34 --- /dev/null +++ b/node_modules/is-weakref/package.json @@ -0,0 +1,63 @@ +{ + "name": "is-weakref", + "version": "1.0.2", + "description": "Is this value a JS WeakRef? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/is-weakref.git" + }, + "keywords": [ + "weakref", + "weak", + "ref", + "finalization", + "finalization registry" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/is-weakref/issues" + }, + "homepage": "https://github.com/inspect-js/is-weakref#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.0.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.4.1", + "for-each": "^0.3.3", + "nyc": "^10.3.2", + "object-inspect": "^1.11.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.3.2" + }, + "dependencies": { + "call-bind": "^1.0.2" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/is-weakref/test/index.js b/node_modules/is-weakref/test/index.js new file mode 100644 index 000000000..c1c5b6f96 --- /dev/null +++ b/node_modules/is-weakref/test/index.js @@ -0,0 +1,26 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var forEach = require('for-each'); + +var isWeakRef = require('..'); + +test('isWeakRef', function (t) { + t.equal(typeof isWeakRef, 'function', 'is a function'); + + var nonWeakRefs = [undefined, null, true, false, 42, 0, Infinity, NaN, /a/g, function () {}, {}, []]; + forEach(nonWeakRefs, function (nonWeakRef) { + t.equal(isWeakRef(nonWeakRef), false, inspect(nonWeakRef) + ' is not a WeakRef'); + }); + + t.test('actual WeakRefs', { skip: typeof WeakRef === 'undefined' }, function (st) { + var ref = new WeakRef({}); + + st.equal(isWeakRef(ref), true, inspect(ref) + ' is a WeakRef'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/json-parse-better-errors/CHANGELOG.md b/node_modules/json-parse-better-errors/CHANGELOG.md deleted file mode 100644 index b1d212de4..000000000 --- a/node_modules/json-parse-better-errors/CHANGELOG.md +++ /dev/null @@ -1,46 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [1.0.2](https://github.com/zkat/json-parse-better-errors/compare/v1.0.1...v1.0.2) (2018-03-30) - - -### Bug Fixes - -* **messages:** More friendly messages for non-string ([#1](https://github.com/zkat/json-parse-better-errors/issues/1)) ([a476d42](https://github.com/zkat/json-parse-better-errors/commit/a476d42)) - - - - -## [1.0.1](https://github.com/zkat/json-parse-better-errors/compare/v1.0.0...v1.0.1) (2017-08-16) - - -### Bug Fixes - -* **license:** oops. Forgot to update license.md ([efe2958](https://github.com/zkat/json-parse-better-errors/commit/efe2958)) - - - - -# 1.0.0 (2017-08-15) - - -### Features - -* **init:** Initial Commit ([562c977](https://github.com/zkat/json-parse-better-errors/commit/562c977)) - - -### BREAKING CHANGES - -* **init:** This is the first commit! - - - - -# 0.1.0 (2017-08-15) - - -### Features - -* **init:** Initial Commit ([9dd1a19](https://github.com/zkat/json-parse-better-errors/commit/9dd1a19)) diff --git a/node_modules/json-parse-better-errors/LICENSE.md b/node_modules/json-parse-better-errors/LICENSE.md deleted file mode 100644 index c51842cc4..000000000 --- a/node_modules/json-parse-better-errors/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2017 Kat Marchán - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/json-parse-better-errors/README.md b/node_modules/json-parse-better-errors/README.md deleted file mode 100644 index a1f0f0a59..000000000 --- a/node_modules/json-parse-better-errors/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# json-parse-better-errors [![npm version](https://img.shields.io/npm/v/json-parse-better-errors.svg)](https://npm.im/json-parse-better-errors) [![license](https://img.shields.io/npm/l/json-parse-better-errors.svg)](https://npm.im/json-parse-better-errors) [![Travis](https://img.shields.io/travis/zkat/json-parse-better-errors.svg)](https://travis-ci.org/zkat/json-parse-better-errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/json-parse-better-errors?svg=true)](https://ci.appveyor.com/project/zkat/json-parse-better-errors) [![Coverage Status](https://coveralls.io/repos/github/zkat/json-parse-better-errors/badge.svg?branch=latest)](https://coveralls.io/github/zkat/json-parse-better-errors?branch=latest) - -[`json-parse-better-errors`](https://github.com/zkat/json-parse-better-errors) is a Node.js library for -getting nicer errors out of `JSON.parse()`, including context and position of the parse errors. - -## Install - -`$ npm install --save json-parse-better-errors` - -## Table of Contents - -* [Example](#example) -* [Features](#features) -* [Contributing](#contributing) -* [API](#api) - * [`parse`](#parse) - -### Example - -```javascript -const parseJson = require('json-parse-better-errors') - -parseJson('"foo"') -parseJson('garbage') // more useful error message -``` - -### Features - -* Like JSON.parse, but the errors are better. - -### Contributing - -The npm team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear. - -All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other. - -Please refer to the [Changelog](CHANGELOG.md) for project history details, too. - -Happy hacking! - -### API - -#### `> parse(txt, ?reviver, ?context=20)` - -Works just like `JSON.parse`, but will include a bit more information when an -error happens. diff --git a/node_modules/json-parse-better-errors/index.js b/node_modules/json-parse-better-errors/index.js deleted file mode 100644 index 14644c2f1..000000000 --- a/node_modules/json-parse-better-errors/index.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict' - -module.exports = parseJson -function parseJson (txt, reviver, context) { - context = context || 20 - try { - return JSON.parse(txt, reviver) - } catch (e) { - if (typeof txt !== 'string') { - const isEmptyArray = Array.isArray(txt) && txt.length === 0 - const errorMessage = 'Cannot parse ' + - (isEmptyArray ? 'an empty array' : String(txt)) - throw new TypeError(errorMessage) - } - const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i) - const errIdx = syntaxErr - ? +syntaxErr[1] - : e.message.match(/^Unexpected end of JSON.*/i) - ? txt.length - 1 - : null - if (errIdx != null) { - const start = errIdx <= context - ? 0 - : errIdx - context - const end = errIdx + context >= txt.length - ? txt.length - : errIdx + context - e.message += ` while parsing near '${ - start === 0 ? '' : '...' - }${txt.slice(start, end)}${ - end === txt.length ? '' : '...' - }'` - } else { - e.message += ` while parsing '${txt.slice(0, context * 2)}'` - } - throw e - } -} diff --git a/node_modules/json-parse-better-errors/package.json b/node_modules/json-parse-better-errors/package.json deleted file mode 100644 index c4c2c20a6..000000000 --- a/node_modules/json-parse-better-errors/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "json-parse-better-errors", - "version": "1.0.2", - "description": "JSON.parse with context information on error", - "main": "index.js", - "files": [ - "*.js" - ], - "scripts": { - "prerelease": "npm t", - "postrelease": "npm publish && git push --follow-tags", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap -J --coverage test/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" - }, - "repository": "https://github.com/zkat/json-parse-better-errors", - "keywords": [ - "JSON", - "parser" - ], - "author": { - "name": "Kat Marchán", - "email": "kzm@zkat.tech", - "twitter": "maybekatz" - }, - "license": "MIT", - "devDependencies": { - "nyc": "^10.3.2", - "standard": "^9.0.2", - "standard-version": "^4.1.0", - "tap": "^10.3.3", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" - }, - "config": { - "nyc": { - "exclude": [ - "node_modules/**", - "test/**" - ] - } - } -} diff --git a/node_modules/json5/CHANGELOG.md b/node_modules/json5/CHANGELOG.md deleted file mode 100644 index be9e98d5d..000000000 --- a/node_modules/json5/CHANGELOG.md +++ /dev/null @@ -1,274 +0,0 @@ -### v1.0.1 [[code][c1.0.1], [diff][d1.0.1]] - -[c1.0.1]: https://github.com/json5/json5/tree/v1.0.1 -[d1.0.1]: https://github.com/json5/json5/compare/v1.0.0...v1.0.1 - -This release includes a bug fix and minor change. - -- Fix: `parse` throws on unclosed objects and arrays. - -- New: `package.json5` has been removed until an easier way to keep it in sync - with `package.json` is found. - - -### v1.0.0 [[code][c1.0.0], [diff][d1.0.0]] - -[c1.0.0]: https://github.com/json5/json5/tree/v1.0.0 -[d1.0.0]: https://github.com/json5/json5/compare/v0.5.1...v1.0.0 - -This release includes major internal changes and public API enhancements. - -- **Major** JSON5 officially supports Node.js v4 and later. Support for Node.js - v0.10 and v0.12 have been dropped. - -- New: Unicode property names and Unicode escapes in property names are - supported. ([#1]) - -- New: `stringify` outputs trailing commas in objects and arrays when a `space` - option is provided. ([#66]) - -- New: JSON5 allows line and paragraph separator characters (U+2028 and U+2029) - in strings in order to be compatible with JSON. However, ES5 does not allow - these characters in strings, so JSON5 gives a warning when they are parsed and - escapes them when they are stringified. ([#70]) - -- New: `stringify` accepts an options object as its second argument. The - supported options are `replacer`, `space`, and a new `quote` option that - specifies the quote character used in strings. ([#71]) - -- New: The CLI supports STDIN and STDOUT and adds `--out-file`, `--space`, and - `--validate` options. See `json5 --help` for more information. ([#72], [#84], - and [#108]) - -- New: In addition to the white space characters space `\t`, `\v`, `\f`, `\n`, - `\r`, and `\xA0`, the additional white space characters `\u2028`, `\u2029`, - and all other characters in the Space Separator Unicode category are allowed. - -- New: In addition to the character escapes `\'`, `\"`, `\\`, `\b`, `\f`, `\n`, - `\r`, and `\t`, the additional character escapes `\v` and `\0`, hexadecimal - escapes like `\x0F`, and unnecessary escapes like `\a` are allowed in string - values and string property names. - -- New: `stringify` outputs strings with single quotes by default but - intelligently uses double quotes if there are more single quotes than double - quotes inside the string. (i.e. `stringify('Stay here.')` outputs - `'Stay here.'` while `stringify('Let\'s go.')` outputs `"Let's go."`) - -- New: When a character is not allowed in a string, `stringify` outputs a - character escape like `\t` when available, a hexadecimal escape like `\x0F` - when the Unicode code point is less than 256, or a Unicode character escape - like `\u01FF`, in that order. - -- New: `stringify` checks for a `toJSON5` method on objects and, if it exists, - stringifies its return value instead of the object. `toJSON5` overrides - `toJSON` if they both exist. - -- New: To `require` or `import` JSON5 files, use `require('json5/lib/register')` - or `import 'json5/lib/register'`. Previous versions used `json5/lib/require`, - which still exists for backward compatibility but is deprecated and will give - a warning. - -- New: To use JSON5 in browsers, use the file at `dist/index.js` or - `https://unpkg.com/json5@^1.0.0`. - -- Fix: `stringify` properly outputs `Infinity` and `NaN`. ([#67]) - -- Fix: `isWord` no longer becomes a property of `JSON5` after calling - `stringify`. ([#68] and [#89]) - -- Fix: `stringify` no longer throws when an object does not have a `prototype`. - ([#154]) - -- Fix: `stringify` properly handles the `key` argument of `toJSON(key)` methods. - `toJSON5(key)` follows this pattern. - -- Fix: `stringify` accepts `Number` and `String` objects as its `space` - argument. - -- Fix: In addition to a function, `stringify` also accepts an array of keys to - include in the output as its `replacer` argument. Numbers, `Number` objects, - and `String` objects will be converted to a string if they are given as array - values. - - -### v0.5.1 [[code][c0.5.1], [diff][d0.5.1]] - -[c0.5.1]: https://github.com/json5/json5/tree/v0.5.1 -[d0.5.1]: https://github.com/json5/json5/compare/v0.5.0...v0.5.1 - -This release includes a minor fix for indentations when stringifying empty -arrays. - -- Fix: Indents no longer appear in empty arrays when stringified. ([#134]) - - -### v0.5.0 [[code][c0.5.0], [diff][d0.5.0]] - -[c0.5.0]: https://github.com/json5/json5/tree/v0.5.0 -[d0.5.0]: https://github.com/json5/json5/compare/v0.4.0...v0.5.0 - -This release includes major internal changes and public API enhancements. - -- **Major:** JSON5 officially supports Node.js v4 LTS and v5. Support for - Node.js v0.6 and v0.8 have been dropped, while support for v0.10 and v0.12 - remain. - -- Fix: YUI Compressor no longer fails when compressing json5.js. ([#97]) - -- New: `parse` and the CLI provide line and column numbers when displaying error - messages. ([#101]; awesome work by [@amb26].) - - -### v0.4.0 [[code][c0.4.0], [diff][d0.4.0]] - -[c0.4.0]: https://github.com/json5/json5/tree/v0.4.0 -[d0.4.0]: https://github.com/json5/json5/compare/v0.2.0...v0.4.0 - -Note that v0.3.0 was tagged, but never published to npm, so this v0.4.0 -changelog entry includes v0.3.0 features. - -This is a massive release that adds `stringify` support, among other things. - -- **Major:** `JSON5.stringify()` now exists! - This method is analogous to the native `JSON.stringify()`; - it just avoids quoting keys where possible. - See the [usage documentation](./README.md#usage) for more. - ([#32]; huge thanks and props [@aeisenberg]!) - -- New: `NaN` and `-NaN` are now allowed number literals. - ([#30]; thanks [@rowanhill].) - -- New: Duplicate object keys are now allowed; the last value is used. - This is the same behavior as JSON. ([#57]; thanks [@jordanbtucker].) - -- Fix: Properly handle various whitespace and newline cases now. - E.g. JSON5 now properly supports escaped CR and CRLF newlines in strings, - and JSON5 now accepts the same whitespace as JSON (stricter than ES5). - ([#58], [#60], and [#63]; thanks [@jordanbtucker].) - -- New: Negative hexadecimal numbers (e.g. `-0xC8`) are allowed again. - (They were disallowed in v0.2.0; see below.) - It turns out they *are* valid in ES5, so JSON5 supports them now too. - ([#36]; thanks [@jordanbtucker]!) - - -### v0.2.0 [[code][c0.2.0], [diff][d0.2.0]] - -[c0.2.0]: https://github.com/json5/json5/tree/v0.2.0 -[d0.2.0]: https://github.com/json5/json5/compare/v0.1.0...v0.2.0 - -This release fixes some bugs and adds some more utility features to help you -express data more easily: - -- **Breaking:** Negative hexadecimal numbers (e.g. `-0xC8`) are rejected now. - While V8 (e.g. Chrome and Node) supported them, it turns out they're invalid - in ES5. This has been [fixed in V8][v8-hex-fix] (and by extension, Chrome - and Node), so JSON5 officially rejects them now, too. ([#36]) - -- New: Trailing decimal points in decimal numbers are allowed again. - (They were disallowed in v0.1.0; see below.) - They're allowed by ES5, and differentiating between integers and floats may - make sense on some platforms. ([#16]; thanks [@Midar].) - -- New: `Infinity` and `-Infinity` are now allowed number literals. - ([#30]; thanks [@pepkin88].) - -- New: Plus signs (`+`) in front of numbers are now allowed, since it can - be helpful in some contexts to explicitly mark numbers as positive. - (E.g. when a property represents changes or deltas.) - -- Fix: unescaped newlines in strings are rejected now. - ([#24]; thanks [@Midar].) - - -### v0.1.0 [[code][c0.1.0], [diff][d0.1.0]] - -[c0.1.0]: https://github.com/json5/json5/tree/v0.1.0 -[d0.1.0]: https://github.com/json5/json5/compare/v0.0.1...v0.1.0 - -This release tightens JSON5 support and adds helpful utility features: - -- New: Support hexadecimal numbers. (Thanks [@MaxNanasy].) - -- Fix: Reject octal numbers properly now. Previously, they were accepted but - improperly parsed as base-10 numbers. (Thanks [@MaxNanasy].) - -- **Breaking:** Reject "noctal" numbers now (base-10 numbers that begin with a - leading zero). These are disallowed by both JSON5 and JSON, as well as by - ES5's strict mode. (Thanks [@MaxNanasy].) - -- New: Support leading decimal points in decimal numbers. - (Thanks [@MaxNanasy].) - -- **Breaking:** Reject trailing decimal points in decimal numbers now. These - are disallowed by both JSON5 and JSON. (Thanks [@MaxNanasy].) - -- **Breaking:** Reject omitted elements in arrays now. These are disallowed by - both JSON5 and JSON. - -- Fix: Throw proper `SyntaxError` instances on errors now. - -- New: Add Node.js `require()` hook. Register via `json5/lib/require`. - -- New: Add Node.js `json5` executable to compile JSON5 files to JSON. - - -### v0.0.1 [[code][c0.0.1], [diff][d0.0.1]] - -[c0.0.1]: https://github.com/json5/json5/tree/v0.0.1 -[d0.0.1]: https://github.com/json5/json5/compare/v0.0.0...v0.0.1 - -This was the first implementation of this JSON5 parser. - -- Support unquoted object keys, including reserved words. Unicode characters - and escape sequences sequences aren't yet supported. - -- Support single-quoted strings. - -- Support multi-line strings. - -- Support trailing commas in arrays and objects. - -- Support comments, both inline and block. - - -### v0.0.0 [[code](https://github.com/json5/json5/tree/v0.0.0)] - -Let's consider this to be Douglas Crockford's original [json_parse.js] — a -parser for the regular JSON format. - - -[json_parse.js]: https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js -[v8-hex-fix]: http://code.google.com/p/v8/issues/detail?id=2240 - -[@MaxNanasy]: https://github.com/MaxNanasy -[@Midar]: https://github.com/Midar -[@pepkin88]: https://github.com/pepkin88 -[@rowanhill]: https://github.com/rowanhill -[@aeisenberg]: https://github.com/aeisenberg -[@jordanbtucker]: https://github.com/jordanbtucker -[@amb26]: https://github.com/amb26 - -[#1]: https://github.com/json5/json5/issues/1 -[#16]: https://github.com/json5/json5/issues/16 -[#24]: https://github.com/json5/json5/issues/24 -[#30]: https://github.com/json5/json5/issues/30 -[#32]: https://github.com/json5/json5/issues/32 -[#36]: https://github.com/json5/json5/issues/36 -[#57]: https://github.com/json5/json5/issues/57 -[#58]: https://github.com/json5/json5/pull/58 -[#60]: https://github.com/json5/json5/pull/60 -[#63]: https://github.com/json5/json5/pull/63 -[#66]: https://github.com/json5/json5/issues/66 -[#67]: https://github.com/json5/json5/issues/67 -[#68]: https://github.com/json5/json5/issues/68 -[#70]: https://github.com/json5/json5/issues/70 -[#71]: https://github.com/json5/json5/issues/71 -[#72]: https://github.com/json5/json5/issues/72 -[#84]: https://github.com/json5/json5/pull/84 -[#89]: https://github.com/json5/json5/pull/89 -[#97]: https://github.com/json5/json5/pull/97 -[#101]: https://github.com/json5/json5/pull/101 -[#108]: https://github.com/json5/json5/pull/108 -[#134]: https://github.com/json5/json5/pull/134 -[#154]: https://github.com/json5/json5/issues/154 diff --git a/node_modules/json5/dist/index.js b/node_modules/json5/dist/index.js index bfc960b9b..b6504bc36 100644 --- a/node_modules/json5/dist/index.js +++ b/node_modules/json5/dist/index.js @@ -1 +1 @@ -!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";var u,D,F=(function(u,D){Object.defineProperty(D,"__esModule",{value:!0});D.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,D.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,D.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC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A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF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\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00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DE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/}(u={exports:{}},u.exports),u.exports);(D=F)&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")&&D.default;var e=F.Space_Separator,C=F.ID_Start,A=F.ID_Continue;function r(u){return u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||C.test(u)}function t(u){return u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||A.test(u)}function E(u){return/[0-9]/.test(u)}function n(u){return/[0-9A-Fa-f]/.test(u)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},o=void 0,a=void 0,B=void 0,c=void 0,s=void 0,f=void 0,d=void 0,l=void 0,v=void 0;var m=void 0,p=void 0,h=void 0,y=void 0,w=void 0;function b(){for(m="default",p="",h=!1,y=1;;){w=g();var u=x[m]();if(u)return u}}function g(){if(o[c])return String.fromCodePoint(o.codePointAt(c))}function S(){var u=g();return"\n"===u?(s++,f=0):u?f+=u.length:f++,u&&(c+=u.length),u}var x={default:function(){switch(w){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void S();case"/":return S(),void(m="comment");case void 0:return S(),N("eof")}if(!function(u){return e.test(u)}(w))return x[a]();S()},comment:function(){switch(w){case"*":return S(),void(m="multiLineComment");case"/":return S(),void(m="singleLineComment")}throw j(S())},multiLineComment:function(){switch(w){case"*":return S(),void(m="multiLineCommentAsterisk");case void 0:throw j(S())}S()},multiLineCommentAsterisk:function(){switch(w){case"*":return void S();case"/":return S(),void(m="default");case void 0:throw j(S())}S(),m="multiLineComment"},singleLineComment:function(){switch(w){case"\n":case"\r":case"\u2028":case"\u2029":return S(),void(m="default");case void 0:return S(),N("eof")}S()},value:function(){switch(w){case"{":case"[":return N("punctuator",S());case"n":return S(),P("ull"),N("null",null);case"t":return S(),P("rue"),N("boolean",!0);case"f":return S(),P("alse"),N("boolean",!1);case"-":case"+":return"-"===S()&&(y=-1),void(m="sign");case".":return p=S(),void(m="decimalPointLeading");case"0":return p=S(),void(m="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return p=S(),void(m="decimalInteger");case"I":return S(),P("nfinity"),N("numeric",1/0);case"N":return S(),P("aN"),N("numeric",NaN);case'"':case"'":return h='"'===S(),p="",void(m="string")}throw j(S())},identifierNameStartEscape:function(){if("u"!==w)throw j(S());S();var u=O();switch(u){case"$":case"_":break;default:if(!r(u))throw L()}p+=u,m="identifierName"},identifierName:function(){switch(w){case"$":case"_":case"‌":case"‍":return void(p+=S());case"\\":return S(),void(m="identifierNameEscape")}if(!t(w))return N("identifier",p);p+=S()},identifierNameEscape:function(){if("u"!==w)throw j(S());S();var u=O();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!t(u))throw L()}p+=u,m="identifierName"},sign:function(){switch(w){case".":return p=S(),void(m="decimalPointLeading");case"0":return p=S(),void(m="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return p=S(),void(m="decimalInteger");case"I":return S(),P("nfinity"),N("numeric",y*(1/0));case"N":return S(),P("aN"),N("numeric",NaN)}throw j(S())},zero:function(){switch(w){case".":return p+=S(),void(m="decimalPoint");case"e":case"E":return p+=S(),void(m="decimalExponent");case"x":case"X":return p+=S(),void(m="hexadecimal")}return N("numeric",0*y)},decimalInteger:function(){switch(w){case".":return p+=S(),void(m="decimalPoint");case"e":case"E":return p+=S(),void(m="decimalExponent")}if(!E(w))return N("numeric",y*Number(p));p+=S()},decimalPointLeading:function(){if(E(w))return p+=S(),void(m="decimalFraction");throw j(S())},decimalPoint:function(){switch(w){case"e":case"E":return p+=S(),void(m="decimalExponent")}return E(w)?(p+=S(),void(m="decimalFraction")):N("numeric",y*Number(p))},decimalFraction:function(){switch(w){case"e":case"E":return p+=S(),void(m="decimalExponent")}if(!E(w))return N("numeric",y*Number(p));p+=S()},decimalExponent:function(){switch(w){case"+":case"-":return p+=S(),void(m="decimalExponentSign")}if(E(w))return p+=S(),void(m="decimalExponentInteger");throw j(S())},decimalExponentSign:function(){if(E(w))return p+=S(),void(m="decimalExponentInteger");throw j(S())},decimalExponentInteger:function(){if(!E(w))return N("numeric",y*Number(p));p+=S()},hexadecimal:function(){if(n(w))return p+=S(),void(m="hexadecimalInteger");throw j(S())},hexadecimalInteger:function(){if(!n(w))return N("numeric",y*Number(p));p+=S()},string:function(){switch(w){case"\\":return S(),void(p+=function(){switch(g()){case"b":return S(),"\b";case"f":return S(),"\f";case"n":return S(),"\n";case"r":return S(),"\r";case"t":return S(),"\t";case"v":return S(),"\v";case"0":if(S(),E(g()))throw j(S());return"\0";case"x":return S(),function(){var u="",D=g();if(!n(D))throw j(S());if(u+=S(),!n(D=g()))throw j(S());return u+=S(),String.fromCodePoint(parseInt(u,16))}();case"u":return S(),O();case"\n":case"\u2028":case"\u2029":return S(),"";case"\r":return S(),"\n"===g()&&S(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw j(S())}return S()}());case'"':return h?(S(),N("string",p)):void(p+=S());case"'":return h?void(p+=S()):(S(),N("string",p));case"\n":case"\r":throw j(S());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+u+"' is not valid ECMAScript; consider escaping")}(w);break;case void 0:throw j(S())}p+=S()},start:function(){switch(w){case"{":case"[":return N("punctuator",S())}m="value"},beforePropertyName:function(){switch(w){case"$":case"_":return p=S(),void(m="identifierName");case"\\":return S(),void(m="identifierNameStartEscape");case"}":return N("punctuator",S());case'"':case"'":return h='"'===S(),void(m="string")}if(r(w))return p+=S(),void(m="identifierName");throw j(S())},afterPropertyName:function(){if(":"===w)return N("punctuator",S());throw j(S())},beforePropertyValue:function(){m="value"},afterPropertyValue:function(){switch(w){case",":case"}":return N("punctuator",S())}throw j(S())},beforeArrayValue:function(){if("]"===w)return N("punctuator",S());m="value"},afterArrayValue:function(){switch(w){case",":case"]":return N("punctuator",S())}throw j(S())},end:function(){throw j(S())}};function N(u,D){return{type:u,value:D,line:s,column:f}}function P(u){var D=!0,F=!1,e=void 0;try{for(var C,A=u[Symbol.iterator]();!(D=(C=A.next()).done);D=!0){var r=C.value;if(g()!==r)throw j(S());S()}}catch(u){F=!0,e=u}finally{try{!D&&A.return&&A.return()}finally{if(F)throw e}}}function O(){for(var u="",D=4;D-- >0;){if(!n(g()))throw j(S());u+=S()}return String.fromCodePoint(parseInt(u,16))}var I={start:function(){if("eof"===d.type)throw J();_()},beforePropertyName:function(){switch(d.type){case"identifier":case"string":return l=d.value,void(a="afterPropertyName");case"punctuator":return void V();case"eof":throw J()}},afterPropertyName:function(){if("eof"===d.type)throw J();a="beforePropertyValue"},beforePropertyValue:function(){if("eof"===d.type)throw J();_()},beforeArrayValue:function(){if("eof"===d.type)throw J();"punctuator"!==d.type||"]"!==d.value?_():V()},afterPropertyValue:function(){if("eof"===d.type)throw J();switch(d.value){case",":return void(a="beforePropertyName");case"}":V()}},afterArrayValue:function(){if("eof"===d.type)throw J();switch(d.value){case",":return void(a="beforeArrayValue");case"]":V()}},end:function(){}};function _(){var u=void 0;switch(d.type){case"punctuator":switch(d.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=d.value}if(void 0===v)v=u;else{var D=B[B.length-1];Array.isArray(D)?D.push(u):D[l]=u}if(null!==u&&"object"===(void 0===u?"undefined":i(u)))B.push(u),a=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var F=B[B.length-1];a=null==F?"end":Array.isArray(F)?"afterArrayValue":"afterPropertyValue"}}function V(){B.pop();var u=B[B.length-1];a=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function j(u){return k(void 0===u?"JSON5: invalid end of input at "+s+":"+f:"JSON5: invalid character '"+function(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var F=u.charCodeAt(0).toString(16);return"\\x"+("00"+F).substring(F.length)}return u}(u)+"' at "+s+":"+f)}function J(){return k("JSON5: invalid end of input at "+s+":"+f)}function L(){return k("JSON5: invalid identifier character at "+s+":"+(f-=5))}function k(u){var D=new SyntaxError(u);return D.lineNumber=s,D.columnNumber=f,D}return{parse:function(u,D){o=String(u),a="start",B=[],c=0,s=1,f=0,d=void 0,l=void 0,v=void 0;do{d=b(),I[a]()}while("eof"!==d.type);return"function"==typeof D?function u(D,F,e){var C=D[F];if(null!=C&&"object"===(void 0===C?"undefined":i(C)))for(var A in C){var r=u(C,A,e);void 0===r?delete C[A]:C[A]=r}return e.call(D,F,C)}({"":v},"",D):v},stringify:function(u,D,F){var e=[],C="",A=void 0,E=void 0,n="",o=void 0;if(null==D||"object"!==(void 0===D?"undefined":i(D))||Array.isArray(D)||(F=D.space,o=D.quote,D=D.replacer),"function"==typeof D)E=D;else if(Array.isArray(D)){A=[];var a=!0,B=!1,c=void 0;try{for(var s,f=D[Symbol.iterator]();!(a=(s=f.next()).done);a=!0){var d=s.value,l=void 0;"string"==typeof d?l=d:("number"==typeof d||d instanceof String||d instanceof Number)&&(l=String(d)),void 0!==l&&A.indexOf(l)<0&&A.push(l)}}catch(u){B=!0,c=u}finally{try{!a&&f.return&&f.return()}finally{if(B)throw c}}}return F instanceof Number?F=Number(F):F instanceof String&&(F=String(F)),"number"==typeof F?F>0&&(F=Math.min(10,Math.floor(F)),n=" ".substr(0,F)):"string"==typeof F&&(n=F.substr(0,10)),v("",{"":u});function v(u,D){var F=D[u];switch(null!=F&&("function"==typeof F.toJSON5?F=F.toJSON5(u):"function"==typeof F.toJSON&&(F=F.toJSON(u))),E&&(F=E.call(D,u,F)),F instanceof Number?F=Number(F):F instanceof String?F=String(F):F instanceof Boolean&&(F=F.valueOf()),F){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof F?m(F):"number"==typeof F?String(F):"object"===(void 0===F?"undefined":i(F))?Array.isArray(F)?function(u){if(e.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");e.push(u);var D=C;C+=n;for(var F=[],A=0;A=0)throw TypeError("Converting circular structure to JSON5");e.push(u);var D=C;C+=n;var F=A||Object.keys(u),r=[],t=!0,E=!1,i=void 0;try{for(var o,a=F[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var B=o.value,c=v(B,u);if(void 0!==c){var s=p(B)+":";""!==n&&(s+=" "),s+=c,r.push(s)}}}catch(u){E=!0,i=u}finally{try{!t&&a.return&&a.return()}finally{if(E)throw i}}var f=void 0;if(0===r.length)f="{}";else{var d=void 0;if(""===n)d=r.join(","),f="{"+d+"}";else{var l=",\n"+C;d=r.join(l),f="{\n"+C+d+",\n"+D+"}"}}return e.pop(),C=D,f}(F):void 0}function m(u){var D={"'":.1,'"':.2},F={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},e="",C=!0,A=!1,r=void 0;try{for(var t,E=u[Symbol.iterator]();!(C=(t=E.next()).done);C=!0){var n=t.value;switch(n){case"'":case'"':D[n]++,e+=n;continue}if(F[n])e+=F[n];else if(n<" "){var i=n.charCodeAt(0).toString(16);e+="\\x"+("00"+i).substring(i.length)}else e+=n}}catch(u){A=!0,r=u}finally{try{!C&&E.return&&E.return()}finally{if(A)throw r}}var a=o||Object.keys(D).reduce(function(u,F){return D[u]="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||C.test(u)}function t(u){return u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||A.test(u)}function n(u){return/[0-9]/.test(u)}function E(u){return/[0-9A-Fa-f]/.test(u)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},a=void 0,o=void 0,B=void 0,c=void 0,s=void 0,f=void 0,l=void 0,d=void 0,v=void 0;var m=void 0,p=void 0,y=void 0,h=void 0,b=void 0;function w(){for(m="default",p="",y=!1,h=1;;){b=g();var u=x[m]();if(u)return u}}function g(){if(a[c])return String.fromCodePoint(a.codePointAt(c))}function S(){var u=g();return"\n"===u?(s++,f=0):u?f+=u.length:f++,u&&(c+=u.length),u}var x={default:function(){switch(b){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void S();case"/":return S(),void(m="comment");case void 0:return S(),N("eof")}if(!function(u){return F.test(u)}(b))return x[o]();S()},comment:function(){switch(b){case"*":return S(),void(m="multiLineComment");case"/":return S(),void(m="singleLineComment")}throw V(S())},multiLineComment:function(){switch(b){case"*":return S(),void(m="multiLineCommentAsterisk");case void 0:throw V(S())}S()},multiLineCommentAsterisk:function(){switch(b){case"*":return void S();case"/":return S(),void(m="default");case void 0:throw V(S())}S(),m="multiLineComment"},singleLineComment:function(){switch(b){case"\n":case"\r":case"\u2028":case"\u2029":return S(),void(m="default");case void 0:return S(),N("eof")}S()},value:function(){switch(b){case"{":case"[":return N("punctuator",S());case"n":return S(),P("ull"),N("null",null);case"t":return S(),P("rue"),N("boolean",!0);case"f":return S(),P("alse"),N("boolean",!1);case"-":case"+":return"-"===S()&&(h=-1),void(m="sign");case".":return p=S(),void(m="decimalPointLeading");case"0":return p=S(),void(m="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return p=S(),void(m="decimalInteger");case"I":return S(),P("nfinity"),N("numeric",1/0);case"N":return S(),P("aN"),N("numeric",NaN);case'"':case"'":return y='"'===S(),p="",void(m="string")}throw V(S())},identifierNameStartEscape:function(){if("u"!==b)throw V(S());S();var u=O();switch(u){case"$":case"_":break;default:if(!r(u))throw L()}p+=u,m="identifierName"},identifierName:function(){switch(b){case"$":case"_":case"‌":case"‍":return void(p+=S());case"\\":return S(),void(m="identifierNameEscape")}if(!t(b))return N("identifier",p);p+=S()},identifierNameEscape:function(){if("u"!==b)throw V(S());S();var u=O();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!t(u))throw L()}p+=u,m="identifierName"},sign:function(){switch(b){case".":return p=S(),void(m="decimalPointLeading");case"0":return p=S(),void(m="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return p=S(),void(m="decimalInteger");case"I":return S(),P("nfinity"),N("numeric",h*(1/0));case"N":return S(),P("aN"),N("numeric",NaN)}throw V(S())},zero:function(){switch(b){case".":return p+=S(),void(m="decimalPoint");case"e":case"E":return p+=S(),void(m="decimalExponent");case"x":case"X":return p+=S(),void(m="hexadecimal")}return N("numeric",0*h)},decimalInteger:function(){switch(b){case".":return p+=S(),void(m="decimalPoint");case"e":case"E":return p+=S(),void(m="decimalExponent")}if(!n(b))return N("numeric",h*Number(p));p+=S()},decimalPointLeading:function(){if(n(b))return p+=S(),void(m="decimalFraction");throw V(S())},decimalPoint:function(){switch(b){case"e":case"E":return p+=S(),void(m="decimalExponent")}return n(b)?(p+=S(),void(m="decimalFraction")):N("numeric",h*Number(p))},decimalFraction:function(){switch(b){case"e":case"E":return p+=S(),void(m="decimalExponent")}if(!n(b))return N("numeric",h*Number(p));p+=S()},decimalExponent:function(){switch(b){case"+":case"-":return p+=S(),void(m="decimalExponentSign")}if(n(b))return p+=S(),void(m="decimalExponentInteger");throw V(S())},decimalExponentSign:function(){if(n(b))return p+=S(),void(m="decimalExponentInteger");throw V(S())},decimalExponentInteger:function(){if(!n(b))return N("numeric",h*Number(p));p+=S()},hexadecimal:function(){if(E(b))return p+=S(),void(m="hexadecimalInteger");throw V(S())},hexadecimalInteger:function(){if(!E(b))return N("numeric",h*Number(p));p+=S()},string:function(){switch(b){case"\\":return S(),void(p+=function(){switch(g()){case"b":return S(),"\b";case"f":return S(),"\f";case"n":return S(),"\n";case"r":return S(),"\r";case"t":return S(),"\t";case"v":return S(),"\v";case"0":if(S(),n(g()))throw V(S());return"\0";case"x":return S(),function(){var u="",D=g();if(!E(D))throw V(S());if(u+=S(),!E(D=g()))throw V(S());return u+=S(),String.fromCodePoint(parseInt(u,16))}();case"u":return S(),O();case"\n":case"\u2028":case"\u2029":return S(),"";case"\r":return S(),"\n"===g()&&S(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw V(S())}return S()}());case'"':return y?(S(),N("string",p)):void(p+=S());case"'":return y?void(p+=S()):(S(),N("string",p));case"\n":case"\r":throw V(S());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+u+"' is not valid ECMAScript; consider escaping")}(b);break;case void 0:throw V(S())}p+=S()},start:function(){switch(b){case"{":case"[":return N("punctuator",S())}m="value"},beforePropertyName:function(){switch(b){case"$":case"_":return p=S(),void(m="identifierName");case"\\":return S(),void(m="identifierNameStartEscape");case"}":return N("punctuator",S());case'"':case"'":return y='"'===S(),void(m="string")}if(r(b))return p+=S(),void(m="identifierName");throw V(S())},afterPropertyName:function(){if(":"===b)return N("punctuator",S());throw V(S())},beforePropertyValue:function(){m="value"},afterPropertyValue:function(){switch(b){case",":case"}":return N("punctuator",S())}throw V(S())},beforeArrayValue:function(){if("]"===b)return N("punctuator",S());m="value"},afterArrayValue:function(){switch(b){case",":case"]":return N("punctuator",S())}throw V(S())},end:function(){throw V(S())}};function N(u,D){return{type:u,value:D,line:s,column:f}}function P(u){var D=!0,e=!1,F=void 0;try{for(var C,A=u[Symbol.iterator]();!(D=(C=A.next()).done);D=!0){var r=C.value;if(g()!==r)throw V(S());S()}}catch(u){e=!0,F=u}finally{try{!D&&A.return&&A.return()}finally{if(e)throw F}}}function O(){for(var u="",D=4;D-- >0;){if(!E(g()))throw V(S());u+=S()}return String.fromCodePoint(parseInt(u,16))}var j={start:function(){if("eof"===l.type)throw J();I()},beforePropertyName:function(){switch(l.type){case"identifier":case"string":return d=l.value,void(o="afterPropertyName");case"punctuator":return void _();case"eof":throw J()}},afterPropertyName:function(){if("eof"===l.type)throw J();o="beforePropertyValue"},beforePropertyValue:function(){if("eof"===l.type)throw J();I()},beforeArrayValue:function(){if("eof"===l.type)throw J();"punctuator"!==l.type||"]"!==l.value?I():_()},afterPropertyValue:function(){if("eof"===l.type)throw J();switch(l.value){case",":return void(o="beforePropertyName");case"}":_()}},afterArrayValue:function(){if("eof"===l.type)throw J();switch(l.value){case",":return void(o="beforeArrayValue");case"]":_()}},end:function(){}};function I(){var u=void 0;switch(l.type){case"punctuator":switch(l.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=l.value}if(void 0===v)v=u;else{var D=B[B.length-1];Array.isArray(D)?D.push(u):Object.defineProperty(D,d,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(null!==u&&"object"===(void 0===u?"undefined":i(u)))B.push(u),o=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var e=B[B.length-1];o=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function _(){B.pop();var u=B[B.length-1];o=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function V(u){return k(void 0===u?"JSON5: invalid end of input at "+s+":"+f:"JSON5: invalid character '"+function(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}(u)+"' at "+s+":"+f)}function J(){return k("JSON5: invalid end of input at "+s+":"+f)}function L(){return k("JSON5: invalid identifier character at "+s+":"+(f-=5))}function k(u){var D=new SyntaxError(u);return D.lineNumber=s,D.columnNumber=f,D}return{parse:function(u,D){a=String(u),o="start",B=[],c=0,s=1,f=0,l=void 0,d=void 0,v=void 0;do{l=w(),j[o]()}while("eof"!==l.type);return"function"==typeof D?function u(D,e,F){var C=D[e];if(null!=C&&"object"===(void 0===C?"undefined":i(C)))if(Array.isArray(C))for(var A=0;A0&&(e=Math.min(10,Math.floor(e)),E=" ".substr(0,e)):"string"==typeof e&&(E=e.substr(0,10)),v("",{"":u});function v(u,D){var e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),n&&(e=n.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?m(e):"number"==typeof e?String(e):"object"===(void 0===e?"undefined":i(e))?Array.isArray(e)?function(u){if(F.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");F.push(u);var D=C;C+=E;for(var e=[],A=0;A=0)throw TypeError("Converting circular structure to JSON5");F.push(u);var D=C;C+=E;var e=A||Object.keys(u),r=[],t=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var B=a.value,c=v(B,u);if(void 0!==c){var s=p(B)+":";""!==E&&(s+=" "),s+=c,r.push(s)}}}catch(u){n=!0,i=u}finally{try{!t&&o.return&&o.return()}finally{if(n)throw i}}var f=void 0;if(0===r.length)f="{}";else{var l=void 0;if(""===E)l=r.join(","),f="{"+l+"}";else{var d=",\n"+C;l=r.join(d),f="{\n"+C+l+",\n"+D+"}"}}return F.pop(),C=D,f}(e):void 0}function m(u){var D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},F="",C=!0,A=!1,r=void 0;try{for(var t,n=u[Symbol.iterator]();!(C=(t=n.next()).done);C=!0){var E=t.value;switch(E){case"'":case'"':D[E]++,F+=E;continue}if(e[E])F+=e[E];else if(E<" "){var i=E.charCodeAt(0).toString(16);F+="\\x"+("00"+i).substring(i.length)}else F+=E}}catch(u){A=!0,r=u}finally{try{!C&&n.return&&n.return()}finally{if(A)throw r}}var o=a||Object.keys(D).reduce(function(u,e){return D[u]0){var _c2=peek();if(!util.isHexDigit(_c2)){throw invalidChar(read())}buffer+=read()}return String.fromCodePoint(parseInt(buffer,16))}var parseStates={start:function start(){if(token.type==='eof'){throw invalidEOF()}push()},beforePropertyName:function beforePropertyName(){switch(token.type){case'identifier':case'string':key=token.value;parseState='afterPropertyName';return;case'punctuator':pop();return;case'eof':throw invalidEOF();}},afterPropertyName:function afterPropertyName(){if(token.type==='eof'){throw invalidEOF()}parseState='beforePropertyValue'},beforePropertyValue:function beforePropertyValue(){if(token.type==='eof'){throw invalidEOF()}push()},beforeArrayValue:function beforeArrayValue(){if(token.type==='eof'){throw invalidEOF()}if(token.type==='punctuator'&&token.value===']'){pop();return}push()},afterPropertyValue:function afterPropertyValue(){if(token.type==='eof'){throw invalidEOF()}switch(token.value){case',':parseState='beforePropertyName';return;case'}':pop();}},afterArrayValue:function afterArrayValue(){if(token.type==='eof'){throw invalidEOF()}switch(token.value){case',':parseState='beforeArrayValue';return;case']':pop();}},end:function end(){}};function push(){var value=void 0;switch(token.type){case'punctuator':switch(token.value){case'{':value={};break;case'[':value=[];break;}break;case'null':case'boolean':case'numeric':case'string':value=token.value;break;}if(root===undefined){root=value}else{var parent=stack[stack.length-1];if(Array.isArray(parent)){parent.push(value)}else{parent[key]=value}}if(value!==null&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'){stack.push(value);if(Array.isArray(value)){parseState='beforeArrayValue'}else{parseState='beforePropertyName'}}else{var current=stack[stack.length-1];if(current==null){parseState='end'}else if(Array.isArray(current)){parseState='afterArrayValue'}else{parseState='afterPropertyValue'}}}function pop(){stack.pop();var current=stack[stack.length-1];if(current==null){parseState='end'}else if(Array.isArray(current)){parseState='afterArrayValue'}else{parseState='afterPropertyValue'}}function invalidChar(c){if(c===undefined){return syntaxError('JSON5: invalid end of input at '+line+':'+column)}return syntaxError('JSON5: invalid character \''+formatChar(c)+'\' at '+line+':'+column)}function invalidEOF(){return syntaxError('JSON5: invalid end of input at '+line+':'+column)}function invalidIdentifier(){column-=5;return syntaxError('JSON5: invalid identifier character at '+line+':'+column)}function separatorChar(c){console.warn('JSON5: \''+c+'\' is not valid ECMAScript; consider escaping')}function formatChar(c){var replacements={'\'':'\\\'','"':'\\"','\\':'\\\\','\b':'\\b','\f':'\\f','\n':'\\n','\r':'\\r','\t':'\\t','\x0B':'\\v','\0':'\\0','\u2028':'\\u2028','\u2029':'\\u2029'};if(replacements[c]){return replacements[c]}if(c<' '){var hexString=c.charCodeAt(0).toString(16);return'\\x'+('00'+hexString).substring(hexString.length)}return c}function syntaxError(message){var err=new SyntaxError(message);err.lineNumber=line;err.columnNumber=column;return err}module.exports=exports['default']; \ No newline at end of file +'use strict';Object.defineProperty(exports,'__esModule',{value:true});var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};exports.default=parse;var _util=require('./util');var util=_interopRequireWildcard(_util);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}var source=void 0;var parseState=void 0;var stack=void 0;var pos=void 0;var line=void 0;var column=void 0;var token=void 0;var key=void 0;var root=void 0;function parse(text,reviver){source=String(text);parseState='start';stack=[];pos=0;line=1;column=0;token=undefined;key=undefined;root=undefined;do{token=lex();parseStates[parseState]()}while(token.type!=='eof');if(typeof reviver==='function'){return internalize({'':root},'',reviver)}return root}function internalize(holder,name,reviver){var value=holder[name];if(value!=null&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'){if(Array.isArray(value)){for(var i=0;i0){var _c2=peek();if(!util.isHexDigit(_c2)){throw invalidChar(read())}buffer+=read()}return String.fromCodePoint(parseInt(buffer,16))}var parseStates={start:function start(){if(token.type==='eof'){throw invalidEOF()}push()},beforePropertyName:function beforePropertyName(){switch(token.type){case'identifier':case'string':key=token.value;parseState='afterPropertyName';return;case'punctuator':pop();return;case'eof':throw invalidEOF();}},afterPropertyName:function afterPropertyName(){if(token.type==='eof'){throw invalidEOF()}parseState='beforePropertyValue'},beforePropertyValue:function beforePropertyValue(){if(token.type==='eof'){throw invalidEOF()}push()},beforeArrayValue:function beforeArrayValue(){if(token.type==='eof'){throw invalidEOF()}if(token.type==='punctuator'&&token.value===']'){pop();return}push()},afterPropertyValue:function afterPropertyValue(){if(token.type==='eof'){throw invalidEOF()}switch(token.value){case',':parseState='beforePropertyName';return;case'}':pop();}},afterArrayValue:function afterArrayValue(){if(token.type==='eof'){throw invalidEOF()}switch(token.value){case',':parseState='beforeArrayValue';return;case']':pop();}},end:function end(){}};function push(){var value=void 0;switch(token.type){case'punctuator':switch(token.value){case'{':value={};break;case'[':value=[];break;}break;case'null':case'boolean':case'numeric':case'string':value=token.value;break;}if(root===undefined){root=value}else{var parent=stack[stack.length-1];if(Array.isArray(parent)){parent.push(value)}else{Object.defineProperty(parent,key,{value:value,writable:true,enumerable:true,configurable:true})}}if(value!==null&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'){stack.push(value);if(Array.isArray(value)){parseState='beforeArrayValue'}else{parseState='beforePropertyName'}}else{var current=stack[stack.length-1];if(current==null){parseState='end'}else if(Array.isArray(current)){parseState='afterArrayValue'}else{parseState='afterPropertyValue'}}}function pop(){stack.pop();var current=stack[stack.length-1];if(current==null){parseState='end'}else if(Array.isArray(current)){parseState='afterArrayValue'}else{parseState='afterPropertyValue'}}function invalidChar(c){if(c===undefined){return syntaxError('JSON5: invalid end of input at '+line+':'+column)}return syntaxError('JSON5: invalid character \''+formatChar(c)+'\' at '+line+':'+column)}function invalidEOF(){return syntaxError('JSON5: invalid end of input at '+line+':'+column)}function invalidIdentifier(){column-=5;return syntaxError('JSON5: invalid identifier character at '+line+':'+column)}function separatorChar(c){console.warn('JSON5: \''+c+'\' is not valid ECMAScript; consider escaping')}function formatChar(c){var replacements={'\'':'\\\'','"':'\\"','\\':'\\\\','\b':'\\b','\f':'\\f','\n':'\\n','\r':'\\r','\t':'\\t','\x0B':'\\v','\0':'\\0','\u2028':'\\u2028','\u2029':'\\u2029'};if(replacements[c]){return replacements[c]}if(c<' '){var hexString=c.charCodeAt(0).toString(16);return'\\x'+('00'+hexString).substring(hexString.length)}return c}function syntaxError(message){var err=new SyntaxError(message);err.lineNumber=line;err.columnNumber=column;return err}module.exports=exports['default']; \ No newline at end of file diff --git a/node_modules/json5/package.json b/node_modules/json5/package.json index b51b76241..87f84a03d 100644 --- a/node_modules/json5/package.json +++ b/node_modules/json5/package.json @@ -1,6 +1,6 @@ { "name": "json5", - "version": "1.0.1", + "version": "1.0.2", "description": "JSON for humans.", "main": "lib/index.js", "bin": "lib/cli.js", diff --git a/node_modules/minimist/.eslintrc b/node_modules/minimist/.eslintrc new file mode 100644 index 000000000..137f67b43 --- /dev/null +++ b/node_modules/minimist/.eslintrc @@ -0,0 +1,54 @@ +{ + "root": true, + + "extends": "@ljharb/eslint-config/node/0.4", + + "rules": { + "array-bracket-spacing": 0, + "array-element-newline": 0, + "brace-style": 1, + "camelcase": 1, + "comma-dangle": 1, + "comma-spacing": 1, + "complexity": 0, + "curly": 1, + "dot-notation": 1, + "eol-last": 1, + "func-style": 1, + "function-paren-newline": 1, + "indent": [1, 4], + "key-spacing": 1, + "max-lines-per-function": 0, + "max-nested-callbacks": 1, + "max-statements": 0, + "multiline-comment-style": 1, + "no-array-constructor": 1, + "no-continue": 1, + "no-div-regex": 1, + "no-extra-parens": 1, + "no-mixed-operators": 1, + "no-multi-spaces": 1, + "no-multiple-empty-lines": 1, + "no-param-reassign": 1, + "no-plusplus": 1, + "no-proto": 1, + "no-redeclare": 1, + "no-restricted-syntax": 1, + "no-shadow": 1, + "no-trailing-spaces": 1, + "no-unused-vars": 1, + "no-use-before-define": 1, + "object-curly-newline": 1, + "object-curly-spacing": 1, + "operator-linebreak": 1, + "quote-props": 1, + "quotes": 1, + "semi-style": 1, + "semi": 1, + "space-before-blocks": 1, + "space-before-function-paren": 1, + "space-infix-ops": 1, + "strict": 1, + "wrap-regex": 1, + }, +} diff --git a/node_modules/minimist/.github/FUNDING.yml b/node_modules/minimist/.github/FUNDING.yml new file mode 100644 index 000000000..a9366222e --- /dev/null +++ b/node_modules/minimist/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/minimist +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/minimist/.nycrc b/node_modules/minimist/.nycrc new file mode 100644 index 000000000..55c3d2936 --- /dev/null +++ b/node_modules/minimist/.nycrc @@ -0,0 +1,14 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "example", + "test" + ] +} diff --git a/node_modules/minimist/.travis.yml b/node_modules/minimist/.travis.yml deleted file mode 100644 index 74c57bf15..000000000 --- a/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/minimist/CHANGELOG.md b/node_modules/minimist/CHANGELOG.md new file mode 100644 index 000000000..e0e00bd00 --- /dev/null +++ b/node_modules/minimist/CHANGELOG.md @@ -0,0 +1,212 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.7](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7) - 2022-10-10 + +### Commits + +- [meta] add `auto-changelog` [`0ebf4eb`](https://github.com/minimistjs/minimist/commit/0ebf4ebcd5f7787a5524d31a849ef41316b83c3c) +- [actions] add reusable workflows [`e115b63`](https://github.com/minimistjs/minimist/commit/e115b63fa9d3909f33b00a2db647ff79068388de) +- [eslint] add eslint; rules to enable later are warnings [`f58745b`](https://github.com/minimistjs/minimist/commit/f58745b9bb84348e1be72af7dbba5840c7c13013) +- [Dev Deps] switch from `covert` to `nyc` [`ab03356`](https://github.com/minimistjs/minimist/commit/ab033567b9c8b31117cb026dc7f1e592ce455c65) +- [readme] rename and add badges [`236f4a0`](https://github.com/minimistjs/minimist/commit/236f4a07e4ebe5ee44f1496ec6974991ab293ffd) +- [meta] create FUNDING.yml; add `funding` in package.json [`783a49b`](https://github.com/minimistjs/minimist/commit/783a49bfd47e8335d3098a8cac75662cf71eb32a) +- [meta] use `npmignore` to autogenerate an npmignore file [`f81ece6`](https://github.com/minimistjs/minimist/commit/f81ece6aaec2fa14e69ff4f1e0407a8c4e2635a2) +- Only apps should have lockfiles [`56cad44`](https://github.com/minimistjs/minimist/commit/56cad44c7f879b9bb5ec18fcc349308024a89bfc) +- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`49c5f9f`](https://github.com/minimistjs/minimist/commit/49c5f9fb7e6a92db9eb340cc679de92fb3aacded) +- [Tests] add `aud` in `posttest` [`228ae93`](https://github.com/minimistjs/minimist/commit/228ae938f3cd9db9dfd8bd7458b076a7b2aef280) +- [meta] add `safe-publish-latest` [`01fc23f`](https://github.com/minimistjs/minimist/commit/01fc23f5104f85c75059972e01dd33796ab529ff) +- [meta] update repo URLs [`6b164c7`](https://github.com/minimistjs/minimist/commit/6b164c7d68e0b6bf32f894699effdfb7c63041dd) + +## [v1.2.6](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.6) - 2022-03-21 + +### Commits + +- test from prototype pollution PR [`bc8ecee`](https://github.com/minimistjs/minimist/commit/bc8ecee43875261f4f17eb20b1243d3ed15e70eb) +- isConstructorOrProto adapted from PR [`c2b9819`](https://github.com/minimistjs/minimist/commit/c2b981977fa834b223b408cfb860f933c9811e4d) +- security notice for additional prototype pollution issue [`ef88b93`](https://github.com/minimistjs/minimist/commit/ef88b9325f77b5ee643ccfc97e2ebda577e4c4e2) + +## [v1.2.5](https://github.com/minimistjs/minimist/compare/v1.2.4...v1.2.5) - 2020-03-12 + +## [v1.2.4](https://github.com/minimistjs/minimist/compare/v1.2.3...v1.2.4) - 2020-03-11 + +### Commits + +- security notice [`4cf1354`](https://github.com/minimistjs/minimist/commit/4cf1354839cb972e38496d35e12f806eea92c11f) +- additional test for constructor prototype pollution [`1043d21`](https://github.com/minimistjs/minimist/commit/1043d212c3caaf871966e710f52cfdf02f9eea4b) + +## [v1.2.3](https://github.com/minimistjs/minimist/compare/v1.2.2...v1.2.3) - 2020-03-10 + +### Commits + +- more failing proto pollution tests [`13c01a5`](https://github.com/minimistjs/minimist/commit/13c01a5327736903704984b7f65616b8476850cc) +- even more aggressive checks for protocol pollution [`38a4d1c`](https://github.com/minimistjs/minimist/commit/38a4d1caead72ef99e824bb420a2528eec03d9ab) + +## [v1.2.2](https://github.com/minimistjs/minimist/compare/v1.2.1...v1.2.2) - 2020-03-10 + +### Commits + +- failing test for protocol pollution [`0efed03`](https://github.com/minimistjs/minimist/commit/0efed0340ec8433638758f7ca0c77cb20a0bfbab) +- cleanup [`67d3722`](https://github.com/minimistjs/minimist/commit/67d3722413448d00a62963d2d30c34656a92d7e2) +- console.dir -> console.log [`47acf72`](https://github.com/minimistjs/minimist/commit/47acf72c715a630bf9ea013867f47f1dd69dfc54) +- don't assign onto __proto__ [`63e7ed0`](https://github.com/minimistjs/minimist/commit/63e7ed05aa4b1889ec2f3b196426db4500cbda94) + +## [v1.2.1](https://github.com/minimistjs/minimist/compare/v1.2.0...v1.2.1) - 2020-03-10 + +### Merged + +- move the `opts['--']` example back where it belongs [`#63`](https://github.com/minimistjs/minimist/pull/63) + +### Commits + +- add test [`6be5dae`](https://github.com/minimistjs/minimist/commit/6be5dae35a32a987bcf4137fcd6c19c5200ee909) +- fix bad boolean regexp [`ac3fc79`](https://github.com/minimistjs/minimist/commit/ac3fc796e63b95128fdbdf67ea7fad71bd59aa76) + +## [v1.2.0](https://github.com/minimistjs/minimist/compare/v1.1.3...v1.2.0) - 2015-08-24 + +### Commits + +- failing -k=v short test [`63416b8`](https://github.com/minimistjs/minimist/commit/63416b8cd1d0d70e4714564cce465a36e4dd26d7) +- kv short fix [`6bbe145`](https://github.com/minimistjs/minimist/commit/6bbe14529166245e86424f220a2321442fe88dc3) +- failing kv short test [`f72ab7f`](https://github.com/minimistjs/minimist/commit/f72ab7f4572adc52902c9b6873cc969192f01b10) +- fixed kv test [`f5a48c3`](https://github.com/minimistjs/minimist/commit/f5a48c3e50e40ca54f00c8e84de4b4d6e9897fa8) +- enforce space between arg key and value [`86b321a`](https://github.com/minimistjs/minimist/commit/86b321affe648a8e016c095a4f0efa9d9074f502) + +## [v1.1.3](https://github.com/minimistjs/minimist/compare/v1.1.2...v1.1.3) - 2015-08-06 + +### Commits + +- add failing test - boolean alias array [`0fa3c5b`](https://github.com/minimistjs/minimist/commit/0fa3c5b3dd98551ddecf5392831b4c21211743fc) +- fix boolean values with multiple aliases [`9c0a6e7`](https://github.com/minimistjs/minimist/commit/9c0a6e7de25a273b11bbf9a7464f0bd833779795) + +## [v1.1.2](https://github.com/minimistjs/minimist/compare/v1.1.1...v1.1.2) - 2015-07-22 + +### Commits + +- Convert boolean arguments to boolean values [`8f3dc27`](https://github.com/minimistjs/minimist/commit/8f3dc27cf833f1d54671b6d0bcb55c2fe19672a9) +- use non-ancient npm, node 0.12 and iojs [`61ed1d0`](https://github.com/minimistjs/minimist/commit/61ed1d034b9ec7282764ce76f3992b1a0b4906ae) +- an older npm for 0.8 [`25cf778`](https://github.com/minimistjs/minimist/commit/25cf778b1220e7838a526832ad6972f75244054f) + +## [v1.1.1](https://github.com/minimistjs/minimist/compare/v1.1.0...v1.1.1) - 2015-03-10 + +### Commits + +- check that they type of a value is a boolean, not just that it is currently set to a boolean [`6863198`](https://github.com/minimistjs/minimist/commit/6863198e36139830ff1f20ffdceaddd93f2c1db9) +- upgrade tape, fix type issues from old tape version [`806712d`](https://github.com/minimistjs/minimist/commit/806712df91604ed02b8e39aa372b84aea659ee34) +- test for setting a boolean to a null default [`8c444fe`](https://github.com/minimistjs/minimist/commit/8c444fe89384ded7d441c120915ea60620b01dd3) +- if the previous value was a boolean, without an default (or with an alias) don't make an array either [`e5f419a`](https://github.com/minimistjs/minimist/commit/e5f419a3b5b3bc3f9e5ac71b7040621af70ed2dd) + +## [v1.1.0](https://github.com/minimistjs/minimist/compare/v1.0.0...v1.1.0) - 2014-08-10 + +### Commits + +- add support for handling "unknown" options not registered with the parser. [`6f3cc5d`](https://github.com/minimistjs/minimist/commit/6f3cc5d4e84524932a6ef2ce3592acc67cdd4383) +- reformat package.json [`02ed371`](https://github.com/minimistjs/minimist/commit/02ed37115194d3697ff358e8e25e5e66bab1d9f8) +- coverage script [`e5531ba`](https://github.com/minimistjs/minimist/commit/e5531ba0479da3b8138d3d8cac545d84ccb1c8df) +- extra fn to get 100% coverage again [`a6972da`](https://github.com/minimistjs/minimist/commit/a6972da89e56bf77642f8ec05a13b6558db93498) + +## [v1.0.0](https://github.com/minimistjs/minimist/compare/v0.2.1...v1.0.0) - 2014-08-10 + +### Commits + +- added stopEarly option [`471c7e4`](https://github.com/minimistjs/minimist/commit/471c7e4a7e910fc7ad8f9df850a186daf32c64e9) +- fix list [`fef6ae7`](https://github.com/minimistjs/minimist/commit/fef6ae79c38b9dc1c49569abb7cd04eb965eac5e) + +## [v0.2.1](https://github.com/minimistjs/minimist/compare/v0.2.0...v0.2.1) - 2020-03-12 + +## [v0.2.0](https://github.com/minimistjs/minimist/compare/v0.1.0...v0.2.0) - 2014-06-19 + +### Commits + +- support all-boolean mode [`450a97f`](https://github.com/minimistjs/minimist/commit/450a97f6e2bc85c7a4a13185c19a818d9a5ebe69) + +## [v0.1.0](https://github.com/minimistjs/minimist/compare/v0.0.10...v0.1.0) - 2014-05-12 + +### Commits + +- Provide a mechanism to segregate -- arguments [`ce4a1e6`](https://github.com/minimistjs/minimist/commit/ce4a1e63a7e8d5ab88d2a3768adefa6af98a445a) +- documented argv['--'] [`14db0e6`](https://github.com/minimistjs/minimist/commit/14db0e6dbc6d2b9e472adaa54dad7004b364634f) +- Adding a test-case for notFlags segregation [`715c1e3`](https://github.com/minimistjs/minimist/commit/715c1e3714be223f998f6c537af6b505f0236c16) + +## [v0.0.10](https://github.com/minimistjs/minimist/compare/v0.0.9...v0.0.10) - 2014-05-11 + +### Commits + +- dedicated boolean test [`46e448f`](https://github.com/minimistjs/minimist/commit/46e448f9f513cfeb2bcc8b688b9b47ba1e515c2b) +- dedicated num test [`9bf2d36`](https://github.com/minimistjs/minimist/commit/9bf2d36f1d3b8795be90b8f7de0a937f098aa394) +- aliased values treated as strings [`1ab743b`](https://github.com/minimistjs/minimist/commit/1ab743bad4484d69f1259bed42f9531de01119de) +- cover the case of already numbers, at 100% coverage [`b2bb044`](https://github.com/minimistjs/minimist/commit/b2bb04436599d77a2ce029e8e555e25b3aa55d13) +- another test for higher coverage [`3662624`](https://github.com/minimistjs/minimist/commit/3662624be976d5489d486a856849c048d13be903) + +## [v0.0.9](https://github.com/minimistjs/minimist/compare/v0.0.8...v0.0.9) - 2014-05-08 + +### Commits + +- Eliminate `longest` fn. [`824f642`](https://github.com/minimistjs/minimist/commit/824f642038d1b02ede68b6261d1d65163390929a) + +## [v0.0.8](https://github.com/minimistjs/minimist/compare/v0.0.7...v0.0.8) - 2014-02-20 + +### Commits + +- return '' if flag is string and empty [`fa63ed4`](https://github.com/minimistjs/minimist/commit/fa63ed4651a4ef4eefddce34188e0d98d745a263) +- handle joined single letters [`66c248f`](https://github.com/minimistjs/minimist/commit/66c248f0241d4d421d193b022e9e365f11178534) + +## [v0.0.7](https://github.com/minimistjs/minimist/compare/v0.0.6...v0.0.7) - 2014-02-08 + +### Commits + +- another swap of .test for .match [`d1da408`](https://github.com/minimistjs/minimist/commit/d1da40819acbe846d89a5c02721211e3c1260dde) + +## [v0.0.6](https://github.com/minimistjs/minimist/compare/v0.0.5...v0.0.6) - 2014-02-08 + +### Commits + +- use .test() instead of .match() to not crash on non-string values in the arguments array [`7e0d1ad`](https://github.com/minimistjs/minimist/commit/7e0d1add8c9e5b9b20a4d3d0f9a94d824c578da1) + +## [v0.0.5](https://github.com/minimistjs/minimist/compare/v0.0.4...v0.0.5) - 2013-09-18 + +### Commits + +- Improve '--' handling. [`b11822c`](https://github.com/minimistjs/minimist/commit/b11822c09cc9d2460f30384d12afc0b953c037a4) + +## [v0.0.4](https://github.com/minimistjs/minimist/compare/v0.0.3...v0.0.4) - 2013-09-17 + +## [v0.0.3](https://github.com/minimistjs/minimist/compare/v0.0.2...v0.0.3) - 2013-09-12 + +### Commits + +- failing test for single dash preceeding a double dash [`b465514`](https://github.com/minimistjs/minimist/commit/b465514b82c9ae28972d714facd951deb2ad762b) +- fix for the dot test [`6a095f1`](https://github.com/minimistjs/minimist/commit/6a095f1d364c8fab2d6753d2291a0649315d297a) + +## [v0.0.2](https://github.com/minimistjs/minimist/compare/v0.0.1...v0.0.2) - 2013-08-28 + +### Commits + +- allow dotted aliases & defaults [`321c33e`](https://github.com/minimistjs/minimist/commit/321c33e755485faaeb44eeb1c05d33b2e0a5a7c4) +- use a better version of ff [`e40f611`](https://github.com/minimistjs/minimist/commit/e40f61114cf7be6f7947f7b3eed345853a67dbbb) + +## [v0.0.1](https://github.com/minimistjs/minimist/compare/v0.0.0...v0.0.1) - 2013-06-25 + +### Commits + +- remove trailing commas [`6ff0fa0`](https://github.com/minimistjs/minimist/commit/6ff0fa055064f15dbe06d50b89d5173a6796e1db) + +## v0.0.0 - 2013-06-25 + +### Commits + +- half of the parse test ported [`3079326`](https://github.com/minimistjs/minimist/commit/307932601325087de6cf94188eb798ffc4f3088a) +- stripped down code and a passing test from optimist [`7cced88`](https://github.com/minimistjs/minimist/commit/7cced88d82e399d1a03ed23eb667f04d3f320d10) +- ported parse tests completely over [`9448754`](https://github.com/minimistjs/minimist/commit/944875452e0820df6830b1408c26a0f7d3e1db04) +- docs, package.json [`a5bf46a`](https://github.com/minimistjs/minimist/commit/a5bf46ac9bb3bd114a9c340276c62c1091e538d5) +- move more short tests into short.js [`503edb5`](https://github.com/minimistjs/minimist/commit/503edb5c41d89c0d40831ee517154fc13b0f18b9) +- default bool test was wrong, not the code [`1b9f5db`](https://github.com/minimistjs/minimist/commit/1b9f5db4741b49962846081b68518de824992097) +- passing long tests ripped out of parse.js [`7972c4a`](https://github.com/minimistjs/minimist/commit/7972c4aff1f4803079e1668006658e2a761a0428) +- badges [`84c0370`](https://github.com/minimistjs/minimist/commit/84c037063664d42878aace715fe6572ce01b6f3b) +- all the tests now ported, some failures [`64239ed`](https://github.com/minimistjs/minimist/commit/64239edfe92c711c4eb0da254fcdfad2a5fdb605) +- failing short test [`f8a5341`](https://github.com/minimistjs/minimist/commit/f8a534112dd1138d2fad722def56a848480c446f) +- fixed the numeric test [`6b034f3`](https://github.com/minimistjs/minimist/commit/6b034f37c79342c60083ed97fd222e16928aac51) diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/README.md similarity index 71% rename from node_modules/minimist/readme.markdown rename to node_modules/minimist/README.md index 859d1ab45..30ff92dfb 100644 --- a/node_modules/minimist/readme.markdown +++ b/node_modules/minimist/README.md @@ -1,4 +1,11 @@ -# minimist +# minimist [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] parse argument options @@ -96,3 +103,15 @@ npm install minimist # license MIT + +[package-url]: https://npmjs.org/package/minimist +[npm-version-svg]: https://versionbadg.es/minimistjs/minimist.svg +[npm-badge-png]: https://nodei.co/npm/minimist.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/minimist.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/minimist.svg +[downloads-url]: https://npm-stat.com/charts.html?package=minimist +[codecov-image]: https://codecov.io/gh/minimistjs/minimist/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/minimistjs/minimist/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/minimistjs/minimist +[actions-url]: https://github.com/minimistjs/minimist/actions diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json index c22585335..89a639ede 100644 --- a/node_modules/minimist/package.json +++ b/node_modules/minimist/package.json @@ -1,16 +1,30 @@ { "name": "minimist", - "version": "1.2.6", + "version": "1.2.7", "description": "parse argument options", "main": "index.js", "devDependencies": { - "covert": "^1.0.0", - "tap": "~0.4.0", - "tape": "^3.5.0" + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" }, "scripts": { - "test": "tap test/*.js", - "coverage": "covert test/*.js" + "prepack": "npmignore --auto --commentLines=auto", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape test/*.js", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, "testling": { "files": "test/*.js", @@ -27,9 +41,9 @@ }, "repository": { "type": "git", - "url": "git://github.com/substack/minimist.git" + "url": "git://github.com/minimistjs/minimist.git" }, - "homepage": "https://github.com/substack/minimist", + "homepage": "https://github.com/minimistjs/minimist", "keywords": [ "argv", "getopt", @@ -41,5 +55,21 @@ "email": "mail@substack.net", "url": "http://substack.net" }, - "license": "MIT" + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } } diff --git a/node_modules/normalize-package-data/AUTHORS b/node_modules/normalize-package-data/AUTHORS deleted file mode 100644 index 66282ba1d..000000000 --- a/node_modules/normalize-package-data/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -# Names sorted by how much code was originally theirs. -Isaac Z. Schlueter -Meryn Stol -Robert Kowalski diff --git a/node_modules/normalize-package-data/LICENSE b/node_modules/normalize-package-data/LICENSE deleted file mode 100644 index 6ed662cd5..000000000 --- a/node_modules/normalize-package-data/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -This package contains code originally written by Isaac Z. Schlueter. -Used with permission. - -Copyright (c) Meryn Stol ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/normalize-package-data/README.md b/node_modules/normalize-package-data/README.md deleted file mode 100644 index d2bd7bc7f..000000000 --- a/node_modules/normalize-package-data/README.md +++ /dev/null @@ -1,106 +0,0 @@ -# normalize-package-data [![Build Status](https://travis-ci.org/npm/normalize-package-data.png?branch=master)](https://travis-ci.org/npm/normalize-package-data) - -normalize-package-data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry. - -normalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools. - -## Installation - -``` -npm install normalize-package-data -``` - -## Usage - -Basic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`. - -```javascript -normalizeData = require('normalize-package-data') -packageData = require("./package.json") -normalizeData(packageData) -// packageData is now normalized -``` - -#### Strict mode - -You may activate strict validation by passing true as the second argument. - -```javascript -normalizeData = require('normalize-package-data') -packageData = require("./package.json") -normalizeData(packageData, true) -// packageData is now normalized -``` - -If strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace. - -#### Warnings - -Optionally, you may pass a "warning" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data. - -```javascript -normalizeData = require('normalize-package-data') -packageData = require("./package.json") -warnFn = function(msg) { console.error(msg) } -normalizeData(packageData, warnFn) -// packageData is now normalized. Any number of warnings may have been logged. -``` - -You may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third. - -When `private` field is set to `true`, warnings will be suppressed. - -### Potential exceptions - -If the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback. - -## What normalization (currently) entails - -* The value of `name` field gets trimmed (unless in strict mode). -* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver). -* If `name` and/or `version` fields are missing, they are set to empty strings. -* If `files` field is not an array, it will be removed. -* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value. -* If `man` field is a string, it will become an array with the original string as its sole member. -* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\s+`. -* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties. -* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`. -* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs. -* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched. -* As of v2: Dependencies that point at known hosted git providers (currently: github, bitbucket, gitlab) will have their URLs canonicalized, but protocols will be preserved. -* As of v2: Dependencies that use shortcuts for hosted git providers (`org/proj`, `github:org/proj`, `bitbucket:org/proj`, `gitlab:org/proj`, `gist:docid`) will have the shortcut left in place. (In the case of github, the `org/proj` form will be expanded to `github:org/proj`.) THIS MARKS A BREAKING CHANGE FROM V1, where the shorcut was previously expanded to a URL. -* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. -* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`. -* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git+https://github.com/[owner-name]/[repo-name].git -* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value. -* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. -* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed. -* If `homepage` field is not a string, it will be removed. -* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`. -* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]#readme . If the repository field points to a GitHub Gist repo url, the associated http url is chosen. - -### Rules for name field - -If `name` field is given, the value of the name field must be a string. The string may not: - -* start with a period. -* contain the following characters: `/@\s+%` -* contain any characters that would need to be encoded for use in urls. -* resemble the word `node_modules` or `favicon.ico` (case doesn't matter). - -### Rules for version field - -If `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver). - -### Rules for license field - -The `license` field should be a valid *SPDX license expression* or one of the special values allowed by [validate-npm-package-license](https://npmjs.com/package/validate-npm-package-license). See [documentation for the license field in package.json](https://docs.npmjs.com/files/package.json#license). - -## Credits - -This package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson. - -## License - -normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). -Copyright (c) 2013 Meryn Stol diff --git a/node_modules/normalize-package-data/lib/extract_description.js b/node_modules/normalize-package-data/lib/extract_description.js deleted file mode 100644 index 83f10aa0a..000000000 --- a/node_modules/normalize-package-data/lib/extract_description.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = extractDescription - -// Extracts description from contents of a readme file in markdown format -function extractDescription (d) { - if (!d) return; - if (d === "ERROR: No README data found!") return; - // the first block of text before the first heading - // that isn't the first line heading - d = d.trim().split('\n') - for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++); - var l = d.length - for (var e = s + 1; e < l && d[e].trim(); e ++); - return d.slice(s, e).join(' ').trim() -} diff --git a/node_modules/normalize-package-data/lib/fixer.js b/node_modules/normalize-package-data/lib/fixer.js deleted file mode 100644 index 27682e961..000000000 --- a/node_modules/normalize-package-data/lib/fixer.js +++ /dev/null @@ -1,418 +0,0 @@ -var semver = require("semver") -var validateLicense = require('validate-npm-package-license'); -var hostedGitInfo = require("hosted-git-info") -var isBuiltinModule = require("resolve").isCore -var depTypes = ["dependencies","devDependencies","optionalDependencies"] -var extractDescription = require("./extract_description") -var url = require("url") -var typos = require("./typos.json") - -var fixer = module.exports = { - // default warning function - warn: function() {}, - - fixRepositoryField: function(data) { - if (data.repositories) { - this.warn("repositories"); - data.repository = data.repositories[0] - } - if (!data.repository) return this.warn("missingRepository") - if (typeof data.repository === "string") { - data.repository = { - type: "git", - url: data.repository - } - } - var r = data.repository.url || "" - if (r) { - var hosted = hostedGitInfo.fromUrl(r) - if (hosted) { - r = data.repository.url - = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString() - } - } - - if (r.match(/github.com\/[^\/]+\/[^\/]+\.git\.git$/)) { - this.warn("brokenGitUrl", r) - } - } - -, fixTypos: function(data) { - Object.keys(typos.topLevel).forEach(function (d) { - if (data.hasOwnProperty(d)) { - this.warn("typo", d, typos.topLevel[d]) - } - }, this) - } - -, fixScriptsField: function(data) { - if (!data.scripts) return - if (typeof data.scripts !== "object") { - this.warn("nonObjectScripts") - delete data.scripts - return - } - Object.keys(data.scripts).forEach(function (k) { - if (typeof data.scripts[k] !== "string") { - this.warn("nonStringScript") - delete data.scripts[k] - } else if (typos.script[k] && !data.scripts[typos.script[k]]) { - this.warn("typo", k, typos.script[k], "scripts") - } - }, this) - } - -, fixFilesField: function(data) { - var files = data.files - if (files && !Array.isArray(files)) { - this.warn("nonArrayFiles") - delete data.files - } else if (data.files) { - data.files = data.files.filter(function(file) { - if (!file || typeof file !== "string") { - this.warn("invalidFilename", file) - return false - } else { - return true - } - }, this) - } - } - -, fixBinField: function(data) { - if (!data.bin) return; - if (typeof data.bin === "string") { - var b = {} - var match - if (match = data.name.match(/^@[^/]+[/](.*)$/)) { - b[match[1]] = data.bin - } else { - b[data.name] = data.bin - } - data.bin = b - } - } - -, fixManField: function(data) { - if (!data.man) return; - if (typeof data.man === "string") { - data.man = [ data.man ] - } - } -, fixBundleDependenciesField: function(data) { - var bdd = "bundledDependencies" - var bd = "bundleDependencies" - if (data[bdd] && !data[bd]) { - data[bd] = data[bdd] - delete data[bdd] - } - if (data[bd] && !Array.isArray(data[bd])) { - this.warn("nonArrayBundleDependencies") - delete data[bd] - } else if (data[bd]) { - data[bd] = data[bd].filter(function(bd) { - if (!bd || typeof bd !== 'string') { - this.warn("nonStringBundleDependency", bd) - return false - } else { - if (!data.dependencies) { - data.dependencies = {} - } - if (!data.dependencies.hasOwnProperty(bd)) { - this.warn("nonDependencyBundleDependency", bd) - data.dependencies[bd] = "*" - } - return true - } - }, this) - } - } - -, fixDependencies: function(data, strict) { - var loose = !strict - objectifyDeps(data, this.warn) - addOptionalDepsToDeps(data, this.warn) - this.fixBundleDependenciesField(data) - - ;['dependencies','devDependencies'].forEach(function(deps) { - if (!(deps in data)) return - if (!data[deps] || typeof data[deps] !== "object") { - this.warn("nonObjectDependencies", deps) - delete data[deps] - return - } - Object.keys(data[deps]).forEach(function (d) { - var r = data[deps][d] - if (typeof r !== 'string') { - this.warn("nonStringDependency", d, JSON.stringify(r)) - delete data[deps][d] - } - var hosted = hostedGitInfo.fromUrl(data[deps][d]) - if (hosted) data[deps][d] = hosted.toString() - }, this) - }, this) - } - -, fixModulesField: function (data) { - if (data.modules) { - this.warn("deprecatedModules") - delete data.modules - } - } - -, fixKeywordsField: function (data) { - if (typeof data.keywords === "string") { - data.keywords = data.keywords.split(/,\s+/) - } - if (data.keywords && !Array.isArray(data.keywords)) { - delete data.keywords - this.warn("nonArrayKeywords") - } else if (data.keywords) { - data.keywords = data.keywords.filter(function(kw) { - if (typeof kw !== "string" || !kw) { - this.warn("nonStringKeyword"); - return false - } else { - return true - } - }, this) - } - } - -, fixVersionField: function(data, strict) { - // allow "loose" semver 1.0 versions in non-strict mode - // enforce strict semver 2.0 compliance in strict mode - var loose = !strict - if (!data.version) { - data.version = "" - return true - } - if (!semver.valid(data.version, loose)) { - throw new Error('Invalid version: "'+ data.version + '"') - } - data.version = semver.clean(data.version, loose) - return true - } - -, fixPeople: function(data) { - modifyPeople(data, unParsePerson) - modifyPeople(data, parsePerson) - } - -, fixNameField: function(data, options) { - if (typeof options === "boolean") options = {strict: options} - else if (typeof options === "undefined") options = {} - var strict = options.strict - if (!data.name && !strict) { - data.name = "" - return - } - if (typeof data.name !== "string") { - throw new Error("name field must be a string.") - } - if (!strict) - data.name = data.name.trim() - ensureValidName(data.name, strict, options.allowLegacyCase) - if (isBuiltinModule(data.name)) - this.warn("conflictingName", data.name) - } - - -, fixDescriptionField: function (data) { - if (data.description && typeof data.description !== 'string') { - this.warn("nonStringDescription") - delete data.description - } - if (data.readme && !data.description) - data.description = extractDescription(data.readme) - if(data.description === undefined) delete data.description; - if (!data.description) this.warn("missingDescription") - } - -, fixReadmeField: function (data) { - if (!data.readme) { - this.warn("missingReadme") - data.readme = "ERROR: No README data found!" - } - } - -, fixBugsField: function(data) { - if (!data.bugs && data.repository && data.repository.url) { - var hosted = hostedGitInfo.fromUrl(data.repository.url) - if(hosted && hosted.bugs()) { - data.bugs = {url: hosted.bugs()} - } - } - else if(data.bugs) { - var emailRe = /^.+@.*\..+$/ - if(typeof data.bugs == "string") { - if(emailRe.test(data.bugs)) - data.bugs = {email:data.bugs} - else if(url.parse(data.bugs).protocol) - data.bugs = {url: data.bugs} - else - this.warn("nonEmailUrlBugsString") - } - else { - bugsTypos(data.bugs, this.warn) - var oldBugs = data.bugs - data.bugs = {} - if(oldBugs.url) { - if(typeof(oldBugs.url) == "string" && url.parse(oldBugs.url).protocol) - data.bugs.url = oldBugs.url - else - this.warn("nonUrlBugsUrlField") - } - if(oldBugs.email) { - if(typeof(oldBugs.email) == "string" && emailRe.test(oldBugs.email)) - data.bugs.email = oldBugs.email - else - this.warn("nonEmailBugsEmailField") - } - } - if(!data.bugs.email && !data.bugs.url) { - delete data.bugs - this.warn("emptyNormalizedBugs") - } - } - } - -, fixHomepageField: function(data) { - if (!data.homepage && data.repository && data.repository.url) { - var hosted = hostedGitInfo.fromUrl(data.repository.url) - if (hosted && hosted.docs()) data.homepage = hosted.docs() - } - if (!data.homepage) return - - if(typeof data.homepage !== "string") { - this.warn("nonUrlHomepage") - return delete data.homepage - } - if(!url.parse(data.homepage).protocol) { - data.homepage = "http://" + data.homepage - } - } - -, fixLicenseField: function(data) { - if (!data.license) { - return this.warn("missingLicense") - } else{ - if ( - typeof(data.license) !== 'string' || - data.license.length < 1 || - data.license.trim() === '' - ) { - this.warn("invalidLicense") - } else { - if (!validateLicense(data.license).validForNewPackages) - this.warn("invalidLicense") - } - } - } -} - -function isValidScopedPackageName(spec) { - if (spec.charAt(0) !== '@') return false - - var rest = spec.slice(1).split('/') - if (rest.length !== 2) return false - - return rest[0] && rest[1] && - rest[0] === encodeURIComponent(rest[0]) && - rest[1] === encodeURIComponent(rest[1]) -} - -function isCorrectlyEncodedName(spec) { - return !spec.match(/[\/@\s\+%:]/) && - spec === encodeURIComponent(spec) -} - -function ensureValidName (name, strict, allowLegacyCase) { - if (name.charAt(0) === "." || - !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || - (strict && (!allowLegacyCase) && name !== name.toLowerCase()) || - name.toLowerCase() === "node_modules" || - name.toLowerCase() === "favicon.ico") { - throw new Error("Invalid name: " + JSON.stringify(name)) - } -} - -function modifyPeople (data, fn) { - if (data.author) data.author = fn(data.author) - ;["maintainers", "contributors"].forEach(function (set) { - if (!Array.isArray(data[set])) return; - data[set] = data[set].map(fn) - }) - return data -} - -function unParsePerson (person) { - if (typeof person === "string") return person - var name = person.name || "" - var u = person.url || person.web - var url = u ? (" ("+u+")") : "" - var e = person.email || person.mail - var email = e ? (" <"+e+">") : "" - return name+email+url -} - -function parsePerson (person) { - if (typeof person !== "string") return person - var name = person.match(/^([^\(<]+)/) - var url = person.match(/\(([^\)]+)\)/) - var email = person.match(/<([^>]+)>/) - var obj = {} - if (name && name[0].trim()) obj.name = name[0].trim() - if (email) obj.email = email[1]; - if (url) obj.url = url[1]; - return obj -} - -function addOptionalDepsToDeps (data, warn) { - var o = data.optionalDependencies - if (!o) return; - var d = data.dependencies || {} - Object.keys(o).forEach(function (k) { - d[k] = o[k] - }) - data.dependencies = d -} - -function depObjectify (deps, type, warn) { - if (!deps) return {} - if (typeof deps === "string") { - deps = deps.trim().split(/[\n\r\s\t ,]+/) - } - if (!Array.isArray(deps)) return deps - warn("deprecatedArrayDependencies", type) - var o = {} - deps.filter(function (d) { - return typeof d === "string" - }).forEach(function(d) { - d = d.trim().split(/(:?[@\s><=])/) - var dn = d.shift() - var dv = d.join("") - dv = dv.trim() - dv = dv.replace(/^@/, "") - o[dn] = dv - }) - return o -} - -function objectifyDeps (data, warn) { - depTypes.forEach(function (type) { - if (!data[type]) return; - data[type] = depObjectify(data[type], type, warn) - }) -} - -function bugsTypos(bugs, warn) { - if (!bugs) return - Object.keys(bugs).forEach(function (k) { - if (typos.bugs[k]) { - warn("typo", k, typos.bugs[k], "bugs") - bugs[typos.bugs[k]] = bugs[k] - delete bugs[k] - } - }) -} diff --git a/node_modules/normalize-package-data/lib/make_warning.js b/node_modules/normalize-package-data/lib/make_warning.js deleted file mode 100644 index 4ac74ad7c..000000000 --- a/node_modules/normalize-package-data/lib/make_warning.js +++ /dev/null @@ -1,23 +0,0 @@ -var util = require("util") -var messages = require("./warning_messages.json") - -module.exports = function() { - var args = Array.prototype.slice.call(arguments, 0) - var warningName = args.shift() - if (warningName == "typo") { - return makeTypoWarning.apply(null,args) - } - else { - var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'" - args.unshift(msgTemplate) - return util.format.apply(null, args) - } -} - -function makeTypoWarning (providedName, probableName, field) { - if (field) { - providedName = field + "['" + providedName + "']" - probableName = field + "['" + probableName + "']" - } - return util.format(messages.typo, providedName, probableName) -} diff --git a/node_modules/normalize-package-data/lib/normalize.js b/node_modules/normalize-package-data/lib/normalize.js deleted file mode 100644 index bd1bfef12..000000000 --- a/node_modules/normalize-package-data/lib/normalize.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = normalize - -var fixer = require("./fixer") -normalize.fixer = fixer - -var makeWarning = require("./make_warning") - -var fieldsToFix = ['name','version','description','repository','modules','scripts' - ,'files','bin','man','bugs','keywords','readme','homepage','license'] -var otherThingsToFix = ['dependencies','people', 'typos'] - -var thingsToFix = fieldsToFix.map(function(fieldName) { - return ucFirst(fieldName) + "Field" -}) -// two ways to do this in CoffeeScript on only one line, sub-70 chars: -// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field" -// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix) -thingsToFix = thingsToFix.concat(otherThingsToFix) - -function normalize (data, warn, strict) { - if(warn === true) warn = null, strict = true - if(!strict) strict = false - if(!warn || data.private) warn = function(msg) { /* noop */ } - - if (data.scripts && - data.scripts.install === "node-gyp rebuild" && - !data.scripts.preinstall) { - data.gypfile = true - } - fixer.warn = function() { warn(makeWarning.apply(null, arguments)) } - thingsToFix.forEach(function(thingName) { - fixer["fix" + ucFirst(thingName)](data, strict) - }) - data._id = data.name + "@" + data.version -} - -function ucFirst (string) { - return string.charAt(0).toUpperCase() + string.slice(1); -} diff --git a/node_modules/normalize-package-data/lib/safe_format.js b/node_modules/normalize-package-data/lib/safe_format.js deleted file mode 100644 index b07f1006d..000000000 --- a/node_modules/normalize-package-data/lib/safe_format.js +++ /dev/null @@ -1,9 +0,0 @@ -var util = require('util') - -module.exports = function() { - var args = Array.prototype.slice.call(arguments, 0) - args.forEach(function(arg) { - if (!arg) throw new TypeError('Bad arguments.') - }) - return util.format.apply(null, arguments) -} diff --git a/node_modules/normalize-package-data/lib/typos.json b/node_modules/normalize-package-data/lib/typos.json deleted file mode 100644 index 7f9dd283b..000000000 --- a/node_modules/normalize-package-data/lib/typos.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "topLevel": { - "dependancies": "dependencies" - ,"dependecies": "dependencies" - ,"depdenencies": "dependencies" - ,"devEependencies": "devDependencies" - ,"depends": "dependencies" - ,"dev-dependencies": "devDependencies" - ,"devDependences": "devDependencies" - ,"devDepenencies": "devDependencies" - ,"devdependencies": "devDependencies" - ,"repostitory": "repository" - ,"repo": "repository" - ,"prefereGlobal": "preferGlobal" - ,"hompage": "homepage" - ,"hampage": "homepage" - ,"autohr": "author" - ,"autor": "author" - ,"contributers": "contributors" - ,"publicationConfig": "publishConfig" - ,"script": "scripts" - }, - "bugs": { "web": "url", "name": "url" }, - "script": { "server": "start", "tests": "test" } -} diff --git a/node_modules/normalize-package-data/lib/warning_messages.json b/node_modules/normalize-package-data/lib/warning_messages.json deleted file mode 100644 index 4890f506e..000000000 --- a/node_modules/normalize-package-data/lib/warning_messages.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "repositories": "'repositories' (plural) Not supported. Please pick one as the 'repository' field" - ,"missingRepository": "No repository field." - ,"brokenGitUrl": "Probably broken git url: %s" - ,"nonObjectScripts": "scripts must be an object" - ,"nonStringScript": "script values must be string commands" - ,"nonArrayFiles": "Invalid 'files' member" - ,"invalidFilename": "Invalid filename in 'files' list: %s" - ,"nonArrayBundleDependencies": "Invalid 'bundleDependencies' list. Must be array of package names" - ,"nonStringBundleDependency": "Invalid bundleDependencies member: %s" - ,"nonDependencyBundleDependency": "Non-dependency in bundleDependencies: %s" - ,"nonObjectDependencies": "%s field must be an object" - ,"nonStringDependency": "Invalid dependency: %s %s" - ,"deprecatedArrayDependencies": "specifying %s as array is deprecated" - ,"deprecatedModules": "modules field is deprecated" - ,"nonArrayKeywords": "keywords should be an array of strings" - ,"nonStringKeyword": "keywords should be an array of strings" - ,"conflictingName": "%s is also the name of a node core module." - ,"nonStringDescription": "'description' field should be a string" - ,"missingDescription": "No description" - ,"missingReadme": "No README data" - ,"missingLicense": "No license field." - ,"nonEmailUrlBugsString": "Bug string field must be url, email, or {email,url}" - ,"nonUrlBugsUrlField": "bugs.url field must be a string url. Deleted." - ,"nonEmailBugsEmailField": "bugs.email field must be a string email. Deleted." - ,"emptyNormalizedBugs": "Normalized value of bugs field is an empty object. Deleted." - ,"nonUrlHomepage": "homepage field must be a string url. Deleted." - ,"invalidLicense": "license should be a valid SPDX license expression" - ,"typo": "%s should probably be %s." -} diff --git a/node_modules/normalize-package-data/node_modules/.bin/semver b/node_modules/normalize-package-data/node_modules/.bin/semver deleted file mode 120000 index 317eb293d..000000000 --- a/node_modules/normalize-package-data/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/node_modules/normalize-package-data/package.json b/node_modules/normalize-package-data/package.json deleted file mode 100644 index dea34bb7f..000000000 --- a/node_modules/normalize-package-data/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "normalize-package-data", - "version": "2.5.0", - "author": "Meryn Stol ", - "description": "Normalizes data that can be found in package.json files.", - "license": "BSD-2-Clause", - "repository": { - "type": "git", - "url": "git://github.com/npm/normalize-package-data.git" - }, - "main": "lib/normalize.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "devDependencies": { - "async": "^2.6.1", - "tap": "^12.4.0", - "underscore": "^1.8.3" - }, - "files": [ - "lib/*.js", - "lib/*.json", - "AUTHORS" - ] -} diff --git a/node_modules/object-inspect/.eslintignore b/node_modules/object-inspect/.eslintignore deleted file mode 100644 index 404abb221..000000000 --- a/node_modules/object-inspect/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/object-inspect/.eslintrc b/node_modules/object-inspect/.eslintrc index 8a2d30ecf..21f903923 100644 --- a/node_modules/object-inspect/.eslintrc +++ b/node_modules/object-inspect/.eslintrc @@ -12,25 +12,14 @@ "max-statements-per-line": [2, { "max": 2 }], "no-magic-numbers": 0, "no-param-reassign": 1, - "operator-linebreak": [2, "before"], "strict": 0, // TODO }, - "globals": { - "BigInt": false, - "WeakSet": false, - "WeakMap": false, - }, "overrides": [ { "files": ["test/**", "test-*", "example/**"], + "extends": "@ljharb/eslint-config/tests", "rules": { - "array-bracket-newline": 0, "id-length": 0, - "max-params": 0, - "max-statements": 0, - "max-statements-per-line": 0, - "object-curly-newline": 0, - "sort-keys": 0, }, }, { diff --git a/node_modules/object-inspect/CHANGELOG.md b/node_modules/object-inspect/CHANGELOG.md new file mode 100644 index 000000000..d42237c6d --- /dev/null +++ b/node_modules/object-inspect/CHANGELOG.md @@ -0,0 +1,370 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.12.3](https://github.com/inspect-js/object-inspect/compare/v1.12.2...v1.12.3) - 2023-01-12 + +### Commits + +- [Fix] in eg FF 24, collections lack forEach [`75fc226`](https://github.com/inspect-js/object-inspect/commit/75fc22673c82d45f28322b1946bb0eb41b672b7f) +- [actions] update rebase action to use reusable workflow [`250a277`](https://github.com/inspect-js/object-inspect/commit/250a277a095e9dacc029ab8454dcfc15de549dcd) +- [Dev Deps] update `aud`, `es-value-fixtures`, `tape` [`66a19b3`](https://github.com/inspect-js/object-inspect/commit/66a19b3209ccc3c5ef4b34c3cb0160e65d1ce9d5) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `error-cause` [`c43d332`](https://github.com/inspect-js/object-inspect/commit/c43d3324b48384a16fd3dc444e5fc589d785bef3) +- [Tests] add `@pkgjs/support` to `postlint` [`e2618d2`](https://github.com/inspect-js/object-inspect/commit/e2618d22a7a3fa361b6629b53c1752fddc9c4d80) + +## [v1.12.2](https://github.com/inspect-js/object-inspect/compare/v1.12.1...v1.12.2) - 2022-05-26 + +### Commits + +- [Fix] use `util.inspect` for a custom inspection symbol method [`e243bf2`](https://github.com/inspect-js/object-inspect/commit/e243bf2eda6c4403ac6f1146fddb14d12e9646c1) +- [meta] add support info [`ca20ba3`](https://github.com/inspect-js/object-inspect/commit/ca20ba35713c17068ca912a86c542f5e8acb656c) +- [Fix] ignore `cause` in node v16.9 and v16.10 where it has a bug [`86aa553`](https://github.com/inspect-js/object-inspect/commit/86aa553a4a455562c2c56f1540f0bf857b9d314b) + +## [v1.12.1](https://github.com/inspect-js/object-inspect/compare/v1.12.0...v1.12.1) - 2022-05-21 + +### Commits + +- [Tests] use `mock-property` [`4ec8893`](https://github.com/inspect-js/object-inspect/commit/4ec8893ea9bfd28065ca3638cf6762424bf44352) +- [meta] use `npmignore` to autogenerate an npmignore file [`07f868c`](https://github.com/inspect-js/object-inspect/commit/07f868c10bd25a9d18686528339bb749c211fc9a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`b05244b`](https://github.com/inspect-js/object-inspect/commit/b05244b4f331e00c43b3151bc498041be77ccc91) +- [Dev Deps] update `@ljharb/eslint-config`, `error-cause`, `es-value-fixtures`, `functions-have-names`, `tape` [`d037398`](https://github.com/inspect-js/object-inspect/commit/d037398dcc5d531532e4c19c4a711ed677f579c1) +- [Fix] properly handle callable regexes in older engines [`848fe48`](https://github.com/inspect-js/object-inspect/commit/848fe48bd6dd0064ba781ee6f3c5e54a94144c37) + +## [v1.12.0](https://github.com/inspect-js/object-inspect/compare/v1.11.1...v1.12.0) - 2021-12-18 + +### Commits + +- [New] add `numericSeparator` boolean option [`2d2d537`](https://github.com/inspect-js/object-inspect/commit/2d2d537f5359a4300ce1c10241369f8024f89e11) +- [Robustness] cache more prototype methods [`191533d`](https://github.com/inspect-js/object-inspect/commit/191533da8aec98a05eadd73a5a6e979c9c8653e8) +- [New] ensure an Error’s `cause` is displayed [`53bc2ce`](https://github.com/inspect-js/object-inspect/commit/53bc2cee4e5a9cc4986f3cafa22c0685f340715e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`bc164b6`](https://github.com/inspect-js/object-inspect/commit/bc164b6e2e7d36b263970f16f54de63048b84a36) +- [Robustness] cache `RegExp.prototype.test` [`a314ab8`](https://github.com/inspect-js/object-inspect/commit/a314ab8271b905cbabc594c82914d2485a8daf12) +- [meta] fix auto-changelog settings [`5ed0983`](https://github.com/inspect-js/object-inspect/commit/5ed0983be72f73e32e2559997517a95525c7e20d) + +## [v1.11.1](https://github.com/inspect-js/object-inspect/compare/v1.11.0...v1.11.1) - 2021-12-05 + +### Commits + +- [meta] add `auto-changelog` [`7dbdd22`](https://github.com/inspect-js/object-inspect/commit/7dbdd228401d6025d8b7391476d88aee9ea9bbdf) +- [actions] reuse common workflows [`c8823bc`](https://github.com/inspect-js/object-inspect/commit/c8823bc0a8790729680709d45fb6e652432e91aa) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`7532b12`](https://github.com/inspect-js/object-inspect/commit/7532b120598307497b712890f75af8056f6d37a6) +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`94abb5d`](https://github.com/inspect-js/object-inspect/commit/94abb5d4e745bf33253942dea86b3e538d2ff6c6) +- [actions] update codecov uploader [`5ed5102`](https://github.com/inspect-js/object-inspect/commit/5ed51025267a00e53b1341357315490ac4eb0874) +- [Dev Deps] update `eslint`, `tape` [`37b2ad2`](https://github.com/inspect-js/object-inspect/commit/37b2ad26c08d94bfd01d5d07069a0b28ef4e2ad7) +- [meta] add `sideEffects` flag [`d341f90`](https://github.com/inspect-js/object-inspect/commit/d341f905ef8bffa6a694cda6ddc5ba343532cd4f) + +## [v1.11.0](https://github.com/inspect-js/object-inspect/compare/v1.10.3...v1.11.0) - 2021-07-12 + +### Commits + +- [New] `customInspect`: add `symbol` option, to mimic modern util.inspect behavior [`e973a6e`](https://github.com/inspect-js/object-inspect/commit/e973a6e21f8140c5837cf25e9d89bdde88dc3120) +- [Dev Deps] update `eslint` [`05f1cb3`](https://github.com/inspect-js/object-inspect/commit/05f1cb3cbcfe1f238e8b51cf9bc294305b7ed793) + +## [v1.10.3](https://github.com/inspect-js/object-inspect/compare/v1.10.2...v1.10.3) - 2021-05-07 + +### Commits + +- [Fix] handle core-js Symbol shams [`4acfc2c`](https://github.com/inspect-js/object-inspect/commit/4acfc2c4b503498759120eb517abad6d51c9c5d6) +- [readme] update badges [`95c323a`](https://github.com/inspect-js/object-inspect/commit/95c323ad909d6cbabb95dd6015c190ba6db9c1f2) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`cb38f48`](https://github.com/inspect-js/object-inspect/commit/cb38f485de6ec7a95109b5a9bbd0a1deba2f6611) + +## [v1.10.2](https://github.com/inspect-js/object-inspect/compare/v1.10.1...v1.10.2) - 2021-04-17 + +### Commits + +- [Fix] use a robust check for a boxed Symbol [`87f12d6`](https://github.com/inspect-js/object-inspect/commit/87f12d6e69ce530be04659c81a4cd502943acac5) + +## [v1.10.1](https://github.com/inspect-js/object-inspect/compare/v1.10.0...v1.10.1) - 2021-04-17 + +### Commits + +- [Fix] use a robust check for a boxed bigint [`d5ca829`](https://github.com/inspect-js/object-inspect/commit/d5ca8298b6d2e5c7b9334a5b21b96ed95d225c91) + +## [v1.10.0](https://github.com/inspect-js/object-inspect/compare/v1.9.0...v1.10.0) - 2021-04-17 + +### Commits + +- [Tests] increase coverage [`d8abb8a`](https://github.com/inspect-js/object-inspect/commit/d8abb8a62c2f084919df994a433b346e0d87a227) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`4bfec2e`](https://github.com/inspect-js/object-inspect/commit/4bfec2e30aaef6ddef6cbb1448306f9f8b9520b7) +- [New] respect `Symbol.toStringTag` on objects [`799b58f`](https://github.com/inspect-js/object-inspect/commit/799b58f536a45e4484633a8e9daeb0330835f175) +- [Fix] do not allow Symbol.toStringTag to masquerade as builtins [`d6c5b37`](https://github.com/inspect-js/object-inspect/commit/d6c5b37d7e94427796b82432fb0c8964f033a6ab) +- [New] add `WeakRef` support [`b6d898e`](https://github.com/inspect-js/object-inspect/commit/b6d898ee21868c780a7ee66b28532b5b34ed7f09) +- [meta] do not publish github action workflow files [`918cdfc`](https://github.com/inspect-js/object-inspect/commit/918cdfc4b6fe83f559ff6ef04fe66201e3ff5cbd) +- [meta] create `FUNDING.yml` [`0bb5fc5`](https://github.com/inspect-js/object-inspect/commit/0bb5fc516dbcd2cd728bd89cee0b580acc5ce301) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`22c8dc0`](https://github.com/inspect-js/object-inspect/commit/22c8dc0cac113d70f4781e49a950070923a671be) +- [meta] use `prepublishOnly` script for npm 7+ [`e52ee09`](https://github.com/inspect-js/object-inspect/commit/e52ee09e8050b8dbac94ef57f786675567728223) +- [Dev Deps] update `eslint` [`7c4e6fd`](https://github.com/inspect-js/object-inspect/commit/7c4e6fdedcd27cc980e13c9ad834d05a96f3d40c) + +## [v1.9.0](https://github.com/inspect-js/object-inspect/compare/v1.8.0...v1.9.0) - 2020-11-30 + +### Commits + +- [Tests] migrate tests to Github Actions [`d262251`](https://github.com/inspect-js/object-inspect/commit/d262251e13e16d3490b5473672f6b6d6ff86675d) +- [New] add enumerable own Symbols to plain object output [`ee60c03`](https://github.com/inspect-js/object-inspect/commit/ee60c033088cff9d33baa71e59a362a541b48284) +- [Tests] add passing tests [`01ac3e4`](https://github.com/inspect-js/object-inspect/commit/01ac3e4b5a30f97875a63dc9b1416b3bd626afc9) +- [actions] add "Require Allow Edits" action [`c2d7746`](https://github.com/inspect-js/object-inspect/commit/c2d774680cde4ca4af332d84d4121b26f798ba9e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js` [`70058de`](https://github.com/inspect-js/object-inspect/commit/70058de1579fc54d1d15ed6c2dbe246637ce70ff) +- [Fix] hex characters in strings should be uppercased, to match node `assert` [`6ab8faa`](https://github.com/inspect-js/object-inspect/commit/6ab8faaa0abc08fe7a8e2afd8b39c6f1f0e00113) +- [Tests] run `nyc` on all tests [`4c47372`](https://github.com/inspect-js/object-inspect/commit/4c473727879ddc8e28b599202551ddaaf07b6210) +- [Tests] node 0.8 has an unpredictable property order; fix `groups` test by removing property [`f192069`](https://github.com/inspect-js/object-inspect/commit/f192069a978a3b60e6f0e0d45ac7df260ab9a778) +- [New] add enumerable properties to Function inspect result, per node’s `assert` [`fd38e1b`](https://github.com/inspect-js/object-inspect/commit/fd38e1bc3e2a1dc82091ce3e021917462eee64fc) +- [Tests] fix tests for node < 10, due to regex match `groups` [`2ac6462`](https://github.com/inspect-js/object-inspect/commit/2ac6462cc4f72eaa0b63a8cfee9aabe3008b2330) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`44b59e2`](https://github.com/inspect-js/object-inspect/commit/44b59e2676a7f825ef530dfd19dafb599e3b9456) +- [Robustness] cache `Symbol.prototype.toString` [`f3c2074`](https://github.com/inspect-js/object-inspect/commit/f3c2074d8f32faf8292587c07c9678ea931703dd) +- [Dev Deps] update `eslint` [`9411294`](https://github.com/inspect-js/object-inspect/commit/94112944b9245e3302e25453277876402d207e7f) +- [meta] `require-allow-edits` no longer requires an explicit github token [`36c0220`](https://github.com/inspect-js/object-inspect/commit/36c02205de3c2b0e84d53777c5c9fd54a36c48ab) +- [actions] update rebase checkout action to v2 [`55a39a6`](https://github.com/inspect-js/object-inspect/commit/55a39a64e944f19c6a7d8efddf3df27700f20d14) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f59fd3c`](https://github.com/inspect-js/object-inspect/commit/f59fd3cf406c3a7c7ece140904a80bbc6bacfcca) +- [Dev Deps] update `eslint` [`a492bec`](https://github.com/inspect-js/object-inspect/commit/a492becec644b0155c9c4bc1caf6f9fac11fb2c7) + +## [v1.8.0](https://github.com/inspect-js/object-inspect/compare/v1.7.0...v1.8.0) - 2020-06-18 + +### Fixed + +- [New] add `indent` option [`#27`](https://github.com/inspect-js/object-inspect/issues/27) + +### Commits + +- [Tests] add codecov [`4324cbb`](https://github.com/inspect-js/object-inspect/commit/4324cbb1a2bd7710822a4151ff373570db22453e) +- [New] add `maxStringLength` option [`b3995cb`](https://github.com/inspect-js/object-inspect/commit/b3995cb71e15b5ee127a3094c43994df9d973502) +- [New] add `customInspect` option, to disable custom inspect methods [`28b9179`](https://github.com/inspect-js/object-inspect/commit/28b9179ee802bb3b90810100c11637db90c2fb6d) +- [Tests] add Date and RegExp tests [`3b28eca`](https://github.com/inspect-js/object-inspect/commit/3b28eca57b0367aeadffac604ea09e8bdae7d97b) +- [actions] add automatic rebasing / merge commit blocking [`0d9c6c0`](https://github.com/inspect-js/object-inspect/commit/0d9c6c044e83475ff0bfffb9d35b149834c83a2e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape`; add `aud` [`7c204f2`](https://github.com/inspect-js/object-inspect/commit/7c204f22b9e41bc97147f4d32d4cb045b17769a6) +- [readme] fix repo URLs, remove testling [`34ca9a0`](https://github.com/inspect-js/object-inspect/commit/34ca9a0dabfe75bd311f806a326fadad029909a3) +- [Fix] when truncating a deep array, note it as `[Array]` instead of just `[Object]` [`f74c82d`](https://github.com/inspect-js/object-inspect/commit/f74c82dd0b35386445510deb250f34c41be3ec0e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1a8a5ea`](https://github.com/inspect-js/object-inspect/commit/1a8a5ea069ea2bee89d77caedad83ffa23d35711) +- [Fix] do not be fooled by a function’s own `toString` method [`7cb5c65`](https://github.com/inspect-js/object-inspect/commit/7cb5c657a976f94715c19c10556a30f15bb7d5d7) +- [patch] indicate explicitly that anon functions are anonymous, to match node [`81ebdd4`](https://github.com/inspect-js/object-inspect/commit/81ebdd4215005144074bbdff3f6bafa01407910a) +- [Dev Deps] loosen the `core-js` dep [`e7472e8`](https://github.com/inspect-js/object-inspect/commit/e7472e8e242117670560bd995830c2a4d12080f5) +- [Dev Deps] update `tape` [`699827e`](https://github.com/inspect-js/object-inspect/commit/699827e6b37258b5203c33c78c009bf4b0e6a66d) +- [meta] add `safe-publish-latest` [`c5d2868`](https://github.com/inspect-js/object-inspect/commit/c5d2868d6eb33c472f37a20f89ceef2787046088) +- [Dev Deps] update `@ljharb/eslint-config` [`9199501`](https://github.com/inspect-js/object-inspect/commit/919950195d486114ccebacbdf9d74d7f382693b0) + +## [v1.7.0](https://github.com/inspect-js/object-inspect/compare/v1.6.0...v1.7.0) - 2019-11-10 + +### Commits + +- [Tests] use shared travis-ci configs [`19899ed`](https://github.com/inspect-js/object-inspect/commit/19899edbf31f4f8809acf745ce34ad1ce1bfa63b) +- [Tests] add linting [`a00f057`](https://github.com/inspect-js/object-inspect/commit/a00f057d917f66ea26dd37769c6b810ec4af97e8) +- [Tests] lint last file [`2698047`](https://github.com/inspect-js/object-inspect/commit/2698047b58af1e2e88061598ef37a75f228dddf6) +- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`589e87a`](https://github.com/inspect-js/object-inspect/commit/589e87a99cadcff4b600e6a303418e9d922836e8) +- [New] add support for `WeakMap` and `WeakSet` [`3ddb3e4`](https://github.com/inspect-js/object-inspect/commit/3ddb3e4e0c8287130c61a12e0ed9c104b1549306) +- [meta] clean up license so github can detect it properly [`27527bb`](https://github.com/inspect-js/object-inspect/commit/27527bb801520c9610c68cc3b55d6f20a2bee56d) +- [Tests] cover `util.inspect.custom` [`36d47b9`](https://github.com/inspect-js/object-inspect/commit/36d47b9c59056a57ef2f1491602c726359561800) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape` [`b614eaa`](https://github.com/inspect-js/object-inspect/commit/b614eaac901da0e5c69151f534671f990a94cace) +- [Tests] fix coverage thresholds [`7b7b176`](https://github.com/inspect-js/object-inspect/commit/7b7b176e15f8bd6e8b2f261ff5a493c2fe78d9c2) +- [Tests] bigint tests now can run on unflagged node [`063af31`](https://github.com/inspect-js/object-inspect/commit/063af31ce9cd13c202e3b67c07ba06dc9b7c0f81) +- [Refactor] add early bailout to `isMap` and `isSet` checks [`fc51047`](https://github.com/inspect-js/object-inspect/commit/fc5104714a3671d37e225813db79470d6335683b) +- [meta] add `funding` field [`7f9953a`](https://github.com/inspect-js/object-inspect/commit/7f9953a113eec7b064a6393cf9f90ba15f1d131b) +- [Tests] Fix invalid strict-mode syntax with hexadecimal [`a8b5425`](https://github.com/inspect-js/object-inspect/commit/a8b542503b4af1599a275209a1a99f5fdedb1ead) +- [Dev Deps] update `@ljharb/eslint-config` [`98df157`](https://github.com/inspect-js/object-inspect/commit/98df1577314d9188a3fc3f17fdcf2fba697ae1bd) +- add copyright to LICENSE [`bb69fd0`](https://github.com/inspect-js/object-inspect/commit/bb69fd017a062d299e44da1f9b2c7dcd67f621e6) +- [Tests] use `npx aud` in `posttest` [`4838353`](https://github.com/inspect-js/object-inspect/commit/4838353593974cf7f905b9ef04c03c094f0cdbe2) +- [Tests] move `0.6` to allowed failures, because it won‘t build on travis [`1bff32a`](https://github.com/inspect-js/object-inspect/commit/1bff32aa52e8aea687f0856b28ba754b3e43ebf7) + +## [v1.6.0](https://github.com/inspect-js/object-inspect/compare/v1.5.0...v1.6.0) - 2018-05-02 + +### Commits + +- [New] add support for boxed BigInt primitives [`356c66a`](https://github.com/inspect-js/object-inspect/commit/356c66a410e7aece7162c8319880a5ef647beaa9) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`c77b65b`](https://github.com/inspect-js/object-inspect/commit/c77b65bba593811b906b9ec57561c5cba92e2db3) +- [New] Add support for upcoming `BigInt` [`1ac548e`](https://github.com/inspect-js/object-inspect/commit/1ac548e4b27e26466c28c9a5e63e5d4e0591c31f) +- [Tests] run bigint tests in CI with --harmony-bigint flag [`d31b738`](https://github.com/inspect-js/object-inspect/commit/d31b73831880254b5c6cf5691cda9a149fbc5f04) +- [Dev Deps] update `core-js`, `tape` [`ff9eff6`](https://github.com/inspect-js/object-inspect/commit/ff9eff67113341ee1aaf80c1c22d683f43bfbccf) +- [Docs] fix example to use `safer-buffer` [`48cae12`](https://github.com/inspect-js/object-inspect/commit/48cae12a73ec6cacc955175bc56bbe6aee6a211f) + +## [v1.5.0](https://github.com/inspect-js/object-inspect/compare/v1.4.1...v1.5.0) - 2017-12-25 + +### Commits + +- [New] add `quoteStyle` option [`f5a72d2`](https://github.com/inspect-js/object-inspect/commit/f5a72d26edb3959b048f74c056ca7100a6b091e4) +- [Tests] add more test coverage [`30ebe4e`](https://github.com/inspect-js/object-inspect/commit/30ebe4e1fa943b99ecbb85be7614256d536e2759) +- [Tests] require 0.6 to pass [`99a008c`](https://github.com/inspect-js/object-inspect/commit/99a008ccace189a60fd7da18bf00e32c9572b980) + +## [v1.4.1](https://github.com/inspect-js/object-inspect/compare/v1.4.0...v1.4.1) - 2017-12-19 + +### Commits + +- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12` [`6674476`](https://github.com/inspect-js/object-inspect/commit/6674476cc56acaac1bde96c84fed5ef631911906) +- [Fix] `inspect(Object(-0))` should be “Object(-0)”, not “Object(0)” [`d0a031f`](https://github.com/inspect-js/object-inspect/commit/d0a031f1cbb3024ee9982bfe364dd18a7e4d1bd3) + +## [v1.4.0](https://github.com/inspect-js/object-inspect/compare/v1.3.0...v1.4.0) - 2017-10-24 + +### Commits + +- [Tests] add `npm run coverage` [`3b48fb2`](https://github.com/inspect-js/object-inspect/commit/3b48fb25db037235eeb808f0b2830aad7aa36f70) +- [Tests] remove commented-out osx builds [`71e24db`](https://github.com/inspect-js/object-inspect/commit/71e24db8ad6ee3b9b381c5300b0475f2ba595a73) +- [New] add support for `util.inspect.custom`, in node only. [`20cca77`](https://github.com/inspect-js/object-inspect/commit/20cca7762d7e17f15b21a90793dff84acce155df) +- [Tests] up to `node` `v8.6`; use `nvm install-latest-npm` to ensure new npm doesn’t break old node [`252952d`](https://github.com/inspect-js/object-inspect/commit/252952d230d8065851dd3d4d5fe8398aae068529) +- [Tests] up to `node` `v8.8` [`4aa868d`](https://github.com/inspect-js/object-inspect/commit/4aa868d3a62914091d489dd6ec6eed194ee67cd3) +- [Dev Deps] update `core-js`, `tape` [`59483d1`](https://github.com/inspect-js/object-inspect/commit/59483d1df418f852f51fa0db7b24aa6b0209a27a) + +## [v1.3.0](https://github.com/inspect-js/object-inspect/compare/v1.2.2...v1.3.0) - 2017-07-31 + +### Fixed + +- [Fix] Map/Set: work around core-js bug < v2.5.0 [`#9`](https://github.com/inspect-js/object-inspect/issues/9) + +### Commits + +- [New] add support for arrays with additional object keys [`0d19937`](https://github.com/inspect-js/object-inspect/commit/0d199374ee37959e51539616666f420ccb29acb9) +- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`; fix new npm breaking on older nodes [`e24784a`](https://github.com/inspect-js/object-inspect/commit/e24784a90c49117787157a12a63897c49cf89bbb) +- Only apps should have lockfiles [`c6faebc`](https://github.com/inspect-js/object-inspect/commit/c6faebcb2ee486a889a4a1c4d78c0776c7576185) +- [Dev Deps] update `tape` [`7345a0a`](https://github.com/inspect-js/object-inspect/commit/7345a0aeba7e91b888a079c10004d17696a7f586) + +## [v1.2.2](https://github.com/inspect-js/object-inspect/compare/v1.2.1...v1.2.2) - 2017-03-24 + +### Commits + +- [Tests] up to `node` `v7.7`, `v6.10`, `v4.8`; improve test matrix [`a2ddc15`](https://github.com/inspect-js/object-inspect/commit/a2ddc15a1f2c65af18076eea1c0eb9cbceb478a0) +- [Tests] up to `node` `v7.0`, `v6.9`, `v5.12`, `v4.6`, `io.js` `v3.3`; improve test matrix [`a48949f`](https://github.com/inspect-js/object-inspect/commit/a48949f6b574b2d4d2298109d8e8d0eb3e7a83e7) +- [Performance] check for primitive types as early as possible. [`3b8092a`](https://github.com/inspect-js/object-inspect/commit/3b8092a2a4deffd0575f94334f00194e2d48dad3) +- [Refactor] remove unneeded `else`s. [`7255034`](https://github.com/inspect-js/object-inspect/commit/725503402e08de4f96f6bf2d8edef44ac36f26b6) +- [Refactor] avoid recreating `lowbyte` function every time. [`81edd34`](https://github.com/inspect-js/object-inspect/commit/81edd3475bd15bdd18e84de7472033dcf5004aaa) +- [Fix] differentiate -0 from 0 [`521d345`](https://github.com/inspect-js/object-inspect/commit/521d3456b009da7bf1c5785c8a9df5a9f8718264) +- [Refactor] move object key gathering into separate function [`aca6265`](https://github.com/inspect-js/object-inspect/commit/aca626536eaeef697196c6e9db3e90e7e0355b6a) +- [Refactor] consolidate wrapping logic for boxed primitives into a function. [`4e440cd`](https://github.com/inspect-js/object-inspect/commit/4e440cd9065df04802a2a1dead03f48c353ca301) +- [Robustness] use `typeof` instead of comparing to literal `undefined` [`5ca6f60`](https://github.com/inspect-js/object-inspect/commit/5ca6f601937506daff8ed2fcf686363b55807b69) +- [Refactor] consolidate Map/Set notations. [`4e576e5`](https://github.com/inspect-js/object-inspect/commit/4e576e5d7ed2f9ec3fb7f37a0d16732eb10758a9) +- [Tests] ensure that this function remains anonymous, despite ES6 name inference. [`7540ae5`](https://github.com/inspect-js/object-inspect/commit/7540ae591278756db614fa4def55ca413150e1a3) +- [Refactor] explicitly coerce Error objects to strings. [`7f4ca84`](https://github.com/inspect-js/object-inspect/commit/7f4ca8424ee8dc2c0ca5a422d94f7fac40327261) +- [Refactor] split up `var` declarations for debuggability [`6f2c11e`](https://github.com/inspect-js/object-inspect/commit/6f2c11e6a85418586a00292dcec5e97683f89bc3) +- [Robustness] cache `Object.prototype.toString` [`df44a20`](https://github.com/inspect-js/object-inspect/commit/df44a20adfccf31529d60d1df2079bfc3c836e27) +- [Dev Deps] update `tape` [`3ec714e`](https://github.com/inspect-js/object-inspect/commit/3ec714eba57bc3f58a6eb4fca1376f49e70d300a) +- [Dev Deps] update `tape` [`beb72d9`](https://github.com/inspect-js/object-inspect/commit/beb72d969653747d7cde300393c28755375329b0) + +## [v1.2.1](https://github.com/inspect-js/object-inspect/compare/v1.2.0...v1.2.1) - 2016-04-09 + +### Fixed + +- [Fix] fix Boolean `false` object inspection. [`#7`](https://github.com/substack/object-inspect/pull/7) + +## [v1.2.0](https://github.com/inspect-js/object-inspect/compare/v1.1.0...v1.2.0) - 2016-04-09 + +### Fixed + +- [New] add support for inspecting String/Number/Boolean objects. [`#6`](https://github.com/inspect-js/object-inspect/issues/6) + +### Commits + +- [Dev Deps] update `tape` [`742caa2`](https://github.com/inspect-js/object-inspect/commit/742caa262cf7af4c815d4821c8bd0129c1446432) + +## [v1.1.0](https://github.com/inspect-js/object-inspect/compare/1.0.2...v1.1.0) - 2015-12-14 + +### Merged + +- [New] add ES6 Map/Set support. [`#4`](https://github.com/inspect-js/object-inspect/pull/4) + +### Fixed + +- [New] add ES6 Map/Set support. [`#3`](https://github.com/inspect-js/object-inspect/issues/3) + +### Commits + +- Update `travis.yml` to test on bunches of `iojs` and `node` versions. [`4c1fd65`](https://github.com/inspect-js/object-inspect/commit/4c1fd65cc3bd95307e854d114b90478324287fd2) +- [Dev Deps] update `tape` [`88a907e`](https://github.com/inspect-js/object-inspect/commit/88a907e33afbe408e4b5d6e4e42a33143f88848c) + +## [1.0.2](https://github.com/inspect-js/object-inspect/compare/1.0.1...1.0.2) - 2015-08-07 + +### Commits + +- [Fix] Cache `Object.prototype.hasOwnProperty` in case it's deleted later. [`1d0075d`](https://github.com/inspect-js/object-inspect/commit/1d0075d3091dc82246feeb1f9871cb2b8ed227b3) +- [Dev Deps] Update `tape` [`ca8d5d7`](https://github.com/inspect-js/object-inspect/commit/ca8d5d75635ddbf76f944e628267581e04958457) +- gitignore node_modules since this is a reusable modules. [`ed41407`](https://github.com/inspect-js/object-inspect/commit/ed41407811743ca530cdeb28f982beb96026af82) + +## [1.0.1](https://github.com/inspect-js/object-inspect/compare/1.0.0...1.0.1) - 2015-07-19 + +### Commits + +- Make `inspect` work with symbol primitives and objects, including in node 0.11 and 0.12. [`ddf1b94`](https://github.com/inspect-js/object-inspect/commit/ddf1b94475ab951f1e3bccdc0a48e9073cfbfef4) +- bump tape [`103d674`](https://github.com/inspect-js/object-inspect/commit/103d67496b504bdcfdd765d303a773f87ec106e2) +- use newer travis config [`d497276`](https://github.com/inspect-js/object-inspect/commit/d497276c1da14234bb5098a59cf20de75fbc316a) + +## [1.0.0](https://github.com/inspect-js/object-inspect/compare/0.4.0...1.0.0) - 2014-08-05 + +### Commits + +- error inspect works properly [`260a22d`](https://github.com/inspect-js/object-inspect/commit/260a22d134d3a8a482c67d52091c6040c34f4299) +- seen coverage [`57269e8`](https://github.com/inspect-js/object-inspect/commit/57269e8baa992a7439047f47325111fdcbcb8417) +- htmlelement instance coverage [`397ffe1`](https://github.com/inspect-js/object-inspect/commit/397ffe10a1980350868043ef9de65686d438979f) +- more element coverage [`6905cc2`](https://github.com/inspect-js/object-inspect/commit/6905cc2f7df35600177e613b0642b4df5efd3eca) +- failing test for type errors [`385b615`](https://github.com/inspect-js/object-inspect/commit/385b6152e49b51b68449a662f410b084ed7c601a) +- fn name coverage [`edc906d`](https://github.com/inspect-js/object-inspect/commit/edc906d40fca6b9194d304062c037ee8e398c4c2) +- server-side element test [`362d1d3`](https://github.com/inspect-js/object-inspect/commit/362d1d3e86f187651c29feeb8478110afada385b) +- custom inspect fn [`e89b0f6`](https://github.com/inspect-js/object-inspect/commit/e89b0f6fe6d5e03681282af83732a509160435a6) +- fixed browser test [`b530882`](https://github.com/inspect-js/object-inspect/commit/b5308824a1c8471c5617e394766a03a6977102a9) +- depth test, matches node [`1cfd9e0`](https://github.com/inspect-js/object-inspect/commit/1cfd9e0285a4ae1dff44101ad482915d9bf47e48) +- exercise hasOwnProperty path [`8d753fb`](https://github.com/inspect-js/object-inspect/commit/8d753fb362a534fa1106e4d80f2ee9bea06a66d9) +- more cases covered for errors [`c5c46a5`](https://github.com/inspect-js/object-inspect/commit/c5c46a569ec4606583497e8550f0d8c7ad39a4a4) +- \W obj key test case [`b0eceee`](https://github.com/inspect-js/object-inspect/commit/b0eceeea6e0eb94d686c1046e99b9e25e5005f75) +- coverage for explicit depth param [`e12b91c`](https://github.com/inspect-js/object-inspect/commit/e12b91cd59683362f3a0e80f46481a0211e26c15) + +## [0.4.0](https://github.com/inspect-js/object-inspect/compare/0.3.1...0.4.0) - 2014-03-21 + +### Commits + +- passing lowbyte interpolation test [`b847511`](https://github.com/inspect-js/object-inspect/commit/b8475114f5def7e7961c5353d48d3d8d9a520985) +- lowbyte test [`4a2b0e1`](https://github.com/inspect-js/object-inspect/commit/4a2b0e142667fc933f195472759385ac08f3946c) + +## [0.3.1](https://github.com/inspect-js/object-inspect/compare/0.3.0...0.3.1) - 2014-03-04 + +### Commits + +- sort keys [`a07b19c`](https://github.com/inspect-js/object-inspect/commit/a07b19cc3b1521a82d4fafb6368b7a9775428a05) + +## [0.3.0](https://github.com/inspect-js/object-inspect/compare/0.2.0...0.3.0) - 2014-03-04 + +### Commits + +- [] and {} instead of [ ] and { } [`654c44b`](https://github.com/inspect-js/object-inspect/commit/654c44b2865811f3519e57bb8526e0821caf5c6b) + +## [0.2.0](https://github.com/inspect-js/object-inspect/compare/0.1.3...0.2.0) - 2014-03-04 + +### Commits + +- failing holes test [`99cdfad`](https://github.com/inspect-js/object-inspect/commit/99cdfad03c6474740275a75636fe6ca86c77737a) +- regex already work [`e324033`](https://github.com/inspect-js/object-inspect/commit/e324033267025995ec97d32ed0a65737c99477a6) +- failing undef/null test [`1f88a00`](https://github.com/inspect-js/object-inspect/commit/1f88a00265d3209719dda8117b7e6360b4c20943) +- holes in the all example [`7d345f3`](https://github.com/inspect-js/object-inspect/commit/7d345f3676dcbe980cff89a4f6c243269ebbb709) +- check for .inspect(), fixes Buffer use-case [`c3f7546`](https://github.com/inspect-js/object-inspect/commit/c3f75466dbca125347d49847c05262c292f12b79) +- fixes for holes [`ce25f73`](https://github.com/inspect-js/object-inspect/commit/ce25f736683de4b92ff27dc5471218415e2d78d8) +- weird null behavior [`405c1ea`](https://github.com/inspect-js/object-inspect/commit/405c1ea72cd5a8cf3b498c3eaa903d01b9fbcab5) +- tape is actually a devDependency, upgrade [`703b0ce`](https://github.com/inspect-js/object-inspect/commit/703b0ce6c5817b4245a082564bccd877e0bb6990) +- put date in the example [`a342219`](https://github.com/inspect-js/object-inspect/commit/a3422190eeaa013215f46df2d0d37b48595ac058) +- passing the null test [`4ab737e`](https://github.com/inspect-js/object-inspect/commit/4ab737ebf862a75d247ebe51e79307a34d6380d4) + +## [0.1.3](https://github.com/inspect-js/object-inspect/compare/0.1.1...0.1.3) - 2013-07-26 + +### Commits + +- special isElement() check [`882768a`](https://github.com/inspect-js/object-inspect/commit/882768a54035d30747be9de1baf14e5aa0daa128) +- oh right old IEs don't have indexOf either [`36d1275`](https://github.com/inspect-js/object-inspect/commit/36d12756c38b08a74370b0bb696c809e529913a5) + +## [0.1.1](https://github.com/inspect-js/object-inspect/compare/0.1.0...0.1.1) - 2013-07-26 + +### Commits + +- tests! [`4422fd9`](https://github.com/inspect-js/object-inspect/commit/4422fd95532c2745aa6c4f786f35f1090be29998) +- fix for ie<9, doesn't have hasOwnProperty [`6b7d611`](https://github.com/inspect-js/object-inspect/commit/6b7d61183050f6da801ea04473211da226482613) +- fix for all IEs: no f.name [`4e0c2f6`](https://github.com/inspect-js/object-inspect/commit/4e0c2f6dfd01c306d067d7163319acc97c94ee50) +- badges [`5ed0d88`](https://github.com/inspect-js/object-inspect/commit/5ed0d88e4e407f9cb327fa4a146c17921f9680f3) + +## [0.1.0](https://github.com/inspect-js/object-inspect/compare/0.0.0...0.1.0) - 2013-07-26 + +### Commits + +- [Function] for functions [`ad5c485`](https://github.com/inspect-js/object-inspect/commit/ad5c485098fc83352cb540a60b2548ca56820e0b) + +## 0.0.0 - 2013-07-26 + +### Commits + +- working browser example [`34be6b6`](https://github.com/inspect-js/object-inspect/commit/34be6b6548f9ce92bdc3c27572857ba0c4a1218d) +- package.json etc [`cad51f2`](https://github.com/inspect-js/object-inspect/commit/cad51f23fc6bcf1a456ed6abe16088256c2f632f) +- docs complete [`b80cce2`](https://github.com/inspect-js/object-inspect/commit/b80cce2490c4e7183a9ee11ea89071f0abec4446) +- circular example [`4b4a7b9`](https://github.com/inspect-js/object-inspect/commit/4b4a7b92209e4e6b4630976cb6bcd17d14165a59) +- string rep [`7afb479`](https://github.com/inspect-js/object-inspect/commit/7afb479baa798d27f09e0a178b72ea327f60f5c8) diff --git a/node_modules/object-inspect/index.js b/node_modules/object-inspect/index.js index 3af7e562b..8496225cc 100644 --- a/node_modules/object-inspect/index.js +++ b/node_modules/object-inspect/index.js @@ -15,11 +15,24 @@ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; var booleanValueOf = Boolean.prototype.valueOf; var objectToString = Object.prototype.toString; var functionToString = Function.prototype.toString; -var match = String.prototype.match; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; var gOPS = Object.getOwnPropertySymbols; var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; var isEnumerable = Object.prototype.propertyIsEnumerable; var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( @@ -30,9 +43,31 @@ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPr : null ); -var inspectCustom = require('./util.inspect').custom; -var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null; -var toStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag !== 'undefined' ? Symbol.toStringTag : null; +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = require('./util.inspect'); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; module.exports = function inspect_(obj, options, depth, seen) { var opts = options || {}; @@ -59,8 +94,12 @@ module.exports = function inspect_(obj, options, depth, seen) { && opts.indent !== '\t' && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) ) { - throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`'); + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); } + var numericSeparator = opts.numericSeparator; if (typeof obj === 'undefined') { return 'undefined'; @@ -79,10 +118,12 @@ module.exports = function inspect_(obj, options, depth, seen) { if (obj === 0) { return Infinity / obj > 0 ? '0' : '-0'; } - return String(obj); + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; } if (typeof obj === 'bigint') { - return String(obj) + 'n'; + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; } var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; @@ -101,7 +142,7 @@ module.exports = function inspect_(obj, options, depth, seen) { function inspect(value, from, noIndent) { if (from) { - seen = seen.slice(); + seen = $arrSlice.call(seen); seen.push(from); } if (noIndent) { @@ -116,24 +157,24 @@ module.exports = function inspect_(obj, options, depth, seen) { return inspect_(value, opts, depth + 1, seen); } - if (typeof obj === 'function') { + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable var name = nameOf(obj); var keys = arrObjKeys(obj, inspect); - return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + keys.join(', ') + ' }' : ''); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); } if (isSymbol(obj)) { - var symString = hasShammedSymbols ? String(obj).replace(/^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; } if (isElement(obj)) { - var s = '<' + String(obj.nodeName).toLowerCase(); + var s = '<' + $toLowerCase.call(String(obj.nodeName)); var attrs = obj.attributes || []; for (var i = 0; i < attrs.length; i++) { s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); } s += '>'; if (obj.childNodes && obj.childNodes.length) { s += '...'; } - s += ''; + s += ''; return s; } if (isArray(obj)) { @@ -142,32 +183,39 @@ module.exports = function inspect_(obj, options, depth, seen) { if (indent && !singleLineValues(xs)) { return '[' + indentedJoin(xs, indent) + ']'; } - return '[ ' + xs.join(', ') + ' ]'; + return '[ ' + $join.call(xs, ', ') + ' ]'; } if (isError(obj)) { var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } if (parts.length === 0) { return '[' + String(obj) + ']'; } - return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }'; + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; } if (typeof obj === 'object' && customInspect) { - if (inspectSymbol && typeof obj[inspectSymbol] === 'function') { - return obj[inspectSymbol](); + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { return obj.inspect(); } } if (isMap(obj)) { var mapParts = []; - mapForEach.call(obj, function (value, key) { - mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); - }); + if (mapForEach) { + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + } return collectionOf('Map', mapSize.call(obj), mapParts, indent); } if (isSet(obj)) { var setParts = []; - setForEach.call(obj, function (value) { - setParts.push(inspect(value, obj)); - }); + if (setForEach) { + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + } return collectionOf('Set', setSize.call(obj), setParts, indent); } if (isWeakMap(obj)) { @@ -195,14 +243,14 @@ module.exports = function inspect_(obj, options, depth, seen) { var ys = arrObjKeys(obj, inspect); var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; var protoTag = obj instanceof Object ? '' : 'null prototype'; - var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? toStr(obj).slice(8, -1) : protoTag ? 'Object' : ''; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; - var tag = constructorTag + (stringTag || protoTag ? '[' + [].concat(stringTag || [], protoTag || []).join(': ') + '] ' : ''); + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); if (ys.length === 0) { return tag + '{}'; } if (indent) { return tag + '{' + indentedJoin(ys, indent) + '}'; } - return tag + '{ ' + ys.join(', ') + ' }'; + return tag + '{ ' + $join.call(ys, ', ') + ' }'; } return String(obj); }; @@ -213,7 +261,7 @@ function wrapQuotes(s, defaultStyle, opts) { } function quote(s) { - return String(s).replace(/"/g, '"'); + return $replace.call(String(s), /"/g, '"'); } function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } @@ -264,7 +312,7 @@ function toStr(obj) { function nameOf(f) { if (f.name) { return f.name; } - var m = match.call(functionToString.call(f), /^function\s*([\w$]+)/); + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); if (m) { return m[1]; } return null; } @@ -364,10 +412,10 @@ function inspectString(str, opts) { if (str.length > opts.maxStringLength) { var remaining = str.length - opts.maxStringLength; var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); - return inspectString(str.slice(0, opts.maxStringLength), opts) + trailer; + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; } // eslint-disable-next-line no-control-regex - var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte); + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); return wrapQuotes(s, 'single', opts); } @@ -381,7 +429,7 @@ function lowbyte(c) { 13: 'r' }[n]; if (x) { return '\\' + x; } - return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16).toUpperCase(); + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); } function markBoxed(str) { @@ -393,7 +441,7 @@ function weakCollectionOf(type) { } function collectionOf(type, size, entries, indent) { - var joinedEntries = indent ? indentedJoin(entries, indent) : entries.join(', '); + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); return type + ' (' + size + ') {' + joinedEntries + '}'; } @@ -411,20 +459,20 @@ function getIndent(opts, depth) { if (opts.indent === '\t') { baseIndent = '\t'; } else if (typeof opts.indent === 'number' && opts.indent > 0) { - baseIndent = Array(opts.indent + 1).join(' '); + baseIndent = $join.call(Array(opts.indent + 1), ' '); } else { return null; } return { base: baseIndent, - prev: Array(depth + 1).join(baseIndent) + prev: $join.call(Array(depth + 1), baseIndent) }; } function indentedJoin(xs, indent) { if (xs.length === 0) { return ''; } var lineJoiner = '\n' + indent.prev + indent.base; - return lineJoiner + xs.join(',' + lineJoiner) + '\n' + indent.prev; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; } function arrObjKeys(obj, inspect) { @@ -451,7 +499,7 @@ function arrObjKeys(obj, inspect) { if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section continue; // eslint-disable-line no-restricted-syntax, no-continue - } else if ((/[^\w$]/).test(key)) { + } else if ($test.call(/[^\w$]/, key)) { xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); } else { xs.push(key + ': ' + inspect(obj[key], obj)); diff --git a/node_modules/object-inspect/package-support.json b/node_modules/object-inspect/package-support.json new file mode 100644 index 000000000..5cc12d058 --- /dev/null +++ b/node_modules/object-inspect/package-support.json @@ -0,0 +1,20 @@ +{ + "versions": [ + { + "version": "*", + "target": { + "node": "all" + }, + "response": { + "type": "time-permitting" + }, + "backing": { + "npm-funding": true, + "donations": [ + "https://github.com/ljharb", + "https://tidelift.com/funding/github/npm/object-inspect" + ] + } + } + ] +} diff --git a/node_modules/object-inspect/package.json b/node_modules/object-inspect/package.json index f5682877a..5f6d5cf86 100644 --- a/node_modules/object-inspect/package.json +++ b/node_modules/object-inspect/package.json @@ -1,30 +1,43 @@ { "name": "object-inspect", - "version": "1.11.0", + "version": "1.12.3", "description": "string representations of objects in node and the browser", "main": "index.js", + "sideEffects": false, "devDependencies": { - "@ljharb/eslint-config": "^17.6.0", - "aud": "^1.1.5", + "@ljharb/eslint-config": "^21.0.1", + "@pkgjs/support": "^0.0.6", + "aud": "^2.0.2", + "auto-changelog": "^2.4.0", "core-js": "^2.6.12", - "eslint": "^7.30.0", + "error-cause": "^1.0.5", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", "for-each": "^0.3.3", - "functions-have-names": "^1.2.2", + "functions-have-names": "^1.2.3", + "has-tostringtag": "^1.0.0", + "in-publish": "^2.0.1", "make-arrow-function": "^1.2.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", + "safe-publish-latest": "^2.0.0", "string.prototype.repeat": "^1.0.0", - "tape": "^5.2.2" + "tape": "^5.6.1" }, "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", "prepublish": "not-in-publish || npm run prepublishOnly", "prepublishOnly": "safe-publish-latest", "pretest": "npm run lint", - "lint": "eslint .", + "lint": "eslint --ext=js,mjs .", + "postlint": "npx @pkgjs/support validate", "test": "npm run tests-only && npm run test:corejs", "tests-only": "nyc tape 'test/*.js'", "test:corejs": "nyc tape test-core-js.js 'test/*.js'", - "posttest": "npx aud --production" + "posttest": "npx aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, "testling": { "files": [ @@ -66,10 +79,19 @@ "browser": { "./util.inspect.js": false }, - "greenkeeper": { + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { "ignore": [ - "nyc", - "core-js" + ".github/workflows", + "./test-core-js.js" ] - } + }, + "support": true } diff --git a/node_modules/object-inspect/readme.markdown b/node_modules/object-inspect/readme.markdown index 4cbe08dff..9ff6bec36 100644 --- a/node_modules/object-inspect/readme.markdown +++ b/node_modules/object-inspect/readme.markdown @@ -55,6 +55,7 @@ Additional options: - `maxStringLength`: must be `0`, a positive integer, `Infinity`, or `null`, if present. Default `Infinity`. - `customInspect`: When `true`, a custom inspect method function will be invoked (either undere the `util.inspect.custom` symbol, or the `inspect` property). When the string `'symbol'`, only the symbol method will be invoked. Default `true`. - `indent`: must be "\t", `null`, or a positive integer. Default `null`. + - `numericSeparator`: must be a boolean, if present. Default `false`. If `true`, all numbers will be printed with numeric separators (eg, `1234.5678` will be printed as `'1_234.567_8'`) # install diff --git a/node_modules/object-inspect/test/bigint.js b/node_modules/object-inspect/test/bigint.js index 905643569..4ecc31df8 100644 --- a/node_modules/object-inspect/test/bigint.js +++ b/node_modules/object-inspect/test/bigint.js @@ -2,7 +2,7 @@ var inspect = require('../'); var test = require('tape'); -var hasSymbols = require('has-symbols/shams')(); +var hasToStringTag = require('has-tostringtag/shams')(); test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) { t.test('primitives', function (st) { @@ -30,7 +30,7 @@ test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) { st.equal(inspect(Function('return 256n')()), '256n'); }); - t.test('toStringTag', { skip: !hasSymbols || typeof Symbol.toStringTag === 'undefined' }, function (st) { + t.test('toStringTag', { skip: !hasToStringTag }, function (st) { st.plan(1); var faker = {}; @@ -42,5 +42,17 @@ test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) { ); }); + t.test('numericSeparator', function (st) { + st.equal(inspect(BigInt(0), { numericSeparator: false }), '0n', '0n, numericSeparator false'); + st.equal(inspect(BigInt(0), { numericSeparator: true }), '0n', '0n, numericSeparator true'); + + st.equal(inspect(BigInt(1234), { numericSeparator: false }), '1234n', '1234n, numericSeparator false'); + st.equal(inspect(BigInt(1234), { numericSeparator: true }), '1_234n', '1234n, numericSeparator true'); + st.equal(inspect(BigInt(-1234), { numericSeparator: false }), '-1234n', '1234n, numericSeparator false'); + st.equal(inspect(BigInt(-1234), { numericSeparator: true }), '-1_234n', '1234n, numericSeparator true'); + + st.end(); + }); + t.end(); }); diff --git a/node_modules/object-inspect/test/err.js b/node_modules/object-inspect/test/err.js index db9633810..cc1d884ab 100644 --- a/node_modules/object-inspect/test/err.js +++ b/node_modules/object-inspect/test/err.js @@ -1,5 +1,7 @@ -var inspect = require('../'); var test = require('tape'); +var ErrorWithCause = require('error-cause/Error'); + +var inspect = require('../'); test('type error', function (t) { t.plan(1); @@ -14,18 +16,33 @@ test('type error', function (t) { cerr.message = 'whoa'; cerr['a-b'] = 5; + var withCause = new ErrorWithCause('foo', { cause: 'bar' }); + var withCausePlus = new ErrorWithCause('foo', { cause: 'bar' }); + withCausePlus.foo = 'bar'; + var withUndefinedCause = new ErrorWithCause('foo', { cause: undefined }); + var withEnumerableCause = new Error('foo'); + withEnumerableCause.cause = 'bar'; + var obj = [ new TypeError(), new TypeError('xxx'), aerr, berr, - cerr + cerr, + withCause, + withCausePlus, + withUndefinedCause, + withEnumerableCause ]; t.equal(inspect(obj), '[ ' + [ '[TypeError]', '[TypeError: xxx]', '{ [TypeError] foo: 555, bar: [ 1, 2, 3 ] }', '{ [TypeError: tuv] baz: 555 }', - '{ [SyntaxError: whoa] message: \'whoa\', \'a-b\': 5 }' + '{ [SyntaxError: whoa] message: \'whoa\', \'a-b\': 5 }', + 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: \'bar\' }', + '{ [Error: foo] ' + ('cause' in Error.prototype ? '' : '[cause]: \'bar\', ') + 'foo: \'bar\' }', + 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: undefined }', + '{ [Error: foo] cause: \'bar\' }' ].join(', ') + ' ]'); }); diff --git a/node_modules/object-inspect/test/fakes.js b/node_modules/object-inspect/test/fakes.js index 17225e2eb..a65c08c15 100644 --- a/node_modules/object-inspect/test/fakes.js +++ b/node_modules/object-inspect/test/fakes.js @@ -2,10 +2,10 @@ var inspect = require('../'); var test = require('tape'); -var hasSymbols = require('has-symbols/shams')(); +var hasToStringTag = require('has-tostringtag/shams')(); var forEach = require('for-each'); -test('fakes', { skip: !hasSymbols || typeof Symbol.toStringTag === 'undefined' }, function (t) { +test('fakes', { skip: !hasToStringTag }, function (t) { forEach([ 'Array', 'Boolean', diff --git a/node_modules/object-inspect/test/has.js b/node_modules/object-inspect/test/has.js index 026d6d5c3..01800dee6 100644 --- a/node_modules/object-inspect/test/has.js +++ b/node_modules/object-inspect/test/has.js @@ -1,34 +1,15 @@ +'use strict'; + var inspect = require('../'); var test = require('tape'); - -function withoutProperty(object, property, fn) { - var original; - if (Object.getOwnPropertyDescriptor) { - original = Object.getOwnPropertyDescriptor(object, property); - } else { - original = object[property]; - } - delete object[property]; - try { - fn(); - } finally { - if (Object.getOwnPropertyDescriptor) { - Object.defineProperty(object, property, original); - } else { - object[property] = original; - } - } -} +var mockProperty = require('mock-property'); test('when Object#hasOwnProperty is deleted', function (t) { t.plan(1); var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays - // eslint-disable-next-line no-extend-native - Array.prototype[1] = 2; // this is needed to account for "in" vs "hasOwnProperty" + t.teardown(mockProperty(Array.prototype, 1, { value: 2 })); // this is needed to account for "in" vs "hasOwnProperty" + t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); - withoutProperty(Object.prototype, 'hasOwnProperty', function () { - t.equal(inspect(arr), '[ 1, , 3 ]'); - }); - delete Array.prototype[1]; + t.equal(inspect(arr), '[ 1, , 3 ]'); }); diff --git a/node_modules/object-inspect/test/inspect.js b/node_modules/object-inspect/test/inspect.js index bcf264ec1..1abf81b1f 100644 --- a/node_modules/object-inspect/test/inspect.js +++ b/node_modules/object-inspect/test/inspect.js @@ -100,3 +100,40 @@ test('maxStringLength', function (t) { t.end(); }); + +test('inspect options', { skip: !utilInspect.custom }, function (t) { + var obj = {}; + obj[utilInspect.custom] = function () { + return JSON.stringify(arguments); + }; + t.equal( + inspect(obj), + utilInspect(obj, { depth: 5 }), + 'custom symbols will use node\'s inspect' + ); + t.equal( + inspect(obj, { depth: 2 }), + utilInspect(obj, { depth: 2 }), + 'a reduced depth will be passed to node\'s inspect' + ); + t.equal( + inspect({ d1: obj }, { depth: 3 }), + '{ d1: ' + utilInspect(obj, { depth: 2 }) + ' }', + 'deep objects will receive a reduced depth' + ); + t.equal( + inspect({ d1: obj }, { depth: 1 }), + '{ d1: [Object] }', + 'unlike nodejs inspect, customInspect will not be used once the depth is exceeded.' + ); + t.end(); +}); + +test('inspect URL', { skip: typeof URL === 'undefined' }, function (t) { + t.match( + inspect(new URL('https://nodejs.org')), + /nodejs\.org/, // Different environments stringify it differently + 'url can be inspected' + ); + t.end(); +}); diff --git a/node_modules/object-inspect/test/number.js b/node_modules/object-inspect/test/number.js index 448304e59..8f287e8e2 100644 --- a/node_modules/object-inspect/test/number.js +++ b/node_modules/object-inspect/test/number.js @@ -1,5 +1,8 @@ -var inspect = require('../'); var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); + +var inspect = require('../'); test('negative zero', function (t) { t.equal(inspect(0), '0', 'inspect(0) === "0"'); @@ -10,3 +13,46 @@ test('negative zero', function (t) { t.end(); }); + +test('numericSeparator', function (t) { + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { inspect(true, { numericSeparator: nonBoolean }); }, + TypeError, + inspect(nonBoolean) + ' is not a boolean' + ); + }); + + t.test('3 digit numbers', function (st) { + var failed = false; + for (var i = -999; i < 1000; i += 1) { + var actual = inspect(i); + var actualSepNo = inspect(i, { numericSeparator: false }); + var actualSepYes = inspect(i, { numericSeparator: true }); + var expected = String(i); + if (actual !== expected || actualSepNo !== expected || actualSepYes !== expected) { + failed = true; + t.equal(actual, expected); + t.equal(actualSepNo, expected); + t.equal(actualSepYes, expected); + } + } + + st.notOk(failed, 'all 3 digit numbers passed'); + + st.end(); + }); + + t.equal(inspect(1e3), '1000', '1000'); + t.equal(inspect(1e3, { numericSeparator: false }), '1000', '1000, numericSeparator false'); + t.equal(inspect(1e3, { numericSeparator: true }), '1_000', '1000, numericSeparator true'); + t.equal(inspect(-1e3), '-1000', '-1000'); + t.equal(inspect(-1e3, { numericSeparator: false }), '-1000', '-1000, numericSeparator false'); + t.equal(inspect(-1e3, { numericSeparator: true }), '-1_000', '-1000, numericSeparator true'); + + t.equal(inspect(1234.5678, { numericSeparator: true }), '1_234.567_8', 'fractional numbers get separators'); + t.equal(inspect(1234.56789, { numericSeparator: true }), '1_234.567_89', 'fractional numbers get separators'); + t.equal(inspect(1234.567891, { numericSeparator: true }), '1_234.567_891', 'fractional numbers get separators'); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/toStringTag.js b/node_modules/object-inspect/test/toStringTag.js index b7ddad374..95f82703d 100644 --- a/node_modules/object-inspect/test/toStringTag.js +++ b/node_modules/object-inspect/test/toStringTag.js @@ -1,11 +1,11 @@ 'use strict'; var test = require('tape'); -var hasSymbols = require('has-symbols/shams')(); +var hasToStringTag = require('has-tostringtag/shams')(); var inspect = require('../'); -test('Symbol.toStringTag', { skip: !hasSymbols || typeof Symbol.toStringTag === 'undefined' }, function (t) { +test('Symbol.toStringTag', { skip: !hasToStringTag }, function (t) { t.plan(4); var obj = { a: 1 }; diff --git a/node_modules/object-inspect/test/values.js b/node_modules/object-inspect/test/values.js index ee64681b2..4832b9fe9 100644 --- a/node_modules/object-inspect/test/values.js +++ b/node_modules/object-inspect/test/values.js @@ -2,7 +2,9 @@ var inspect = require('../'); var test = require('tape'); +var mockProperty = require('mock-property'); var hasSymbols = require('has-symbols/shams')(); +var hasToStringTag = require('has-tostringtag/shams')(); test('values', function (t) { t.plan(1); @@ -22,10 +24,9 @@ test('arrays with properties', function (t) { test('has', function (t) { t.plan(1); - var has = Object.prototype.hasOwnProperty; - delete Object.prototype.hasOwnProperty; + t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); + t.equal(inspect({ a: 1, b: 2 }), '{ a: 1, b: 2 }'); - Object.prototype.hasOwnProperty = has; // eslint-disable-line no-extend-native }); test('indexOf seen', function (t) { @@ -76,7 +77,7 @@ test('symbols', { skip: !hasSymbols }, function (t) { t.equal(inspect(Object(sym)), 'Object(Symbol(foo))', 'Object(Symbol("foo")) should be "Object(Symbol(foo))"'); } - t.test('toStringTag', { skip: !hasSymbols || typeof Symbol.toStringTag === 'undefined' }, function (st) { + t.test('toStringTag', { skip: !hasToStringTag }, function (st) { st.plan(1); var faker = {}; diff --git a/node_modules/object.assign/.eslintignore b/node_modules/object.assign/.eslintignore deleted file mode 100644 index 849ddff3b..000000000 --- a/node_modules/object.assign/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -dist/ diff --git a/node_modules/object.assign/.eslintrc b/node_modules/object.assign/.eslintrc index 6d4cafd95..131851698 100644 --- a/node_modules/object.assign/.eslintrc +++ b/node_modules/object.assign/.eslintrc @@ -3,8 +3,10 @@ "extends": "@ljharb", + "ignorePatterns": ["dist/"], + "rules": { - "complexity": [2, 19], + "eqeqeq": [2, "allow-null"], "id-length": [2, { "min": 1, "max": 30 }], "max-statements": [2, 33], "max-statements-per-line": [2, { "max": 2 }], diff --git a/node_modules/object.assign/.github/workflows/rebase.yml b/node_modules/object.assign/.github/workflows/rebase.yml deleted file mode 100644 index 0c2ad39b5..000000000 --- a/node_modules/object.assign/.github/workflows/rebase.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Automatic Rebase - -on: [pull_request_target] - -jobs: - _: - name: "Automatic Rebase" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - uses: ljharb/rebase@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/object.assign/.github/workflows/require-allow-edits.yml b/node_modules/object.assign/.github/workflows/require-allow-edits.yml deleted file mode 100644 index aac42d3e2..000000000 --- a/node_modules/object.assign/.github/workflows/require-allow-edits.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Require “Allow Edits” - -on: [pull_request_target] - -jobs: - _: - name: "Require “Allow Edits”" - - runs-on: ubuntu-latest - - steps: - - uses: ljharb/require-allow-edits@main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/object.assign/.nycrc b/node_modules/object.assign/.nycrc index d316b4db7..bdd626ce9 100644 --- a/node_modules/object.assign/.nycrc +++ b/node_modules/object.assign/.nycrc @@ -2,13 +2,8 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, "exclude": [ "coverage", - "operations", "test" ] } diff --git a/node_modules/object.assign/CHANGELOG.md b/node_modules/object.assign/CHANGELOG.md index ac543d52b..426c5b708 100644 --- a/node_modules/object.assign/CHANGELOG.md +++ b/node_modules/object.assign/CHANGELOG.md @@ -1,3 +1,27 @@ +4.1.4 / 2022-08-16 +================== + * [meta] fix `npmignore` integration (#83) + +4.1.3 / 2022-08-05 +================== + * [Refactor] make steps closer to actual spec + * [Refactor] simplify object coercible check + * [readme] remove defunct badges, add coverage and actions badges + * [eslint] ignore coverage output + * [meta] use `npmignore` to autogenerate an npmignore file + * [meta] remove audit-level + * [Deps] update `call-bind`, `define-properties`, `has-symbols` + * [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `functions-have-names`, `safe-publish-latest`, `ses`, `tape` + * [actions] use `node/install` instead of `node/run`; use `codecov` action + * [actions] reuse common workflows + * [actions] update codecov uploader + * [Tests] add implementation tests + * [Tests] use `mock-property` + * [Tests] disable posttest pending `aud` handling `file:` deps + * [Tests] migrate remaining tests to Github Actions (#81) + * [Tests] gitignore coverage output + * [Tests] test node v1-v9 on Github Actions instead of travis; resume testing all minors (#80) + 4.1.2 / 2020-10-30 ================== * [Refactor] use extracted `call-bind` instead of full `es-abstract` diff --git a/node_modules/object.assign/README.md b/node_modules/object.assign/README.md index 70b6ac440..8e933fee6 100644 --- a/node_modules/object.assign/README.md +++ b/node_modules/object.assign/README.md @@ -1,6 +1,7 @@ -#object.assign [![Version Badge][npm-version-svg]][npm-url] +# object.assign [![Version Badge][npm-version-svg]][npm-url] -[![Build Status][travis-svg]][travis-url] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] @@ -8,8 +9,6 @@ [![npm badge][npm-badge-png]][npm-url] -[![browser support][testling-png]][testling-url] - An Object.assign shim. Invoke its "shim" method to shim Object.assign if it is unavailable. This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s. @@ -126,10 +125,12 @@ Simply clone the repo, `npm install`, and run `npm test` [deps-url]: https://david-dm.org/ljharb/object.assign [dev-deps-svg]: https://david-dm.org/ljharb/object.assign/dev-status.svg?theme=shields.io [dev-deps-url]: https://david-dm.org/ljharb/object.assign#info=devDependencies -[testling-png]: https://ci.testling.com/ljharb/object.assign.png -[testling-url]: https://ci.testling.com/ljharb/object.assign [npm-badge-png]: https://nodei.co/npm/object.assign.png?downloads=true&stars=true [license-image]: http://img.shields.io/npm/l/object.assign.svg [license-url]: LICENSE [downloads-image]: http://img.shields.io/npm/dm/object.assign.svg [downloads-url]: http://npm-stat.com/charts.html?package=object.assign +[codecov-image]: https://codecov.io/gh/ljharb/object.assign/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/object.assign/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/object.assign +[actions-url]: https://github.com/ljharb/object.assign/actions diff --git a/node_modules/object.assign/dist/browser.js b/node_modules/object.assign/dist/browser.js index 15f0e20a1..115a4579c 100644 --- a/node_modules/object.assign/dist/browser.js +++ b/node_modules/object.assign/dist/browser.js @@ -10,14 +10,11 @@ module.exports = assign.shim(); delete assign.shim; -},{"./":3,"object-keys":14}],2:[function(require,module,exports){ +},{"./":3,"object-keys":15}],2:[function(require,module,exports){ 'use strict'; // modified from https://github.com/es-shims/es6-shim -var keys = require('object-keys'); -var canBeObject = function (obj) { - return typeof obj !== 'undefined' && obj !== null; -}; +var objectKeys = require('object-keys'); var hasSymbols = require('has-symbols/shams')(); var callBound = require('call-bind/callBound'); var toObject = Object; @@ -27,34 +24,41 @@ var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; // eslint-disable-next-line no-unused-vars module.exports = function assign(target, source1) { - if (!canBeObject(target)) { throw new TypeError('target must be an object'); } - var objTarget = toObject(target); - var s, source, i, props, syms, value, key; - for (s = 1; s < arguments.length; ++s) { - source = toObject(arguments[s]); - props = keys(source); + if (target == null) { throw new TypeError('target must be an object'); } + var to = toObject(target); // step 1 + if (arguments.length === 1) { + return to; // step 2 + } + for (var s = 1; s < arguments.length; ++s) { + var from = toObject(arguments[s]); // step 3.a.i + + // step 3.a.ii: + var keys = objectKeys(from); var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); if (getSymbols) { - syms = getSymbols(source); - for (i = 0; i < syms.length; ++i) { - key = syms[i]; - if ($propIsEnumerable(source, key)) { - $push(props, key); + var syms = getSymbols(from); + for (var j = 0; j < syms.length; ++j) { + var key = syms[j]; + if ($propIsEnumerable(from, key)) { + $push(keys, key); } } } - for (i = 0; i < props.length; ++i) { - key = props[i]; - value = source[key]; - if ($propIsEnumerable(source, key)) { - objTarget[key] = value; + + // step 3.a.iii: + for (var i = 0; i < keys.length; ++i) { + var nextKey = keys[i]; + if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2 + var propValue = from[nextKey]; // step 3.a.iii.2.a + to[nextKey] = propValue; // step 3.a.iii.2.b } } } - return objTarget; + + return to; // step 4 }; -},{"call-bind/callBound":4,"has-symbols/shams":11,"object-keys":14}],3:[function(require,module,exports){ +},{"call-bind/callBound":4,"has-symbols/shams":12,"object-keys":15}],3:[function(require,module,exports){ 'use strict'; var defineProperties = require('define-properties'); @@ -78,7 +82,7 @@ defineProperties(bound, { module.exports = bound; -},{"./implementation":2,"./polyfill":16,"./shim":17,"call-bind":5,"define-properties":6}],4:[function(require,module,exports){ +},{"./implementation":2,"./polyfill":17,"./shim":18,"call-bind":5,"define-properties":6}],4:[function(require,module,exports){ 'use strict'; var GetIntrinsic = require('get-intrinsic'); @@ -105,7 +109,9 @@ var $apply = GetIntrinsic('%Function.prototype.apply%'); var $call = GetIntrinsic('%Function.prototype.call%'); var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); if ($defineProperty) { try { @@ -116,8 +122,20 @@ if ($defineProperty) { } } -module.exports = function callBind() { - return $reflectApply(bind, $call, arguments); +module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length'); + if (desc.configurable) { + // original length, plus the receiver, minus any additional arguments (after the receiver) + $defineProperty( + func, + 'length', + { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } + ); + } + } + return func; }; var applyBind = function applyBind() { @@ -144,20 +162,9 @@ var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; -var arePropertyDescriptorsSupported = function () { - var obj = {}; - try { - origDefineProperty(obj, 'x', { enumerable: false, value: obj }); - // eslint-disable-next-line no-unused-vars, no-restricted-syntax - for (var _ in obj) { // jscs:ignore disallowUnusedVariables - return false; - } - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); +var hasPropertyDescriptors = require('has-property-descriptors')(); + +var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; var defineProperty = function (object, name, value, predicate) { if (name in object && (!isFunction(predicate) || !predicate())) { @@ -171,7 +178,7 @@ var defineProperty = function (object, name, value, predicate) { writable: true }); } else { - object[name] = value; + object[name] = value; // eslint-disable-line no-param-reassign } }; @@ -190,7 +197,7 @@ defineProperties.supportsDescriptors = !!supportsDescriptors; module.exports = defineProperties; -},{"object-keys":14}],7:[function(require,module,exports){ +},{"has-property-descriptors":10,"object-keys":15}],7:[function(require,module,exports){ 'use strict'; /* eslint no-invalid-this: 1 */ @@ -254,14 +261,6 @@ module.exports = Function.prototype.bind || implementation; },{"./implementation":7}],9:[function(require,module,exports){ 'use strict'; -/* globals - AggregateError, - Atomics, - FinalizationRegistry, - SharedArrayBuffer, - WeakRef, -*/ - var undefined; var $SyntaxError = SyntaxError; @@ -271,8 +270,7 @@ var $TypeError = TypeError; // eslint-disable-next-line consistent-return var getEvalledConstructor = function (expressionSyntax) { try { - // eslint-disable-next-line no-new-func - return Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); } catch (e) {} }; @@ -309,9 +307,7 @@ var hasSymbols = require('has-symbols')(); var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto -var asyncGenFunction = getEvalledConstructor('async function* () {}'); -var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined; -var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined; +var needsEval = {}; var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); @@ -321,10 +317,10 @@ var INTRINSICS = { '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': getEvalledConstructor('async function () {}'), - '%AsyncGenerator%': asyncGenFunctionPrototype, - '%AsyncGeneratorFunction%': asyncGenFunction, - '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, '%Boolean%': Boolean, @@ -341,7 +337,7 @@ var INTRINSICS = { '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, '%Function%': $Function, - '%GeneratorFunction%': getEvalledConstructor('function* () {}'), + '%GeneratorFunction%': needsEval, '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, @@ -382,6 +378,31 @@ var INTRINSICS = { '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet }; +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + var LEGACY_ALIASES = { '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], '%ArrayPrototype%': ['Array', 'prototype'], @@ -441,11 +462,19 @@ var hasOwn = require('has'); var $concat = bind.call(Function.call, Array.prototype.concat); var $spliceApply = bind.call(Function.apply, Array.prototype.splice); var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } var result = []; $replace(string, rePropName, function (match, number, quote, subString) { result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; @@ -464,6 +493,9 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { if (hasOwn(INTRINSICS, intrinsicName)) { var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } if (typeof value === 'undefined' && !allowMissing) { throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); } @@ -502,6 +534,17 @@ module.exports = function GetIntrinsic(name, allowMissing) { for (var i = 1, isOwn = true; i < parts.length; i += 1) { var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } if (part === 'constructor' || !isOwn) { skipFurtherCaching = true; } @@ -512,13 +555,16 @@ module.exports = function GetIntrinsic(name, allowMissing) { if (hasOwn(INTRINSICS, intrinsicRealName)) { value = INTRINSICS[intrinsicRealName]; } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } if ($gOPD && (i + 1) >= parts.length) { var desc = $gOPD(value, part); isOwn = !!desc; - if (!allowMissing && !(part in value)) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } // By convention, when a data property is converted to an accessor // property to emulate a data property that does not suffer from // the override mistake, that accessor's getter is marked with @@ -544,11 +590,45 @@ module.exports = function GetIntrinsic(name, allowMissing) { return value; }; -},{"function-bind":8,"has":12,"has-symbols":10}],10:[function(require,module,exports){ -(function (global){(function (){ +},{"function-bind":8,"has":13,"has-symbols":11}],10:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + +},{"get-intrinsic":9}],11:[function(require,module,exports){ 'use strict'; -var origSymbol = global.Symbol; +var origSymbol = typeof Symbol !== 'undefined' && Symbol; var hasSymbolSham = require('./shams'); module.exports = function hasNativeSymbols() { @@ -560,8 +640,7 @@ module.exports = function hasNativeSymbols() { return hasSymbolSham(); }; -}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./shams":11}],11:[function(require,module,exports){ +},{"./shams":12}],12:[function(require,module,exports){ 'use strict'; /* eslint complexity: [2, 18], max-statements: [2, 33] */ @@ -587,7 +666,7 @@ module.exports = function hasSymbols() { var symVal = 42; obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } @@ -605,14 +684,14 @@ module.exports = function hasSymbols() { return true; }; -},{}],12:[function(require,module,exports){ +},{}],13:[function(require,module,exports){ 'use strict'; var bind = require('function-bind'); module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); -},{"function-bind":8}],13:[function(require,module,exports){ +},{"function-bind":8}],14:[function(require,module,exports){ 'use strict'; var keysShim; @@ -736,7 +815,7 @@ if (!Object.keys) { } module.exports = keysShim; -},{"./isArguments":15}],14:[function(require,module,exports){ +},{"./isArguments":16}],15:[function(require,module,exports){ 'use strict'; var slice = Array.prototype.slice; @@ -770,7 +849,7 @@ keysShim.shim = function shimObjectKeys() { module.exports = keysShim; -},{"./implementation":13,"./isArguments":15}],15:[function(require,module,exports){ +},{"./implementation":14,"./isArguments":16}],16:[function(require,module,exports){ 'use strict'; var toStr = Object.prototype.toString; @@ -789,7 +868,7 @@ module.exports = function isArguments(value) { return isArgs; }; -},{}],16:[function(require,module,exports){ +},{}],17:[function(require,module,exports){ 'use strict'; var implementation = require('./implementation'); @@ -846,7 +925,7 @@ module.exports = function getPolyfill() { return Object.assign; }; -},{"./implementation":2}],17:[function(require,module,exports){ +},{"./implementation":2}],18:[function(require,module,exports){ 'use strict'; var define = require('define-properties'); @@ -862,4 +941,4 @@ module.exports = function shimAssign() { return polyfill; }; -},{"./polyfill":16,"define-properties":6}]},{},[1]); +},{"./polyfill":17,"define-properties":6}]},{},[1]); diff --git a/node_modules/object.assign/implementation.js b/node_modules/object.assign/implementation.js index 567efe905..7a85167a7 100644 --- a/node_modules/object.assign/implementation.js +++ b/node_modules/object.assign/implementation.js @@ -1,10 +1,7 @@ 'use strict'; // modified from https://github.com/es-shims/es6-shim -var keys = require('object-keys'); -var canBeObject = function (obj) { - return typeof obj !== 'undefined' && obj !== null; -}; +var objectKeys = require('object-keys'); var hasSymbols = require('has-symbols/shams')(); var callBound = require('call-bind/callBound'); var toObject = Object; @@ -14,29 +11,36 @@ var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; // eslint-disable-next-line no-unused-vars module.exports = function assign(target, source1) { - if (!canBeObject(target)) { throw new TypeError('target must be an object'); } - var objTarget = toObject(target); - var s, source, i, props, syms, value, key; - for (s = 1; s < arguments.length; ++s) { - source = toObject(arguments[s]); - props = keys(source); + if (target == null) { throw new TypeError('target must be an object'); } + var to = toObject(target); // step 1 + if (arguments.length === 1) { + return to; // step 2 + } + for (var s = 1; s < arguments.length; ++s) { + var from = toObject(arguments[s]); // step 3.a.i + + // step 3.a.ii: + var keys = objectKeys(from); var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); if (getSymbols) { - syms = getSymbols(source); - for (i = 0; i < syms.length; ++i) { - key = syms[i]; - if ($propIsEnumerable(source, key)) { - $push(props, key); + var syms = getSymbols(from); + for (var j = 0; j < syms.length; ++j) { + var key = syms[j]; + if ($propIsEnumerable(from, key)) { + $push(keys, key); } } } - for (i = 0; i < props.length; ++i) { - key = props[i]; - value = source[key]; - if ($propIsEnumerable(source, key)) { - objTarget[key] = value; + + // step 3.a.iii: + for (var i = 0; i < keys.length; ++i) { + var nextKey = keys[i]; + if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2 + var propValue = from[nextKey]; // step 3.a.iii.2.a + to[nextKey] = propValue; // step 3.a.iii.2.b } } } - return objTarget; + + return to; // step 4 }; diff --git a/node_modules/object.assign/package.json b/node_modules/object.assign/package.json index 7da23c63d..159159fb5 100644 --- a/node_modules/object.assign/package.json +++ b/node_modules/object.assign/package.json @@ -1,6 +1,6 @@ { "name": "object.assign", - "version": "4.1.2", + "version": "4.1.4", "author": "Jordan Harband", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9,6 +9,7 @@ "license": "MIT", "main": "index.js", "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", "pretest": "npm run lint && es-shim-api --bound", "test": "npm run tests-only && npm run test:ses", "posttest": "aud --production", @@ -19,7 +20,8 @@ "test:ses": "node test/ses-compat", "lint": "eslint .", "build": "mkdir -p dist && browserify browserShim.js > dist/browser.js", - "prepublish": "safe-publish-latest && npm run build" + "prepublishOnly": "safe-publish-latest && npm run build", + "prepublish": "not-in-publish || npm run prepublishOnly" }, "repository": { "type": "git", @@ -39,25 +41,28 @@ "shim" ], "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^17.2.0", - "aud": "^1.1.2", + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", "browserify": "^16.5.2", - "eslint": "^7.12.1", + "eslint": "=8.8.0", "for-each": "^0.3.3", - "functions-have-names": "^1.2.1", + "functions-have-names": "^1.2.3", "has": "^1.0.3", + "has-strict-mode": "^1.0.1", "is": "^3.3.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "ses": "^0.10.4", - "tape": "^5.0.1" + "safe-publish-latest": "^2.0.0", + "ses": "^0.11.1", + "tape": "^5.5.3" }, "testling": { "files": "test/index.js", @@ -79,5 +84,13 @@ }, "engines": { "node": ">= 0.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "bower.json", + "browserShim.js", + "!dist/" + ] } } diff --git a/node_modules/object.assign/test.html b/node_modules/object.assign/test.html new file mode 100644 index 000000000..c4efa6d10 --- /dev/null +++ b/node_modules/object.assign/test.html @@ -0,0 +1,18458 @@ +

diff --git a/node_modules/object.assign/test/implementation.js b/node_modules/object.assign/test/implementation.js
new file mode 100644
index 000000000..05d7d7ada
--- /dev/null
+++ b/node_modules/object.assign/test/implementation.js
@@ -0,0 +1,19 @@
+'use strict';
+
+var implementation = require('../implementation');
+var callBind = require('call-bind');
+var test = require('tape');
+var hasStrictMode = require('has-strict-mode')();
+var runTests = require('./tests');
+
+test('as a function', function (t) {
+	t.test('bad first arg/receiver', { skip: !hasStrictMode }, function (st) {
+		st['throws'](function () { implementation(undefined); }, TypeError, 'undefined is not an object');
+		st['throws'](function () { implementation(null); }, TypeError, 'null is not an object');
+		st.end();
+	});
+
+	runTests(callBind(implementation, Object), t);
+
+	t.end();
+});
diff --git a/node_modules/object.assign/test/tests.js b/node_modules/object.assign/test/tests.js
index 81b132634..40b0b80f5 100644
--- a/node_modules/object.assign/test/tests.js
+++ b/node_modules/object.assign/test/tests.js
@@ -3,6 +3,7 @@
 var hasSymbols = require('has-symbols/shams')();
 var forEach = require('for-each');
 var has = require('has');
+var mockProperty = require('mock-property');
 
 module.exports = function (assign, t) {
 	t.test('error cases', function (st) {
@@ -160,11 +161,7 @@ module.exports = function (assign, t) {
 	});
 
 	t.test('does not fail when symbols are not present', { skip: !Object.isFrozen || Object.isFrozen(Object) }, function (st) {
-		var getSyms;
-		if (hasSymbols) {
-			getSyms = Object.getOwnPropertySymbols;
-			delete Object.getOwnPropertySymbols;
-		}
+		st.teardown(mockProperty(Object, 'getOwnPropertySymbols', { 'delete': true }));
 
 		var visited = [];
 		var obj = {};
@@ -184,8 +181,6 @@ module.exports = function (assign, t) {
 
 		if (hasSymbols) {
 			st.equal(target[symbol], Infinity);
-
-			Object.getOwnPropertySymbols = getSyms;
 		}
 		st.end();
 	});
diff --git a/node_modules/object.values/.eslintignore b/node_modules/object.values/.eslintignore
deleted file mode 100644
index 404abb221..000000000
--- a/node_modules/object.values/.eslintignore
+++ /dev/null
@@ -1 +0,0 @@
-coverage/
diff --git a/node_modules/object.values/.eslintrc b/node_modules/object.values/.eslintrc
index 15c95c174..f76815b19 100644
--- a/node_modules/object.values/.eslintrc
+++ b/node_modules/object.values/.eslintrc
@@ -6,7 +6,6 @@
 	"rules": {
 		"id-length": 0,
 		"new-cap": [2, { "capIsNewExceptions": ["RequireObjectCoercible"] }],
-		"no-magic-numbers": [0],
-		"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"]
-	}
+		"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
+	},
 }
diff --git a/node_modules/object.values/CHANGELOG.md b/node_modules/object.values/CHANGELOG.md
index b6c68412b..6eef87752 100644
--- a/node_modules/object.values/CHANGELOG.md
+++ b/node_modules/object.values/CHANGELOG.md
@@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+## [v1.1.6](https://github.com/ljharb/Object.values/compare/v1.1.5...v1.1.6) - 2022-11-06
+
+### Commits
+
+- [actions] reuse common workflows [`4072b71`](https://github.com/ljharb/Object.values/commit/4072b716b4ed42cbd3f3f008ea6a53a374f31bf6)
+- [meta] use `npmignore` to autogenerate an npmignore file [`6881278`](https://github.com/ljharb/Object.values/commit/688127818288a7ab3232aa45ab9271c678a702d5)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `array.prototype.map`, `safe-publish-latest`, `tape` [`28c21e6`](https://github.com/ljharb/Object.values/commit/28c21e6c67420b8a1c466321dce35e883b6e4e52)
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.map`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`0e78caa`](https://github.com/ljharb/Object.values/commit/0e78caadf9d6fae70712ea8d5953517d6b3d9bdb)
+- [actions] update rebase action to use reusable workflow [`6f37c60`](https://github.com/ljharb/Object.values/commit/6f37c60053cfe4bcdd44ddf0f29296fe3c312c1b)
+- [actions] update codecov uploader [`d7c5f30`](https://github.com/ljharb/Object.values/commit/d7c5f3019ccdba81f0afea189e95d5996ea9dd95)
+- [Deps] update `define-properties`, `es-abstract` [`911ca0e`](https://github.com/ljharb/Object.values/commit/911ca0ee81f38cd1541c1c7ec7c29ec9904d11d5)
+
+## [v1.1.5](https://github.com/ljharb/Object.values/compare/v1.1.4...v1.1.5) - 2021-10-03
+
+### Commits
+
+- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `tape` [`c397925`](https://github.com/ljharb/Object.values/commit/c3979252140c24514aeebf3d452b422528e36349)
+- [Deps] update `es-abstract` [`f98d0da`](https://github.com/ljharb/Object.values/commit/f98d0da2035bf8396b2544f2e2ac02aec766d36f)
+- [Robustness] use a call-bound `Array.prototype.push` [`72a3213`](https://github.com/ljharb/Object.values/commit/72a32138e91a9a7b3a828fa1f8f02fe361097c51)
+- [meta] npmignore coverage output [`3b0433f`](https://github.com/ljharb/Object.values/commit/3b0433fe3025cb079b0de2373a0a9cfd2e0777b5)
+
 ## [v1.1.4](https://github.com/ljharb/Object.values/compare/v1.1.3...v1.1.4) - 2021-05-26
 
 ### Commits
diff --git a/node_modules/object.values/implementation.js b/node_modules/object.values/implementation.js
index edac901a0..9083115ab 100644
--- a/node_modules/object.values/implementation.js
+++ b/node_modules/object.values/implementation.js
@@ -1,16 +1,17 @@
 'use strict';
 
-var RequireObjectCoercible = require('es-abstract/2020/RequireObjectCoercible');
+var RequireObjectCoercible = require('es-abstract/2022/RequireObjectCoercible');
 var callBound = require('call-bind/callBound');
 
 var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
+var $push = callBound('Array.prototype.push');
 
 module.exports = function values(O) {
 	var obj = RequireObjectCoercible(O);
 	var vals = [];
 	for (var key in obj) {
 		if ($isEnumerable(obj, key)) { // checks own-ness as well
-			vals.push(obj[key]);
+			$push(vals, obj[key]);
 		}
 	}
 	return vals;
diff --git a/node_modules/object.values/package.json b/node_modules/object.values/package.json
index 7fac4b865..971667b65 100644
--- a/node_modules/object.values/package.json
+++ b/node_modules/object.values/package.json
@@ -1,6 +1,6 @@
 {
   "name": "object.values",
-  "version": "1.1.4",
+  "version": "1.1.6",
   "author": "Jordan Harband ",
   "funding": {
     "url": "https://github.com/sponsors/ljharb"
@@ -9,13 +9,14 @@
   "license": "MIT",
   "main": "index.js",
   "scripts": {
+    "prepack": "npmignore --auto --commentLines=autogenerated",
     "prepublish": "not-in-publish || npm run prepublishOnly",
     "prepublishOnly": "safe-publish-latest",
     "pretest": "npm run lint",
     "test": "npm run tests-only",
-    "posttest": "npx aud --production",
+    "posttest": "aud --production",
     "tests-only": "nyc tape 'test/**/*.js'",
-    "lint": "eslint .",
+    "lint": "eslint --ext=js,mjs .",
     "postlint": "es-shim-api --bound",
     "version": "auto-changelog && git add CHANGELOG.md",
     "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
@@ -41,22 +42,24 @@
   ],
   "dependencies": {
     "call-bind": "^1.0.2",
-    "define-properties": "^1.1.3",
-    "es-abstract": "^1.18.2"
+    "define-properties": "^1.1.4",
+    "es-abstract": "^1.20.4"
   },
   "devDependencies": {
-    "@es-shims/api": "^2.1.2",
-    "@ljharb/eslint-config": "^17.6.0",
-    "array.prototype.map": "^1.0.3",
-    "aud": "^1.1.5",
-    "auto-changelog": "^2.3.0",
-    "eslint": "^7.27.0",
-    "functions-have-names": "^1.2.2",
+    "@es-shims/api": "^2.2.3",
+    "@ljharb/eslint-config": "^21.0.0",
+    "array.prototype.map": "^1.0.5",
+    "aud": "^2.0.1",
+    "auto-changelog": "^2.4.0",
+    "eslint": "=8.8.0",
+    "functions-have-names": "^1.2.3",
     "has-strict-mode": "^1.0.1",
+    "in-publish": "^2.0.1",
+    "npmignore": "^0.3.0",
     "nyc": "^10.3.2",
     "object-keys": "^1.1.1",
-    "safe-publish-latest": "^1.1.4",
-    "tape": "^5.2.2"
+    "safe-publish-latest": "^2.0.0",
+    "tape": "^5.6.1"
   },
   "testling": {
     "files": "test/index.js",
@@ -86,5 +89,10 @@
     "commitLimit": false,
     "backfillLimit": false,
     "hideCredit": true
+  },
+  "publishConfig": {
+    "ignore": [
+      ".github/workflows"
+    ]
   }
 }
diff --git a/node_modules/parse-json/index.js b/node_modules/parse-json/index.js
deleted file mode 100644
index 16f42b4a3..000000000
--- a/node_modules/parse-json/index.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-const errorEx = require('error-ex');
-const fallback = require('json-parse-better-errors');
-
-const JSONError = errorEx('JSONError', {
-	fileName: errorEx.append('in %s')
-});
-
-module.exports = (input, reviver, filename) => {
-	if (typeof reviver === 'string') {
-		filename = reviver;
-		reviver = null;
-	}
-
-	try {
-		try {
-			return JSON.parse(input, reviver);
-		} catch (err) {
-			fallback(input, reviver);
-
-			throw err;
-		}
-	} catch (err) {
-		err.message = err.message.replace(/\n/g, '');
-
-		const jsonErr = new JSONError(err);
-		if (filename) {
-			jsonErr.fileName = filename;
-		}
-
-		throw jsonErr;
-	}
-};
diff --git a/node_modules/parse-json/license b/node_modules/parse-json/license
deleted file mode 100644
index e7af2f771..000000000
--- a/node_modules/parse-json/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus  (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/parse-json/package.json b/node_modules/parse-json/package.json
deleted file mode 100644
index 7aca6eded..000000000
--- a/node_modules/parse-json/package.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
-  "name": "parse-json",
-  "version": "4.0.0",
-  "description": "Parse JSON with more helpful errors",
-  "license": "MIT",
-  "repository": "sindresorhus/parse-json",
-  "author": {
-    "name": "Sindre Sorhus",
-    "email": "sindresorhus@gmail.com",
-    "url": "sindresorhus.com"
-  },
-  "engines": {
-    "node": ">=4"
-  },
-  "scripts": {
-    "test": "xo && nyc ava"
-  },
-  "files": [
-    "index.js",
-    "vendor"
-  ],
-  "keywords": [
-    "parse",
-    "json",
-    "graceful",
-    "error",
-    "message",
-    "humanize",
-    "friendly",
-    "helpful",
-    "string",
-    "str"
-  ],
-  "dependencies": {
-    "error-ex": "^1.3.1",
-    "json-parse-better-errors": "^1.0.1"
-  },
-  "devDependencies": {
-    "ava": "*",
-    "nyc": "^11.2.1",
-    "xo": "*"
-  }
-}
diff --git a/node_modules/parse-json/readme.md b/node_modules/parse-json/readme.md
deleted file mode 100644
index 2976e3471..000000000
--- a/node_modules/parse-json/readme.md
+++ /dev/null
@@ -1,83 +0,0 @@
-# parse-json [![Build Status](https://travis-ci.org/sindresorhus/parse-json.svg?branch=master)](https://travis-ci.org/sindresorhus/parse-json)
-
-> Parse JSON with more helpful errors
-
-
-## Install
-
-```
-$ npm install parse-json
-```
-
-
-## Usage
-
-```js
-const parseJson = require('parse-json');
-const json = '{\n\t"foo": true,\n}';
-
-
-JSON.parse(json);
-/*
-undefined:3
-}
-^
-SyntaxError: Unexpected token }
-*/
-
-
-parseJson(json);
-/*
-JSONError: Trailing comma in object at 3:1
-}
-^
-*/
-
-
-parseJson(json, 'foo.json');
-/*
-JSONError: Trailing comma in object in foo.json:3:1
-}
-^
-*/
-
-
-// You can also add the filename at a later point
-try {
-	parseJson(json);
-} catch (err) {
-	err.fileName = 'foo.json';
-	throw err;
-}
-/*
-JSONError: Trailing comma in object in foo.json:3:1
-}
-^
-*/
-```
-
-## API
-
-### parseJson(input, [reviver], [filename])
-
-#### input
-
-Type: `string`
-
-#### reviver
-
-Type: `Function`
-
-Prescribes how the value originally produced by parsing is transformed, before being returned. See [`JSON.parse` docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter
-) for more.
-
-#### filename
-
-Type: `string`
-
-Filename displayed in the error message.
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/pkg-up/index.js b/node_modules/pkg-up/index.js
deleted file mode 100644
index 19aeaea38..000000000
--- a/node_modules/pkg-up/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-const findUp = require('find-up');
-
-module.exports = cwd => findUp('package.json', {cwd});
-module.exports.sync = cwd => findUp.sync('package.json', {cwd});
diff --git a/node_modules/pkg-up/license b/node_modules/pkg-up/license
deleted file mode 100644
index 654d0bfe9..000000000
--- a/node_modules/pkg-up/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus  (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/pkg-up/node_modules/find-up/index.js b/node_modules/pkg-up/node_modules/find-up/index.js
deleted file mode 100644
index 939c9553d..000000000
--- a/node_modules/pkg-up/node_modules/find-up/index.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-const path = require('path');
-const locatePath = require('locate-path');
-
-module.exports = (filename, opts) => {
-	opts = opts || {};
-
-	const startDir = path.resolve(opts.cwd || '');
-	const root = path.parse(startDir).root;
-
-	const filenames = [].concat(filename);
-
-	return new Promise(resolve => {
-		(function find(dir) {
-			locatePath(filenames, {cwd: dir}).then(file => {
-				if (file) {
-					resolve(path.join(dir, file));
-				} else if (dir === root) {
-					resolve(null);
-				} else {
-					find(path.dirname(dir));
-				}
-			});
-		})(startDir);
-	});
-};
-
-module.exports.sync = (filename, opts) => {
-	opts = opts || {};
-
-	let dir = path.resolve(opts.cwd || '');
-	const root = path.parse(dir).root;
-
-	const filenames = [].concat(filename);
-
-	// eslint-disable-next-line no-constant-condition
-	while (true) {
-		const file = locatePath.sync(filenames, {cwd: dir});
-
-		if (file) {
-			return path.join(dir, file);
-		} else if (dir === root) {
-			return null;
-		}
-
-		dir = path.dirname(dir);
-	}
-};
diff --git a/node_modules/pkg-up/node_modules/find-up/license b/node_modules/pkg-up/node_modules/find-up/license
deleted file mode 100644
index 654d0bfe9..000000000
--- a/node_modules/pkg-up/node_modules/find-up/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus  (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/pkg-up/node_modules/find-up/package.json b/node_modules/pkg-up/node_modules/find-up/package.json
deleted file mode 100644
index 7ec85bb79..000000000
--- a/node_modules/pkg-up/node_modules/find-up/package.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
-  "name": "find-up",
-  "version": "2.1.0",
-  "description": "Find a file by walking up parent directories",
-  "license": "MIT",
-  "repository": "sindresorhus/find-up",
-  "author": {
-    "name": "Sindre Sorhus",
-    "email": "sindresorhus@gmail.com",
-    "url": "sindresorhus.com"
-  },
-  "engines": {
-    "node": ">=4"
-  },
-  "scripts": {
-    "test": "xo && ava"
-  },
-  "files": [
-    "index.js"
-  ],
-  "keywords": [
-    "find",
-    "up",
-    "find-up",
-    "findup",
-    "look-up",
-    "look",
-    "file",
-    "search",
-    "match",
-    "package",
-    "resolve",
-    "parent",
-    "parents",
-    "folder",
-    "directory",
-    "dir",
-    "walk",
-    "walking",
-    "path"
-  ],
-  "dependencies": {
-    "locate-path": "^2.0.0"
-  },
-  "devDependencies": {
-    "ava": "*",
-    "tempfile": "^1.1.1",
-    "xo": "*"
-  },
-  "xo": {
-    "esnext": true
-  }
-}
diff --git a/node_modules/pkg-up/node_modules/find-up/readme.md b/node_modules/pkg-up/node_modules/find-up/readme.md
deleted file mode 100644
index b5ad69455..000000000
--- a/node_modules/pkg-up/node_modules/find-up/readme.md
+++ /dev/null
@@ -1,85 +0,0 @@
-# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master)
-
-> Find a file by walking up parent directories
-
-
-## Install
-
-```
-$ npm install --save find-up
-```
-
-
-## Usage
-
-```
-/
-└── Users
-		└── sindresorhus
-				├── unicorn.png
-				└── foo
-						└── bar
-								├── baz
-								└── example.js
-```
-
-```js
-// example.js
-const findUp = require('find-up');
-
-findUp('unicorn.png').then(filepath => {
-	console.log(filepath);
-	//=> '/Users/sindresorhus/unicorn.png'
-});
-
-findUp(['rainbow.png', 'unicorn.png']).then(filepath => {
-	console.log(filepath);
-	//=> '/Users/sindresorhus/unicorn.png'
-});
-```
-
-
-## API
-
-### findUp(filename, [options])
-
-Returns a `Promise` for the filepath or `null`.
-
-### findUp([filenameA, filenameB], [options])
-
-Returns a `Promise` for the first filepath found (by respecting the order) or `null`.
-
-### findUp.sync(filename, [options])
-
-Returns a filepath or `null`.
-
-### findUp.sync([filenameA, filenameB], [options])
-
-Returns the first filepath found (by respecting the order) or `null`.
-
-#### filename
-
-Type: `string`
-
-Filename of the file to find.
-
-#### options
-
-##### cwd
-
-Type: `string`
-Default: `process.cwd()` - -Directory to start from. - - -## Related - -- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module -- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file -- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pkg-up/node_modules/locate-path/index.js b/node_modules/pkg-up/node_modules/locate-path/index.js deleted file mode 100644 index 32b108d19..000000000 --- a/node_modules/pkg-up/node_modules/locate-path/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -const path = require('path'); -const pathExists = require('path-exists'); -const pLocate = require('p-locate'); - -module.exports = (iterable, opts) => { - opts = Object.assign({ - cwd: process.cwd() - }, opts); - - return pLocate(iterable, el => pathExists(path.resolve(opts.cwd, el)), opts); -}; - -module.exports.sync = (iterable, opts) => { - opts = Object.assign({ - cwd: process.cwd() - }, opts); - - for (const el of iterable) { - if (pathExists.sync(path.resolve(opts.cwd, el))) { - return el; - } - } -}; diff --git a/node_modules/pkg-up/node_modules/locate-path/license b/node_modules/pkg-up/node_modules/locate-path/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/pkg-up/node_modules/locate-path/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pkg-up/node_modules/locate-path/package.json b/node_modules/pkg-up/node_modules/locate-path/package.json deleted file mode 100644 index 17bcd7ff6..000000000 --- a/node_modules/pkg-up/node_modules/locate-path/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "locate-path", - "version": "2.0.0", - "description": "Get the first path that exists on disk of multiple paths", - "license": "MIT", - "repository": "sindresorhus/locate-path", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "locate", - "path", - "paths", - "file", - "files", - "exists", - "find", - "finder", - "search", - "searcher", - "array", - "iterable", - "iterator" - ], - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/pkg-up/node_modules/locate-path/readme.md b/node_modules/pkg-up/node_modules/locate-path/readme.md deleted file mode 100644 index f7b337bb2..000000000 --- a/node_modules/pkg-up/node_modules/locate-path/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path) - -> Get the first path that exists on disk of multiple paths - - -## Install - -``` -$ npm install --save locate-path -``` - - -## Usage - -Here we find the first file that exists on disk, in array order. - -```js -const locatePath = require('locate-path'); - -const files = [ - 'unicorn.png', - 'rainbow.png', // only this one actually exists on disk - 'pony.png' -]; - -locatePath(files).then(foundPath => { - console.log(foundPath); - //=> 'rainbow' -}); -``` - - -## API - -### locatePath(input, [options]) - -Returns a `Promise` for the first path that exists or `undefined` if none exists. - -#### input - -Type: `Iterable` - -Paths to check. - -#### options - -Type: `Object` - -##### concurrency - -Type: `number`
-Default: `Infinity`
-Minimum: `1` - -Number of concurrently pending promises. - -##### preserveOrder - -Type: `boolean`
-Default: `true` - -Preserve `input` order when searching. - -Disable this to improve performance if you don't care about the order. - -##### cwd - -Type: `string`
-Default: `process.cwd()` - -Current working directory. - -### locatePath.sync(input, [options]) - -Returns the first path that exists or `undefined` if none exists. - -#### input - -Type: `Iterable` - -Paths to check. - -#### options - -Type: `Object` - -##### cwd - -Same as above. - - -## Related - -- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pkg-up/node_modules/p-limit/index.js b/node_modules/pkg-up/node_modules/p-limit/index.js deleted file mode 100644 index 873f0e70d..000000000 --- a/node_modules/pkg-up/node_modules/p-limit/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; -const pTry = require('p-try'); - -module.exports = concurrency => { - if (concurrency < 1) { - throw new TypeError('Expected `concurrency` to be a number from 1 and up'); - } - - const queue = []; - let activeCount = 0; - - const next = () => { - activeCount--; - - if (queue.length > 0) { - queue.shift()(); - } - }; - - return fn => new Promise((resolve, reject) => { - const run = () => { - activeCount++; - - pTry(fn).then( - val => { - resolve(val); - next(); - }, - err => { - reject(err); - next(); - } - ); - }; - - if (activeCount < concurrency) { - run(); - } else { - queue.push(run); - } - }); -}; diff --git a/node_modules/pkg-up/node_modules/p-limit/license b/node_modules/pkg-up/node_modules/p-limit/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/pkg-up/node_modules/p-limit/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/pkg-up/node_modules/p-limit/package.json b/node_modules/pkg-up/node_modules/p-limit/package.json deleted file mode 100644 index 90db5794d..000000000 --- a/node_modules/pkg-up/node_modules/p-limit/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "p-limit", - "version": "1.3.0", - "description": "Run multiple promise-returning & async functions with limited concurrency", - "license": "MIT", - "repository": "sindresorhus/p-limit", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "limit", - "limited", - "concurrency", - "throttle", - "throat", - "rate", - "batch", - "ratelimit", - "task", - "queue", - "async", - "await", - "promises", - "bluebird" - ], - "dependencies": { - "p-try": "^1.0.0" - }, - "devDependencies": { - "ava": "*", - "delay": "^2.0.0", - "in-range": "^1.0.0", - "random-int": "^1.0.0", - "time-span": "^2.0.0", - "xo": "*" - } -} diff --git a/node_modules/pkg-up/node_modules/p-limit/readme.md b/node_modules/pkg-up/node_modules/p-limit/readme.md deleted file mode 100644 index 90129925c..000000000 --- a/node_modules/pkg-up/node_modules/p-limit/readme.md +++ /dev/null @@ -1,69 +0,0 @@ -# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit) - -> Run multiple promise-returning & async functions with limited concurrency - - -## Install - -``` -$ npm install p-limit -``` - - -## Usage - -```js -const pLimit = require('p-limit'); - -const limit = pLimit(1); - -const input = [ - limit(() => fetchSomething('foo')), - limit(() => fetchSomething('bar')), - limit(() => doSomething()) -]; - -(async () => { - // Only one promise is run at once - const result = await Promise.all(input); - console.log(result); -})(); -``` - - -## API - -### pLimit(concurrency) - -Returns a `limit` function. - -#### concurrency - -Type: `number`
-Minimum: `1` - -Concurrency limit. - -### limit(fn) - -Returns the promise returned by calling `fn`. - -#### fn - -Type: `Function` - -Promise-returning/async function. - - -## Related - -- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control -- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions -- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions -- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pkg-up/node_modules/p-locate/index.js b/node_modules/pkg-up/node_modules/p-locate/index.js deleted file mode 100644 index 7461d665b..000000000 --- a/node_modules/pkg-up/node_modules/p-locate/index.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; -const pLimit = require('p-limit'); - -class EndError extends Error { - constructor(value) { - super(); - this.value = value; - } -} - -// the input can also be a promise, so we `Promise.all()` them both -const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0]))); - -module.exports = (iterable, tester, opts) => { - opts = Object.assign({ - concurrency: Infinity, - preserveOrder: true - }, opts); - - const limit = pLimit(opts.concurrency); - - // start all the promises concurrently with optional limit - const items = Array.from(iterable).map(el => [el, limit(() => Promise.resolve(el).then(tester))]); - - // check the promises either serially or concurrently - const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity); - - return Promise.all(items.map(el => checkLimit(() => finder(el)))) - .then(() => {}) - .catch(err => err instanceof EndError ? err.value : Promise.reject(err)); -}; diff --git a/node_modules/pkg-up/node_modules/p-locate/license b/node_modules/pkg-up/node_modules/p-locate/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/pkg-up/node_modules/p-locate/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pkg-up/node_modules/p-locate/package.json b/node_modules/pkg-up/node_modules/p-locate/package.json deleted file mode 100644 index 767002b38..000000000 --- a/node_modules/pkg-up/node_modules/p-locate/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "p-locate", - "version": "2.0.0", - "description": "Get the first fulfilled promise that satisfies the provided testing function", - "license": "MIT", - "repository": "sindresorhus/p-locate", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "locate", - "find", - "finder", - "search", - "searcher", - "test", - "array", - "collection", - "iterable", - "iterator", - "race", - "fulfilled", - "fastest", - "async", - "await", - "promises", - "bluebird" - ], - "dependencies": { - "p-limit": "^1.1.0" - }, - "devDependencies": { - "ava": "*", - "delay": "^1.3.1", - "in-range": "^1.0.0", - "time-span": "^1.0.0", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/pkg-up/node_modules/p-locate/readme.md b/node_modules/pkg-up/node_modules/p-locate/readme.md deleted file mode 100644 index 68b96a47e..000000000 --- a/node_modules/pkg-up/node_modules/p-locate/readme.md +++ /dev/null @@ -1,86 +0,0 @@ -# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate) - -> Get the first fulfilled promise that satisfies the provided testing function - -Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find). - - -## Install - -``` -$ npm install --save p-locate -``` - - -## Usage - -Here we find the first file that exists on disk, in array order. - -```js -const pathExists = require('path-exists'); -const pLocate = require('p-locate'); - -const files = [ - 'unicorn.png', - 'rainbow.png', // only this one actually exists on disk - 'pony.png' -]; - -pLocate(files, file => pathExists(file)).then(foundPath => { - console.log(foundPath); - //=> 'rainbow' -}); -``` - -*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.* - - -## API - -### pLocate(input, tester, [options]) - -Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. - -#### input - -Type: `Iterable` - -#### tester(element) - -Type: `Function` - -Expected to return a `Promise` or boolean. - -#### options - -Type: `Object` - -##### concurrency - -Type: `number`
-Default: `Infinity`
-Minimum: `1` - -Number of concurrently pending promises returned by `tester`. - -##### preserveOrder - -Type: `boolean`
-Default: `true` - -Preserve `input` order when searching. - -Disable this to improve performance if you don't care about the order. - - -## Related - -- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently -- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently -- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pkg-up/node_modules/p-try/index.js b/node_modules/pkg-up/node_modules/p-try/index.js deleted file mode 100644 index efa2f7433..000000000 --- a/node_modules/pkg-up/node_modules/p-try/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = cb => new Promise(resolve => { - resolve(cb()); -}); diff --git a/node_modules/pkg-up/node_modules/p-try/license b/node_modules/pkg-up/node_modules/p-try/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/pkg-up/node_modules/p-try/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pkg-up/node_modules/p-try/package.json b/node_modules/pkg-up/node_modules/p-try/package.json deleted file mode 100644 index ba2513ade..000000000 --- a/node_modules/pkg-up/node_modules/p-try/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "p-try", - "version": "1.0.0", - "description": "`Promise#try()` ponyfill - Starts a promise chain", - "license": "MIT", - "repository": "sindresorhus/p-try", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "try", - "resolve", - "function", - "catch", - "async", - "await", - "promises", - "settled", - "ponyfill", - "polyfill", - "shim", - "bluebird" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/pkg-up/node_modules/p-try/readme.md b/node_modules/pkg-up/node_modules/p-try/readme.md deleted file mode 100644 index 8e5fdddbe..000000000 --- a/node_modules/pkg-up/node_modules/p-try/readme.md +++ /dev/null @@ -1,38 +0,0 @@ -# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try) - -> [`Promise#try()`](https://github.com/ljharb/proposal-promise-try) [ponyfill](https://ponyfill.com) - Starts a promise chain - -[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/) - - -## Install - -``` -$ npm install --save p-try -``` - - -## Usage - -```js -const pTry = require('p-try'); - -pTry(() => { - return synchronousFunctionThatMightThrow(); -}).then(value => { - console.log(value); -}).catch(error => { - console.error(error); -}); -``` - - -## Related - -- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pkg-up/node_modules/path-exists/index.js b/node_modules/pkg-up/node_modules/path-exists/index.js deleted file mode 100644 index 16ae60acb..000000000 --- a/node_modules/pkg-up/node_modules/path-exists/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; -const fs = require('fs'); - -module.exports = fp => new Promise(resolve => { - fs.access(fp, err => { - resolve(!err); - }); -}); - -module.exports.sync = fp => { - try { - fs.accessSync(fp); - return true; - } catch (err) { - return false; - } -}; diff --git a/node_modules/pkg-up/node_modules/path-exists/license b/node_modules/pkg-up/node_modules/path-exists/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/pkg-up/node_modules/path-exists/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pkg-up/node_modules/path-exists/package.json b/node_modules/pkg-up/node_modules/path-exists/package.json deleted file mode 100644 index efd56267e..000000000 --- a/node_modules/pkg-up/node_modules/path-exists/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "path-exists", - "version": "3.0.0", - "description": "Check if a path exists", - "license": "MIT", - "repository": "sindresorhus/path-exists", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "path", - "exists", - "exist", - "file", - "filepath", - "fs", - "filesystem", - "file-system", - "access", - "stat" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/pkg-up/node_modules/path-exists/readme.md b/node_modules/pkg-up/node_modules/path-exists/readme.md deleted file mode 100644 index 1b65fa705..000000000 --- a/node_modules/pkg-up/node_modules/path-exists/readme.md +++ /dev/null @@ -1,50 +0,0 @@ -# path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists) - -> Check if a path exists - -Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it. - -Never use this before handling a file though: - -> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there. - - -## Install - -``` -$ npm install --save path-exists -``` - - -## Usage - -```js -// foo.js -const pathExists = require('path-exists'); - -pathExists('foo.js').then(exists => { - console.log(exists); - //=> true -}); -``` - - -## API - -### pathExists(path) - -Returns a promise for a boolean of whether the path exists. - -### pathExists.sync(path) - -Returns a boolean of whether the path exists. - - -## Related - -- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/pkg-up/package.json b/node_modules/pkg-up/package.json deleted file mode 100644 index 973c31c5b..000000000 --- a/node_modules/pkg-up/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "pkg-up", - "version": "2.0.0", - "description": "Find the closest package.json file", - "license": "MIT", - "repository": "sindresorhus/pkg-up", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "pkg", - "package", - "file", - "find", - "up", - "find-up", - "findup", - "look-up", - "look", - "search", - "match", - "resolve", - "parent", - "parents", - "folder", - "directory", - "dir", - "walk", - "walking", - "path" - ], - "dependencies": { - "find-up": "^2.1.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/node_modules/pkg-up/readme.md b/node_modules/pkg-up/readme.md deleted file mode 100644 index e61d70b1c..000000000 --- a/node_modules/pkg-up/readme.md +++ /dev/null @@ -1,64 +0,0 @@ -# pkg-up [![Build Status](https://travis-ci.org/sindresorhus/pkg-up.svg?branch=master)](https://travis-ci.org/sindresorhus/pkg-up) - -> Find the closest package.json file - - -## Install - -``` -$ npm install --save pkg-up -``` - - -## Usage - -``` -/ -└── Users - └── sindresorhus - └── foo - ├── package.json - └── bar - ├── baz - └── example.js -``` - -```js -// example.js -const pkgUp = require('pkg-up'); - -pkgUp().then(filepath => { - console.log(filepath); - //=> '/Users/sindresorhus/foo/package.json' -}); -``` - - -## API - -### pkgUp([cwd]) - -Returns a `Promise` for either the filepath or `null` if it could be found. - -### pkgUp.sync([cwd]) - -Returns the filepath or `null`. - -#### cwd - -Type: `string` -Default: `process.cwd()` - -Directory to start from. - - -## Related - -- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file -- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package -- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/index.js b/node_modules/read-pkg-up/index.js deleted file mode 100644 index 26079760f..000000000 --- a/node_modules/read-pkg-up/index.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; -const findUp = require('find-up'); -const readPkg = require('read-pkg'); - -module.exports = opts => { - return findUp('package.json', opts).then(fp => { - if (!fp) { - return {}; - } - - return readPkg(fp, opts).then(pkg => ({pkg, path: fp})); - }); -}; - -module.exports.sync = opts => { - const fp = findUp.sync('package.json', opts); - - if (!fp) { - return {}; - } - - return { - pkg: readPkg.sync(fp, opts), - path: fp - }; -}; diff --git a/node_modules/read-pkg-up/license b/node_modules/read-pkg-up/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/read-pkg-up/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/find-up/index.js b/node_modules/read-pkg-up/node_modules/find-up/index.js deleted file mode 100644 index 939c9553d..000000000 --- a/node_modules/read-pkg-up/node_modules/find-up/index.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; -const path = require('path'); -const locatePath = require('locate-path'); - -module.exports = (filename, opts) => { - opts = opts || {}; - - const startDir = path.resolve(opts.cwd || ''); - const root = path.parse(startDir).root; - - const filenames = [].concat(filename); - - return new Promise(resolve => { - (function find(dir) { - locatePath(filenames, {cwd: dir}).then(file => { - if (file) { - resolve(path.join(dir, file)); - } else if (dir === root) { - resolve(null); - } else { - find(path.dirname(dir)); - } - }); - })(startDir); - }); -}; - -module.exports.sync = (filename, opts) => { - opts = opts || {}; - - let dir = path.resolve(opts.cwd || ''); - const root = path.parse(dir).root; - - const filenames = [].concat(filename); - - // eslint-disable-next-line no-constant-condition - while (true) { - const file = locatePath.sync(filenames, {cwd: dir}); - - if (file) { - return path.join(dir, file); - } else if (dir === root) { - return null; - } - - dir = path.dirname(dir); - } -}; diff --git a/node_modules/read-pkg-up/node_modules/find-up/license b/node_modules/read-pkg-up/node_modules/find-up/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/read-pkg-up/node_modules/find-up/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/find-up/package.json b/node_modules/read-pkg-up/node_modules/find-up/package.json deleted file mode 100644 index 7ec85bb79..000000000 --- a/node_modules/read-pkg-up/node_modules/find-up/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "find-up", - "version": "2.1.0", - "description": "Find a file by walking up parent directories", - "license": "MIT", - "repository": "sindresorhus/find-up", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "find", - "up", - "find-up", - "findup", - "look-up", - "look", - "file", - "search", - "match", - "package", - "resolve", - "parent", - "parents", - "folder", - "directory", - "dir", - "walk", - "walking", - "path" - ], - "dependencies": { - "locate-path": "^2.0.0" - }, - "devDependencies": { - "ava": "*", - "tempfile": "^1.1.1", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/read-pkg-up/node_modules/find-up/readme.md b/node_modules/read-pkg-up/node_modules/find-up/readme.md deleted file mode 100644 index b5ad69455..000000000 --- a/node_modules/read-pkg-up/node_modules/find-up/readme.md +++ /dev/null @@ -1,85 +0,0 @@ -# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master) - -> Find a file by walking up parent directories - - -## Install - -``` -$ npm install --save find-up -``` - - -## Usage - -``` -/ -└── Users - └── sindresorhus - ├── unicorn.png - └── foo - └── bar - ├── baz - └── example.js -``` - -```js -// example.js -const findUp = require('find-up'); - -findUp('unicorn.png').then(filepath => { - console.log(filepath); - //=> '/Users/sindresorhus/unicorn.png' -}); - -findUp(['rainbow.png', 'unicorn.png']).then(filepath => { - console.log(filepath); - //=> '/Users/sindresorhus/unicorn.png' -}); -``` - - -## API - -### findUp(filename, [options]) - -Returns a `Promise` for the filepath or `null`. - -### findUp([filenameA, filenameB], [options]) - -Returns a `Promise` for the first filepath found (by respecting the order) or `null`. - -### findUp.sync(filename, [options]) - -Returns a filepath or `null`. - -### findUp.sync([filenameA, filenameB], [options]) - -Returns the first filepath found (by respecting the order) or `null`. - -#### filename - -Type: `string` - -Filename of the file to find. - -#### options - -##### cwd - -Type: `string`
-Default: `process.cwd()` - -Directory to start from. - - -## Related - -- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module -- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file -- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/node_modules/load-json-file/index.js b/node_modules/read-pkg-up/node_modules/load-json-file/index.js deleted file mode 100644 index b2767e302..000000000 --- a/node_modules/read-pkg-up/node_modules/load-json-file/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -const path = require('path'); -const fs = require('graceful-fs'); -const stripBom = require('strip-bom'); -const parseJson = require('parse-json'); -const pify = require('pify'); - -const parse = (data, fp) => parseJson(stripBom(data), path.relative('.', fp)); - -module.exports = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data, fp)); -module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8'), fp); diff --git a/node_modules/read-pkg-up/node_modules/load-json-file/license b/node_modules/read-pkg-up/node_modules/load-json-file/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/read-pkg-up/node_modules/load-json-file/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/load-json-file/package.json b/node_modules/read-pkg-up/node_modules/load-json-file/package.json deleted file mode 100644 index 8bfb1c600..000000000 --- a/node_modules/read-pkg-up/node_modules/load-json-file/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "load-json-file", - "version": "4.0.0", - "description": "Read and parse a JSON file", - "license": "MIT", - "repository": "sindresorhus/load-json-file", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "read", - "json", - "parse", - "file", - "fs", - "graceful", - "load" - ], - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/read-pkg-up/node_modules/load-json-file/readme.md b/node_modules/read-pkg-up/node_modules/load-json-file/readme.md deleted file mode 100644 index 3319c266c..000000000 --- a/node_modules/read-pkg-up/node_modules/load-json-file/readme.md +++ /dev/null @@ -1,45 +0,0 @@ -# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file) - -> Read and parse a JSON file - -[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json). - - -## Install - -``` -$ npm install --save load-json-file -``` - - -## Usage - -```js -const loadJsonFile = require('load-json-file'); - -loadJsonFile('foo.json').then(json => { - console.log(json); - //=> {foo: true} -}); -``` - - -## API - -### loadJsonFile(filepath) - -Returns a promise for the parsed JSON. - -### loadJsonFile.sync(filepath) - -Returns the parsed JSON. - - -## Related - -- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/node_modules/locate-path/index.js b/node_modules/read-pkg-up/node_modules/locate-path/index.js deleted file mode 100644 index 32b108d19..000000000 --- a/node_modules/read-pkg-up/node_modules/locate-path/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -const path = require('path'); -const pathExists = require('path-exists'); -const pLocate = require('p-locate'); - -module.exports = (iterable, opts) => { - opts = Object.assign({ - cwd: process.cwd() - }, opts); - - return pLocate(iterable, el => pathExists(path.resolve(opts.cwd, el)), opts); -}; - -module.exports.sync = (iterable, opts) => { - opts = Object.assign({ - cwd: process.cwd() - }, opts); - - for (const el of iterable) { - if (pathExists.sync(path.resolve(opts.cwd, el))) { - return el; - } - } -}; diff --git a/node_modules/read-pkg-up/node_modules/locate-path/license b/node_modules/read-pkg-up/node_modules/locate-path/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/read-pkg-up/node_modules/locate-path/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/locate-path/package.json b/node_modules/read-pkg-up/node_modules/locate-path/package.json deleted file mode 100644 index 17bcd7ff6..000000000 --- a/node_modules/read-pkg-up/node_modules/locate-path/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "locate-path", - "version": "2.0.0", - "description": "Get the first path that exists on disk of multiple paths", - "license": "MIT", - "repository": "sindresorhus/locate-path", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "locate", - "path", - "paths", - "file", - "files", - "exists", - "find", - "finder", - "search", - "searcher", - "array", - "iterable", - "iterator" - ], - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/read-pkg-up/node_modules/locate-path/readme.md b/node_modules/read-pkg-up/node_modules/locate-path/readme.md deleted file mode 100644 index f7b337bb2..000000000 --- a/node_modules/read-pkg-up/node_modules/locate-path/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path) - -> Get the first path that exists on disk of multiple paths - - -## Install - -``` -$ npm install --save locate-path -``` - - -## Usage - -Here we find the first file that exists on disk, in array order. - -```js -const locatePath = require('locate-path'); - -const files = [ - 'unicorn.png', - 'rainbow.png', // only this one actually exists on disk - 'pony.png' -]; - -locatePath(files).then(foundPath => { - console.log(foundPath); - //=> 'rainbow' -}); -``` - - -## API - -### locatePath(input, [options]) - -Returns a `Promise` for the first path that exists or `undefined` if none exists. - -#### input - -Type: `Iterable` - -Paths to check. - -#### options - -Type: `Object` - -##### concurrency - -Type: `number`
-Default: `Infinity`
-Minimum: `1` - -Number of concurrently pending promises. - -##### preserveOrder - -Type: `boolean`
-Default: `true` - -Preserve `input` order when searching. - -Disable this to improve performance if you don't care about the order. - -##### cwd - -Type: `string`
-Default: `process.cwd()` - -Current working directory. - -### locatePath.sync(input, [options]) - -Returns the first path that exists or `undefined` if none exists. - -#### input - -Type: `Iterable` - -Paths to check. - -#### options - -Type: `Object` - -##### cwd - -Same as above. - - -## Related - -- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/node_modules/p-limit/index.js b/node_modules/read-pkg-up/node_modules/p-limit/index.js deleted file mode 100644 index 873f0e70d..000000000 --- a/node_modules/read-pkg-up/node_modules/p-limit/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; -const pTry = require('p-try'); - -module.exports = concurrency => { - if (concurrency < 1) { - throw new TypeError('Expected `concurrency` to be a number from 1 and up'); - } - - const queue = []; - let activeCount = 0; - - const next = () => { - activeCount--; - - if (queue.length > 0) { - queue.shift()(); - } - }; - - return fn => new Promise((resolve, reject) => { - const run = () => { - activeCount++; - - pTry(fn).then( - val => { - resolve(val); - next(); - }, - err => { - reject(err); - next(); - } - ); - }; - - if (activeCount < concurrency) { - run(); - } else { - queue.push(run); - } - }); -}; diff --git a/node_modules/read-pkg-up/node_modules/p-limit/license b/node_modules/read-pkg-up/node_modules/p-limit/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/read-pkg-up/node_modules/p-limit/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/p-limit/package.json b/node_modules/read-pkg-up/node_modules/p-limit/package.json deleted file mode 100644 index 90db5794d..000000000 --- a/node_modules/read-pkg-up/node_modules/p-limit/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "p-limit", - "version": "1.3.0", - "description": "Run multiple promise-returning & async functions with limited concurrency", - "license": "MIT", - "repository": "sindresorhus/p-limit", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "limit", - "limited", - "concurrency", - "throttle", - "throat", - "rate", - "batch", - "ratelimit", - "task", - "queue", - "async", - "await", - "promises", - "bluebird" - ], - "dependencies": { - "p-try": "^1.0.0" - }, - "devDependencies": { - "ava": "*", - "delay": "^2.0.0", - "in-range": "^1.0.0", - "random-int": "^1.0.0", - "time-span": "^2.0.0", - "xo": "*" - } -} diff --git a/node_modules/read-pkg-up/node_modules/p-limit/readme.md b/node_modules/read-pkg-up/node_modules/p-limit/readme.md deleted file mode 100644 index 90129925c..000000000 --- a/node_modules/read-pkg-up/node_modules/p-limit/readme.md +++ /dev/null @@ -1,69 +0,0 @@ -# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit) - -> Run multiple promise-returning & async functions with limited concurrency - - -## Install - -``` -$ npm install p-limit -``` - - -## Usage - -```js -const pLimit = require('p-limit'); - -const limit = pLimit(1); - -const input = [ - limit(() => fetchSomething('foo')), - limit(() => fetchSomething('bar')), - limit(() => doSomething()) -]; - -(async () => { - // Only one promise is run at once - const result = await Promise.all(input); - console.log(result); -})(); -``` - - -## API - -### pLimit(concurrency) - -Returns a `limit` function. - -#### concurrency - -Type: `number`
-Minimum: `1` - -Concurrency limit. - -### limit(fn) - -Returns the promise returned by calling `fn`. - -#### fn - -Type: `Function` - -Promise-returning/async function. - - -## Related - -- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control -- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions -- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions -- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/node_modules/p-locate/index.js b/node_modules/read-pkg-up/node_modules/p-locate/index.js deleted file mode 100644 index 7461d665b..000000000 --- a/node_modules/read-pkg-up/node_modules/p-locate/index.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; -const pLimit = require('p-limit'); - -class EndError extends Error { - constructor(value) { - super(); - this.value = value; - } -} - -// the input can also be a promise, so we `Promise.all()` them both -const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0]))); - -module.exports = (iterable, tester, opts) => { - opts = Object.assign({ - concurrency: Infinity, - preserveOrder: true - }, opts); - - const limit = pLimit(opts.concurrency); - - // start all the promises concurrently with optional limit - const items = Array.from(iterable).map(el => [el, limit(() => Promise.resolve(el).then(tester))]); - - // check the promises either serially or concurrently - const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity); - - return Promise.all(items.map(el => checkLimit(() => finder(el)))) - .then(() => {}) - .catch(err => err instanceof EndError ? err.value : Promise.reject(err)); -}; diff --git a/node_modules/read-pkg-up/node_modules/p-locate/license b/node_modules/read-pkg-up/node_modules/p-locate/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/read-pkg-up/node_modules/p-locate/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/p-locate/package.json b/node_modules/read-pkg-up/node_modules/p-locate/package.json deleted file mode 100644 index 767002b38..000000000 --- a/node_modules/read-pkg-up/node_modules/p-locate/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "p-locate", - "version": "2.0.0", - "description": "Get the first fulfilled promise that satisfies the provided testing function", - "license": "MIT", - "repository": "sindresorhus/p-locate", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "locate", - "find", - "finder", - "search", - "searcher", - "test", - "array", - "collection", - "iterable", - "iterator", - "race", - "fulfilled", - "fastest", - "async", - "await", - "promises", - "bluebird" - ], - "dependencies": { - "p-limit": "^1.1.0" - }, - "devDependencies": { - "ava": "*", - "delay": "^1.3.1", - "in-range": "^1.0.0", - "time-span": "^1.0.0", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/read-pkg-up/node_modules/p-locate/readme.md b/node_modules/read-pkg-up/node_modules/p-locate/readme.md deleted file mode 100644 index 68b96a47e..000000000 --- a/node_modules/read-pkg-up/node_modules/p-locate/readme.md +++ /dev/null @@ -1,86 +0,0 @@ -# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate) - -> Get the first fulfilled promise that satisfies the provided testing function - -Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find). - - -## Install - -``` -$ npm install --save p-locate -``` - - -## Usage - -Here we find the first file that exists on disk, in array order. - -```js -const pathExists = require('path-exists'); -const pLocate = require('p-locate'); - -const files = [ - 'unicorn.png', - 'rainbow.png', // only this one actually exists on disk - 'pony.png' -]; - -pLocate(files, file => pathExists(file)).then(foundPath => { - console.log(foundPath); - //=> 'rainbow' -}); -``` - -*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.* - - -## API - -### pLocate(input, tester, [options]) - -Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. - -#### input - -Type: `Iterable` - -#### tester(element) - -Type: `Function` - -Expected to return a `Promise` or boolean. - -#### options - -Type: `Object` - -##### concurrency - -Type: `number`
-Default: `Infinity`
-Minimum: `1` - -Number of concurrently pending promises returned by `tester`. - -##### preserveOrder - -Type: `boolean`
-Default: `true` - -Preserve `input` order when searching. - -Disable this to improve performance if you don't care about the order. - - -## Related - -- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently -- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently -- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/node_modules/p-try/index.js b/node_modules/read-pkg-up/node_modules/p-try/index.js deleted file mode 100644 index efa2f7433..000000000 --- a/node_modules/read-pkg-up/node_modules/p-try/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = cb => new Promise(resolve => { - resolve(cb()); -}); diff --git a/node_modules/read-pkg-up/node_modules/p-try/license b/node_modules/read-pkg-up/node_modules/p-try/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/read-pkg-up/node_modules/p-try/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/p-try/package.json b/node_modules/read-pkg-up/node_modules/p-try/package.json deleted file mode 100644 index ba2513ade..000000000 --- a/node_modules/read-pkg-up/node_modules/p-try/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "p-try", - "version": "1.0.0", - "description": "`Promise#try()` ponyfill - Starts a promise chain", - "license": "MIT", - "repository": "sindresorhus/p-try", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "try", - "resolve", - "function", - "catch", - "async", - "await", - "promises", - "settled", - "ponyfill", - "polyfill", - "shim", - "bluebird" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/read-pkg-up/node_modules/p-try/readme.md b/node_modules/read-pkg-up/node_modules/p-try/readme.md deleted file mode 100644 index 8e5fdddbe..000000000 --- a/node_modules/read-pkg-up/node_modules/p-try/readme.md +++ /dev/null @@ -1,38 +0,0 @@ -# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try) - -> [`Promise#try()`](https://github.com/ljharb/proposal-promise-try) [ponyfill](https://ponyfill.com) - Starts a promise chain - -[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/) - - -## Install - -``` -$ npm install --save p-try -``` - - -## Usage - -```js -const pTry = require('p-try'); - -pTry(() => { - return synchronousFunctionThatMightThrow(); -}).then(value => { - console.log(value); -}).catch(error => { - console.error(error); -}); -``` - - -## Related - -- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/node_modules/path-exists/index.js b/node_modules/read-pkg-up/node_modules/path-exists/index.js deleted file mode 100644 index 16ae60acb..000000000 --- a/node_modules/read-pkg-up/node_modules/path-exists/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; -const fs = require('fs'); - -module.exports = fp => new Promise(resolve => { - fs.access(fp, err => { - resolve(!err); - }); -}); - -module.exports.sync = fp => { - try { - fs.accessSync(fp); - return true; - } catch (err) { - return false; - } -}; diff --git a/node_modules/read-pkg-up/node_modules/path-exists/license b/node_modules/read-pkg-up/node_modules/path-exists/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/read-pkg-up/node_modules/path-exists/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/path-exists/package.json b/node_modules/read-pkg-up/node_modules/path-exists/package.json deleted file mode 100644 index efd56267e..000000000 --- a/node_modules/read-pkg-up/node_modules/path-exists/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "path-exists", - "version": "3.0.0", - "description": "Check if a path exists", - "license": "MIT", - "repository": "sindresorhus/path-exists", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "path", - "exists", - "exist", - "file", - "filepath", - "fs", - "filesystem", - "file-system", - "access", - "stat" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/node_modules/read-pkg-up/node_modules/path-exists/readme.md b/node_modules/read-pkg-up/node_modules/path-exists/readme.md deleted file mode 100644 index 1b65fa705..000000000 --- a/node_modules/read-pkg-up/node_modules/path-exists/readme.md +++ /dev/null @@ -1,50 +0,0 @@ -# path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists) - -> Check if a path exists - -Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it. - -Never use this before handling a file though: - -> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there. - - -## Install - -``` -$ npm install --save path-exists -``` - - -## Usage - -```js -// foo.js -const pathExists = require('path-exists'); - -pathExists('foo.js').then(exists => { - console.log(exists); - //=> true -}); -``` - - -## API - -### pathExists(path) - -Returns a promise for a boolean of whether the path exists. - -### pathExists.sync(path) - -Returns a boolean of whether the path exists. - - -## Related - -- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/node_modules/path-type/index.js b/node_modules/read-pkg-up/node_modules/path-type/index.js deleted file mode 100644 index 6e0a1b7b7..000000000 --- a/node_modules/read-pkg-up/node_modules/path-type/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; -const fs = require('fs'); -const pify = require('pify'); - -function type(fn, fn2, fp) { - if (typeof fp !== 'string') { - return Promise.reject(new TypeError(`Expected a string, got ${typeof fp}`)); - } - - return pify(fs[fn])(fp) - .then(stats => stats[fn2]()) - .catch(err => { - if (err.code === 'ENOENT') { - return false; - } - - throw err; - }); -} - -function typeSync(fn, fn2, fp) { - if (typeof fp !== 'string') { - throw new TypeError(`Expected a string, got ${typeof fp}`); - } - - try { - return fs[fn](fp)[fn2](); - } catch (err) { - if (err.code === 'ENOENT') { - return false; - } - - throw err; - } -} - -exports.file = type.bind(null, 'stat', 'isFile'); -exports.dir = type.bind(null, 'stat', 'isDirectory'); -exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink'); -exports.fileSync = typeSync.bind(null, 'statSync', 'isFile'); -exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory'); -exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); diff --git a/node_modules/read-pkg-up/node_modules/path-type/license b/node_modules/read-pkg-up/node_modules/path-type/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/read-pkg-up/node_modules/path-type/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/path-type/package.json b/node_modules/read-pkg-up/node_modules/path-type/package.json deleted file mode 100644 index 09f564095..000000000 --- a/node_modules/read-pkg-up/node_modules/path-type/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "path-type", - "version": "3.0.0", - "description": "Check if a path is a file, directory, or symlink", - "license": "MIT", - "repository": "sindresorhus/path-type", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "path", - "fs", - "type", - "is", - "check", - "directory", - "dir", - "file", - "filepath", - "symlink", - "symbolic", - "link", - "stat", - "stats", - "filesystem" - ], - "dependencies": { - "pify": "^3.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/node_modules/read-pkg-up/node_modules/path-type/readme.md b/node_modules/read-pkg-up/node_modules/path-type/readme.md deleted file mode 100644 index ed2af8b98..000000000 --- a/node_modules/read-pkg-up/node_modules/path-type/readme.md +++ /dev/null @@ -1,42 +0,0 @@ -# path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](https://travis-ci.org/sindresorhus/path-type) - -> Check if a path is a file, directory, or symlink - - -## Install - -``` -$ npm install path-type -``` - - -## Usage - -```js -const pathType = require('path-type'); - -pathType.file('package.json').then(isFile => { - console.log(isFile); - //=> true -}) -``` - - -## API - -### .file(path) -### .dir(path) -### .symlink(path) - -Returns a `Promise` for a `boolean` of whether the path is the checked type. - -### .fileSync(path) -### .dirSync(path) -### .symlinkSync(path) - -Returns a `boolean` of whether the path is the checked type. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/node_modules/pify/index.js b/node_modules/read-pkg-up/node_modules/pify/index.js deleted file mode 100644 index 1dee43ad0..000000000 --- a/node_modules/read-pkg-up/node_modules/pify/index.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -const processFn = (fn, opts) => function () { - const P = opts.promiseModule; - const args = new Array(arguments.length); - - for (let i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - - return new P((resolve, reject) => { - if (opts.errorFirst) { - args.push(function (err, result) { - if (opts.multiArgs) { - const results = new Array(arguments.length - 1); - - for (let i = 1; i < arguments.length; i++) { - results[i - 1] = arguments[i]; - } - - if (err) { - results.unshift(err); - reject(results); - } else { - resolve(results); - } - } else if (err) { - reject(err); - } else { - resolve(result); - } - }); - } else { - args.push(function (result) { - if (opts.multiArgs) { - const results = new Array(arguments.length - 1); - - for (let i = 0; i < arguments.length; i++) { - results[i] = arguments[i]; - } - - resolve(results); - } else { - resolve(result); - } - }); - } - - fn.apply(this, args); - }); -}; - -module.exports = (obj, opts) => { - opts = Object.assign({ - exclude: [/.+(Sync|Stream)$/], - errorFirst: true, - promiseModule: Promise - }, opts); - - const filter = key => { - const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); - return opts.include ? opts.include.some(match) : !opts.exclude.some(match); - }; - - let ret; - if (typeof obj === 'function') { - ret = function () { - if (opts.excludeMain) { - return obj.apply(this, arguments); - } - - return processFn(obj, opts).apply(this, arguments); - }; - } else { - ret = Object.create(Object.getPrototypeOf(obj)); - } - - for (const key in obj) { // eslint-disable-line guard-for-in - const x = obj[key]; - ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x; - } - - return ret; -}; diff --git a/node_modules/read-pkg-up/node_modules/pify/license b/node_modules/read-pkg-up/node_modules/pify/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/read-pkg-up/node_modules/pify/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/pify/package.json b/node_modules/read-pkg-up/node_modules/pify/package.json deleted file mode 100644 index 468d85760..000000000 --- a/node_modules/read-pkg-up/node_modules/pify/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "pify", - "version": "3.0.0", - "description": "Promisify a callback-style function", - "license": "MIT", - "repository": "sindresorhus/pify", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava && npm run optimization-test", - "optimization-test": "node --allow-natives-syntax optimization-test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "promise", - "promises", - "promisify", - "all", - "denodify", - "denodeify", - "callback", - "cb", - "node", - "then", - "thenify", - "convert", - "transform", - "wrap", - "wrapper", - "bind", - "to", - "async", - "await", - "es2015", - "bluebird" - ], - "devDependencies": { - "ava": "*", - "pinkie-promise": "^2.0.0", - "v8-natives": "^1.0.0", - "xo": "*" - } -} diff --git a/node_modules/read-pkg-up/node_modules/pify/readme.md b/node_modules/read-pkg-up/node_modules/pify/readme.md deleted file mode 100644 index 376ca4e59..000000000 --- a/node_modules/read-pkg-up/node_modules/pify/readme.md +++ /dev/null @@ -1,131 +0,0 @@ -# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify) - -> Promisify a callback-style function - - -## Install - -``` -$ npm install --save pify -``` - - -## Usage - -```js -const fs = require('fs'); -const pify = require('pify'); - -// Promisify a single function -pify(fs.readFile)('package.json', 'utf8').then(data => { - console.log(JSON.parse(data).name); - //=> 'pify' -}); - -// Promisify all methods in a module -pify(fs).readFile('package.json', 'utf8').then(data => { - console.log(JSON.parse(data).name); - //=> 'pify' -}); -``` - - -## API - -### pify(input, [options]) - -Returns a `Promise` wrapped version of the supplied function or module. - -#### input - -Type: `Function` `Object` - -Callback-style function or module whose methods you want to promisify. - -#### options - -##### multiArgs - -Type: `boolean`
-Default: `false` - -By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error. - -```js -const request = require('request'); -const pify = require('pify'); - -pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { - const [httpResponse, body] = result; -}); -``` - -##### include - -Type: `string[]` `RegExp[]` - -Methods in a module to promisify. Remaining methods will be left untouched. - -##### exclude - -Type: `string[]` `RegExp[]`
-Default: `[/.+(Sync|Stream)$/]` - -Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. - -##### excludeMain - -Type: `boolean`
-Default: `false` - -If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module. - -```js -const pify = require('pify'); - -function fn() { - return true; -} - -fn.method = (data, callback) => { - setImmediate(() => { - callback(null, data); - }); -}; - -// Promisify methods but not `fn()` -const promiseFn = pify(fn, {excludeMain: true}); - -if (promiseFn()) { - promiseFn.method('hi').then(data => { - console.log(data); - }); -} -``` - -##### errorFirst - -Type: `boolean`
-Default: `true` - -Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc. - -##### promiseModule - -Type: `Function` - -Custom promise module to use instead of the native one. - -Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill. - - -## Related - -- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted -- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently -- [More…](https://github.com/sindresorhus/promise-fun) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/node_modules/read-pkg/index.js b/node_modules/read-pkg-up/node_modules/read-pkg/index.js deleted file mode 100644 index dff948b69..000000000 --- a/node_modules/read-pkg-up/node_modules/read-pkg/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -const path = require('path'); -const loadJsonFile = require('load-json-file'); -const pathType = require('path-type'); - -module.exports = (fp, opts) => { - if (typeof fp !== 'string') { - opts = fp; - fp = '.'; - } - - opts = opts || {}; - - return pathType.dir(fp) - .then(isDir => { - if (isDir) { - fp = path.join(fp, 'package.json'); - } - - return loadJsonFile(fp); - }) - .then(x => { - if (opts.normalize !== false) { - require('normalize-package-data')(x); - } - - return x; - }); -}; - -module.exports.sync = (fp, opts) => { - if (typeof fp !== 'string') { - opts = fp; - fp = '.'; - } - - opts = opts || {}; - fp = pathType.dirSync(fp) ? path.join(fp, 'package.json') : fp; - - const x = loadJsonFile.sync(fp); - - if (opts.normalize !== false) { - require('normalize-package-data')(x); - } - - return x; -}; diff --git a/node_modules/read-pkg-up/node_modules/read-pkg/license b/node_modules/read-pkg-up/node_modules/read-pkg/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/read-pkg-up/node_modules/read-pkg/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/read-pkg-up/node_modules/read-pkg/package.json b/node_modules/read-pkg-up/node_modules/read-pkg/package.json deleted file mode 100644 index 1a40fe0ed..000000000 --- a/node_modules/read-pkg-up/node_modules/read-pkg/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "read-pkg", - "version": "3.0.0", - "description": "Read a package.json file", - "license": "MIT", - "repository": "sindresorhus/read-pkg", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "json", - "read", - "parse", - "file", - "fs", - "graceful", - "load", - "pkg", - "package", - "normalize" - ], - "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/node_modules/read-pkg-up/node_modules/read-pkg/readme.md b/node_modules/read-pkg-up/node_modules/read-pkg/readme.md deleted file mode 100644 index 687506740..000000000 --- a/node_modules/read-pkg-up/node_modules/read-pkg/readme.md +++ /dev/null @@ -1,79 +0,0 @@ -# read-pkg [![Build Status](https://travis-ci.org/sindresorhus/read-pkg.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg) - -> Read a package.json file - - -## Why - -- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs) -- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom) -- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json) -- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) - - -## Install - -``` -$ npm install read-pkg -``` - - -## Usage - -```js -const readPkg = require('read-pkg'); - -readPkg().then(pkg => { - console.log(pkg); - //=> {name: 'read-pkg', ...} -}); - -readPkg(__dirname).then(pkg => { - console.log(pkg); - //=> {name: 'read-pkg', ...} -}); - -readPkg(path.join('unicorn', 'package.json')).then(pkg => { - console.log(pkg); - //=> {name: 'read-pkg', ...} -}); -``` - - -## API - -### readPkg([path], [options]) - -Returns a `Promise` for the parsed JSON. - -### readPkg.sync([path], [options]) - -Returns the parsed JSON. - -#### path - -Type: `string`
-Default: `process.cwd()` - -Path to a `package.json` file or its directory. - -#### options - -##### normalize - -Type: `boolean`
-Default: `true` - -[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data. - - -## Related - -- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file -- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file -- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/read-pkg-up/package.json b/node_modules/read-pkg-up/package.json deleted file mode 100644 index 5126ad07f..000000000 --- a/node_modules/read-pkg-up/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "read-pkg-up", - "version": "3.0.0", - "description": "Read the closest package.json file", - "license": "MIT", - "repository": "sindresorhus/read-pkg-up", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "json", - "read", - "parse", - "file", - "fs", - "graceful", - "load", - "pkg", - "package", - "find", - "up", - "find-up", - "findup", - "look-up", - "look", - "search", - "match", - "resolve", - "parent", - "parents", - "folder", - "directory", - "dir", - "walk", - "walking", - "path" - ], - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - }, - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/node_modules/read-pkg-up/readme.md b/node_modules/read-pkg-up/readme.md deleted file mode 100644 index ecf739311..000000000 --- a/node_modules/read-pkg-up/readme.md +++ /dev/null @@ -1,80 +0,0 @@ -# read-pkg-up [![Build Status](https://travis-ci.org/sindresorhus/read-pkg-up.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg-up) - -> Read the closest package.json file - - -## Why - -- [Finds the closest package.json](https://github.com/sindresorhus/find-up) -- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs) -- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom) -- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json) -- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) - - -## Install - -``` -$ npm install read-pkg-up -``` - - -## Usage - -```js -const readPkgUp = require('read-pkg-up'); - -readPkgUp().then(result => { - console.log(result); - /* - { - pkg: { - name: 'awesome-package', - version: '1.0.0', - … - }, - path: '/Users/sindresorhus/dev/awesome-package/package.json' - } - */ -}); -``` - - -## API - -### readPkgUp([options]) - -Returns a `Promise` for the result object. - -### readPkgUp.sync([options]) - -Returns the result object. - -#### options - -##### cwd - -Type: `string`
-Default: `process.cwd()` - -Directory to start looking for a package.json file. - -##### normalize - -Type: `boolean`
-Default: `true` - -[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data. - - -## Related - -- [read-pkg](https://github.com/sindresorhus/read-pkg) - Read a package.json file -- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file -- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories -- [pkg-conf](https://github.com/sindresorhus/pkg-conf) - Get namespaced config from the closest package.json - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/regexp.prototype.flags/.editorconfig b/node_modules/regexp.prototype.flags/.editorconfig new file mode 100644 index 000000000..eaa214161 --- /dev/null +++ b/node_modules/regexp.prototype.flags/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = tab; +insert_final_newline = true; +quote_type = auto; +space_after_anonymous_functions = true; +space_after_control_statements = true; +spaces_around_operators = true; +trim_trailing_whitespace = true; +spaces_in_brackets = false; +end_of_line = lf; + diff --git a/node_modules/regexp.prototype.flags/.eslintrc b/node_modules/regexp.prototype.flags/.eslintrc new file mode 100644 index 000000000..dcbbda298 --- /dev/null +++ b/node_modules/regexp.prototype.flags/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "eqeqeq": [2, "allow-null"], + "id-length": 0, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + }, + }, + ], +} diff --git a/node_modules/regexp.prototype.flags/.nycrc b/node_modules/regexp.prototype.flags/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/regexp.prototype.flags/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/regexp.prototype.flags/CHANGELOG.md b/node_modules/regexp.prototype.flags/CHANGELOG.md new file mode 100644 index 000000000..f7bf7b82e --- /dev/null +++ b/node_modules/regexp.prototype.flags/CHANGELOG.md @@ -0,0 +1,190 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.4.3](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.2...v1.4.3) - 2022-04-14 + +### Commits + +- [Fix] when shimmed, name must be `get flags` [`fcefd00`](https://github.com/es-shims/RegExp.prototype.flags/commit/fcefd0039177e9cbcb2ed842d353131ace7a3377) + +## [v1.4.2](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.1...v1.4.2) - 2022-04-12 + +### Commits + +- [Fix] ensure `hasIndices` is patched properly, and getter order is correct [`a1af45a`](https://github.com/es-shims/RegExp.prototype.flags/commit/a1af45a8a6f7305b097b83f96ee9fc45abb3e733) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`24f5a0c`](https://github.com/es-shims/RegExp.prototype.flags/commit/24f5a0c84f2e7d263ae0e2008def870afd6d5a4f) + +## [v1.4.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.0...v1.4.1) - 2022-01-13 + +### Commits + +- [Fix] `polyfill`: do not throw in a descriptorless environment [`e2d24e7`](https://github.com/es-shims/RegExp.prototype.flags/commit/e2d24e707a44d958a0b6d3a114effb2f2b475337) + +## [v1.4.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.2...v1.4.0) - 2022-01-13 + +### Commits + +- [Tests] use `available-regexp-flags` [`95af246`](https://github.com/es-shims/RegExp.prototype.flags/commit/95af2463f1373282087528f8566e20ffae26c3db) +- [New] add `hasIndices`/`d` flag [`89959ca`](https://github.com/es-shims/RegExp.prototype.flags/commit/89959ca1128ea48dcd0ec1416355264425fa3bc5) + +## [v1.3.2](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.1...v1.3.2) - 2022-01-13 + +### Commits + +- [actions] reuse common workflows [`6665b5d`](https://github.com/es-shims/RegExp.prototype.flags/commit/6665b5db7c45ce6b987d08ebaf6d2767eec95b94) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`babce94`](https://github.com/es-shims/RegExp.prototype.flags/commit/babce94b5ca96e93e74e384c0a01295943677a3f) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `object-inspect`, `safe-publish-latest`, `tape` [`52132d9`](https://github.com/es-shims/RegExp.prototype.flags/commit/52132d9f3df904864d4cf3fd44892ee563aee524) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c16687c`](https://github.com/es-shims/RegExp.prototype.flags/commit/c16687c118d374d8997a8d885467507bf943b4bc) +- [actions] update codecov uploader [`0a3c904`](https://github.com/es-shims/RegExp.prototype.flags/commit/0a3c904a9fd1247b3b8e0fb6b451b3fbe97735bd) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`3fce7f2`](https://github.com/es-shims/RegExp.prototype.flags/commit/3fce7f27c753440003675d03ae9a7ecfa6a74d30) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`75ca498`](https://github.com/es-shims/RegExp.prototype.flags/commit/75ca49889349fc42e51ea79b2ec7a1996fb3eb18) +- [actions] update workflows [`300f321`](https://github.com/es-shims/RegExp.prototype.flags/commit/300f321984526066656bec791f0bb3861b33cfbc) +- [meta] better `eccheck` command [`5f735ab`](https://github.com/es-shims/RegExp.prototype.flags/commit/5f735ab1b1c87dbd05c0096249160587f166cd51) +- [Dev Deps] update `eslint`, `tape` [`3059637`](https://github.com/es-shims/RegExp.prototype.flags/commit/3059637210eb5c9fa97160ec2f0aea1d1d724eb7) +- [actions] update workflows` [`dbd8ab4`](https://github.com/es-shims/RegExp.prototype.flags/commit/dbd8ab49fa2196dd74791107825c43e4481cdfd2) +- [meta] use `prepublishOnly` script for npm 7+ [`5cc8652`](https://github.com/es-shims/RegExp.prototype.flags/commit/5cc86524a41bf358b6701bcf46e480f0e3e470b4) +- [Fix] use polyfill, not implementation, in main export [`15ab4b8`](https://github.com/es-shims/RegExp.prototype.flags/commit/15ab4b85f3904e48664e26394dc12765ed666da4) +- [meta] remove `audit-level` config, which breaks npm 7 installs [`1cb98ae`](https://github.com/es-shims/RegExp.prototype.flags/commit/1cb98aed731e73d11df5ed3b853b371d35a69f5a) + +## [v1.3.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.3.0...v1.3.1) - 2021-01-15 + +### Commits + +- [Tests] run `nyc` on all tests; use `tape` runner; add full es-shims test suite [`047a1e8`](https://github.com/es-shims/RegExp.prototype.flags/commit/047a1e8ff250220254b0e9598d962a56c8ec3ffc) +- [Tests] migrate tests to Github Actions [`e4e391f`](https://github.com/es-shims/RegExp.prototype.flags/commit/e4e391fd3e6f057172994ad0c33ca128568c0b06) +- [meta] use `auto-changelog` for changelog [`afbcd06`](https://github.com/es-shims/RegExp.prototype.flags/commit/afbcd06402e97e975af797e2c1375e35e22e90f2) +- [actions] add Require Allow Edits workflow [`0db5d50`](https://github.com/es-shims/RegExp.prototype.flags/commit/0db5d50cdf59e3e5529024af4f8ce05829edc06d) +- [meta] do not publish github action workflow files [`53f2902`](https://github.com/es-shims/RegExp.prototype.flags/commit/53f29020e5a1f517e91b8cf226ed6bc97eadc090) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `aud` [`05f2a85`](https://github.com/es-shims/RegExp.prototype.flags/commit/05f2a851869069c7911176809028be8491465f86) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2a197b8`](https://github.com/es-shims/RegExp.prototype.flags/commit/2a197b84916f094946c5cad56ef8e7bb7e8f12ac) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `safe-publish-latest` [`e40bd37`](https://github.com/es-shims/RegExp.prototype.flags/commit/e40bd37de9bb756672832a6c994652965d09b9ae) +- [Refactor] use `call-bind` instead of `es-abstract` [`e6eac90`](https://github.com/es-shims/RegExp.prototype.flags/commit/e6eac9052ebdb4bc28cb83b5d3017a4ed74fe3f1) +- [Deps] update `es-abstract` [`f198075`](https://github.com/es-shims/RegExp.prototype.flags/commit/f198075d6fc075e0d98967af98a512742e6e7e4f) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`2d21727`](https://github.com/es-shims/RegExp.prototype.flags/commit/2d217275d78214b82c7f5cacca85ca2308df83f1) +- [Deps] update `es-abstract` [`7e7ddc6`](https://github.com/es-shims/RegExp.prototype.flags/commit/7e7ddc66174256f6688a857b09c9a02bafcf4866) + +## [v1.3.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.2.0...v1.3.0) - 2019-12-14 + +### Commits + +- [Tests] remove `jscs` [`4a09ab4`](https://github.com/es-shims/RegExp.prototype.flags/commit/4a09ab467f62065a1718b0dcc50f7818b5400ab6) +- [Tests] use shared travis-ci configs [`8afa6a9`](https://github.com/es-shims/RegExp.prototype.flags/commit/8afa6a99fd35c19fb49ba630fd17159a5da2a34e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `has`, `tape` [`13a9fc9`](https://github.com/es-shims/RegExp.prototype.flags/commit/13a9fc9d6bc2600681eb3f638668beccf80b843c) +- [Refactor] use `callBind` helper from `es-abstract` [`c3a3727`](https://github.com/es-shims/RegExp.prototype.flags/commit/c3a37276764d99c1e4f7e9467ad636fce8c92c58) +- [actions] add automatic rebasing / merge commit blocking [`51e3f93`](https://github.com/es-shims/RegExp.prototype.flags/commit/51e3f9366d15a07edaf532884948ce74b6827125) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`7e1ee50`](https://github.com/es-shims/RegExp.prototype.flags/commit/7e1ee505df374867c2c04d500aa1c36265161b6f) +- [meta] add `funding` field [`c99cbec`](https://github.com/es-shims/RegExp.prototype.flags/commit/c99cbec1af9b0e0be42e82f164adacf2e1bdee16) +- [New] add `auto` entry point [`1e53e85`](https://github.com/es-shims/RegExp.prototype.flags/commit/1e53e854f663472e74dd0350e0c095df9c2b9c7b) +- [Tests] use `eclint` instead of `editorconfig-tools` [`8600bfe`](https://github.com/es-shims/RegExp.prototype.flags/commit/8600bfed42ab8d294463df482874c344fc079f82) +- [Deps] update `define-properties` [`ad221fa`](https://github.com/es-shims/RegExp.prototype.flags/commit/ad221fa2a26a9c2bc8d274b689cf7a626b58f4e9) + +## [v1.2.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.1.1...v1.2.0) - 2017-10-24 + +### Commits + +- [Tests] up to `node` `v8.8`, `v7.10`, `v6.11`, `v4.8`; improve matrix; use `nvm install-latest-npm` so new npm doesn’t break old node [`5a9653d`](https://github.com/es-shims/RegExp.prototype.flags/commit/5a9653d1904eb8ad8baffe43cd065b6f36013e5a) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`; add `has` [`556de86`](https://github.com/es-shims/RegExp.prototype.flags/commit/556de8632bbe7a23279717f7d0b6ee841514fbe1) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`726772c`](https://github.com/es-shims/RegExp.prototype.flags/commit/726772c054a499ab7680823c4bd8fa9b048d9420) +- [New] add support for `dotAll` regex flag. [`fcbd64f`](https://github.com/es-shims/RegExp.prototype.flags/commit/fcbd64f84fd974d98384bdb093bf25656eb72e8f) +- [Dev Deps] update `eslint`, `jscs`, `nsp`, `tape`, `@ljharb/eslint-config`, `@es-shims/api` [`0272934`](https://github.com/es-shims/RegExp.prototype.flags/commit/02729344addadc105b9c5e12d90cca85a75d16d6) +- [Dev Deps] update `jscs`, `nsp`, `eslint` [`e4cd264`](https://github.com/es-shims/RegExp.prototype.flags/commit/e4cd264f4afa33ff865325b04791de95696e3ae4) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@es-shims/api` [`baf5169`](https://github.com/es-shims/RegExp.prototype.flags/commit/baf51698ac00b31b6a4a6d5646a183a409ad1118) +- [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config` [`97cea15`](https://github.com/es-shims/RegExp.prototype.flags/commit/97cea152c20bb0e63e9c5111780f7b4af5d1a0e8) +- [Dev Deps] update `tape`, `discs`, `eslint`, `@ljharb/eslint-config` [`b6872f4`](https://github.com/es-shims/RegExp.prototype.flags/commit/b6872f44c833f6f7faf63881657208b6cd43ef49) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`14702cc`](https://github.com/es-shims/RegExp.prototype.flags/commit/14702ccd050029d4e6ea2e59d0912e6bfc16ffc0) +- [Dev Deps] update `jscs`, `@es-shims/api` [`cd060a6`](https://github.com/es-shims/RegExp.prototype.flags/commit/cd060a650db019be5244e1c1b77a29f6d79c89db) +- [Tests] up to `node` `v6.2`, `v5.11` [`14638bd`](https://github.com/es-shims/RegExp.prototype.flags/commit/14638bdbd62d6b6a7c89efb8ec57a7815032b4bb) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`b0a5ffb`](https://github.com/es-shims/RegExp.prototype.flags/commit/b0a5ffb25a76783053652e0d7f835e354f9b29b6) +- [Tests] npm run silently [`35804d4`](https://github.com/es-shims/RegExp.prototype.flags/commit/35804d45dd7f57faab923aaab914e6390813e700) +- [Tests] up to `node` `v5.9`, `v4.4` [`e0fe80d`](https://github.com/es-shims/RegExp.prototype.flags/commit/e0fe80d96783820444d6dea1e6b5739032a50c1b) +- [Tests] up to `node` `v5.7`, `v4.3` [`9739c42`](https://github.com/es-shims/RegExp.prototype.flags/commit/9739c422523571cc439d73a9ecaf5dc2e2643bec) +- [Dev Deps] update `jscs` [`4aa1699`](https://github.com/es-shims/RegExp.prototype.flags/commit/4aa1699a0582b7739f14c6cd8d5ae1a4515bd604) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `@ljharb/eslint-config` [`8bc5e6b`](https://github.com/es-shims/RegExp.prototype.flags/commit/8bc5e6ba5befc8f399e00f3c2d064519457fb57c) +- [Tests] fix npm upgrades on older nodes [`ae00bb9`](https://github.com/es-shims/RegExp.prototype.flags/commit/ae00bb9d979605f41fc598156b5c590923ac8184) +- Only apps should have lockfiles. [`6d14965`](https://github.com/es-shims/RegExp.prototype.flags/commit/6d1496550a962ea8525fb7b62dc4ac99d9513a6d) +- [Tests] use pretest/posttest for better organization [`0520cfd`](https://github.com/es-shims/RegExp.prototype.flags/commit/0520cfda23835fb5bff038a6e5cc530b0ce66985) +- [Tests] up to `node` `v5.5` [`810f62b`](https://github.com/es-shims/RegExp.prototype.flags/commit/810f62b6d2418e843b7c2c225841e9305dbc01ee) +- [Tests] on `node` `v5.3` [`f839662`](https://github.com/es-shims/RegExp.prototype.flags/commit/f839662887cbb1a5e472a9302185355b431c85c1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`78ecaa5`](https://github.com/es-shims/RegExp.prototype.flags/commit/78ecaa5b203a07f76505824f77ce1e5d60d8b0ca) +- [Tests] up to `node` `v5.2` [`c04d762`](https://github.com/es-shims/RegExp.prototype.flags/commit/c04d762a8c09ab544df14c14521f32dac3f67823) +- [Tests] up to `node` `v5.0` [`7c0d5b9`](https://github.com/es-shims/RegExp.prototype.flags/commit/7c0d5b944d9ba30f38227d0750109d582be254e2) +- [Tests] on `node` `v5.10` [`40ddafd`](https://github.com/es-shims/RegExp.prototype.flags/commit/40ddafd83e2e1c959ee8ba24cb296559f2545a0c) +- [Deps] update `define-properties` [`98ea89d`](https://github.com/es-shims/RegExp.prototype.flags/commit/98ea89dc9c41b81b84d4071105048687dab0660e) + +## [v1.1.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.1.0...v1.1.1) - 2015-08-16 + +### Commits + +- [Fix] cover the case where there is no descriptor on the prototype [`67014c3`](https://github.com/es-shims/RegExp.prototype.flags/commit/67014c35a93c76e28c4ab5cd3e5a54f7f40c2ddf) + +## [v1.1.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.0.1...v1.1.0) - 2015-08-16 + +### Commits + +- Update `jscs`, `eslint`; use my personal shared `eslint` config. [`37ca379`](https://github.com/es-shims/RegExp.prototype.flags/commit/37ca379bc72620fa6785b0a9ca791b160328c236) +- Update `eslint`, `tape`, `editorconfig-tools`, `nsp` [`cb92d6e`](https://github.com/es-shims/RegExp.prototype.flags/commit/cb92d6e8a8c1df5f00a226e11a78f38c6f7c3055) +- Implement the [es-shim API](es-shims/api). [`15eb821`](https://github.com/es-shims/RegExp.prototype.flags/commit/15eb821be2771e03a1341a08483513702118b45c) +- Refactoring to reduce complexity. [`aeb4785`](https://github.com/es-shims/RegExp.prototype.flags/commit/aeb47854f6b00355702104066c63f6eed38b5e81) +- Move implementation to `implementation.js` [`a698925`](https://github.com/es-shims/RegExp.prototype.flags/commit/a698925b4c1c78cd1ed4315b9deb5bb1707d5203) +- Update `eslint`, `jscs` [`277a4a1`](https://github.com/es-shims/RegExp.prototype.flags/commit/277a4a15e663eb823b63743b84645158b9bb9a43) +- Update `nsp`, `eslint` [`c9f3866`](https://github.com/es-shims/RegExp.prototype.flags/commit/c9f3866e25b52050f6bfe3fd0de8849de0271ea4) +- Update `tape`, `eslint` [`a08795b`](https://github.com/es-shims/RegExp.prototype.flags/commit/a08795b688b186fa5a2ec207358d81c16a07d30d) +- Make some things a bit more robust. [`450abb4`](https://github.com/es-shims/RegExp.prototype.flags/commit/450abb48974f10bfd2d9478e7ea1b9d87f004fb9) +- Update `eslint` [`25d898f`](https://github.com/es-shims/RegExp.prototype.flags/commit/25d898f62719b26fea5f9245be141103d4ec58cd) +- Test on latest two `io.js` versions. [`2e17ca3`](https://github.com/es-shims/RegExp.prototype.flags/commit/2e17ca304e12fb5071a091706a4d559b3eac968a) +- All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`. [`4a2a548`](https://github.com/es-shims/RegExp.prototype.flags/commit/4a2a5480c50f30814000684462a8a3b44c87ae2e) +- Update `eslint` [`64df4e0`](https://github.com/es-shims/RegExp.prototype.flags/commit/64df4e0a2d0e2901b57652e30913db797dc0829b) +- Update `eslint` [`ac05ae5`](https://github.com/es-shims/RegExp.prototype.flags/commit/ac05ae509a4a70d107820a749ea6f02784fc41eb) +- Clean up `supportsDescriptors` check. [`e44d0de`](https://github.com/es-shims/RegExp.prototype.flags/commit/e44d0dec9c8415ff9a911b8806e1d245d6919a11) +- [Dev Deps] Update `jscs` [`8741758`](https://github.com/es-shims/RegExp.prototype.flags/commit/87417588f52f1176fc37d7c32221aa85f749aa34) +- Update `tape`, `jscs`, `nsp`, `eslint` [`db1f658`](https://github.com/es-shims/RegExp.prototype.flags/commit/db1f6584b18cc035ef3b5aec556f54e0ee8c639d) +- Test on `io.js` `v2.3` [`18c948f`](https://github.com/es-shims/RegExp.prototype.flags/commit/18c948f033c87ab2657a0395052cbec531c40900) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`c37e79f`](https://github.com/es-shims/RegExp.prototype.flags/commit/c37e79f380d87a226a6cdaa5f09f832f5dc21b7d) +- Update `tape`, `jscs`, `eslint` [`4b652bf`](https://github.com/es-shims/RegExp.prototype.flags/commit/4b652bf5f2f0e36a15227d0b4048de91ee6c4433) +- [Dev Deps] Update `tape`, `eslint` [`29d4ac0`](https://github.com/es-shims/RegExp.prototype.flags/commit/29d4ac0bea16c6a9f611cb15baccd30449f30a91) +- Test up to `io.js` `v2.1` [`9f9e342`](https://github.com/es-shims/RegExp.prototype.flags/commit/9f9e34295ced1b288dea08e0a66dffd2bc03ff8b) +- Update `covert`, `jscs` [`c98f3b4`](https://github.com/es-shims/RegExp.prototype.flags/commit/c98f3b47f01f317e8a589486dfaee482c66b8b64) +- Update `jscs` [`9e5e220`](https://github.com/es-shims/RegExp.prototype.flags/commit/9e5e220be6ec5d5b9b658235287e35bded580b06) +- [Dev Deps] update `tape` [`cdd3af2`](https://github.com/es-shims/RegExp.prototype.flags/commit/cdd3af21507b01aa524f8b87f158dfc8a8153c85) +- [Dev Deps] update `tape` [`d42d0bf`](https://github.com/es-shims/RegExp.prototype.flags/commit/d42d0bf28f8da2cb47fff49283a07a693f8cb626) +- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`a5e7453`](https://github.com/es-shims/RegExp.prototype.flags/commit/a5e745375c01e9f90ff632c55a5b44b6ada38217) +- Update `tape` [`2a675ec`](https://github.com/es-shims/RegExp.prototype.flags/commit/2a675ec707a9d89aea403d0b9a723ea531e50c2d) +- Test on `io.js` `v2.5` [`448cbdb`](https://github.com/es-shims/RegExp.prototype.flags/commit/448cbdb7df47e52677daea4e0c41e892ad8770e4) +- Test on `io.js` `v2.4` [`948e511`](https://github.com/es-shims/RegExp.prototype.flags/commit/948e51129c01147ffe4dedc3a7d4980128d0cf73) +- Test on `io.js` `v2.2` [`4793278`](https://github.com/es-shims/RegExp.prototype.flags/commit/4793278f5aca187e36b42b08fc1388d8021400e2) +- Update `eslint` [`0f463da`](https://github.com/es-shims/RegExp.prototype.flags/commit/0f463daa14a193ed94b16c46832074d63e861c91) +- Update `eslint` [`5a16967`](https://github.com/es-shims/RegExp.prototype.flags/commit/5a16967db71bb8a24c81a27ee366f0b02b663e34) +- Test on `io.js` `v3.0` [`7ba8706`](https://github.com/es-shims/RegExp.prototype.flags/commit/7ba87064bc8520d34a9560bea8e366d70c93dbbb) +- Test on `iojs-v1.2` [`b521e09`](https://github.com/es-shims/RegExp.prototype.flags/commit/b521e099b7de48cfbdd6860265eb5e972d2859a5) + +## [v1.0.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.0.0...v1.0.1) - 2014-12-13 + +### Merged + +- Match the spec properly: throw when not an object; make getter generic. [`#3`](https://github.com/es-shims/RegExp.prototype.flags/pull/3) + +### Fixed + +- Match the spec properly [`#1`](https://github.com/es-shims/RegExp.prototype.flags/issues/1) + +### Commits + +- Speed up the “is object” check in case of `null` or `undefined` [`77137f9`](https://github.com/es-shims/RegExp.prototype.flags/commit/77137f99449c9b6583cdfda295a00b832dfd45f3) + +## v1.0.0 - 2014-12-10 + +### Commits + +- Adding dotfiles [`313812e`](https://github.com/es-shims/RegExp.prototype.flags/commit/313812e1d8ff42a13dbc8689f2e719324c46c9ca) +- Tests [`625a042`](https://github.com/es-shims/RegExp.prototype.flags/commit/625a042220a3152b49608fb6f187f67bff02b6fb) +- Add package.json [`8b98257`](https://github.com/es-shims/RegExp.prototype.flags/commit/8b98257f900d0a73c8eb3805b9b01999e05e880a) +- Adding the README [`884798b`](https://github.com/es-shims/RegExp.prototype.flags/commit/884798b710d5a85bc6d9a6879f509766e2e57c0e) +- Implementation. [`4186cc9`](https://github.com/es-shims/RegExp.prototype.flags/commit/4186cc9d9a7533f78d88be976f0a8a2757604fc5) +- Adding LICENSE and CHANGELOG [`f87fa81`](https://github.com/es-shims/RegExp.prototype.flags/commit/f87fa8126cc6c39747fbe0dc6cb40ca0ff77fbbc) +- Fixing README URLs [`b821703`](https://github.com/es-shims/RegExp.prototype.flags/commit/b821703d5e5b01ee4f526f15c8e525645cf95ef7) +- Clean up dependencies; update `tape`, `jscs`, `nsp` [`0e13fc1`](https://github.com/es-shims/RegExp.prototype.flags/commit/0e13fc12df09f3a7ac30116ef13bba820c220730) +- Initial commit. [`8a9e35e`](https://github.com/es-shims/RegExp.prototype.flags/commit/8a9e35e15f65c9640e64ee14fab190a60993efaa) diff --git a/node_modules/is-arrayish/LICENSE b/node_modules/regexp.prototype.flags/LICENSE similarity index 96% rename from node_modules/is-arrayish/LICENSE rename to node_modules/regexp.prototype.flags/LICENSE index 0a5f461a6..e5956a86b 100644 --- a/node_modules/is-arrayish/LICENSE +++ b/node_modules/regexp.prototype.flags/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 JD Ballard +Copyright (C) 2014 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/regexp.prototype.flags/README.md b/node_modules/regexp.prototype.flags/README.md new file mode 100644 index 000000000..77e151e21 --- /dev/null +++ b/node_modules/regexp.prototype.flags/README.md @@ -0,0 +1,54 @@ +RegExp.prototype.flags [![Version Badge][npm-version-svg]][package-url] + +[![Build Status][travis-svg]][travis-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +[![browser support][testling-svg]][testling-url] + +An ES6 spec-compliant `RegExp.prototype.flags` shim. Invoke its "shim" method to shim RegExp.prototype.flags if it is unavailable. +*Note*: `RegExp#flags` requires a true ES5 environment - specifically, one with ES5 getters. + +This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES5-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/6.0/#sec-get-regexp.prototype.flags). + +Most common usage: +```js +var flags = require('regexp.prototype.flags'); + +assert(flags(/a/) === ''); +assert(flags(new RegExp('a') === ''); +assert(flags(/a/mig) === 'gim'); +assert(flags(new RegExp('a', 'mig')) === 'gim'); + +if (!RegExp.prototype.flags) { + flags.shim(); +} + +assert(flags(/a/) === /a/.flags); +assert(flags(new RegExp('a') === new RegExp('a').flags); +assert(flags(/a/mig) === /a/mig.flags); +assert(flags(new RegExp('a', 'mig')) === new RegExp('a', 'mig').flags); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/regexp.prototype.flags +[npm-version-svg]: http://versionbadg.es/es-shims/RegExp.prototype.flags.svg +[travis-svg]: https://travis-ci.org/es-shims/RegExp.prototype.flags.svg +[travis-url]: https://travis-ci.org/es-shims/RegExp.prototype.flags +[deps-svg]: https://david-dm.org/es-shims/RegExp.prototype.flags.svg +[deps-url]: https://david-dm.org/es-shims/RegExp.prototype.flags +[dev-deps-svg]: https://david-dm.org/es-shims/RegExp.prototype.flags/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/RegExp.prototype.flags#info=devDependencies +[testling-svg]: https://ci.testling.com/es-shims/RegExp.prototype.flags.png +[testling-url]: https://ci.testling.com/es-shims/RegExp.prototype.flags +[npm-badge-png]: https://nodei.co/npm/regexp.prototype.flags.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/regexp.prototype.flags.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/regexp.prototype.flags.svg +[downloads-url]: http://npm-stat.com/charts.html?package=regexp.prototype.flags diff --git a/node_modules/regexp.prototype.flags/auto.js b/node_modules/regexp.prototype.flags/auto.js new file mode 100644 index 000000000..8ebf606cb --- /dev/null +++ b/node_modules/regexp.prototype.flags/auto.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./shim')(); diff --git a/node_modules/regexp.prototype.flags/implementation.js b/node_modules/regexp.prototype.flags/implementation.js new file mode 100644 index 000000000..9d2f0bc3e --- /dev/null +++ b/node_modules/regexp.prototype.flags/implementation.js @@ -0,0 +1,39 @@ +'use strict'; + +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); + +var $Object = Object; +var $TypeError = TypeError; + +module.exports = function flags() { + if (this != null && this !== $Object(this)) { + throw new $TypeError('RegExp.prototype.flags getter called on non-object'); + } + var result = ''; + if (this.hasIndices) { + result += 'd'; + } + if (this.global) { + result += 'g'; + } + if (this.ignoreCase) { + result += 'i'; + } + if (this.multiline) { + result += 'm'; + } + if (this.dotAll) { + result += 's'; + } + if (this.unicode) { + result += 'u'; + } + if (this.sticky) { + result += 'y'; + } + return result; +}; + +if (functionsHaveConfigurableNames && Object.defineProperty) { + Object.defineProperty(module.exports, 'name', { value: 'get flags' }); +} diff --git a/node_modules/regexp.prototype.flags/index.js b/node_modules/regexp.prototype.flags/index.js new file mode 100644 index 000000000..d6054c766 --- /dev/null +++ b/node_modules/regexp.prototype.flags/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var define = require('define-properties'); +var callBind = require('call-bind'); + +var implementation = require('./implementation'); +var getPolyfill = require('./polyfill'); +var shim = require('./shim'); + +var flagsBound = callBind(getPolyfill()); + +define(flagsBound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = flagsBound; diff --git a/node_modules/regexp.prototype.flags/package.json b/node_modules/regexp.prototype.flags/package.json new file mode 100644 index 000000000..cbcdc216f --- /dev/null +++ b/node_modules/regexp.prototype.flags/package.json @@ -0,0 +1,92 @@ +{ + "name": "regexp.prototype.flags", + "version": "1.4.3", + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "description": "ES6 spec-compliant RegExp.prototype.flags shim.", + "license": "MIT", + "main": "index.js", + "scripts": { + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/es-shims/RegExp.prototype.flags.git" + }, + "keywords": [ + "RegExp.prototype.flags", + "regex", + "regular expression", + "ES6", + "shim", + "flag", + "flags", + "regexp", + "RegExp#flags", + "polyfill", + "es-shim API" + ], + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + }, + "devDependencies": { + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "available-regexp-flags": "^1.0.0", + "covert": "^1.1.1", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "foreach": "^2.0.5", + "has": "^1.0.3", + "has-strict-mode": "^1.0.1", + "nyc": "^10.3.2", + "object-inspect": "^1.12.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/9.0..latest", + "firefox/4.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/11.6..latest", + "opera/next", + "safari/5.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/regexp.prototype.flags/polyfill.js b/node_modules/regexp.prototype.flags/polyfill.js new file mode 100644 index 000000000..2ea3dac46 --- /dev/null +++ b/node_modules/regexp.prototype.flags/polyfill.js @@ -0,0 +1,36 @@ +'use strict'; + +var implementation = require('./implementation'); + +var supportsDescriptors = require('define-properties').supportsDescriptors; +var $gOPD = Object.getOwnPropertyDescriptor; + +module.exports = function getPolyfill() { + if (supportsDescriptors && (/a/mig).flags === 'gim') { + var descriptor = $gOPD(RegExp.prototype, 'flags'); + if ( + descriptor + && typeof descriptor.get === 'function' + && typeof RegExp.prototype.dotAll === 'boolean' + && typeof RegExp.prototype.hasIndices === 'boolean' + ) { + /* eslint getter-return: 0 */ + var calls = ''; + var o = {}; + Object.defineProperty(o, 'hasIndices', { + get: function () { + calls += 'd'; + } + }); + Object.defineProperty(o, 'sticky', { + get: function () { + calls += 'y'; + } + }); + if (calls === 'dy') { + return descriptor.get; + } + } + } + return implementation; +}; diff --git a/node_modules/regexp.prototype.flags/shim.js b/node_modules/regexp.prototype.flags/shim.js new file mode 100644 index 000000000..3ec77c14f --- /dev/null +++ b/node_modules/regexp.prototype.flags/shim.js @@ -0,0 +1,26 @@ +'use strict'; + +var supportsDescriptors = require('define-properties').supportsDescriptors; +var getPolyfill = require('./polyfill'); +var gOPD = Object.getOwnPropertyDescriptor; +var defineProperty = Object.defineProperty; +var TypeErr = TypeError; +var getProto = Object.getPrototypeOf; +var regex = /a/; + +module.exports = function shimFlags() { + if (!supportsDescriptors || !getProto) { + throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors'); + } + var polyfill = getPolyfill(); + var proto = getProto(regex); + var descriptor = gOPD(proto, 'flags'); + if (!descriptor || descriptor.get !== polyfill) { + defineProperty(proto, 'flags', { + configurable: true, + enumerable: false, + get: polyfill + }); + } + return polyfill; +}; diff --git a/node_modules/regexp.prototype.flags/test/implementation.js b/node_modules/regexp.prototype.flags/test/implementation.js new file mode 100644 index 000000000..1e3a71416 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/implementation.js @@ -0,0 +1,20 @@ +'use strict'; + +var flags = require('../implementation'); +var callBind = require('call-bind'); +var test = require('tape'); +var hasStrictMode = require('has-strict-mode')(); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + /* eslint no-useless-call: 0 */ + st['throws'](function () { flags.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { flags.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(callBind(flags), t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/index.js b/node_modules/regexp.prototype.flags/test/index.js new file mode 100644 index 000000000..10d107133 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var flags = require('../'); +var test = require('tape'); +var runTests = require('./tests'); + +test('as a function', function (t) { + t.test('bad array/this value', function (st) { + st['throws'](function () { flags(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { flags(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + runTests(flags, t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/shimmed.js b/node_modules/regexp.prototype.flags/test/shimmed.js new file mode 100644 index 000000000..059e0e17d --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/shimmed.js @@ -0,0 +1,48 @@ +'use strict'; + +require('../auto'); + +var test = require('tape'); +var defineProperties = require('define-properties'); +var callBind = require('call-bind'); + +var isEnumerable = Object.prototype.propertyIsEnumerable; +var functionsHaveNames = require('functions-have-names')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); +var hasStrictMode = require('has-strict-mode')(); + +var runTests = require('./tests'); + +test('shimmed', function (t) { + var descriptor = Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags'); + + t.equal(descriptor.get.length, 0, 'RegExp#flags getter has a length of 0'); + + t.test('Function name', { skip: !functionsHaveNames }, function (st) { + st.equal(descriptor.get.name, functionsHaveConfigurableNames ? 'get flags' : 'flags', 'RegExp#flags getter has name "get flags" (or "flags" if function names are not configurable)'); + st.end(); + }); + + t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { + et.equal(false, isEnumerable.call(RegExp.prototype, 'flags'), 'RegExp#flags is not enumerable'); + et.end(); + }); + + t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { + st['throws'](function () { return descriptor.get.call(undefined); }, TypeError, 'undefined is not an object'); + st['throws'](function () { return descriptor.get.call(null); }, TypeError, 'null is not an object'); + st.end(); + }); + + t.test('has the correct descriptor', function (st) { + st.equal(descriptor.configurable, true); + st.equal(descriptor.enumerable, false); + st.equal(typeof descriptor.get, 'function'); + st.equal(descriptor.set, undefined); + st.end(); + }); + + runTests(callBind(descriptor.get), t); + + t.end(); +}); diff --git a/node_modules/regexp.prototype.flags/test/tests.js b/node_modules/regexp.prototype.flags/test/tests.js new file mode 100644 index 000000000..0421a99b2 --- /dev/null +++ b/node_modules/regexp.prototype.flags/test/tests.js @@ -0,0 +1,141 @@ +'use strict'; + +var has = require('has'); +var inspect = require('object-inspect'); +var supportsDescriptors = require('define-properties').supportsDescriptors; + +var forEach = require('foreach'); +var availableFlags = require('available-regexp-flags'); +var regexProperties = require('available-regexp-flags/properties'); + +var sortedFlags = availableFlags.slice().sort(function (a, b) { return a.localeCompare(b); }).join(''); + +var getRegexLiteral = function (stringRegex) { + try { + // eslint-disable-next-line no-new-func + return Function('return ' + stringRegex + ';')(); + } catch (e) { /**/ } + return null; +}; + +module.exports = function runTests(flags, t) { + t.equal(flags(/a/g), 'g', 'flags(/a/g) !== "g"'); + t.equal(flags(/a/gmi), 'gim', 'flags(/a/gmi) !== "gim"'); + t.equal(flags(new RegExp('a', 'gmi')), 'gim', 'flags(new RegExp("a", "gmi")) !== "gim"'); + t.equal(flags(/a/), '', 'flags(/a/) !== ""'); + t.equal(flags(new RegExp('a')), '', 'flags(new RegExp("a")) !== ""'); + + forEach(availableFlags, function (flag) { + var property = regexProperties[flag]; + t.test(property + ' flag', function (st) { + st.equal(flags(getRegexLiteral('/a/' + flag)), flag, 'flags(/a/' + flag + ') !== ' + inspect(flag)); + st.equal(flags(new RegExp('a', flag)), flag, 'flags(new RegExp("a", ' + inspect(flag) + ')) !== ' + inspect(flag)); + st.end(); + }); + }); + + t.test('sorting', function (st) { + st.equal(flags(/a/gim), 'gim', 'flags(/a/gim) !== "gim"'); + st.equal(flags(/a/mig), 'gim', 'flags(/a/mig) !== "gim"'); + st.equal(flags(/a/mgi), 'gim', 'flags(/a/mgi) !== "gim"'); + if (has(RegExp.prototype, 'sticky')) { + st.equal(flags(getRegexLiteral('/a/gyim')), 'gimy', 'flags(/a/gyim) !== "gimy"'); + } + if (has(RegExp.prototype, 'unicode')) { + st.equal(flags(getRegexLiteral('/a/ugmi')), 'gimu', 'flags(/a/ugmi) !== "gimu"'); + } + if (has(RegExp.prototype, 'dotAll')) { + st.equal(flags(getRegexLiteral('/a/sgmi')), 'gims', 'flags(/a/sgmi) !== "gims"'); + } + + var randomFlags = availableFlags.slice().sort(function () { return Math.random() > 0.5 ? 1 : -1; }).join(''); + st.equal( + flags(getRegexLiteral('/a/' + randomFlags)), + sortedFlags, + 'random: flags(/a/' + randomFlags + ') === ' + inspect(sortedFlags) + ); + + st.end(); + }); + + t.test('basic examples', function (st) { + st.equal(flags(/a/g), 'g', '(/a/g).flags !== "g"'); + st.equal(flags(/a/gmi), 'gim', '(/a/gmi).flags !== "gim"'); + st.equal(flags(new RegExp('a', 'gmi')), 'gim', 'new RegExp("a", "gmi").flags !== "gim"'); + st.equal(flags(/a/), '', '(/a/).flags !== ""'); + st.equal(flags(new RegExp('a')), '', 'new RegExp("a").flags !== ""'); + + st.end(); + }); + + t.test('generic flags', function (st) { + st.equal(flags({}), ''); + st.equal(flags({ ignoreCase: true }), 'i'); + st.equal(flags({ dotAll: 1, global: 0, sticky: 1, unicode: 1 }), 'suy'); + st.equal(flags({ __proto__: { multiline: true } }), 'm'); + + var obj = {}; + forEach(availableFlags, function (flag) { + obj[regexProperties[flag]] = true; + }); + st.equal(flags(obj), sortedFlags, 'an object with every available flag: ' + sortedFlags); + + st.end(); + }); + + t.test('throws properly', function (st) { + var nonObjects = ['', false, true, 42, NaN, null, undefined]; + st.plan(nonObjects.length); + var throwsOnNonObject = function (nonObject) { + st['throws'](flags.bind(null, nonObject), TypeError, inspect(nonObject) + ' is not an Object'); + }; + nonObjects.forEach(throwsOnNonObject); + }); + + t.test('getters', { skip: !supportsDescriptors }, function (st) { + /* eslint getter-return: 0 */ + var calls = ''; + var re = {}; + Object.defineProperty(re, 'hasIndices', { + get: function () { + calls += 'd'; + } + }); + Object.defineProperty(re, 'global', { + get: function () { + calls += 'g'; + } + }); + Object.defineProperty(re, 'ignoreCase', { + get: function () { + calls += 'i'; + } + }); + Object.defineProperty(re, 'multiline', { + get: function () { + calls += 'm'; + } + }); + Object.defineProperty(re, 'dotAll', { + get: function () { + calls += 's'; + } + }); + Object.defineProperty(re, 'unicode', { + get: function () { + calls += 'u'; + } + }); + Object.defineProperty(re, 'sticky', { + get: function () { + calls += 'y'; + } + }); + + flags(re); + + st.equal(calls, 'dgimsuy', 'getters are called in expected order'); + + st.end(); + }); +}; diff --git a/node_modules/resolve/.eslintignore b/node_modules/resolve/.eslintignore deleted file mode 100644 index 3c3629e64..000000000 --- a/node_modules/resolve/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/resolve/.eslintrc b/node_modules/resolve/.eslintrc index a22863c8c..ce1be6efc 100644 --- a/node_modules/resolve/.eslintrc +++ b/node_modules/resolve/.eslintrc @@ -1,9 +1,9 @@ { - "extends": "@ljharb", "root": true, + + "extends": "@ljharb", + "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, "indent": [2, 4], "strict": 0, "complexity": 0, @@ -12,28 +12,54 @@ "dot-notation": [2, { "allowKeywords": true }], "func-name-matching": 0, "func-style": 0, - "global-require": 0, + "global-require": 1, "id-length": [2, { "min": 1, "max": 30 }], + "max-lines": [2, 350], "max-lines-per-function": 0, "max-nested-callbacks": 0, "max-params": 0, "max-statements-per-line": [2, { "max": 2 }], "max-statements": 0, "no-magic-numbers": 0, - "no-console": 0, "no-shadow": 0, - "no-unused-vars": [2, { "vars": "all", "args": "none" }], "no-use-before-define": 0, - "object-curly-newline": 0, - "operator-linebreak": [2, "before"], "sort-keys": 0, }, "overrides": [ + { + "files": "bin/**", + "rules": { + "no-process-exit": "off", + }, + }, + { + "files": "example/**", + "rules": { + "no-console": 0, + }, + }, { "files": "test/resolver/nested_symlinks/mylib/*.js", "rules": { "no-throw-literal": 0, }, }, + { + "files": "test/**", + "parserOptions": { + "ecmaVersion": 5, + "allowReserved": false, + }, + "rules": { + "dot-notation": [2, { "allowPattern": "throws" }], + "max-lines": 0, + "max-lines-per-function": 0, + "no-unused-vars": [2, { "vars": "all", "args": "none" }], + }, + }, + ], + + "ignorePatterns": [ + "./test/resolver/malformed_package_json/package.json", ], } diff --git a/node_modules/resolve/.github/FUNDING.yml b/node_modules/resolve/.github/FUNDING.yml new file mode 100644 index 000000000..d9c059554 --- /dev/null +++ b/node_modules/resolve/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/resolve +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/resolve/appveyor.yml b/node_modules/resolve/appveyor.yml deleted file mode 100644 index 747fbdbba..000000000 --- a/node_modules/resolve/appveyor.yml +++ /dev/null @@ -1,74 +0,0 @@ -version: 1.0.{build} -skip_branch_with_pr: true -build: off - -environment: - matrix: - #- nodejs_version: "15" - - nodejs_version: "14" - - nodejs_version: "13" - - nodejs_version: "12" - - nodejs_version: "11" - - nodejs_version: "10" - - nodejs_version: "9" - - nodejs_version: "8" - - nodejs_version: "7" - - nodejs_version: "6" - - nodejs_version: "5" - - nodejs_version: "4" - - nodejs_version: "3" - - nodejs_version: "2" - - nodejs_version: "1" - - nodejs_version: "0.12" - - nodejs_version: "0.10" - - nodejs_version: "0.8" - - nodejs_version: "0.6" -matrix: - # fast_finish: true - allow_failures: - - nodejs_version: "5" # due to windows npm bug, registry-side - - nodejs_version: "0.8" - # platform: x86 # x64 has started failing on the registry side, around early November 2020 - - nodejs_version: "0.6" - -platform: - - x86 - - x64 - -# Install scripts. (runs after repo cloning) -install: - # Fix symlinks in working copy (see https://github.com/appveyor/ci/issues/650#issuecomment-186592582) / https://github.com/charleskorn/batect/commit/d08986802ec43086902958c4ee7e57ff3e71dbef - - git config core.symlinks true - - git reset --hard - # Get the latest stable version of Node.js or io.js - - ps: if ($env:nodejs_version -ne '0.6') { Install-Product node $env:nodejs_version $env:platform } - - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform - - IF %nodejs_version% EQU 0.6 npm config set strict-ssl false && npm -g install npm@1.3 - - IF %nodejs_version% EQU 0.8 npm config set strict-ssl false && npm -g install npm@1.4.28 && npm install -g npm@4.5 - - IF %nodejs_version% EQU 1 npm -g install npm@2.9 - - IF %nodejs_version% EQU 2 npm -g install npm@4 - - IF %nodejs_version% EQU 3 npm -g install npm@4 - - IF %nodejs_version% EQU 4 npm -g install npm@5.3 - - IF %nodejs_version% EQU 5 npm -g install npm@5.3 - - IF %nodejs_version% EQU 6 npm -g install npm@6.9 - - IF %nodejs_version% EQU 7 npm -g install npm@6 - - IF %nodejs_version% EQU 8 npm -g install npm@6 - - IF %nodejs_version% EQU 9 npm -g install npm@6.9 - - IF %nodejs_version% EQU 10 npm -g install npm@7 - - IF %nodejs_version% EQU 11 npm -g install npm@7 - - IF %nodejs_version% EQU 12 npm -g install npm@7 - - IF %nodejs_version% EQU 13 npm -g install npm@7 - - IF %nodejs_version% EQU 14 npm -g install npm@7 - - IF %nodejs_version% EQU 15 npm -g install npm@7 - - set PATH=%APPDATA%\npm;%PATH% - #- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm - # install modules - - npm install - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - # run tests - - npm run tests-only diff --git a/node_modules/resolve/async.js b/node_modules/resolve/async.js new file mode 100644 index 000000000..f38c5813e --- /dev/null +++ b/node_modules/resolve/async.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/async'); diff --git a/node_modules/resolve/bin/resolve b/node_modules/resolve/bin/resolve new file mode 100755 index 000000000..5ee329af9 --- /dev/null +++ b/node_modules/resolve/bin/resolve @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +'use strict'; + +var path = require('path'); +var fs = require('fs'); + +if ( + String(process.env.npm_lifecycle_script).slice(0, 8) !== 'resolve ' + && ( + !process.argv + || process.argv.length < 2 + || (process.argv[1] !== __filename && fs.statSync(process.argv[1]).ino !== fs.statSync(__filename).ino) + || (process.env._ && path.resolve(process.env._) !== __filename) + ) +) { + console.error('Error: `resolve` must be run directly as an executable'); + process.exit(1); +} + +var supportsPreserveSymlinkFlag = require('supports-preserve-symlinks-flag'); + +var preserveSymlinks = false; +for (var i = 2; i < process.argv.length; i += 1) { + if (process.argv[i].slice(0, 2) === '--') { + if (supportsPreserveSymlinkFlag && process.argv[i] === '--preserve-symlinks') { + preserveSymlinks = true; + } else if (process.argv[i].length > 2) { + console.error('Unknown argument ' + process.argv[i].replace(/[=].*$/, '')); + process.exit(2); + } + process.argv.splice(i, 1); + i -= 1; + if (process.argv[i] === '--') { break; } // eslint-disable-line no-restricted-syntax + } +} + +if (process.argv.length < 3) { + console.error('Error: `resolve` expects a specifier'); + process.exit(2); +} + +var resolve = require('../'); + +var result = resolve.sync(process.argv[2], { + basedir: process.cwd(), + preserveSymlinks: preserveSymlinks +}); + +console.log(result); diff --git a/node_modules/resolve/lib/async.js b/node_modules/resolve/lib/async.js index 02e80ac80..60d2555fc 100644 --- a/node_modules/resolve/lib/async.js +++ b/node_modules/resolve/lib/async.js @@ -1,11 +1,20 @@ var fs = require('fs'); +var getHomedir = require('./homedir'); var path = require('path'); var caller = require('./caller'); var nodeModulesPaths = require('./node-modules-paths'); var normalizeOptions = require('./normalize-options'); var isCore = require('is-core-module'); -var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; +var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; var defaultIsFile = function isFile(file, cb) { fs.stat(file, function (err, stat) { @@ -98,7 +107,7 @@ module.exports = function resolve(x, options, callback) { var basedir = opts.basedir || path.dirname(caller()); var parent = opts.filename || basedir; - opts.paths = opts.paths || []; + opts.paths = opts.paths || defaultPaths(); // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory var absoluteStart = path.resolve(basedir); diff --git a/node_modules/resolve/lib/core.js b/node_modules/resolve/lib/core.js index c417d23c5..ecc5b2e96 100644 --- a/node_modules/resolve/lib/core.js +++ b/node_modules/resolve/lib/core.js @@ -15,9 +15,8 @@ function specifierIncluded(specifier) { return cur < ver; } else if (op === '>=') { return cur >= ver; - } else { - return false; } + return false; } return op === '>='; } diff --git a/node_modules/resolve/lib/core.json b/node_modules/resolve/lib/core.json index 0238b61a4..058584b78 100644 --- a/node_modules/resolve/lib/core.json +++ b/node_modules/resolve/lib/core.json @@ -1,83 +1,153 @@ { "assert": true, + "node:assert": [">= 14.18 && < 15", ">= 16"], "assert/strict": ">= 15", + "node:assert/strict": ">= 16", "async_hooks": ">= 8", - "buffer_ieee754": "< 0.9.7", + "node:async_hooks": [">= 14.18 && < 15", ">= 16"], + "buffer_ieee754": ">= 0.5 && < 0.9.7", "buffer": true, + "node:buffer": [">= 14.18 && < 15", ">= 16"], "child_process": true, - "cluster": true, + "node:child_process": [">= 14.18 && < 15", ">= 16"], + "cluster": ">= 0.5", + "node:cluster": [">= 14.18 && < 15", ">= 16"], "console": true, + "node:console": [">= 14.18 && < 15", ">= 16"], "constants": true, + "node:constants": [">= 14.18 && < 15", ">= 16"], "crypto": true, + "node:crypto": [">= 14.18 && < 15", ">= 16"], "_debug_agent": ">= 1 && < 8", "_debugger": "< 8", "dgram": true, - "diagnostics_channel": ">= 15.1", + "node:dgram": [">= 14.18 && < 15", ">= 16"], + "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], + "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], "dns": true, + "node:dns": [">= 14.18 && < 15", ">= 16"], "dns/promises": ">= 15", + "node:dns/promises": ">= 16", "domain": ">= 0.7.12", + "node:domain": [">= 14.18 && < 15", ">= 16"], "events": true, + "node:events": [">= 14.18 && < 15", ">= 16"], "freelist": "< 6", "fs": true, + "node:fs": [">= 14.18 && < 15", ">= 16"], "fs/promises": [">= 10 && < 10.1", ">= 14"], + "node:fs/promises": [">= 14.18 && < 15", ">= 16"], "_http_agent": ">= 0.11.1", + "node:_http_agent": [">= 14.18 && < 15", ">= 16"], "_http_client": ">= 0.11.1", + "node:_http_client": [">= 14.18 && < 15", ">= 16"], "_http_common": ">= 0.11.1", + "node:_http_common": [">= 14.18 && < 15", ">= 16"], "_http_incoming": ">= 0.11.1", + "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], "_http_outgoing": ">= 0.11.1", + "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], "_http_server": ">= 0.11.1", + "node:_http_server": [">= 14.18 && < 15", ">= 16"], "http": true, + "node:http": [">= 14.18 && < 15", ">= 16"], "http2": ">= 8.8", + "node:http2": [">= 14.18 && < 15", ">= 16"], "https": true, - "inspector": ">= 8.0.0", + "node:https": [">= 14.18 && < 15", ">= 16"], + "inspector": ">= 8", + "node:inspector": [">= 14.18 && < 15", ">= 16"], "_linklist": "< 8", "module": true, + "node:module": [">= 14.18 && < 15", ">= 16"], "net": true, - "node-inspect/lib/_inspect": ">= 7.6.0 && < 12", - "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12", - "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12", + "node:net": [">= 14.18 && < 15", ">= 16"], + "node-inspect/lib/_inspect": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", + "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", "os": true, + "node:os": [">= 14.18 && < 15", ">= 16"], "path": true, + "node:path": [">= 14.18 && < 15", ">= 16"], "path/posix": ">= 15.3", + "node:path/posix": ">= 16", "path/win32": ">= 15.3", + "node:path/win32": ">= 16", "perf_hooks": ">= 8.5", + "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], "process": ">= 1", - "punycode": true, + "node:process": [">= 14.18 && < 15", ">= 16"], + "punycode": ">= 0.5", + "node:punycode": [">= 14.18 && < 15", ">= 16"], "querystring": true, + "node:querystring": [">= 14.18 && < 15", ">= 16"], "readline": true, + "node:readline": [">= 14.18 && < 15", ">= 16"], + "readline/promises": ">= 17", + "node:readline/promises": ">= 17", "repl": true, + "node:repl": [">= 14.18 && < 15", ">= 16"], "smalloc": ">= 0.11.5 && < 3", "_stream_duplex": ">= 0.9.4", + "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], "_stream_transform": ">= 0.9.4", + "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], "_stream_wrap": ">= 1.4.1", + "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], "_stream_passthrough": ">= 0.9.4", + "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], "_stream_readable": ">= 0.9.4", + "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], "_stream_writable": ">= 0.9.4", + "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], "stream": true, + "node:stream": [">= 14.18 && < 15", ">= 16"], + "stream/consumers": ">= 16.7", + "node:stream/consumers": ">= 16.7", "stream/promises": ">= 15", + "node:stream/promises": ">= 16", + "stream/web": ">= 16.5", + "node:stream/web": ">= 16.5", "string_decoder": true, - "sys": [">= 0.6 && < 0.7", ">= 0.8"], + "node:string_decoder": [">= 14.18 && < 15", ">= 16"], + "sys": [">= 0.4 && < 0.7", ">= 0.8"], + "node:sys": [">= 14.18 && < 15", ">= 16"], + "node:test": ">= 18", "timers": true, + "node:timers": [">= 14.18 && < 15", ">= 16"], "timers/promises": ">= 15", + "node:timers/promises": ">= 16", "_tls_common": ">= 0.11.13", + "node:_tls_common": [">= 14.18 && < 15", ">= 16"], "_tls_legacy": ">= 0.11.3 && < 10", "_tls_wrap": ">= 0.11.3", + "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], "tls": true, + "node:tls": [">= 14.18 && < 15", ">= 16"], "trace_events": ">= 10", + "node:trace_events": [">= 14.18 && < 15", ">= 16"], "tty": true, + "node:tty": [">= 14.18 && < 15", ">= 16"], "url": true, + "node:url": [">= 14.18 && < 15", ">= 16"], "util": true, + "node:util": [">= 14.18 && < 15", ">= 16"], "util/types": ">= 15.3", + "node:util/types": ">= 16", "v8/tools/arguments": ">= 10 && < 12", - "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], - "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"], + "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], + "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], "v8": ">= 1", + "node:v8": [">= 14.18 && < 15", ">= 16"], "vm": true, + "node:vm": [">= 14.18 && < 15", ">= 16"], "wasi": ">= 13.4 && < 13.5", "worker_threads": ">= 11.7", - "zlib": true + "node:worker_threads": [">= 14.18 && < 15", ">= 16"], + "zlib": ">= 0.5", + "node:zlib": [">= 14.18 && < 15", ">= 16"] } diff --git a/node_modules/resolve/lib/homedir.js b/node_modules/resolve/lib/homedir.js new file mode 100644 index 000000000..5ffdf73bb --- /dev/null +++ b/node_modules/resolve/lib/homedir.js @@ -0,0 +1,24 @@ +'use strict'; + +var os = require('os'); + +// adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js + +module.exports = os.homedir || function homedir() { + var home = process.env.HOME; + var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME; + + if (process.platform === 'win32') { + return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null; + } + + if (process.platform === 'darwin') { + return home || (user ? '/Users/' + user : null); + } + + if (process.platform === 'linux') { + return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens + } + + return home || null; +}; diff --git a/node_modules/resolve/lib/node-modules-paths.js b/node_modules/resolve/lib/node-modules-paths.js index 2b43813a7..1cff0107b 100644 --- a/node_modules/resolve/lib/node-modules-paths.js +++ b/node_modules/resolve/lib/node-modules-paths.js @@ -1,5 +1,5 @@ var path = require('path'); -var parse = path.parse || require('path-parse'); +var parse = path.parse || require('path-parse'); // eslint-disable-line global-require var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { var prefix = '/'; diff --git a/node_modules/resolve/lib/sync.js b/node_modules/resolve/lib/sync.js index ef9bd803c..0b6cd58d4 100644 --- a/node_modules/resolve/lib/sync.js +++ b/node_modules/resolve/lib/sync.js @@ -1,30 +1,39 @@ var isCore = require('is-core-module'); var fs = require('fs'); var path = require('path'); +var getHomedir = require('./homedir'); var caller = require('./caller'); var nodeModulesPaths = require('./node-modules-paths'); var normalizeOptions = require('./normalize-options'); -var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; +var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; + +var homedir = getHomedir(); +var defaultPaths = function () { + return [ + path.join(homedir, '.node_modules'), + path.join(homedir, '.node_libraries') + ]; +}; var defaultIsFile = function isFile(file) { try { - var stat = fs.statSync(file); + var stat = fs.statSync(file, { throwIfNoEntry: false }); } catch (e) { if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; throw e; } - return stat.isFile() || stat.isFIFO(); + return !!stat && (stat.isFile() || stat.isFIFO()); }; var defaultIsDir = function isDirectory(dir) { try { - var stat = fs.statSync(dir); + var stat = fs.statSync(dir, { throwIfNoEntry: false }); } catch (e) { if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; throw e; } - return stat.isDirectory(); + return !!stat && stat.isDirectory(); }; var defaultRealpathSync = function realpathSync(x) { @@ -82,7 +91,7 @@ module.exports = function resolveSync(x, options) { var basedir = opts.basedir || path.dirname(caller()); var parent = opts.filename || basedir; - opts.paths = opts.paths || []; + opts.paths = opts.paths || defaultPaths(); // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts); diff --git a/node_modules/resolve/package.json b/node_modules/resolve/package.json index 4799ea0ba..897b6edba 100644 --- a/node_modules/resolve/package.json +++ b/node_modules/resolve/package.json @@ -1,11 +1,14 @@ { "name": "resolve", "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "version": "1.20.0", + "version": "1.22.1", "repository": { "type": "git", "url": "git://github.com/browserify/resolve.git" }, + "bin": { + "resolve": "./bin/resolve" + }, "main": "index.js", "keywords": [ "resolve", @@ -14,9 +17,11 @@ "module" ], "scripts": { - "prepublish": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/ ||:", - "prelint": "eclint check '**/*'", - "lint": "eslint --ext=js,mjs .", + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/ ||:", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", + "lint": "eslint --ext=js,mjs --no-eslintrc -c .eslintrc . 'bin/**'", "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", "tests-only": "tape test/*.js", "pretest": "npm run lint", @@ -25,15 +30,23 @@ "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test" }, "devDependencies": { - "@ljharb/eslint-config": "^17.5.1", - "array.prototype.map": "^1.0.3", - "aud": "^1.1.4", + "@ljharb/eslint-config": "^21.0.0", + "array.prototype.map": "^1.0.4", + "aud": "^2.0.0", + "copy-dir": "^1.3.0", "eclint": "^2.8.1", - "eslint": "^7.19.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "mkdirp": "^0.5.5", + "mv": "^2.1.1", + "npmignore": "^0.3.0", "object-keys": "^1.1.1", - "safe-publish-latest": "^1.1.4", + "rimraf": "^2.7.1", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", "tap": "0.4.13", - "tape": "^5.1.1" + "tape": "^5.5.3", + "tmp": "^0.0.31" }, "license": "MIT", "author": { @@ -45,7 +58,14 @@ "url": "https://github.com/sponsors/ljharb" }, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "appveyor.yml" + ] } } diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown index 7c9f2dcd5..ad34d60dd 100644 --- a/node_modules/resolve/readme.markdown +++ b/node_modules/resolve/readme.markdown @@ -1,18 +1,22 @@ -# resolve +# resolve [![Version Badge][2]][1] -implements the [node `require.resolve()` -algorithm](https://nodejs.org/api/modules.html#modules_all_together) -such that you can `require.resolve()` on behalf of a file asynchronously and -synchronously +implements the [node `require.resolve()` algorithm](https://nodejs.org/api/modules.html#modules_all_together) such that you can `require.resolve()` on behalf of a file asynchronously and synchronously -[![build status](https://secure.travis-ci.org/browserify/resolve.png)](http://travis-ci.org/browserify/resolve) +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] # example asynchronously resolve: ```js -var resolve = require('resolve'); +var resolve = require('resolve/async'); // or, require('resolve') resolve('tap', { basedir: __dirname }, function (err, res) { if (err) console.error(err); else console.log(res); @@ -27,8 +31,8 @@ $ node example/async.js synchronously resolve: ```js -var resolve = require('resolve'); -var res = resolve.sync('tap', { basedir: __dirname }); +var resolve = require('resolve/sync'); // or, `require('resolve').sync +var res = resolve('tap', { basedir: __dirname }); console.log(res); ``` @@ -41,6 +45,8 @@ $ node example/sync.js ```js var resolve = require('resolve'); +var async = require('resolve/async'); +var sync = require('resolve/sync'); ``` For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values: @@ -67,7 +73,7 @@ options are: * opts.isFile - function to asynchronously test whether a file exists -* opts.isDirectory - function to asynchronously test whether a directory exists +* opts.isDirectory - function to asynchronously test whether a file exists and is a directory * opts.realpath - function to asynchronously resolve a potential symlink to its real path @@ -79,7 +85,7 @@ options are: * `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field * pkg - package data * pkgfile - path to package.json - * dir - directory for package.json + * dir - directory that contains package.json * `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package * pkg - package data @@ -177,7 +183,7 @@ options are: * opts.isFile - function to synchronously test whether a file exists -* opts.isDirectory - function to synchronously test whether a directory exists +* opts.isDirectory - function to synchronously test whether a file exists and is a directory * opts.realpathSync - function to synchronously resolve a potential symlink to its real path @@ -187,7 +193,7 @@ options are: * `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field * pkg - package data - * dir - directory for package.json (Note: the second argument will change to "pkgfile" in v2) + * dir - directory that contains package.json (Note: the second argument will change to "pkgfile" in v2) * `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package * pkg - package data @@ -277,3 +283,19 @@ npm install resolve # license MIT + +[1]: https://npmjs.org/package/resolve +[2]: https://versionbadg.es/browserify/resolve.svg +[5]: https://david-dm.org/browserify/resolve.svg +[6]: https://david-dm.org/browserify/resolve +[7]: https://david-dm.org/browserify/resolve/dev-status.svg +[8]: https://david-dm.org/browserify/resolve#info=devDependencies +[11]: https://nodei.co/npm/resolve.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/resolve.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/resolve.svg +[downloads-url]: https://npm-stat.com/charts.html?package=resolve +[codecov-image]: https://codecov.io/gh/browserify/resolve/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/browserify/resolve/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/browserify/resolve +[actions-url]: https://github.com/browserify/resolve/actions diff --git a/node_modules/resolve/sync.js b/node_modules/resolve/sync.js new file mode 100644 index 000000000..cd0ee0401 --- /dev/null +++ b/node_modules/resolve/sync.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/sync'); diff --git a/node_modules/resolve/test/.eslintrc b/node_modules/resolve/test/.eslintrc deleted file mode 100644 index ddd262df5..000000000 --- a/node_modules/resolve/test/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "max-lines": 0 - } -} diff --git a/node_modules/resolve/test/core.js b/node_modules/resolve/test/core.js index 7a3ccb16b..a477adc5c 100644 --- a/node_modules/resolve/test/core.js +++ b/node_modules/resolve/test/core.js @@ -1,7 +1,11 @@ var test = require('tape'); var keys = require('object-keys'); +var semver = require('semver'); + var resolve = require('../'); +var brokenNode = semver.satisfies(process.version, '11.11 - 11.13'); + test('core modules', function (t) { t.test('isCore()', function (st) { st.ok(resolve.isCore('fs')); @@ -22,10 +26,13 @@ test('core modules', function (t) { for (var i = 0; i < cores.length; ++i) { var mod = cores[i]; + // note: this must be require, not require.resolve, due to https://github.com/nodejs/node/issues/43274 var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func - console.log(mod, resolve.core, resolve.core[mod]); + t.comment(mod + ': ' + resolve.core[mod]); if (resolve.core[mod]) { st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); + } else if (brokenNode) { + st.ok(true, 'this version of node is broken: attempting to require things that fail to resolve breaks "home_paths" tests'); } else { st.throws(requireFunc, mod + ' not supported; requiring throws'); } diff --git a/node_modules/resolve/test/home_paths.js b/node_modules/resolve/test/home_paths.js new file mode 100644 index 000000000..3b8c9b32c --- /dev/null +++ b/node_modules/resolve/test/home_paths.js @@ -0,0 +1,127 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../async'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazPkg = { name: 'baz', main: 'quux.js' }; + var dotMainPkg = { main: 'index' }; + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + var dotSlashMainPkg = { main: 'index' }; + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('dot_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_main`'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + s2t.deepEqual(pkg, dotMainPkg); + }); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(3); + + resolve('dot_slash_main', function (err, res, pkg) { + s2t.error(err, 'no error resolving `dot_slash_main`'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + s2t.deepEqual(pkg, dotSlashMainPkg); + }); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(3); + + resolve('baz', function (err, res, pkg) { + s2t.error(err, 'no error resolving `baz`'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + s2t.deepEqual(pkg, bazPkg); + }); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/home_paths_sync.js b/node_modules/resolve/test/home_paths_sync.js new file mode 100644 index 000000000..5d2c56fd3 --- /dev/null +++ b/node_modules/resolve/test/home_paths_sync.js @@ -0,0 +1,114 @@ +'use strict'; + +var fs = require('fs'); +var homedir = require('../lib/homedir'); +var path = require('path'); + +var test = require('tape'); +var mkdirp = require('mkdirp'); +var rimraf = require('rimraf'); +var mv = require('mv'); +var copyDir = require('copy-dir'); +var tmp = require('tmp'); + +var HOME = homedir(); + +var hnm = path.join(HOME, '.node_modules'); +var hnl = path.join(HOME, '.node_libraries'); + +var resolve = require('../sync'); + +function makeDir(t, dir, cb) { + mkdirp(dir, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function cleanup() { + rimraf.sync(dir); + }); + cb(); + } + }); +} + +function makeTempDir(t, dir, cb) { + if (fs.existsSync(dir)) { + var tmpResult = tmp.dirSync(); + t.teardown(tmpResult.removeCallback); + var backup = path.join(tmpResult.name, path.basename(dir)); + mv(dir, backup, function (err) { + if (err) { + cb(err); + } else { + t.teardown(function () { + mv(backup, dir, cb); + }); + makeDir(t, dir, cb); + } + }); + } else { + makeDir(t, dir, cb); + } +} + +test('homedir module paths', function (t) { + t.plan(7); + + makeTempDir(t, hnm, function (err) { + t.error(err, 'no error with HNM temp dir'); + if (err) { + return t.end(); + } + + var bazHNMDir = path.join(hnm, 'baz'); + var dotMainDir = path.join(hnm, 'dot_main'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNMDir); + copyDir.sync(path.join(__dirname, 'resolver/dot_main'), dotMainDir); + + var bazHNMmain = path.join(bazHNMDir, 'quux.js'); + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + var dotMainMain = path.join(dotMainDir, 'index.js'); + t.equal(require.resolve('dot_main'), dotMainMain, 'sanity check: require.resolve finds `dot_main`'); + + makeTempDir(t, hnl, function (err) { + t.error(err, 'no error with HNL temp dir'); + if (err) { + return t.end(); + } + var bazHNLDir = path.join(hnl, 'baz'); + copyDir.sync(path.join(__dirname, 'resolver/baz'), bazHNLDir); + + var dotSlashMainDir = path.join(hnl, 'dot_slash_main'); + var dotSlashMainMain = path.join(dotSlashMainDir, 'index.js'); + copyDir.sync(path.join(__dirname, 'resolver/dot_slash_main'), dotSlashMainDir); + + t.equal(require.resolve('baz'), bazHNMmain, 'sanity check: require.resolve finds HNM `baz`'); + t.equal(require.resolve('dot_slash_main'), dotSlashMainMain, 'sanity check: require.resolve finds HNL `dot_slash_main`'); + + t.test('with temp dirs', function (st) { + st.plan(3); + + st.test('just in `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_main'); + s2t.equal(res, dotMainMain, '`dot_main` resolves in `$HOME/.node_modules`'); + }); + + st.test('just in `$HOME/.node_libraries`', function (s2t) { + s2t.plan(1); + + var res = resolve('dot_slash_main'); + s2t.equal(res, dotSlashMainMain, '`dot_slash_main` resolves in `$HOME/.node_libraries`'); + }); + + st.test('in `$HOME/.node_libraries` and `$HOME/.node_modules`', function (s2t) { + s2t.plan(1); + + var res = resolve('baz'); + s2t.equal(res, bazHNMmain, '`baz` resolves in `$HOME/.node_modules` when in both'); + }); + }); + }); + }); +}); diff --git a/node_modules/resolve/test/mock_sync.js b/node_modules/resolve/test/mock_sync.js index 0e3a60d44..c5a7e2a98 100644 --- a/node_modules/resolve/test/mock_sync.js +++ b/node_modules/resolve/test/mock_sync.js @@ -122,9 +122,8 @@ test('symlinked', function (t) { var dir = path.dirname(resolved); var base = path.basename(resolved); return path.join(dir, 'symlinked', base); - } else { - return path.join(resolved, 'symlinked'); } + return path.join(resolved, 'symlinked'); } }; } @@ -183,9 +182,8 @@ test('readPackageSync', function (t) { var readPackageSync = function (readFileSync, file) { if (file.indexOf(path.join('bar', 'package.json')) >= 0) { return { main: './something-else.js' }; - } else { - return JSON.parse(files[path.resolve(file)]); } + return JSON.parse(files[path.resolve(file)]); }; t.test('with readPackage', function (st) { diff --git a/node_modules/resolve/test/node_path.js b/node_modules/resolve/test/node_path.js index d06aa4eaf..e463d6c8c 100644 --- a/node_modules/resolve/test/node_path.js +++ b/node_modules/resolve/test/node_path.js @@ -63,7 +63,7 @@ test('$NODE_PATH', function (t) { basedir: path.join(__dirname, 'node_path/x'), isDirectory: isDir }, function (err, res) { - var root = require('tap/package.json').main; + var root = require('tap/package.json').main; // eslint-disable-line global-require t.error(err); t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root), 'tap resolves'); }); diff --git a/node_modules/resolve/test/resolver.js b/node_modules/resolve/test/resolver.js index aa36ee114..490316594 100644 --- a/node_modules/resolve/test/resolver.js +++ b/node_modules/resolve/test/resolver.js @@ -1,6 +1,12 @@ var path = require('path'); var test = require('tape'); var resolve = require('../'); +var async = require('../async'); + +test('`./async` entry point', function (t) { + t.equal(resolve, async, '`./async` entry point is the same as `main`'); + t.end(); +}); test('async foo', function (t) { t.plan(12); @@ -284,11 +290,60 @@ test('incorrect main', function (t) { }); }); +test('missing index', function (t) { + t.plan(2); + + var resolverDir = path.join(__dirname, 'resolver'); + resolve('./missing_index', { basedir: resolverDir }, function (err, res, pkg) { + t.ok(err instanceof Error); + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('missing main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./missing_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('null main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + + resolve('./null_main', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + }); +}); + +test('main: false', function (t) { + t.plan(2); + + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + resolve('./false_main', { basedir: basedir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal( + res, + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + t.deepEqual(pkg, { + name: 'false_main', + main: false + }); + }); +}); + test('without basedir', function (t) { t.plan(1); var dir = path.join(__dirname, 'resolver/without_basedir'); - var tester = require(path.join(dir, 'main.js')); + var tester = require(path.join(dir, 'main.js')); // eslint-disable-line global-require tester(t, function (err, res, pkg) { if (err) { @@ -404,7 +459,7 @@ test('non-string "main" field in package.json', function (t) { var dir = path.join(__dirname, 'resolver'); resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); t.equal(err.code, 'INVALID_PACKAGE_MAIN'); t.equal(res, undefined, 'res is undefined'); t.equal(pkg, undefined, 'pkg is undefined'); @@ -417,7 +472,7 @@ test('non-string "main" field in package.json', function (t) { var dir = path.join(__dirname, 'resolver'); resolve('./invalid_main', { basedir: dir }, function (err, res, pkg) { t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); t.equal(err.code, 'INVALID_PACKAGE_MAIN'); t.equal(res, undefined, 'res is undefined'); t.equal(pkg, undefined, 'pkg is undefined'); @@ -448,3 +503,93 @@ test('browser field in package.json', function (t) { } ); }); + +test('absolute paths', function (t) { + t.plan(4); + + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + resolve(__filename, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file resolves' + ); + }); + resolve(extensionless, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file resolves' + ); + }); + resolve(__filename, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'absolute path to this file with a basedir resolves' + ); + }); + resolve(extensionless, { basedir: process.cwd() }, function (err, res) { + t.equal( + res, + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + }); +}); + +test('malformed package.json', function (t) { + /* eslint operator-linebreak: ["error", "before"], function-paren-newline: "off" */ + t.plan( + (3 * 3) // 3 sets of 3 assertions in the final callback + + 2 // 1 readPackage call with malformed package.json + ); + + var basedir = path.join(__dirname, 'resolver/malformed_package_json'); + var expected = path.join(basedir, 'index.js'); + + resolve('./index.js', { basedir: basedir }, function (err, res, pkg) { + t.error(err, 'no error'); + t.equal(res, expected, 'malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'malformed package.json gives an undefined `pkg` argument'); + }); + + resolve( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + }, + function (err, res, pkg) { + t.error(err, 'with packageFilter: no error'); + t.equal(res, expected, 'with packageFilter: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with packageFilter: malformed package.json gives an undefined `pkg` argument'); + } + ); + + resolve( + './index.js', + { + basedir: basedir, + readPackage: function (readFile, pkgfile, cb) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + readFile(pkgfile, function (err, result) { + try { + cb(null, JSON.parse(result)); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackage: malformed package.json parses as a syntax error'); + cb(null); + } + }); + } + }, + function (err, res, pkg) { + t.error(err, 'with readPackage: no error'); + t.equal(res, expected, 'with readPackage: malformed package.json is silently ignored'); + t.equal(pkg, undefined, 'with readPackage: malformed package.json gives an undefined `pkg` argument'); + } + ); +}); diff --git a/node_modules/resolve/test/resolver/false_main/index.js b/node_modules/resolve/test/resolver/false_main/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/node_modules/resolve/test/resolver/false_main/package.json b/node_modules/resolve/test/resolver/false_main/package.json new file mode 100644 index 000000000..6055bbb71 --- /dev/null +++ b/node_modules/resolve/test/resolver/false_main/package.json @@ -0,0 +1,4 @@ +{ + "name": "false_main", + "main": false +} diff --git a/node_modules/resolve/test/resolver/invalid_main/package.json b/node_modules/resolve/test/resolver/invalid_main/package.json index 0cf827995..059074864 100644 --- a/node_modules/resolve/test/resolver/invalid_main/package.json +++ b/node_modules/resolve/test/resolver/invalid_main/package.json @@ -1,5 +1,5 @@ { - "name": "invalid main", + "name": "invalid_main", "main": [ "why is this a thing", "srsly omg wtf" diff --git a/node_modules/resolve/test/resolver/malformed_package_json/index.js b/node_modules/resolve/test/resolver/malformed_package_json/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/node_modules/resolve/test/resolver/malformed_package_json/package.json b/node_modules/resolve/test/resolver/malformed_package_json/package.json new file mode 100644 index 000000000..98232c64f --- /dev/null +++ b/node_modules/resolve/test/resolver/malformed_package_json/package.json @@ -0,0 +1 @@ +{ diff --git a/node_modules/resolve/test/resolver_sync.js b/node_modules/resolve/test/resolver_sync.js index 3082c96e5..53453d666 100644 --- a/node_modules/resolve/test/resolver_sync.js +++ b/node_modules/resolve/test/resolver_sync.js @@ -1,19 +1,46 @@ var path = require('path'); +var fs = require('fs'); var test = require('tape'); + var resolve = require('../'); +var sync = require('../sync'); + +var requireResolveSupportsPaths = require.resolve.length > 1 + && !(/^v12\.[012]\./).test(process.version); // broken in v12.0-12.2, see https://github.com/nodejs/node/issues/27794 + +test('`./sync` entry point', function (t) { + t.equal(resolve.sync, sync, '`./sync` entry point is the same as `.sync` on `main`'); + t.end(); +}); test('foo', function (t) { var dir = path.join(__dirname, 'resolver'); t.equal( resolve.sync('./foo', { basedir: dir }), - path.join(dir, 'foo.js') + path.join(dir, 'foo.js'), + './foo' ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo', { basedir: dir }), + require.resolve('./foo', { paths: [dir] }), + './foo: resolve.sync === require.resolve' + ); + } t.equal( resolve.sync('./foo.js', { basedir: dir }), - path.join(dir, 'foo.js') + path.join(dir, 'foo.js'), + './foo.js' ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + require.resolve('./foo.js', { paths: [dir] }), + './foo.js: resolve.sync === require.resolve' + ); + } t.equal( resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }), @@ -41,10 +68,21 @@ test('foo', function (t) { test('bar', function (t) { var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'bar'); + t.equal( - resolve.sync('foo', { basedir: path.join(dir, 'bar') }), - path.join(dir, 'bar/node_modules/foo/index.js') + resolve.sync('foo', { basedir: basedir }), + path.join(dir, 'bar/node_modules/foo/index.js'), + 'foo in bar' ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('foo', { basedir: basedir }), + require.resolve('foo', { paths: [basedir] }), + 'foo in bar: resolve.sync === require.resolve' + ); + } + t.end(); }); @@ -53,52 +91,98 @@ test('baz', function (t) { t.equal( resolve.sync('./baz', { basedir: dir }), - path.join(dir, 'baz/quux.js') + path.join(dir, 'baz/quux.js'), + './baz' ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./baz', { basedir: dir }), + require.resolve('./baz', { paths: [dir] }), + './baz: resolve.sync === require.resolve' + ); + } + t.end(); }); test('biz', function (t) { var dir = path.join(__dirname, 'resolver/biz/node_modules'); + t.equal( resolve.sync('./grux', { basedir: dir }), path.join(dir, 'grux/index.js') ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./grux', { basedir: dir }), + require.resolve('./grux', { paths: [dir] }), + './grux: resolve.sync === require.resolve' + ); + } + var tivDir = path.join(dir, 'grux'); t.equal( - resolve.sync('tiv', { basedir: path.join(dir, 'grux') }), + resolve.sync('tiv', { basedir: tivDir }), path.join(dir, 'tiv/index.js') ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('tiv', { basedir: tivDir }), + require.resolve('tiv', { paths: [tivDir] }), + 'tiv: resolve.sync === require.resolve' + ); + } + var gruxDir = path.join(dir, 'tiv'); t.equal( - resolve.sync('grux', { basedir: path.join(dir, 'tiv') }), + resolve.sync('grux', { basedir: gruxDir }), path.join(dir, 'grux/index.js') ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('grux', { basedir: gruxDir }), + require.resolve('grux', { paths: [gruxDir] }), + 'grux: resolve.sync === require.resolve' + ); + } + t.end(); }); test('normalize', function (t) { var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + t.equal( resolve.sync('../grux', { basedir: dir }), path.join(dir, 'index.js') ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('../grux', { basedir: dir }), + require.resolve('../grux', { paths: [dir] }), + '../grux: resolve.sync === require.resolve' + ); + } + t.end(); }); test('cup', function (t) { var dir = path.join(__dirname, 'resolver'); + t.equal( resolve.sync('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }), - path.join(dir, 'cup.coffee') + path.join(dir, 'cup.coffee'), + './cup -> ./cup.coffee' ); t.equal( resolve.sync('./cup.coffee', { basedir: dir }), - path.join(dir, 'cup.coffee') + path.join(dir, 'cup.coffee'), + './cup.coffee' ); t.throws(function () { @@ -108,22 +192,40 @@ test('cup', function (t) { }); }); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./cup.coffee', { basedir: dir, extensions: ['.js', '.coffee'] }), + require.resolve('./cup.coffee', { paths: [dir] }), + './cup.coffee: resolve.sync === require.resolve' + ); + } + t.end(); }); test('mug', function (t) { var dir = path.join(__dirname, 'resolver'); + t.equal( resolve.sync('./mug', { basedir: dir }), - path.join(dir, 'mug.js') + path.join(dir, 'mug.js'), + './mug -> ./mug.js' ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./mug', { basedir: dir }), + require.resolve('./mug', { paths: [dir] }), + './mug: resolve.sync === require.resolve' + ); + } t.equal( resolve.sync('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }), - path.join(dir, 'mug.coffee') + path.join(dir, 'mug.coffee'), + './mug -> ./mug.coffee' ); t.equal( @@ -131,7 +233,8 @@ test('mug', function (t) { basedir: dir, extensions: ['.js', '.coffee'] }), - path.join(dir, 'mug.js') + path.join(dir, 'mug.js'), + './mug -> ./mug.js' ); t.end(); @@ -195,12 +298,99 @@ test('incorrect main', function (t) { resolve.sync('./incorrect_main', { basedir: resolverDir }), path.join(dir, 'index.js') ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + require.resolve('./incorrect_main', { paths: [resolverDir] }), + './incorrect_main: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('missing index', function (t) { + t.plan(requireResolveSupportsPaths ? 2 : 1); + + var resolverDir = path.join(__dirname, 'resolver'); + try { + resolve.sync('./missing_index', { basedir: resolverDir }); + t.fail('did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + require.resolve('./missing_index', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } +}); + +test('missing main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + try { + resolve.sync('./missing_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + resolve.sync('./missing_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } + + t.end(); +}); + +test('null main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + + try { + resolve.sync('./null_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + if (requireResolveSupportsPaths) { + try { + resolve.sync('./null_main', { basedir: resolverDir }); + t.fail('require.resolve did not fail'); + } catch (err) { + t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); + } + } + + t.end(); +}); + +test('main: false', function (t) { + var basedir = path.join(__dirname, 'resolver'); + var dir = path.join(basedir, 'false_main'); + t.equal( + resolve.sync('./false_main', { basedir: basedir }), + path.join(dir, 'index.js'), + '`"main": false`: resolves to `index.js`' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./false_main', { basedir: basedir }), + require.resolve('./false_main', { paths: [basedir] }), + '`"main": false`: resolve.sync === require.resolve' + ); + } t.end(); }); var stubStatSync = function stubStatSync(fn) { - var fs = require('fs'); var statSync = fs.statSync; try { fs.statSync = function () { @@ -226,29 +416,66 @@ test('#79 - re-throw non ENOENT errors from stat', function (t) { test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'same_names'); t.equal( - resolve.sync('./foo', { basedir: path.join(dir, 'same_names') }), + resolve.sync('./foo', { basedir: basedir }), path.join(dir, 'same_names/foo.js') ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo', { basedir: basedir }), + require.resolve('./foo', { paths: [basedir] }), + './foo: resolve.sync === require.resolve' + ); + } + t.equal( - resolve.sync('./foo/', { basedir: path.join(dir, 'same_names') }), + resolve.sync('./foo/', { basedir: basedir }), path.join(dir, 'same_names/foo/index.js') ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./foo/', { basedir: basedir }), + require.resolve('./foo/', { paths: [basedir] }), + './foo/: resolve.sync === require.resolve' + ); + } + t.end(); }); test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { var dir = path.join(__dirname, 'resolver'); + var basedir = path.join(dir, 'same_names/foo'); t.equal( - resolve.sync('./', { basedir: path.join(dir, 'same_names/foo') }), - path.join(dir, 'same_names/foo/index.js') + resolve.sync('./', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js'), + './' ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./', { basedir: basedir }), + require.resolve('./', { paths: [basedir] }), + './: resolve.sync === require.resolve' + ); + } + t.equal( - resolve.sync('.', { basedir: path.join(dir, 'same_names/foo') }), - path.join(dir, 'same_names/foo/index.js') + resolve.sync('.', { basedir: basedir }), + path.join(dir, 'same_names/foo/index.js'), + '.' ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('.', { basedir: basedir }), + require.resolve('.', { paths: [basedir] }), + '.: resolve.sync === require.resolve', + { todo: true } + ); + } + t.end(); }); @@ -261,6 +488,12 @@ test('sync: #121 - treating an existing file as a dir when no basedir', function __filename, 'sanity check' ); + st.equal( + resolve.sync('./' + testFile), + require.resolve('./' + testFile), + 'sanity check: resolve.sync === require.resolve' + ); + st.end(); }); @@ -288,15 +521,38 @@ test('sync: #121 - treating an existing file as a dir when no basedir', function test('sync dot main', function (t) { var start = new Date(); - t.equal(resolve.sync('./resolver/dot_main'), path.join(__dirname, 'resolver/dot_main/index.js')); + + t.equal( + resolve.sync('./resolver/dot_main'), + path.join(__dirname, 'resolver/dot_main/index.js'), + './resolver/dot_main' + ); + t.equal( + resolve.sync('./resolver/dot_main'), + require.resolve('./resolver/dot_main'), + './resolver/dot_main: resolve.sync === require.resolve' + ); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); }); test('sync dot slash main', function (t) { var start = new Date(); - t.equal(resolve.sync('./resolver/dot_slash_main'), path.join(__dirname, 'resolver/dot_slash_main/index.js')); + + t.equal( + resolve.sync('./resolver/dot_slash_main'), + path.join(__dirname, 'resolver/dot_slash_main/index.js') + ); + t.equal( + resolve.sync('./resolver/dot_slash_main'), + require.resolve('./resolver/dot_slash_main'), + './resolver/dot_slash_main: resolve.sync === require.resolve' + ); + t.ok(new Date() - start < 50, 'resolve.sync timedout'); + t.end(); }); @@ -321,7 +577,7 @@ test('non-string "main" field in package.json', function (t) { t.fail('should not get here'); } catch (err) { t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); t.equal(err.code, 'INVALID_PACKAGE_MAIN'); } t.end(); @@ -335,7 +591,7 @@ test('non-string "main" field in package.json', function (t) { t.fail('should not get here'); } catch (err) { t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid main” `main` must be a string'); + t.equal(err.message, 'package “invalid_main” `main` must be a string'); t.equal(err.code, 'INVALID_PACKAGE_MAIN'); } t.end(); @@ -356,3 +612,115 @@ test('browser field in package.json', function (t) { t.equal(res, path.join(dir, 'browser_field', 'b.js')); t.end(); }); + +test('absolute paths', function (t) { + var extensionless = __filename.slice(0, -path.extname(__filename).length); + + t.equal( + resolve.sync(__filename), + __filename, + 'absolute path to this file resolves' + ); + t.equal( + resolve.sync(__filename), + require.resolve(__filename), + 'absolute path to this file: resolve.sync === require.resolve' + ); + + t.equal( + resolve.sync(extensionless), + __filename, + 'extensionless absolute path to this file resolves' + ); + t.equal( + resolve.sync(__filename), + require.resolve(__filename), + 'absolute path to this file: resolve.sync === require.resolve' + ); + + t.equal( + resolve.sync(__filename, { basedir: process.cwd() }), + __filename, + 'absolute path to this file with a basedir resolves' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync(__filename, { basedir: process.cwd() }), + require.resolve(__filename, { paths: [process.cwd()] }), + 'absolute path to this file + basedir: resolve.sync === require.resolve' + ); + } + + t.equal( + resolve.sync(extensionless, { basedir: process.cwd() }), + __filename, + 'extensionless absolute path to this file with a basedir resolves' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync(extensionless, { basedir: process.cwd() }), + require.resolve(extensionless, { paths: [process.cwd()] }), + 'extensionless absolute path to this file + basedir: resolve.sync === require.resolve' + ); + } + + t.end(); +}); + +test('malformed package.json', function (t) { + t.plan(5 + (requireResolveSupportsPaths ? 1 : 0)); + + var basedir = path.join(__dirname, 'resolver/malformed_package_json'); + var expected = path.join(basedir, 'index.js'); + + t.equal( + resolve.sync('./index.js', { basedir: basedir }), + expected, + 'malformed package.json is silently ignored' + ); + if (requireResolveSupportsPaths) { + t.equal( + resolve.sync('./index.js', { basedir: basedir }), + require.resolve('./index.js', { paths: [basedir] }), + 'malformed package.json: resolve.sync === require.resolve' + ); + } + + var res1 = resolve.sync( + './index.js', + { + basedir: basedir, + packageFilter: function (pkg, pkgfile, dir) { + t.fail('should not reach here'); + } + } + ); + + t.equal( + res1, + expected, + 'with packageFilter: malformed package.json is silently ignored' + ); + + var res2 = resolve.sync( + './index.js', + { + basedir: basedir, + readPackageSync: function (readFileSync, pkgfile) { + t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); + var result = String(readFileSync(pkgfile)); + try { + return JSON.parse(result); + } catch (e) { + t.ok(e instanceof SyntaxError, 'readPackageSync: malformed package.json parses as a syntax error'); + } + } + } + ); + + t.equal( + res2, + expected, + 'with readPackageSync: malformed package.json is silently ignored' + ); +}); diff --git a/node_modules/safe-regex-test/.eslintrc b/node_modules/safe-regex-test/.eslintrc new file mode 100644 index 000000000..ff89be3cc --- /dev/null +++ b/node_modules/safe-regex-test/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], + }, +} diff --git a/node_modules/safe-regex-test/.github/FUNDING.yml b/node_modules/safe-regex-test/.github/FUNDING.yml new file mode 100644 index 000000000..ef4a26798 --- /dev/null +++ b/node_modules/safe-regex-test/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/safe-regex-test +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/safe-regex-test/CHANGELOG.md b/node_modules/safe-regex-test/CHANGELOG.md new file mode 100644 index 000000000..e3107aafc --- /dev/null +++ b/node_modules/safe-regex-test/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-09-22 + +### Commits + +- Initial implementation, tests, readme [`0273e9f`](https://github.com/ljharb/safe-regex-test/commit/0273e9f96f4b09df413523f4faacc8ae9ac5e6cb) +- Initial commit [`b6c1edf`](https://github.com/ljharb/safe-regex-test/commit/b6c1edf740e6105fb71c34c1c69fadd837e8f7ab) +- npm init [`c7f5765`](https://github.com/ljharb/safe-regex-test/commit/c7f576580607b16458b5a16e6bfa3b639e49c6bd) +- Only apps should have lockfiles [`1162bf0`](https://github.com/ljharb/safe-regex-test/commit/1162bf011835040f7e2c9936734294b2d98536bf) diff --git a/node_modules/safe-regex-test/LICENSE b/node_modules/safe-regex-test/LICENSE new file mode 100644 index 000000000..6abfe1434 --- /dev/null +++ b/node_modules/safe-regex-test/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/safe-regex-test/README.md b/node_modules/safe-regex-test/README.md new file mode 100644 index 000000000..6e1162f2e --- /dev/null +++ b/node_modules/safe-regex-test/README.md @@ -0,0 +1,42 @@ +# safe-regex-test [![Version Badge][npm-version-svg]][package-url] + +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Give a regex, get a robust predicate function that tests it against a string. This will work even if `RegExp.prototype` is altered later. + +## Getting started + +```sh +npm install --save safe-regex-test +``` + +## Usage/Examples + +```js +var regexTester = require('safe-regex-test'); +var assert = require('assert'); + +var tester = regexTester('a'); +assert.ok(tester('a')); +assert.notOk(tester('b')); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/safe-regex-test +[npm-version-svg]: https://versionbadg.es/ljharb/safe-regex-test.svg +[deps-svg]: https://david-dm.org/ljharb/safe-regex-test.svg +[deps-url]: https://david-dm.org/ljharb/safe-regex-test +[dev-deps-svg]: https://david-dm.org/ljharb/safe-regex-test/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/safe-regex-test#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/safe-regex-test.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/safe-regex-test.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/safe-regex-test.svg +[downloads-url]: https://npm-stat.com/charts.html?package=safe-regex-test diff --git a/node_modules/safe-regex-test/index.js b/node_modules/safe-regex-test/index.js new file mode 100644 index 000000000..19ad8db30 --- /dev/null +++ b/node_modules/safe-regex-test/index.js @@ -0,0 +1,17 @@ +'use strict'; + +var callBound = require('call-bind/callBound'); +var GetIntrinsic = require('get-intrinsic'); +var isRegex = require('is-regex'); + +var $exec = callBound('RegExp.prototype.exec'); +var $TypeError = GetIntrinsic('%TypeError%'); + +module.exports = function regexTester(regex) { + if (!isRegex(regex)) { + throw new $TypeError('`regex` must be a RegExp'); + } + return function test(s) { + return $exec(regex, s) !== null; + }; +}; diff --git a/node_modules/safe-regex-test/package.json b/node_modules/safe-regex-test/package.json new file mode 100644 index 000000000..999da0591 --- /dev/null +++ b/node_modules/safe-regex-test/package.json @@ -0,0 +1,75 @@ +{ + "name": "safe-regex-test", + "version": "1.0.0", + "description": "Give a regex, get a robust predicate function that tests it against a string.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "lint": "eslint --ext=js,mjs .", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "tests-only": "tape test", + "test": "npm run tests-only", + "posttest": "aud --production" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/safe-regex-test.git" + }, + "keywords": [ + "regex", + "regexp", + "test", + "tester", + "safe", + "robust", + "exec" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/safe-regex-test/issues" + }, + "homepage": "https://github.com/ljharb/safe-regex-test#readme", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "es-value-fixtures": "^1.4.2", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/safe-regex-test/test/index.js b/node_modules/safe-regex-test/test/index.js new file mode 100644 index 000000000..a2e1f9d91 --- /dev/null +++ b/node_modules/safe-regex-test/test/index.js @@ -0,0 +1,37 @@ +'use strict'; + +var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var regexTester = require('../'); + +test('regex tester', function (t) { + t.equal(typeof regexTester, 'function', 'is a function'); + + t.test('non-regexes', function (st) { + forEach(v.primitives.concat(v.objects), function (val) { + st['throws']( + function () { regexTester(val); }, + TypeError, + inspect(val) + ' is not a regex' + ); + }); + + st.end(); + }); + + t.test('regexes', function (st) { + var tester = regexTester(/a/); + + st.equal(typeof tester, 'function', 'returns a function'); + st.equal(tester('a'), true, 'returns true for a match'); + st.equal(tester('b'), false, 'returns false for a non-match'); + st.equal(tester('a'), true, 'returns true for a match again'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/is-callable/.eslintignore b/node_modules/side-channel/.eslintignore similarity index 100% rename from node_modules/is-callable/.eslintignore rename to node_modules/side-channel/.eslintignore diff --git a/node_modules/side-channel/.eslintrc b/node_modules/side-channel/.eslintrc new file mode 100644 index 000000000..850ac1fa8 --- /dev/null +++ b/node_modules/side-channel/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-lines-per-function": 0, + "max-params": 0, + "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], + }, +} diff --git a/node_modules/side-channel/.github/FUNDING.yml b/node_modules/side-channel/.github/FUNDING.yml new file mode 100644 index 000000000..2a94840c6 --- /dev/null +++ b/node_modules/side-channel/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/side-channel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/side-channel/.nycrc b/node_modules/side-channel/.nycrc new file mode 100644 index 000000000..1826526e0 --- /dev/null +++ b/node_modules/side-channel/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/side-channel/CHANGELOG.md b/node_modules/side-channel/CHANGELOG.md new file mode 100644 index 000000000..a3d161fac --- /dev/null +++ b/node_modules/side-channel/CHANGELOG.md @@ -0,0 +1,65 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.4](https://github.com/ljharb/side-channel/compare/v1.0.3...v1.0.4) - 2020-12-29 + +### Commits + +- [Tests] migrate tests to Github Actions [`10909cb`](https://github.com/ljharb/side-channel/commit/10909cbf8ce9c0bf96f604cf13d7ffd5a22c2d40) +- [Refactor] Use a linked list rather than an array, and move accessed nodes to the beginning [`195613f`](https://github.com/ljharb/side-channel/commit/195613f28b5c1e6072ef0b61b5beebaf2b6a304e) +- [meta] do not publish github action workflow files [`290ec29`](https://github.com/ljharb/side-channel/commit/290ec29cd21a60585145b4a7237ec55228c52c27) +- [Tests] run `nyc` on all tests; use `tape` runner [`ea6d030`](https://github.com/ljharb/side-channel/commit/ea6d030ff3fe6be2eca39e859d644c51ecd88869) +- [actions] add "Allow Edits" workflow [`d464d8f`](https://github.com/ljharb/side-channel/commit/d464d8fe52b5eddf1504a0ed97f0941a90f32c15) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`02daca8`](https://github.com/ljharb/side-channel/commit/02daca87c6809821c97be468d1afa2f5ef447383) +- [Refactor] use `call-bind` and `get-intrinsic` instead of `es-abstract` [`e09d481`](https://github.com/ljharb/side-channel/commit/e09d481528452ebafa5cdeae1af665c35aa2deee) +- [Deps] update `object.assign` [`ee83aa8`](https://github.com/ljharb/side-channel/commit/ee83aa81df313b5e46319a63adb05cf0c179079a) +- [actions] update rebase action to use checkout v2 [`7726b0b`](https://github.com/ljharb/side-channel/commit/7726b0b058b632fccea709f58960871defaaa9d7) + +## [v1.0.3](https://github.com/ljharb/side-channel/compare/v1.0.2...v1.0.3) - 2020-08-23 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`1f10561`](https://github.com/ljharb/side-channel/commit/1f105611ef3acf32dec8032ae5c0baa5e56bb868) +- [Deps] update `es-abstract`, `object-inspect` [`bc20159`](https://github.com/ljharb/side-channel/commit/bc201597949a505e37cef9eaf24c7010831e6f03) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`b9b2b22`](https://github.com/ljharb/side-channel/commit/b9b2b225f9e0ea72a6ec2b89348f0bd690bc9ed1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7055ab4`](https://github.com/ljharb/side-channel/commit/7055ab4de0860606efd2003674a74f1fe6ebc07e) +- [Dev Deps] update `auto-changelog`; add `aud` [`d278c37`](https://github.com/ljharb/side-channel/commit/d278c37d08227be4f84aa769fcd919e73feeba40) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`3bcf982`](https://github.com/ljharb/side-channel/commit/3bcf982faa122745b39c33ce83d32fdf003741c6) +- [Tests] only audit prod deps [`18d01c4`](https://github.com/ljharb/side-channel/commit/18d01c4015b82a3d75044c4d5ba7917b2eac01ec) +- [Deps] update `es-abstract` [`6ab096d`](https://github.com/ljharb/side-channel/commit/6ab096d9de2b482cf5e0717e34e212f5b2b9bc9a) +- [Dev Deps] update `tape` [`9dc174c`](https://github.com/ljharb/side-channel/commit/9dc174cc651dfd300b4b72da936a0a7eda5f9452) +- [Deps] update `es-abstract` [`431d0f0`](https://github.com/ljharb/side-channel/commit/431d0f0ff11fbd2ae6f3115582a356d3a1cfce82) +- [Deps] update `es-abstract` [`49869fd`](https://github.com/ljharb/side-channel/commit/49869fd323bf4453f0ba515c0fb265cf5ab7b932) +- [meta] Add package.json to package's exports [`77d9cdc`](https://github.com/ljharb/side-channel/commit/77d9cdceb2a9e47700074f2ae0c0a202e7dac0d4) + +## [v1.0.2](https://github.com/ljharb/side-channel/compare/v1.0.1...v1.0.2) - 2019-12-20 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`4a526df`](https://github.com/ljharb/side-channel/commit/4a526df44e4701566ed001ec78546193f818b082) +- [Deps] update `es-abstract` [`d4f6e62`](https://github.com/ljharb/side-channel/commit/d4f6e629b6fb93a07415db7f30d3c90fd7f264fe) + +## [v1.0.1](https://github.com/ljharb/side-channel/compare/v1.0.0...v1.0.1) - 2019-12-01 + +### Commits + +- [Fix] add missing "exports" [`d212907`](https://github.com/ljharb/side-channel/commit/d2129073abf0701a5343bf28aa2145617604dc2e) + +## v1.0.0 - 2019-12-01 + +### Commits + +- Initial implementation [`dbebd3a`](https://github.com/ljharb/side-channel/commit/dbebd3a4b5ed64242f9a6810efe7c4214cd8cde4) +- Initial tests [`73bdefe`](https://github.com/ljharb/side-channel/commit/73bdefe568c9076cf8c0b8719bc2141aec0e19b8) +- Initial commit [`43c03e1`](https://github.com/ljharb/side-channel/commit/43c03e1c2849ec50a87b7a5cd76238a62b0b8770) +- npm init [`5c090a7`](https://github.com/ljharb/side-channel/commit/5c090a765d66a5527d9889b89aeff78dee91348c) +- [meta] add `auto-changelog` [`a5c4e56`](https://github.com/ljharb/side-channel/commit/a5c4e5675ec02d5eb4d84b4243aeea2a1d38fbec) +- [actions] add automatic rebasing / merge commit blocking [`bab1683`](https://github.com/ljharb/side-channel/commit/bab1683d8f9754b086e94397699fdc645e0d7077) +- [meta] add `funding` field; create FUNDING.yml [`63d7aea`](https://github.com/ljharb/side-channel/commit/63d7aeaf34f5650650ae97ca4b9fae685bd0937c) +- [Tests] add `npm run lint` [`46a5a81`](https://github.com/ljharb/side-channel/commit/46a5a81705cd2664f83df232c01dbbf2ee952885) +- Only apps should have lockfiles [`8b16b03`](https://github.com/ljharb/side-channel/commit/8b16b0305f00895d90c4e2e5773c854cfea0e448) +- [meta] add `safe-publish-latest` [`2f098ef`](https://github.com/ljharb/side-channel/commit/2f098ef092a39399cfe548b19a1fc03c2fd2f490) diff --git a/node_modules/side-channel/LICENSE b/node_modules/side-channel/LICENSE new file mode 100644 index 000000000..3900dd7e2 --- /dev/null +++ b/node_modules/side-channel/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/side-channel/README.md b/node_modules/side-channel/README.md new file mode 100644 index 000000000..7fa4f0680 --- /dev/null +++ b/node_modules/side-channel/README.md @@ -0,0 +1,2 @@ +# side-channel +Store information about any JS value in a side channel. Uses WeakMap if available. diff --git a/node_modules/side-channel/index.js b/node_modules/side-channel/index.js new file mode 100644 index 000000000..f1c48264f --- /dev/null +++ b/node_modules/side-channel/index.js @@ -0,0 +1,124 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var inspect = require('object-inspect'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $WeakMap = GetIntrinsic('%WeakMap%', true); +var $Map = GetIntrinsic('%Map%', true); + +var $weakMapGet = callBound('WeakMap.prototype.get', true); +var $weakMapSet = callBound('WeakMap.prototype.set', true); +var $weakMapHas = callBound('WeakMap.prototype.has', true); +var $mapGet = callBound('Map.prototype.get', true); +var $mapSet = callBound('Map.prototype.set', true); +var $mapHas = callBound('Map.prototype.has', true); + +/* + * This function traverses the list returning the node corresponding to the + * given key. + * + * That node is also moved to the head of the list, so that if it's accessed + * again we don't need to traverse the whole list. By doing so, all the recently + * used nodes can be accessed relatively quickly. + */ +var listGetNode = function (list, key) { // eslint-disable-line consistent-return + for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + curr.next = list.next; + list.next = curr; // eslint-disable-line no-param-reassign + return curr; + } + } +}; + +var listGet = function (objects, key) { + var node = listGetNode(objects, key); + return node && node.value; +}; +var listSet = function (objects, key, value) { + var node = listGetNode(objects, key); + if (node) { + node.value = value; + } else { + // Prepend the new node to the beginning of the list + objects.next = { // eslint-disable-line no-param-reassign + key: key, + next: objects.next, + value: value + }; + } +}; +var listHas = function (objects, key) { + return !!listGetNode(objects, key); +}; + +module.exports = function getSideChannel() { + var $wm; + var $m; + var $o; + var channel = { + assert: function (key) { + if (!channel.has(key)) { + throw new $TypeError('Side channel does not contain ' + inspect(key)); + } + }, + get: function (key) { // eslint-disable-line consistent-return + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapGet($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapGet($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listGet($o, key); + } + } + }, + has: function (key) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapHas($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapHas($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listHas($o, key); + } + } + return false; + }, + set: function (key, value) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if (!$wm) { + $wm = new $WeakMap(); + } + $weakMapSet($wm, key, value); + } else if ($Map) { + if (!$m) { + $m = new $Map(); + } + $mapSet($m, key, value); + } else { + if (!$o) { + /* + * Initialize the linked list as an empty node, so that we don't have + * to special-case handling of the first node: we can always refer to + * it as (previous node).next, instead of something like (list).head + */ + $o = { key: {}, next: null }; + } + listSet($o, key, value); + } + } + }; + return channel; +}; diff --git a/node_modules/side-channel/package.json b/node_modules/side-channel/package.json new file mode 100644 index 000000000..83e53f3bb --- /dev/null +++ b/node_modules/side-channel/package.json @@ -0,0 +1,67 @@ +{ + "name": "side-channel", + "version": "1.0.4", + "description": "Store information about any JS value in a side channel. Uses WeakMap if available.", + "main": "index.js", + "exports": { + "./package.json": "./package.json", + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ] + }, + "scripts": { + "prepublish": "safe-publish-latest", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/side-channel.git" + }, + "keywords": [ + "weakmap", + "map", + "side", + "channel", + "metadata" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/side-channel/issues" + }, + "homepage": "https://github.com/ljharb/side-channel#readme", + "devDependencies": { + "@ljharb/eslint-config": "^17.3.0", + "aud": "^1.1.3", + "auto-changelog": "^2.2.1", + "eslint": "^7.16.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.0.1" + }, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/side-channel/test/index.js b/node_modules/side-channel/test/index.js new file mode 100644 index 000000000..3b92ef7eb --- /dev/null +++ b/node_modules/side-channel/test/index.js @@ -0,0 +1,78 @@ +'use strict'; + +var test = require('tape'); + +var getSideChannel = require('../'); + +test('export', function (t) { + t.equal(typeof getSideChannel, 'function', 'is a function'); + t.equal(getSideChannel.length, 0, 'takes no arguments'); + + var channel = getSideChannel(); + t.ok(channel, 'is truthy'); + t.equal(typeof channel, 'object', 'is an object'); + + t.end(); +}); + +test('assert', function (t) { + var channel = getSideChannel(); + t['throws']( + function () { channel.assert({}); }, + TypeError, + 'nonexistent value throws' + ); + + var o = {}; + channel.set(o, 'data'); + t.doesNotThrow(function () { channel.assert(o); }, 'existent value noops'); + + t.end(); +}); + +test('has', function (t) { + var channel = getSideChannel(); + var o = []; + + t.equal(channel.has(o), false, 'nonexistent value yields false'); + + channel.set(o, 'foo'); + t.equal(channel.has(o), true, 'existent value yields true'); + + t.end(); +}); + +test('get', function (t) { + var channel = getSideChannel(); + var o = {}; + t.equal(channel.get(o), undefined, 'nonexistent value yields undefined'); + + var data = {}; + channel.set(o, data); + t.equal(channel.get(o), data, '"get" yields data set by "set"'); + + t.end(); +}); + +test('set', function (t) { + var channel = getSideChannel(); + var o = function () {}; + t.equal(channel.get(o), undefined, 'value not set'); + + channel.set(o, 42); + t.equal(channel.get(o), 42, 'value was set'); + + channel.set(o, Infinity); + t.equal(channel.get(o), Infinity, 'value was set again'); + + var o2 = {}; + channel.set(o2, 17); + t.equal(channel.get(o), Infinity, 'o is not modified'); + t.equal(channel.get(o2), 17, 'o2 is set'); + + channel.set(o, 14); + t.equal(channel.get(o), 14, 'o is modified'); + t.equal(channel.get(o2), 17, 'o2 is not modified'); + + t.end(); +}); diff --git a/node_modules/spdx-correct/LICENSE b/node_modules/spdx-correct/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/node_modules/spdx-correct/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/spdx-correct/README.md b/node_modules/spdx-correct/README.md deleted file mode 100644 index ab388cf94..000000000 --- a/node_modules/spdx-correct/README.md +++ /dev/null @@ -1,14 +0,0 @@ -```javascript -var correct = require('spdx-correct') -var assert = require('assert') - -assert.equal(correct('mit'), 'MIT') - -assert.equal(correct('Apache 2'), 'Apache-2.0') - -assert(correct('No idea what license') === null) - -// disable upgrade option -assert(correct('GPL-3.0'), 'GPL-3.0-or-later') -assert(correct('GPL-3.0', { upgrade: false }), 'GPL-3.0') -``` diff --git a/node_modules/spdx-correct/index.js b/node_modules/spdx-correct/index.js deleted file mode 100644 index 8e0e5aeda..000000000 --- a/node_modules/spdx-correct/index.js +++ /dev/null @@ -1,343 +0,0 @@ -/* -Copyright spdx-correct.js contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -var parse = require('spdx-expression-parse') -var spdxLicenseIds = require('spdx-license-ids') - -function valid (string) { - try { - parse(string) - return true - } catch (error) { - return false - } -} - -// Common transpositions of license identifier acronyms -var transpositions = [ - ['APGL', 'AGPL'], - ['Gpl', 'GPL'], - ['GLP', 'GPL'], - ['APL', 'Apache'], - ['ISD', 'ISC'], - ['GLP', 'GPL'], - ['IST', 'ISC'], - ['Claude', 'Clause'], - [' or later', '+'], - [' International', ''], - ['GNU', 'GPL'], - ['GUN', 'GPL'], - ['+', ''], - ['GNU GPL', 'GPL'], - ['GNU/GPL', 'GPL'], - ['GNU GLP', 'GPL'], - ['GNU General Public License', 'GPL'], - ['Gnu public license', 'GPL'], - ['GNU Public License', 'GPL'], - ['GNU GENERAL PUBLIC LICENSE', 'GPL'], - ['MTI', 'MIT'], - ['Mozilla Public License', 'MPL'], - ['WTH', 'WTF'], - ['-License', ''] -] - -var TRANSPOSED = 0 -var CORRECT = 1 - -// Simple corrections to nearly valid identifiers. -var transforms = [ - // e.g. 'mit' - function (argument) { - return argument.toUpperCase() - }, - // e.g. 'MIT ' - function (argument) { - return argument.trim() - }, - // e.g. 'M.I.T.' - function (argument) { - return argument.replace(/\./g, '') - }, - // e.g. 'Apache- 2.0' - function (argument) { - return argument.replace(/\s+/g, '') - }, - // e.g. 'CC BY 4.0'' - function (argument) { - return argument.replace(/\s+/g, '-') - }, - // e.g. 'LGPLv2.1' - function (argument) { - return argument.replace('v', '-') - }, - // e.g. 'Apache 2.0' - function (argument) { - return argument.replace(/,?\s*(\d)/, '-$1') - }, - // e.g. 'GPL 2' - function (argument) { - return argument.replace(/,?\s*(\d)/, '-$1.0') - }, - // e.g. 'Apache Version 2.0' - function (argument) { - return argument - .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2') - }, - // e.g. 'Apache Version 2' - function (argument) { - return argument - .replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/, '-$2.0') - }, - // e.g. 'ZLIB' - function (argument) { - return argument[0].toUpperCase() + argument.slice(1) - }, - // e.g. 'MPL/2.0' - function (argument) { - return argument.replace('/', '-') - }, - // e.g. 'Apache 2' - function (argument) { - return argument - .replace(/\s*V\s*(\d)/, '-$1') - .replace(/(\d)$/, '$1.0') - }, - // e.g. 'GPL-2.0', 'GPL-3.0' - function (argument) { - if (argument.indexOf('3.0') !== -1) { - return argument + '-or-later' - } else { - return argument + '-only' - } - }, - // e.g. 'GPL-2.0-' - function (argument) { - return argument + 'only' - }, - // e.g. 'GPL2' - function (argument) { - return argument.replace(/(\d)$/, '-$1.0') - }, - // e.g. 'BSD 3' - function (argument) { - return argument.replace(/(-| )?(\d)$/, '-$2-Clause') - }, - // e.g. 'BSD clause 3' - function (argument) { - return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause') - }, - // e.g. 'BY-NC-4.0' - function (argument) { - return 'CC-' + argument - }, - // e.g. 'BY-NC' - function (argument) { - return 'CC-' + argument + '-4.0' - }, - // e.g. 'Attribution-NonCommercial' - function (argument) { - return argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, '') - }, - // e.g. 'Attribution-NonCommercial' - function (argument) { - return 'CC-' + - argument - .replace('Attribution', 'BY') - .replace('NonCommercial', 'NC') - .replace('NoDerivatives', 'ND') - .replace(/ (\d)/, '-$1') - .replace(/ ?International/, '') + - '-4.0' - } -] - -var licensesWithVersions = spdxLicenseIds - .map(function (id) { - var match = /^(.*)-\d+\.\d+$/.exec(id) - return match - ? [match[0], match[1]] - : [id, null] - }) - .reduce(function (objectMap, item) { - var key = item[1] - objectMap[key] = objectMap[key] || [] - objectMap[key].push(item[0]) - return objectMap - }, {}) - -var licensesWithOneVersion = Object.keys(licensesWithVersions) - .map(function makeEntries (key) { - return [key, licensesWithVersions[key]] - }) - .filter(function identifySoleVersions (item) { - return ( - // Licenses has just one valid version suffix. - item[1].length === 1 && - item[0] !== null && - // APL will be considered Apache, rather than APL-1.0 - item[0] !== 'APL' - ) - }) - .map(function createLastResorts (item) { - return [item[0], item[1][0]] - }) - -licensesWithVersions = undefined - -// If all else fails, guess that strings containing certain substrings -// meant to identify certain licenses. -var lastResorts = [ - ['UNLI', 'Unlicense'], - ['WTF', 'WTFPL'], - ['2 CLAUSE', 'BSD-2-Clause'], - ['2-CLAUSE', 'BSD-2-Clause'], - ['3 CLAUSE', 'BSD-3-Clause'], - ['3-CLAUSE', 'BSD-3-Clause'], - ['AFFERO', 'AGPL-3.0-or-later'], - ['AGPL', 'AGPL-3.0-or-later'], - ['APACHE', 'Apache-2.0'], - ['ARTISTIC', 'Artistic-2.0'], - ['Affero', 'AGPL-3.0-or-later'], - ['BEER', 'Beerware'], - ['BOOST', 'BSL-1.0'], - ['BSD', 'BSD-2-Clause'], - ['CDDL', 'CDDL-1.1'], - ['ECLIPSE', 'EPL-1.0'], - ['FUCK', 'WTFPL'], - ['GNU', 'GPL-3.0-or-later'], - ['LGPL', 'LGPL-3.0-or-later'], - ['GPLV1', 'GPL-1.0-only'], - ['GPL-1', 'GPL-1.0-only'], - ['GPLV2', 'GPL-2.0-only'], - ['GPL-2', 'GPL-2.0-only'], - ['GPL', 'GPL-3.0-or-later'], - ['MIT +NO-FALSE-ATTRIBS', 'MITNFA'], - ['MIT', 'MIT'], - ['MPL', 'MPL-2.0'], - ['X11', 'X11'], - ['ZLIB', 'Zlib'] -].concat(licensesWithOneVersion) - -var SUBSTRING = 0 -var IDENTIFIER = 1 - -var validTransformation = function (identifier) { - for (var i = 0; i < transforms.length; i++) { - var transformed = transforms[i](identifier).trim() - if (transformed !== identifier && valid(transformed)) { - return transformed - } - } - return null -} - -var validLastResort = function (identifier) { - var upperCased = identifier.toUpperCase() - for (var i = 0; i < lastResorts.length; i++) { - var lastResort = lastResorts[i] - if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) { - return lastResort[IDENTIFIER] - } - } - return null -} - -var anyCorrection = function (identifier, check) { - for (var i = 0; i < transpositions.length; i++) { - var transposition = transpositions[i] - var transposed = transposition[TRANSPOSED] - if (identifier.indexOf(transposed) > -1) { - var corrected = identifier.replace( - transposed, - transposition[CORRECT] - ) - var checked = check(corrected) - if (checked !== null) { - return checked - } - } - } - return null -} - -module.exports = function (identifier, options) { - options = options || {} - var upgrade = options.upgrade === undefined ? true : !!options.upgrade - function postprocess (value) { - return upgrade ? upgradeGPLs(value) : value - } - var validArugment = ( - typeof identifier === 'string' && - identifier.trim().length !== 0 - ) - if (!validArugment) { - throw Error('Invalid argument. Expected non-empty string.') - } - identifier = identifier.trim() - if (valid(identifier)) { - return postprocess(identifier) - } - var noPlus = identifier.replace(/\+$/, '').trim() - if (valid(noPlus)) { - return postprocess(noPlus) - } - var transformed = validTransformation(identifier) - if (transformed !== null) { - return postprocess(transformed) - } - transformed = anyCorrection(identifier, function (argument) { - if (valid(argument)) { - return argument - } - return validTransformation(argument) - }) - if (transformed !== null) { - return postprocess(transformed) - } - transformed = validLastResort(identifier) - if (transformed !== null) { - return postprocess(transformed) - } - transformed = anyCorrection(identifier, validLastResort) - if (transformed !== null) { - return postprocess(transformed) - } - return null -} - -function upgradeGPLs (value) { - if ([ - 'GPL-1.0', 'LGPL-1.0', 'AGPL-1.0', - 'GPL-2.0', 'LGPL-2.0', 'AGPL-2.0', - 'LGPL-2.1' - ].indexOf(value) !== -1) { - return value + '-only' - } else if ([ - 'GPL-1.0+', 'GPL-2.0+', 'GPL-3.0+', - 'LGPL-2.0+', 'LGPL-2.1+', 'LGPL-3.0+', - 'AGPL-1.0+', 'AGPL-3.0+' - ].indexOf(value) !== -1) { - return value.replace(/\+$/, '-or-later') - } else if (['GPL-3.0', 'LGPL-3.0', 'AGPL-3.0'].indexOf(value) !== -1) { - return value + '-or-later' - } else { - return value - } -} diff --git a/node_modules/spdx-correct/package.json b/node_modules/spdx-correct/package.json deleted file mode 100644 index bc87fd5c9..000000000 --- a/node_modules/spdx-correct/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "spdx-correct", - "description": "correct invalid SPDX expressions", - "version": "3.1.0", - "author": "Kyle E. Mitchell (https://kemitchell.com)", - "contributors": [ - "Kyle E. Mitchell (https://kemitchell.com)", - "Christian Zommerfelds ", - "Tal Einat ", - "Dan Butvinik " - ], - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^2.0.1", - "replace-require-self": "^1.0.0", - "standard": "^11.0.0", - "standard-markdown": "^4.0.2", - "tape": "^4.9.0" - }, - "files": [ - "index.js" - ], - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata" - ], - "license": "Apache-2.0", - "repository": "jslicense/spdx-correct.js", - "scripts": { - "lint": "standard && standard-markdown README.md", - "test": "defence README.md | replace-require-self | node && node test.js" - } -} diff --git a/node_modules/spdx-exceptions/README.md b/node_modules/spdx-exceptions/README.md deleted file mode 100644 index 6c927ecc6..000000000 --- a/node_modules/spdx-exceptions/README.md +++ /dev/null @@ -1,36 +0,0 @@ -The package exports an array of strings. Each string is an identifier -for a license exception under the [Software Package Data Exchange -(SPDX)][SPDX] software license metadata standard. - -[SPDX]: https://spdx.org - -## Copyright and Licensing - -### SPDX - -"SPDX" is a federally registered United States trademark of The Linux -Foundation Corporation. - -From version 2.0 of the [SPDX] specification: - -> Copyright © 2010-2015 Linux Foundation and its Contributors. Licensed -> under the Creative Commons Attribution License 3.0 Unported. All other -> rights are expressly reserved. - -The Linux Foundation and the SPDX working groups are good people. Only -they decide what "SPDX" means, as a standard and otherwise. I respect -their work and their rights. You should, too. - -### This Package - -> I created this package by copying exception identifiers out of the -> SPDX specification. That work was mechanical, routine, and required no -> creativity whatsoever. - Kyle Mitchell, package author - -United States users concerned about intellectual property may wish to -discuss the following Supreme Court decisions with their attorneys: - -- _Baker v. Selden_, 101 U.S. 99 (1879) - -- _Feist Publications, Inc., v. Rural Telephone Service Co._, - 499 U.S. 340 (1991) diff --git a/node_modules/spdx-exceptions/index.json b/node_modules/spdx-exceptions/index.json deleted file mode 100644 index f88f088ab..000000000 --- a/node_modules/spdx-exceptions/index.json +++ /dev/null @@ -1,40 +0,0 @@ -[ - "389-exception", - "Autoconf-exception-2.0", - "Autoconf-exception-3.0", - "Bison-exception-2.2", - "Bootloader-exception", - "Classpath-exception-2.0", - "CLISP-exception-2.0", - "DigiRule-FOSS-exception", - "eCos-exception-2.0", - "Fawkes-Runtime-exception", - "FLTK-exception", - "Font-exception-2.0", - "freertos-exception-2.0", - "GCC-exception-2.0", - "GCC-exception-3.1", - "gnu-javamail-exception", - "GPL-3.0-linking-exception", - "GPL-3.0-linking-source-exception", - "GPL-CC-1.0", - "i2p-gpl-java-exception", - "Libtool-exception", - "Linux-syscall-note", - "LLVM-exception", - "LZMA-exception", - "mif-exception", - "Nokia-Qt-exception-1.1", - "OCaml-LGPL-linking-exception", - "OCCT-exception-1.0", - "OpenJDK-assembly-exception-1.0", - "openvpn-openssl-exception", - "PS-or-PDF-font-exception-20170817", - "Qt-GPL-exception-1.0", - "Qt-LGPL-exception-1.1", - "Qwt-exception-1.0", - "Swift-exception", - "u-boot-exception-2.0", - "Universal-FOSS-exception-1.0", - "WxWindows-exception-3.1" -] diff --git a/node_modules/spdx-exceptions/package.json b/node_modules/spdx-exceptions/package.json deleted file mode 100644 index 2bafc6a38..000000000 --- a/node_modules/spdx-exceptions/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "spdx-exceptions", - "description": "list of SPDX standard license exceptions", - "version": "2.3.0", - "author": "The Linux Foundation", - "contributors": [ - "Kyle E. Mitchell (https://kemitchell.com/)" - ], - "license": "CC-BY-3.0", - "repository": "kemitchell/spdx-exceptions.json", - "files": [ - "index.json" - ], - "scripts": { - "build": "node build.js" - } -} diff --git a/node_modules/spdx-expression-parse/AUTHORS b/node_modules/spdx-expression-parse/AUTHORS deleted file mode 100644 index 257a76b94..000000000 --- a/node_modules/spdx-expression-parse/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -C. Scott Ananian (http://cscott.net) -Kyle E. Mitchell (https://kemitchell.com) -Shinnosuke Watanabe -Antoine Motet diff --git a/node_modules/spdx-expression-parse/LICENSE b/node_modules/spdx-expression-parse/LICENSE deleted file mode 100644 index 831618eab..000000000 --- a/node_modules/spdx-expression-parse/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2015 Kyle E. Mitchell & other authors listed in AUTHORS - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/spdx-expression-parse/README.md b/node_modules/spdx-expression-parse/README.md deleted file mode 100644 index 514895b7d..000000000 --- a/node_modules/spdx-expression-parse/README.md +++ /dev/null @@ -1,91 +0,0 @@ -This package parses [SPDX license expression](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60) strings describing license terms, like [package.json license strings](https://docs.npmjs.com/files/package.json#license), into consistently structured ECMAScript objects. The npm command-line interface depends on this package, as do many automatic license-audit tools. - -In a nutshell: - -```javascript -var parse = require('spdx-expression-parse') -var assert = require('assert') - -assert.deepEqual( - // Licensed under the terms of the Two-Clause BSD License. - parse('BSD-2-Clause'), - {license: 'BSD-2-Clause'} -) - -assert.throws(function () { - // An invalid SPDX license expression. - // Should be `Apache-2.0`. - parse('Apache 2') -}) - -assert.deepEqual( - // Dual licensed under either: - // - LGPL 2.1 - // - a combination of Three-Clause BSD and MIT - parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'), - { - left: {license: 'LGPL-2.1'}, - conjunction: 'or', - right: { - left: {license: 'BSD-3-Clause'}, - conjunction: 'and', - right: {license: 'MIT'} - } - } -) -``` - -The syntax comes from the [Software Package Data eXchange (SPDX)](https://spdx.org/), a standard from the [Linux Foundation](https://www.linuxfoundation.org) for shareable data about software package license terms. SPDX aims to make sharing and auditing license data easy, especially for users of open-source software. - -The bulk of the SPDX standard describes syntax and semantics of XML metadata files. This package implements two lightweight, plain-text components of that larger standard: - -1. The [license list](https://spdx.org/licenses), a mapping from specific string identifiers, like `Apache-2.0`, to standard form license texts and bolt-on license exceptions. The [spdx-license-ids](https://www.npmjs.com/package/spdx-exceptions) and [spdx-exceptions](https://www.npmjs.com/package/spdx-license-ids) packages implement the license list. `spdx-expression-parse` depends on and `require()`s them. - - Any license identifier from the license list is a valid license expression: - - ```javascript - var identifiers = [] - .concat(require('spdx-license-ids')) - .concat(require('spdx-license-ids/deprecated')) - - identifiers.forEach(function (id) { - assert.deepEqual(parse(id), {license: id}) - }) - ``` - - So is any license identifier `WITH` a standardized license exception: - - ```javascript - identifiers.forEach(function (id) { - require('spdx-exceptions').forEach(function (e) { - assert.deepEqual( - parse(id + ' WITH ' + e), - {license: id, exception: e} - ) - }) - }) - ``` - -2. The license expression language, for describing simple and complex license terms, like `MIT` for MIT-licensed and `(GPL-2.0 OR Apache-2.0)` for dual-licensing under GPL 2.0 and Apache 2.0. `spdx-expression-parse` itself implements license expression language, exporting a parser. - - ```javascript - assert.deepEqual( - // Licensed under a combination of: - // - the MIT License AND - // - a combination of: - // - LGPL 2.1 (or a later version) AND - // - Three-Clause BSD - parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'), - { - left: {license: 'MIT'}, - conjunction: 'and', - right: { - left: {license: 'LGPL-2.1', plus: true}, - conjunction: 'and', - right: {license: 'BSD-3-Clause'} - } - } - ) - ``` - -The Linux Foundation and its contributors license the SPDX standard under the terms of [the Creative Commons Attribution License 3.0 Unported (SPDX: "CC-BY-3.0")](http://spdx.org/licenses/CC-BY-3.0). "SPDX" is a United States federally registered trademark of the Linux Foundation. The authors of this package license their work under the terms of the MIT License. diff --git a/node_modules/spdx-expression-parse/index.js b/node_modules/spdx-expression-parse/index.js deleted file mode 100644 index 52fab560a..000000000 --- a/node_modules/spdx-expression-parse/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -var scan = require('./scan') -var parse = require('./parse') - -module.exports = function (source) { - return parse(scan(source)) -} diff --git a/node_modules/spdx-expression-parse/package.json b/node_modules/spdx-expression-parse/package.json deleted file mode 100644 index 71575209c..000000000 --- a/node_modules/spdx-expression-parse/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "spdx-expression-parse", - "description": "parse SPDX license expressions", - "version": "3.0.0", - "author": "Kyle E. Mitchell (http://kemitchell.com)", - "files": [ - "AUTHORS", - "index.js", - "parse.js", - "scan.js" - ], - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^2.0.1", - "mocha": "^3.4.2", - "replace-require-self": "^1.0.0", - "standard": "^10.0.2" - }, - "keywords": [ - "SPDX", - "law", - "legal", - "license", - "metadata", - "package", - "package.json", - "standards" - ], - "license": "MIT", - "repository": "jslicense/spdx-expression-parse.js", - "scripts": { - "lint": "standard", - "test:readme": "defence -i javascript README.md | replace-require-self | node", - "test:mocha": "mocha test/index.js", - "test": "npm run test:mocha && npm run test:readme" - } -} diff --git a/node_modules/spdx-expression-parse/parse.js b/node_modules/spdx-expression-parse/parse.js deleted file mode 100644 index a4a52ce93..000000000 --- a/node_modules/spdx-expression-parse/parse.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict' - -// The ABNF grammar in the spec is totally ambiguous. -// -// This parser follows the operator precedence defined in the -// `Order of Precedence and Parentheses` section. - -module.exports = function (tokens) { - var index = 0 - - function hasMore () { - return index < tokens.length - } - - function token () { - return hasMore() ? tokens[index] : null - } - - function next () { - if (!hasMore()) { - throw new Error() - } - index++ - } - - function parseOperator (operator) { - var t = token() - if (t && t.type === 'OPERATOR' && operator === t.string) { - next() - return t.string - } - } - - function parseWith () { - if (parseOperator('WITH')) { - var t = token() - if (t && t.type === 'EXCEPTION') { - next() - return t.string - } - throw new Error('Expected exception after `WITH`') - } - } - - function parseLicenseRef () { - // TODO: Actually, everything is concatenated into one string - // for backward-compatibility but it could be better to return - // a nice structure. - var begin = index - var string = '' - var t = token() - if (t.type === 'DOCUMENTREF') { - next() - string += 'DocumentRef-' + t.string + ':' - if (!parseOperator(':')) { - throw new Error('Expected `:` after `DocumentRef-...`') - } - } - t = token() - if (t.type === 'LICENSEREF') { - next() - string += 'LicenseRef-' + t.string - return {license: string} - } - index = begin - } - - function parseLicense () { - var t = token() - if (t && t.type === 'LICENSE') { - next() - var node = {license: t.string} - if (parseOperator('+')) { - node.plus = true - } - var exception = parseWith() - if (exception) { - node.exception = exception - } - return node - } - } - - function parseParenthesizedExpression () { - var left = parseOperator('(') - if (!left) { - return - } - - var expr = parseExpression() - - if (!parseOperator(')')) { - throw new Error('Expected `)`') - } - - return expr - } - - function parseAtom () { - return ( - parseParenthesizedExpression() || - parseLicenseRef() || - parseLicense() - ) - } - - function makeBinaryOpParser (operator, nextParser) { - return function parseBinaryOp () { - var left = nextParser() - if (!left) { - return - } - - if (!parseOperator(operator)) { - return left - } - - var right = parseBinaryOp() - if (!right) { - throw new Error('Expected expression') - } - return { - left: left, - conjunction: operator.toLowerCase(), - right: right - } - } - } - - var parseAnd = makeBinaryOpParser('AND', parseAtom) - var parseExpression = makeBinaryOpParser('OR', parseAnd) - - var node = parseExpression() - if (!node || hasMore()) { - throw new Error('Syntax error') - } - return node -} diff --git a/node_modules/spdx-expression-parse/scan.js b/node_modules/spdx-expression-parse/scan.js deleted file mode 100644 index d0567f494..000000000 --- a/node_modules/spdx-expression-parse/scan.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict' - -var licenses = [] - .concat(require('spdx-license-ids')) - .concat(require('spdx-license-ids/deprecated')) -var exceptions = require('spdx-exceptions') - -module.exports = function (source) { - var index = 0 - - function hasMore () { - return index < source.length - } - - // `value` can be a regexp or a string. - // If it is recognized, the matching source string is returned and - // the index is incremented. Otherwise `undefined` is returned. - function read (value) { - if (value instanceof RegExp) { - var chars = source.slice(index) - var match = chars.match(value) - if (match) { - index += match[0].length - return match[0] - } - } else { - if (source.indexOf(value, index) === index) { - index += value.length - return value - } - } - } - - function skipWhitespace () { - read(/[ ]*/) - } - - function operator () { - var string - var possibilities = ['WITH', 'AND', 'OR', '(', ')', ':', '+'] - for (var i = 0; i < possibilities.length; i++) { - string = read(possibilities[i]) - if (string) { - break - } - } - - if (string === '+' && index > 1 && source[index - 2] === ' ') { - throw new Error('Space before `+`') - } - - return string && { - type: 'OPERATOR', - string: string - } - } - - function idstring () { - return read(/[A-Za-z0-9-.]+/) - } - - function expectIdstring () { - var string = idstring() - if (!string) { - throw new Error('Expected idstring at offset ' + index) - } - return string - } - - function documentRef () { - if (read('DocumentRef-')) { - var string = expectIdstring() - return {type: 'DOCUMENTREF', string: string} - } - } - - function licenseRef () { - if (read('LicenseRef-')) { - var string = expectIdstring() - return {type: 'LICENSEREF', string: string} - } - } - - function identifier () { - var begin = index - var string = idstring() - - if (licenses.indexOf(string) !== -1) { - return { - type: 'LICENSE', - string: string - } - } else if (exceptions.indexOf(string) !== -1) { - return { - type: 'EXCEPTION', - string: string - } - } - - index = begin - } - - // Tries to read the next token. Returns `undefined` if no token is - // recognized. - function parseToken () { - // Ordering matters - return ( - operator() || - documentRef() || - licenseRef() || - identifier() - ) - } - - var tokens = [] - while (hasMore()) { - skipWhitespace() - if (!hasMore()) { - break - } - - var token = parseToken() - if (!token) { - throw new Error('Unexpected `' + source[index] + - '` at offset ' + index) - } - - tokens.push(token) - } - return tokens -} diff --git a/node_modules/spdx-license-ids/README.md b/node_modules/spdx-license-ids/README.md deleted file mode 100644 index 699514d1a..000000000 --- a/node_modules/spdx-license-ids/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# spdx-license-ids - -[![npm version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.com/package/spdx-license-ids) -[![Github Actions](https://action-badges.now.sh/shinnn/spdx-license-ids)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/shinnn/spdx-license-ids) - -A list of [SPDX license](https://spdx.org/licenses/) identifiers - -## Installation - -[Download JSON directly](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/index.json), or [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/): - -``` -npm install spdx-license-ids -``` - -## [Node.js](https://nodejs.org/) API - -### require('spdx-license-ids') - -Type: `string[]` - -All license IDs except for the currently deprecated ones. - -```javascript -const ids = require('spdx-license-ids'); -//=> ['0BSD', 'AAL', 'ADSL', 'AFL-1.1', 'AFL-1.2', 'AFL-2.0', 'AFL-2.1', 'AFL-3.0', 'AGPL-1.0-only', ...] - -ids.includes('BSD-3-Clause'); //=> true -ids.includes('CC-BY-1.0'); //=> true - -ids.includes('GPL-3.0'); //=> false -``` - -### require('spdx-license-ids/deprecated') - -Type: `string[]` - -Deprecated license IDs. - -```javascript -const deprecatedIds = require('spdx-license-ids/deprecated'); -//=> ['AGPL-1.0', 'AGPL-3.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', 'GPL-2.0', ...] - -deprecatedIds.includes('BSD-3-Clause'); //=> false -deprecatedIds.includes('CC-BY-1.0'); //=> false - -deprecatedIds.includes('GPL-3.0'); //=> true -``` - -## License - -[Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/deed) diff --git a/node_modules/spdx-license-ids/deprecated.json b/node_modules/spdx-license-ids/deprecated.json deleted file mode 100644 index 1681f4870..000000000 --- a/node_modules/spdx-license-ids/deprecated.json +++ /dev/null @@ -1,24 +0,0 @@ -[ - "AGPL-1.0", - "AGPL-3.0", - "GFDL-1.1", - "GFDL-1.2", - "GFDL-1.3", - "GPL-1.0", - "GPL-2.0", - "GPL-2.0-with-GCC-exception", - "GPL-2.0-with-autoconf-exception", - "GPL-2.0-with-bison-exception", - "GPL-2.0-with-classpath-exception", - "GPL-2.0-with-font-exception", - "GPL-3.0", - "GPL-3.0-with-GCC-exception", - "GPL-3.0-with-autoconf-exception", - "LGPL-2.0", - "LGPL-2.1", - "LGPL-3.0", - "Nunit", - "StandardML-NJ", - "eCos-2.0", - "wxWindows" -] diff --git a/node_modules/spdx-license-ids/index.json b/node_modules/spdx-license-ids/index.json deleted file mode 100644 index 5283c78dc..000000000 --- a/node_modules/spdx-license-ids/index.json +++ /dev/null @@ -1,370 +0,0 @@ -[ - "0BSD", - "AAL", - "ADSL", - "AFL-1.1", - "AFL-1.2", - "AFL-2.0", - "AFL-2.1", - "AFL-3.0", - "AGPL-1.0-only", - "AGPL-1.0-or-later", - "AGPL-3.0-only", - "AGPL-3.0-or-later", - "AMDPLPA", - "AML", - "AMPAS", - "ANTLR-PD", - "APAFML", - "APL-1.0", - "APSL-1.0", - "APSL-1.1", - "APSL-1.2", - "APSL-2.0", - "Abstyles", - "Adobe-2006", - "Adobe-Glyph", - "Afmparse", - "Aladdin", - "Apache-1.0", - "Apache-1.1", - "Apache-2.0", - "Artistic-1.0", - "Artistic-1.0-Perl", - "Artistic-1.0-cl8", - "Artistic-2.0", - "BSD-1-Clause", - "BSD-2-Clause", - "BSD-2-Clause-FreeBSD", - "BSD-2-Clause-NetBSD", - "BSD-2-Clause-Patent", - "BSD-3-Clause", - "BSD-3-Clause-Attribution", - "BSD-3-Clause-Clear", - "BSD-3-Clause-LBNL", - "BSD-3-Clause-No-Nuclear-License", - "BSD-3-Clause-No-Nuclear-License-2014", - "BSD-3-Clause-No-Nuclear-Warranty", - "BSD-3-Clause-Open-MPI", - "BSD-4-Clause", - "BSD-4-Clause-UC", - "BSD-Protection", - "BSD-Source-Code", - "BSL-1.0", - "Bahyph", - "Barr", - "Beerware", - "BitTorrent-1.0", - "BitTorrent-1.1", - "BlueOak-1.0.0", - "Borceux", - "CATOSL-1.1", - "CC-BY-1.0", - "CC-BY-2.0", - "CC-BY-2.5", - "CC-BY-3.0", - "CC-BY-4.0", - "CC-BY-NC-1.0", - "CC-BY-NC-2.0", - "CC-BY-NC-2.5", - "CC-BY-NC-3.0", - "CC-BY-NC-4.0", - "CC-BY-NC-ND-1.0", - "CC-BY-NC-ND-2.0", - "CC-BY-NC-ND-2.5", - "CC-BY-NC-ND-3.0", - "CC-BY-NC-ND-4.0", - "CC-BY-NC-SA-1.0", - "CC-BY-NC-SA-2.0", - "CC-BY-NC-SA-2.5", - "CC-BY-NC-SA-3.0", - "CC-BY-NC-SA-4.0", - "CC-BY-ND-1.0", - "CC-BY-ND-2.0", - "CC-BY-ND-2.5", - "CC-BY-ND-3.0", - "CC-BY-ND-4.0", - "CC-BY-SA-1.0", - "CC-BY-SA-2.0", - "CC-BY-SA-2.5", - "CC-BY-SA-3.0", - "CC-BY-SA-4.0", - "CC-PDDC", - "CC0-1.0", - "CDDL-1.0", - "CDDL-1.1", - "CDLA-Permissive-1.0", - "CDLA-Sharing-1.0", - "CECILL-1.0", - "CECILL-1.1", - "CECILL-2.0", - "CECILL-2.1", - "CECILL-B", - "CECILL-C", - "CERN-OHL-1.1", - "CERN-OHL-1.2", - "CNRI-Jython", - "CNRI-Python", - "CNRI-Python-GPL-Compatible", - "CPAL-1.0", - "CPL-1.0", - "CPOL-1.02", - "CUA-OPL-1.0", - "Caldera", - "ClArtistic", - "Condor-1.1", - "Crossword", - "CrystalStacker", - "Cube", - "D-FSL-1.0", - "DOC", - "DSDP", - "Dotseqn", - "ECL-1.0", - "ECL-2.0", - "EFL-1.0", - "EFL-2.0", - "EPL-1.0", - "EPL-2.0", - "EUDatagrid", - "EUPL-1.0", - "EUPL-1.1", - "EUPL-1.2", - "Entessa", - "ErlPL-1.1", - "Eurosym", - "FSFAP", - "FSFUL", - "FSFULLR", - "FTL", - "Fair", - "Frameworx-1.0", - "FreeImage", - "GFDL-1.1-only", - "GFDL-1.1-or-later", - "GFDL-1.2-only", - "GFDL-1.2-or-later", - "GFDL-1.3-only", - "GFDL-1.3-or-later", - "GL2PS", - "GPL-1.0-only", - "GPL-1.0-or-later", - "GPL-2.0-only", - "GPL-2.0-or-later", - "GPL-3.0-only", - "GPL-3.0-or-later", - "Giftware", - "Glide", - "Glulxe", - "HPND", - "HPND-sell-variant", - "HaskellReport", - "IBM-pibs", - "ICU", - "IJG", - "IPA", - "IPL-1.0", - "ISC", - "ImageMagick", - "Imlib2", - "Info-ZIP", - "Intel", - "Intel-ACPI", - "Interbase-1.0", - "JPNIC", - "JSON", - "JasPer-2.0", - "LAL-1.2", - "LAL-1.3", - "LGPL-2.0-only", - "LGPL-2.0-or-later", - "LGPL-2.1-only", - "LGPL-2.1-or-later", - "LGPL-3.0-only", - "LGPL-3.0-or-later", - "LGPLLR", - "LPL-1.0", - "LPL-1.02", - "LPPL-1.0", - "LPPL-1.1", - "LPPL-1.2", - "LPPL-1.3a", - "LPPL-1.3c", - "Latex2e", - "Leptonica", - "LiLiQ-P-1.1", - "LiLiQ-R-1.1", - "LiLiQ-Rplus-1.1", - "Libpng", - "Linux-OpenIB", - "MIT", - "MIT-0", - "MIT-CMU", - "MIT-advertising", - "MIT-enna", - "MIT-feh", - "MITNFA", - "MPL-1.0", - "MPL-1.1", - "MPL-2.0", - "MPL-2.0-no-copyleft-exception", - "MS-PL", - "MS-RL", - "MTLL", - "MakeIndex", - "MirOS", - "Motosoto", - "Multics", - "Mup", - "NASA-1.3", - "NBPL-1.0", - "NCSA", - "NGPL", - "NLOD-1.0", - "NLPL", - "NOSL", - "NPL-1.0", - "NPL-1.1", - "NPOSL-3.0", - "NRL", - "NTP", - "Naumen", - "Net-SNMP", - "NetCDF", - "Newsletr", - "Nokia", - "Noweb", - "OCCT-PL", - "OCLC-2.0", - "ODC-By-1.0", - "ODbL-1.0", - "OFL-1.0", - "OFL-1.1", - "OGL-UK-1.0", - "OGL-UK-2.0", - "OGL-UK-3.0", - "OGTSL", - "OLDAP-1.1", - "OLDAP-1.2", - "OLDAP-1.3", - "OLDAP-1.4", - "OLDAP-2.0", - "OLDAP-2.0.1", - "OLDAP-2.1", - "OLDAP-2.2", - "OLDAP-2.2.1", - "OLDAP-2.2.2", - "OLDAP-2.3", - "OLDAP-2.4", - "OLDAP-2.5", - "OLDAP-2.6", - "OLDAP-2.7", - "OLDAP-2.8", - "OML", - "OPL-1.0", - "OSET-PL-2.1", - "OSL-1.0", - "OSL-1.1", - "OSL-2.0", - "OSL-2.1", - "OSL-3.0", - "OpenSSL", - "PDDL-1.0", - "PHP-3.0", - "PHP-3.01", - "Parity-6.0.0", - "Plexus", - "PostgreSQL", - "Python-2.0", - "QPL-1.0", - "Qhull", - "RHeCos-1.1", - "RPL-1.1", - "RPL-1.5", - "RPSL-1.0", - "RSA-MD", - "RSCPL", - "Rdisc", - "Ruby", - "SAX-PD", - "SCEA", - "SGI-B-1.0", - "SGI-B-1.1", - "SGI-B-2.0", - "SHL-0.5", - "SHL-0.51", - "SISSL", - "SISSL-1.2", - "SMLNJ", - "SMPPL", - "SNIA", - "SPL-1.0", - "SSPL-1.0", - "SWL", - "Saxpath", - "Sendmail", - "Sendmail-8.23", - "SimPL-2.0", - "Sleepycat", - "Spencer-86", - "Spencer-94", - "Spencer-99", - "SugarCRM-1.1.3", - "TAPR-OHL-1.0", - "TCL", - "TCP-wrappers", - "TMate", - "TORQUE-1.1", - "TOSL", - "TU-Berlin-1.0", - "TU-Berlin-2.0", - "UPL-1.0", - "Unicode-DFS-2015", - "Unicode-DFS-2016", - "Unicode-TOU", - "Unlicense", - "VOSTROM", - "VSL-1.0", - "Vim", - "W3C", - "W3C-19980720", - "W3C-20150513", - "WTFPL", - "Watcom-1.0", - "Wsuipa", - "X11", - "XFree86-1.1", - "XSkat", - "Xerox", - "Xnet", - "YPL-1.0", - "YPL-1.1", - "ZPL-1.1", - "ZPL-2.0", - "ZPL-2.1", - "Zed", - "Zend-2.0", - "Zimbra-1.3", - "Zimbra-1.4", - "Zlib", - "blessing", - "bzip2-1.0.5", - "bzip2-1.0.6", - "copyleft-next-0.3.0", - "copyleft-next-0.3.1", - "curl", - "diffmark", - "dvipdfm", - "eGenix", - "gSOAP-1.3b", - "gnuplot", - "iMatix", - "libpng-2.0", - "libtiff", - "mpich2", - "psfrag", - "psutils", - "xinetd", - "xpp", - "zlib-acknowledgement" -] diff --git a/node_modules/spdx-license-ids/package.json b/node_modules/spdx-license-ids/package.json deleted file mode 100644 index 2f41ece08..000000000 --- a/node_modules/spdx-license-ids/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "spdx-license-ids", - "version": "3.0.5", - "description": "A list of SPDX license identifiers", - "repository": "shinnn/spdx-license-ids", - "author": "Shinnosuke Watanabe (https://github.com/shinnn)", - "license": "CC0-1.0", - "scripts": { - "build": "node build.js", - "pretest": "eslint .", - "test": "node test.js" - }, - "files": [ - "deprecated.json", - "index.json" - ], - "keywords": [ - "spdx", - "license", - "licenses", - "id", - "identifier", - "identifiers", - "json", - "array", - "oss" - ], - "devDependencies": { - "@shinnn/eslint-config": "^6.8.7", - "chalk": "^2.4.1", - "eslint": "^5.10.0", - "get-spdx-license-ids": "^2.1.0", - "rmfr": "^2.0.0", - "tape": "^4.9.1" - }, - "eslintConfig": { - "extends": "@shinnn" - } -} diff --git a/node_modules/string.prototype.trimend/.eslintignore b/node_modules/string.prototype.trimend/.eslintignore deleted file mode 100644 index 404abb221..000000000 --- a/node_modules/string.prototype.trimend/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/string.prototype.trimend/.eslintrc b/node_modules/string.prototype.trimend/.eslintrc index 54af451cf..8056b20c9 100644 --- a/node_modules/string.prototype.trimend/.eslintrc +++ b/node_modules/string.prototype.trimend/.eslintrc @@ -3,6 +3,15 @@ "extends": "@ljharb", + "rules": { + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "RequireObjectCoercible", + ], + }], + }, + "overrides": [ { "files": "test/**", diff --git a/node_modules/string.prototype.trimend/.nycrc b/node_modules/string.prototype.trimend/.nycrc index 1826526e0..bdd626ce9 100644 --- a/node_modules/string.prototype.trimend/.nycrc +++ b/node_modules/string.prototype.trimend/.nycrc @@ -2,10 +2,6 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, "exclude": [ "coverage", "test" diff --git a/node_modules/string.prototype.trimend/CHANGELOG.md b/node_modules/string.prototype.trimend/CHANGELOG.md index 37cae3dc5..a53453b4c 100644 --- a/node_modules/string.prototype.trimend/CHANGELOG.md +++ b/node_modules/string.prototype.trimend/CHANGELOG.md @@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.0.6](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.5...v1.0.6) - 2022-11-07 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`1d1e717`](https://github.com/es-shims/String.prototype.trimEnd/commit/1d1e71720ada81e484c9bffb386f65d7a6a1335e) +- [actions] update rebase action to use reusable workflow [`83f2683`](https://github.com/es-shims/String.prototype.trimEnd/commit/83f268325cc37ca72bea995281167a9d2821810b) +- [Dev Deps] update `aud`, `tape` [`a3a9129`](https://github.com/es-shims/String.prototype.trimEnd/commit/a3a9129dd995a949bdb93d278f403aa400e088ed) +- [Deps] update `es-abstract` [`a6e476d`](https://github.com/es-shims/String.prototype.trimEnd/commit/a6e476dc0120a41a22e66b5079bf3b407da387fa) + +## [v1.0.5](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.4...v1.0.5) - 2022-05-02 + +### Commits + +- [actions] reuse common workflows [`69a56ce`](https://github.com/es-shims/String.prototype.trimEnd/commit/69a56ce95343848d5e498f8e939a0697db8ac9f2) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`5d7db31`](https://github.com/es-shims/String.prototype.trimEnd/commit/5d7db314948faac975705db56305b6cc3dae7ba9) +- [Fix] ensure main entry point properly checks the receiver in ES3 engines [`bb1983d`](https://github.com/es-shims/String.prototype.trimEnd/commit/bb1983dc27504733ab883a42f55b134f679a642d) +- [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace [`10a1091`](https://github.com/es-shims/String.prototype.trimEnd/commit/10a10916e1ffc8cdab78515b2cc521cc74c08277) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`a08e14b`](https://github.com/es-shims/String.prototype.trimEnd/commit/a08e14bfea5e27d419ef742e83f467a169a69971) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`1c4c8da`](https://github.com/es-shims/String.prototype.trimEnd/commit/1c4c8dab4aefc1c5823a61b5a0286bb6fe1e036c) +- [actions] update codecov uploader [`70c4a7c`](https://github.com/es-shims/String.prototype.trimEnd/commit/70c4a7c566fd5bf72475df9318ec2cd218ceca26) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `tape` [`4b08ed7`](https://github.com/es-shims/String.prototype.trimEnd/commit/4b08ed78a579585b593b3ca4ac7919d13906e840) +- [readme] add github actions/codecov badges [`9805501`](https://github.com/es-shims/String.prototype.trimEnd/commit/980550105b304385bcccb8ec05a247e02c24d04a) +- [Dev Deps] update `eslint`, `tape` [`50ec335`](https://github.com/es-shims/String.prototype.trimEnd/commit/50ec335ed42b59d1ab626dbe412f4ae23ab99b4b) +- [actions] update workflows [`bf9c32e`](https://github.com/es-shims/String.prototype.trimEnd/commit/bf9c32efe08e98b53302df67581dc971b7a758cd) +- [meta] use `prepublishOnly` script for npm 7+ [`9d921bd`](https://github.com/es-shims/String.prototype.trimEnd/commit/9d921bdbcaf8cebebbc302e6df518cbc3e4907bd) +- [Deps] update `define-properties` [`15617ce`](https://github.com/es-shims/String.prototype.trimEnd/commit/15617ced8ac2ea3ab8324a04d16fd294b12059b5) + ## [v1.0.4](https://github.com/es-shims/String.prototype.trimEnd/compare/v1.0.3...v1.0.4) - 2021-02-23 ### Commits diff --git a/node_modules/string.prototype.trimend/README.md b/node_modules/string.prototype.trimend/README.md index f6fd331c1..292bda959 100644 --- a/node_modules/string.prototype.trimend/README.md +++ b/node_modules/string.prototype.trimend/README.md @@ -1,5 +1,7 @@ -String.prototype.trimEnd [![Version Badge][npm-version-svg]][package-url] +# String.prototype.trimEnd [![Version Badge][npm-version-svg]][package-url] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] @@ -38,3 +40,7 @@ Simply clone the repo, `npm install`, and run `npm test` [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/string.prototype.trimend.svg [downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trimend +[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trimEnd/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trimEnd/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trimEnd +[actions-url]: https://github.com/es-shims/String.prototype.trimEnd/actions diff --git a/node_modules/string.prototype.trimend/implementation.js b/node_modules/string.prototype.trimend/implementation.js index a14a7fc35..4628abaa3 100644 --- a/node_modules/string.prototype.trimend/implementation.js +++ b/node_modules/string.prototype.trimend/implementation.js @@ -3,8 +3,11 @@ var callBound = require('call-bind/callBound'); var $replace = callBound('String.prototype.replace'); +var mvsIsWS = (/^\s$/).test('\u180E'); /* eslint-disable no-control-regex */ -var endWhitespace = /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*$/; +var endWhitespace = mvsIsWS + ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/ + : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/; /* eslint-enable no-control-regex */ module.exports = function trimEnd() { diff --git a/node_modules/string.prototype.trimend/index.js b/node_modules/string.prototype.trimend/index.js index 31f6bf44a..6aba38207 100644 --- a/node_modules/string.prototype.trimend/index.js +++ b/node_modules/string.prototype.trimend/index.js @@ -2,17 +2,22 @@ var callBind = require('call-bind'); var define = require('define-properties'); +var RequireObjectCoercible = require('es-abstract/2022/RequireObjectCoercible'); var implementation = require('./implementation'); var getPolyfill = require('./polyfill'); var shim = require('./shim'); var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; -define(bound, { +define(boundMethod, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); -module.exports = bound; +module.exports = boundMethod; diff --git a/node_modules/string.prototype.trimend/package.json b/node_modules/string.prototype.trimend/package.json index b552bfa43..e0ebc2183 100644 --- a/node_modules/string.prototype.trimend/package.json +++ b/node_modules/string.prototype.trimend/package.json @@ -1,6 +1,6 @@ { "name": "string.prototype.trimend", - "version": "1.0.4", + "version": "1.0.6", "author": "Jordan Harband ", "contributors": [ "Jordan Harband ", @@ -13,8 +13,10 @@ "license": "MIT", "main": "index.js", "scripts": { - "prepublish": "safe-publish-latest", - "lint": "eslint .", + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=js,mjs .", "postlint": "es-shim-api --bound", "pretest": "npm run lint", "test": "npm run tests-only", @@ -43,16 +45,18 @@ "tc39" ], "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^17.5.1", - "aud": "^1.1.4", - "auto-changelog": "^2.2.1", - "eslint": "^7.20.0", - "functions-have-names": "^1.2.2", + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "functions-have-names": "^1.2.3", "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.1.1" + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" }, "auto-changelog": { "output": "CHANGELOG.md", @@ -64,6 +68,12 @@ }, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] } } diff --git a/node_modules/string.prototype.trimend/test/tests.js b/node_modules/string.prototype.trimend/test/tests.js index ce00554c7..03a8c5c51 100644 --- a/node_modules/string.prototype.trimend/test/tests.js +++ b/node_modules/string.prototype.trimend/test/tests.js @@ -13,8 +13,13 @@ module.exports = function (trimEnd, t) { // see https://codeblog.jonskeet.uk/2014/12/01/when-is-an-identifier-not-an-identifier-attack-of-the-mongolian-vowel-separator/ var mongolianVowelSeparator = '\u180E'; - t.test('unicode >= 4 && < 6.3', { skip: !(/^\s$/).test(mongolianVowelSeparator) }, function (st) { - st.equal(trimEnd(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), mongolianVowelSeparator + 'a', 'mongolian vowel separator is whitespace'); + var mvsIsWS = (/^\s$/).test(mongolianVowelSeparator); + t.test('mongolian vowel separator: unicode >= 4 && < 6.3', function (st) { + st.equal( + trimEnd(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), + mongolianVowelSeparator + 'a' + (mvsIsWS ? '' : mongolianVowelSeparator), + 'mongolian vowel separator is ' + (mvsIsWS ? '' : 'not ') + 'whitespace' + ); st.end(); }); diff --git a/node_modules/string.prototype.trimstart/.eslintignore b/node_modules/string.prototype.trimstart/.eslintignore deleted file mode 100644 index 404abb221..000000000 --- a/node_modules/string.prototype.trimstart/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/string.prototype.trimstart/.eslintrc b/node_modules/string.prototype.trimstart/.eslintrc index 54af451cf..8056b20c9 100644 --- a/node_modules/string.prototype.trimstart/.eslintrc +++ b/node_modules/string.prototype.trimstart/.eslintrc @@ -3,6 +3,15 @@ "extends": "@ljharb", + "rules": { + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "RequireObjectCoercible", + ], + }], + }, + "overrides": [ { "files": "test/**", diff --git a/node_modules/string.prototype.trimstart/.nycrc b/node_modules/string.prototype.trimstart/.nycrc index 1826526e0..bdd626ce9 100644 --- a/node_modules/string.prototype.trimstart/.nycrc +++ b/node_modules/string.prototype.trimstart/.nycrc @@ -2,10 +2,6 @@ "all": true, "check-coverage": false, "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, "exclude": [ "coverage", "test" diff --git a/node_modules/string.prototype.trimstart/CHANGELOG.md b/node_modules/string.prototype.trimstart/CHANGELOG.md index f740ecd14..f9ec035a0 100644 --- a/node_modules/string.prototype.trimstart/CHANGELOG.md +++ b/node_modules/string.prototype.trimstart/CHANGELOG.md @@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.0.6](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.5...v1.0.6) - 2022-11-07 + +### Commits + +- [meta] use `npmignore` to autogenerate an npmignore file [`0838ae4`](https://github.com/es-shims/String.prototype.trimStart/commit/0838ae4ed948df470185afbeea4296f5c5ecd759) +- [actions] update rebase action to use reusable workflow [`d6bb784`](https://github.com/es-shims/String.prototype.trimStart/commit/d6bb78400a00459e9ab0b28f433c45804a65184d) +- [Dev Deps] update `aud`, `tape` [`8734d9a`](https://github.com/es-shims/String.prototype.trimStart/commit/8734d9a616c6aca9ec7f0c8819e66c2496deb32e) +- [Deps] update `es-abstract` [`30f593f`](https://github.com/es-shims/String.prototype.trimStart/commit/30f593f3febf6d8d9b3d5605174b437fed9cbb3a) + +## [v1.0.5](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.4...v1.0.5) - 2022-05-02 + +### Commits + +- [actions] reuse common workflows [`61d4009`](https://github.com/es-shims/String.prototype.trimStart/commit/61d40098a96b3dcc6cf963c9d03dd1b23b6eb13d) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`bfe39c4`](https://github.com/es-shims/String.prototype.trimStart/commit/bfe39c498e26a4ad75c64cce27ff3df9bfef2cc1) +- [Fix] ensure main entry point properly checks the receiver in ES3 engines [`36e3730`](https://github.com/es-shims/String.prototype.trimStart/commit/36e37307bb06fb5dc34d861a4bf6f7db931340d9) +- [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace [`4f77eed`](https://github.com/es-shims/String.prototype.trimStart/commit/4f77eed5aa64e6f781310847d7831563fce90f5c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`59fcb99`](https://github.com/es-shims/String.prototype.trimStart/commit/59fcb995ef8d4723a83e28d46dbe41a14253b681) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`486ffcf`](https://github.com/es-shims/String.prototype.trimStart/commit/486ffcfa93c75516601169a3973b81fdfeb7de8b) +- [actions] update codecov uploader [`b33ac48`](https://github.com/es-shims/String.prototype.trimStart/commit/b33ac48ccc86f6b894d8fde5162bd1c806904972) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `tape` [`3c89fa5`](https://github.com/es-shims/String.prototype.trimStart/commit/3c89fa571d1c4b8894230d93caaf3b3d9885534d) +- [readme] add github actions/codecov badges [`00be6b3`](https://github.com/es-shims/String.prototype.trimStart/commit/00be6b34fdd989950b934b4471087362b78d4b0c) +- [Dev Deps] update `eslint`, `tape` [`13a08f5`](https://github.com/es-shims/String.prototype.trimStart/commit/13a08f578c53cf5f129fb6ebe486e8bbcc40c14e) +- [actions] update workflows [`6ac576d`](https://github.com/es-shims/String.prototype.trimStart/commit/6ac576dde99f73d19492777efed29ec069e89bf1) +- [meta] use `prepublishOnly` script for npm 7+ [`fa382ca`](https://github.com/es-shims/String.prototype.trimStart/commit/fa382caa5c8e9a868572605ce215a3db1dc9ef21) +- [Deps] update `define-properties` [`d57bffe`](https://github.com/es-shims/String.prototype.trimStart/commit/d57bffef7d89384c8888627c5ee33b80e24d54e0) + ## [v1.0.4](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.3...v1.0.4) - 2021-02-23 ### Commits diff --git a/node_modules/string.prototype.trimstart/README.md b/node_modules/string.prototype.trimstart/README.md index 682408bf2..5ec76138e 100644 --- a/node_modules/string.prototype.trimstart/README.md +++ b/node_modules/string.prototype.trimstart/README.md @@ -1,5 +1,7 @@ # String.prototype.trimStart [![Version Badge][npm-version-svg]][package-url] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] @@ -38,3 +40,7 @@ Simply clone the repo, `npm install`, and run `npm test` [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/string.prototype.trimstart.svg [downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trimstart +[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trimStart/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trimStart/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trimStart +[actions-url]: https://github.com/es-shims/String.prototype.trimStart/actions diff --git a/node_modules/string.prototype.trimstart/implementation.js b/node_modules/string.prototype.trimstart/implementation.js index 862aa0f74..882e7111e 100644 --- a/node_modules/string.prototype.trimstart/implementation.js +++ b/node_modules/string.prototype.trimstart/implementation.js @@ -3,8 +3,11 @@ var callBound = require('call-bind/callBound'); var $replace = callBound('String.prototype.replace'); +var mvsIsWS = (/^\s$/).test('\u180E'); /* eslint-disable no-control-regex */ -var startWhitespace = /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*/; +var startWhitespace = mvsIsWS + ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ + : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; /* eslint-enable no-control-regex */ module.exports = function trimStart() { diff --git a/node_modules/string.prototype.trimstart/index.js b/node_modules/string.prototype.trimstart/index.js index 31f6bf44a..6aba38207 100644 --- a/node_modules/string.prototype.trimstart/index.js +++ b/node_modules/string.prototype.trimstart/index.js @@ -2,17 +2,22 @@ var callBind = require('call-bind'); var define = require('define-properties'); +var RequireObjectCoercible = require('es-abstract/2022/RequireObjectCoercible'); var implementation = require('./implementation'); var getPolyfill = require('./polyfill'); var shim = require('./shim'); var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; -define(bound, { +define(boundMethod, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); -module.exports = bound; +module.exports = boundMethod; diff --git a/node_modules/string.prototype.trimstart/package.json b/node_modules/string.prototype.trimstart/package.json index c965ca2de..526126001 100644 --- a/node_modules/string.prototype.trimstart/package.json +++ b/node_modules/string.prototype.trimstart/package.json @@ -1,6 +1,6 @@ { "name": "string.prototype.trimstart", - "version": "1.0.4", + "version": "1.0.6", "author": "Jordan Harband ", "contributors": [ "Jordan Harband ", @@ -13,8 +13,10 @@ "license": "MIT", "main": "index.js", "scripts": { - "prepublish": "safe-publish-latest", - "lint": "eslint .", + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", "postlint": "es-shim-api --bound", "pretest": "npm run lint", "test": "npm run tests-only", @@ -43,16 +45,18 @@ "tc39" ], "devDependencies": { - "@es-shims/api": "^2.1.2", - "@ljharb/eslint-config": "^17.5.1", - "aud": "^1.1.4", - "auto-changelog": "^2.2.1", - "eslint": "^7.20.0", - "functions-have-names": "^1.2.2", + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "functions-have-names": "^1.2.3", "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.2.0" + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" }, "auto-changelog": { "output": "CHANGELOG.md", @@ -64,6 +68,12 @@ }, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] } } diff --git a/node_modules/string.prototype.trimstart/test/tests.js b/node_modules/string.prototype.trimstart/test/tests.js index a515158c9..526aac144 100644 --- a/node_modules/string.prototype.trimstart/test/tests.js +++ b/node_modules/string.prototype.trimstart/test/tests.js @@ -13,8 +13,13 @@ module.exports = function (trimStart, t) { // see https://codeblog.jonskeet.uk/2014/12/01/when-is-an-identifier-not-an-identifier-attack-of-the-mongolian-vowel-separator/ var mongolianVowelSeparator = '\u180E'; - t.test('unicode >= 4 && < 6.3', { skip: !(/^\s$/).test(mongolianVowelSeparator) }, function (st) { - st.equal(trimStart(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), 'a' + mongolianVowelSeparator, 'mongolian vowel separator is whitespace'); + var mvsIsWS = (/^\s$/).test(mongolianVowelSeparator); + t.test('mongolian vowel separator: unicode >= 4 && < 6.3', function (st) { + st.equal( + trimStart(mongolianVowelSeparator + 'a' + mongolianVowelSeparator), + (mvsIsWS ? '' : mongolianVowelSeparator) + 'a' + mongolianVowelSeparator, + 'mongolian vowel separator is ' + (mvsIsWS ? '' : 'not ') + 'whitespace' + ); st.end(); }); diff --git a/node_modules/supports-preserve-symlinks-flag/.eslintrc b/node_modules/supports-preserve-symlinks-flag/.eslintrc new file mode 100644 index 000000000..346ffeca8 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "browser": true, + "node": true, + }, + + "rules": { + "id-length": "off", + }, +} diff --git a/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml new file mode 100644 index 000000000..e8d64f37e --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/supports-preserve-symlink-flag +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/supports-preserve-symlinks-flag/.nycrc b/node_modules/supports-preserve-symlinks-flag/.nycrc new file mode 100644 index 000000000..bdd626ce9 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md new file mode 100644 index 000000000..61f607f48 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v1.0.0 - 2022-01-02 + +### Commits + +- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074) +- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9) +- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262) +- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff) +- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d) +- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8) +- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d) +- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087) +- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69) +- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca) +- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741) diff --git a/node_modules/supports-preserve-symlinks-flag/LICENSE b/node_modules/supports-preserve-symlinks-flag/LICENSE new file mode 100644 index 000000000..2e7b9a3ea --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/supports-preserve-symlinks-flag/README.md b/node_modules/supports-preserve-symlinks-flag/README.md new file mode 100644 index 000000000..eb05b124c --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/README.md @@ -0,0 +1,42 @@ +# node-supports-preserve-symlinks-flag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Determine if the current node version supports the `--preserve-symlinks` flag. + +## Example + +```js +var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag'); +var assert = require('assert'); + +assert.equal(supportsPreserveSymlinks, null); // in a browser +assert.equal(supportsPreserveSymlinks, false); // in node < v6.2 +assert.equal(supportsPreserveSymlinks, true); // in node v6.2+ +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag +[npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg +[deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag +[dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag +[codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag +[actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions diff --git a/node_modules/supports-preserve-symlinks-flag/browser.js b/node_modules/supports-preserve-symlinks-flag/browser.js new file mode 100644 index 000000000..087be1fe9 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/browser.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = null; diff --git a/node_modules/supports-preserve-symlinks-flag/index.js b/node_modules/supports-preserve-symlinks-flag/index.js new file mode 100644 index 000000000..86fd5d331 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/index.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = ( +// node 12+ + process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks') +) || ( +// node v6.2 - v11 + String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle +); diff --git a/node_modules/supports-preserve-symlinks-flag/package.json b/node_modules/supports-preserve-symlinks-flag/package.json new file mode 100644 index 000000000..8d3c44684 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/package.json @@ -0,0 +1,70 @@ +{ + "name": "supports-preserve-symlinks-flag", + "version": "1.0.0", + "description": "Determine if the current node version supports the `--preserve-symlinks` flag.", + "main": "./index.js", + "browser": "./browser.js", + "exports": { + ".": [ + { + "browser": "./browser.js", + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git" + }, + "keywords": [ + "node", + "flag", + "symlink", + "symlinks", + "preserve-symlinks" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues" + }, + "homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.1.0", + "aud": "^1.1.5", + "auto-changelog": "^2.3.0", + "eslint": "^8.6.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "semver": "^6.3.0", + "tape": "^5.4.0" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/supports-preserve-symlinks-flag/test/index.js b/node_modules/supports-preserve-symlinks-flag/test/index.js new file mode 100644 index 000000000..9938d6716 --- /dev/null +++ b/node_modules/supports-preserve-symlinks-flag/test/index.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); +var semver = require('semver'); + +var supportsPreserveSymlinks = require('../'); +var browser = require('../browser'); + +test('supportsPreserveSymlinks', function (t) { + t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean'); + + t.equal(browser, null, 'browser file is `null`'); + t.equal( + supportsPreserveSymlinks, + null, + 'in a browser, is null', + { skip: typeof window === 'undefined' } + ); + + var expected = semver.satisfies(process.version, '>= 6.2'); + t.equal( + supportsPreserveSymlinks, + expected, + 'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')', + { skip: typeof window !== 'undefined' } + ); + + t.end(); +}); diff --git a/node_modules/tsconfig-paths/.nycrc.json b/node_modules/tsconfig-paths/.nycrc.json deleted file mode 100644 index 08e0ea09c..000000000 --- a/node_modules/tsconfig-paths/.nycrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "include": ["src/**/*.{ts,tsx}"], - "exclude": ["src/register.ts"], - "extension": [".ts", ".tsx"], - "reporter": ["json"], - "sourceMap": true, - "all": true -} diff --git a/node_modules/tsconfig-paths/CHANGELOG.md b/node_modules/tsconfig-paths/CHANGELOG.md index 03bdc184c..6fd484cde 100644 --- a/node_modules/tsconfig-paths/CHANGELOG.md +++ b/node_modules/tsconfig-paths/CHANGELOG.md @@ -7,6 +7,63 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [3.14.1] - 2022-03-22 + +### Fixed + +- Use minimist 1.2.6 for all depencencies becuase of pollution vulnerability. See PR [#197](https://github.com/dividab/tsconfig-paths/pull/197). Thanks to [@gopijaganthan](https://github.com/gopijaganthan) for this fix! + +## [3.14.0] - 2022-03-13 + +### Added + +- Support for path mapping starting with `/`. See PR [#180](https://github.com/dividab/tsconfig-paths/pull/180), issue [#113](https://github.com/dividab/tsconfig-paths/issues/113), and issue [#128](https://github.com/dividab/tsconfig-paths/issues/128). Thanks to [@benevbright](https://github.com/benevbright) for this fix! + +## [3.13.0] - 2022-03-03 + +### Added + +- Include file extension in paths resolved from package.json "main" field. See PR [#135](https://github.com/dividab/tsconfig-paths/pull/135) and issue [#133](https://github.com/dividab/tsconfig-paths/issues/133). Thanks to [@katywings](https://github.com/katywings) for this fix! + +## [3.12.0] - 2021-08-24 + +- Add support for baseUrl override using TS_NODE_BASEURL env var #185 and #114. Thanks to @ejhayes and @information-security for these PRs! + +## [3.11.0] - 2021-08-24 + +- Reverted upgrade of json5 due to being a breaking change. See PR #173. + +## [3.10.1] - 2021-07-06 + +### Fixed + +- Add register.js to published files + +## [3.10.0] - 2021-07-06 + +### Added + +- feat(tsconfig-loader): extends config from node_modules (#106). Thanks to @zorji for this PR! + +### Fixed + +- Update CHANGELOG.md (#96). Thanks to @OliverJAsh for this PR! +- Fix "bootstraping" typo (#111). Thanks to @KRMisha for this PR! +- Update Readme fixes #116 (#123). Thanks to @benwinding for this PR! +- Fixed typo (#144). Thanks to @mprinc for this PR! +- [TYPO] src/mapping-entry.ts (#145). Thanks to @mprinc for this PR! +- docs(README): fix typos (#156). Thanks to @PiDelport for this PR! +- deps: bump json5 to use type definition provided officially (#158). Thanks to @koba04 for this PR! +- Update tsconfig-loader.ts (#161). Thanks to @fecqs for this PR! +- fix typo (#165). Thanks to @wonda-tea-coffee for this PR! +- Add file extenstion to typings property value (#151). Thanks to @dangrussell for this PR! + +## [3.9.0] - 2019-09-12 + +### Added + +- Make extension config override instead of deep merge. See PR [#95](https://github.com/dividab/tsconfig-paths/pull/95) and issue [#94](https://github.com/dividab/tsconfig-paths/issues/94). Thanks to [@OliverJAsh](https://github.com/OliverJAsh) for this addition! + ## [3.8.0] - 2019-02-05 ### Added @@ -53,7 +110,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed -- Adding json file extention to extends property, [#40](https://github.com/dividab/tsconfig-paths/pull/40). Thanks to [@cwhite-connectfirst](https://github.com/cwhite-connectfirst) for this fixing this! +- Adding json file extension to extends property, [#40](https://github.com/dividab/tsconfig-paths/pull/40). Thanks to [@cwhite-connectfirst](https://github.com/cwhite-connectfirst) for this fixing this! ## [3.3.1] - 2018-04-17 @@ -275,7 +332,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Initial version. -[unreleased]: https://github.com/dividab/tsconfig-paths/compare/3.8.0...master +[unreleased]: https://github.com/dividab/tsconfig-paths/compare/v3.9.0...master +[3.9.0]: https://github.com/dividab/tsconfig-paths/compare/v3.8.0...v3.9.0 [3.8.0]: https://github.com/dividab/tsconfig-paths/compare/3.7.0...3.8.0 [3.7.0]: https://github.com/dividab/tsconfig-paths/compare/3.6.0...3.7.0 [3.6.0]: https://github.com/dividab/tsconfig-paths/compare/3.5.0...3.6.0 diff --git a/node_modules/tsconfig-paths/README.md b/node_modules/tsconfig-paths/README.md index 491e6371e..768119ed8 100644 --- a/node_modules/tsconfig-paths/README.md +++ b/node_modules/tsconfig-paths/README.md @@ -1,7 +1,7 @@ # tsconfig-paths [![npm version][version-image]][version-url] -[![travis build][travis-image]][travis-url] +[![build][build-image]][build-url] [![Coverage Status][codecov-image]][codecov-url] [![MIT license][license-image]][license-url] [![code style: prettier][prettier-image]][prettier-url] @@ -10,7 +10,7 @@ Use this to load modules whose location is specified in the `paths` section of ` Typescript by default mimics the Node.js runtime resolution strategy of modules. But it also allows the use of [path mapping](https://www.typescriptlang.org/docs/handbook/module-resolution.html) which allows arbitrary module paths (that doesn't start with "/" or ".") to be specified and mapped to physical paths in the filesystem. The typescript compiler can resolve these paths from `tsconfig` so it will compile OK. But if you then try to execute the compiled files with node (or ts-node), it will only look in the `node_modules` folders all the way up to the root of the filesystem and thus will not find the modules specified by `paths` in `tsconfig`. -If you require this package's `tsconfig-paths/register` module it will read the `paths` from `tsconfig.json` and convert node's module loading calls into to physcial file paths that node can load. +If you require this package's `tsconfig-paths/register` module it will read the `paths` from `tsconfig.json` and convert node's module loading calls into to physical file paths that node can load. ## How to install @@ -30,6 +30,10 @@ npm install --save-dev tsconfig-paths `node -r tsconfig-paths/register main.js` +If `process.env.TS_NODE_BASEURL` is set it will override the value of `baseUrl` in tsconfig.json: + +`TS_NODE_BASEURL=./dist node -r tsconfig-paths/register main.js` + ### With ts-node `ts-node -r tsconfig-paths/register main.ts` @@ -52,10 +56,43 @@ mocha -r ts-node/register -r tsconfig-paths/register "test/**/*.ts" As long as the command has something similar to a `--require` option that can load a module before it starts, tsconfig-paths should be able to work with it. -## Bootstraping with explicit params +### With `ts-node` and VSCode + +The following is an example configuration for the `.vscode/launch.json`. + +```js +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Functions", + "request": "launch", + "type": "node", + "runtimeArgs": [ + "-r", + "${workspaceFolder}/functions/node_modules/ts-node/register", + "-r", + "${workspaceFolder}/functions/node_modules/tsconfig-paths/register" + ], + "args": ["${workspaceFolder}/functions/src/index.ts"], + "cwd": "${workspaceFolder}", + "protocol": "inspector", + "env": { + "NODE_ENV": "development", + "TS_NODE_PROJECT": "${workspaceFolder}/functions/tsconfig.json" + }, + "outFiles": ["${workspaceFolder}/functions/lib/**/*.js"] + } + ] +} +``` + +## Bootstrapping with explicit params If you want more granular control over tsconfig-paths you can bootstrap it. This can be useful if you for instance have compiled with `tsc` to another directory where `tsconfig.json` doesn't exists. +For example, create a wrapper script called `tsconfig-paths-bootstrap.js` with the contents below: + ```javascript const tsConfig = require("./tsconfig.json"); const tsConfigPaths = require("tsconfig-paths"); @@ -63,7 +100,7 @@ const tsConfigPaths = require("tsconfig-paths"); const baseUrl = "./"; // Either absolute or relative path. If relative it's resolved to current working directory. const cleanup = tsConfigPaths.register({ baseUrl, - paths: tsConfig.compilerOptions.paths + paths: tsConfig.compilerOptions.paths, }); // When path registration is no longer needed @@ -176,7 +213,7 @@ export function createMatchPath( ): MatchPath { ``` -The `createMatchPath` function will create a function that can match paths. It accepts `baseUrl` and `paths` directly as they are specified in tsconfig and will handle resolving paths to absolute form. The created function has the signare specified by the type `MatchPath` above. +The `createMatchPath` function will create a function that can match paths. It accepts `baseUrl` and `paths` directly as they are specified in tsconfig and will handle resolving paths to absolute form. The created function has the signature specified by the type `MatchPath` above. ### matchFromAbsolutePaths @@ -186,7 +223,7 @@ The `createMatchPath` function will create a function that can match paths. It a * @param absolutePathMappings The paths to try as specified in tsconfig but resolved to absolute form. * @param requestedModule The required module name. * @param readJson Function that can read json from a path (useful for testing). - * @param fileExists Function that checks for existance of a file at a path (useful for testing). + * @param fileExists Function that checks for existence of a file at a path (useful for testing). * @param extensions File extensions to probe for (useful for testing). * @param mainFields A list of package.json field names to try when resolving module files. * @returns the found path, or undefined if no path was found. @@ -201,7 +238,7 @@ export function matchFromAbsolutePaths( ): string | undefined { ``` -This function is lower level and requries that the paths as already been resolved to absolute form and sorted in correct order into an array. +This function is lower level and requires that the paths as already been resolved to absolute form and sorted in correct order into an array. ### createMatchPathAsync @@ -221,8 +258,8 @@ yarn version --major [version-image]: https://img.shields.io/npm/v/tsconfig-paths.svg?style=flat [version-url]: https://www.npmjs.com/package/tsconfig-paths -[travis-image]: https://travis-ci.com/dividab/tsconfig-paths.svg?branch=master&style=flat -[travis-url]: https://travis-ci.com/dividab/tsconfig-paths +[build-image]: https://github.com/dividab/tsconfig-paths/workflows/CI/badge.svg +[build-url]: https://github.com/dividab/tsconfig-paths/actions/workflows/ci.yml?query=branch%3Amaster [codecov-image]: https://codecov.io/gh/dividab/tsconfig-paths/branch/master/graph/badge.svg [codecov-url]: https://codecov.io/gh/dividab/tsconfig-paths [license-image]: https://img.shields.io/github/license/dividab/tsconfig-paths.svg?style=flat diff --git a/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.d.ts b/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js b/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js new file mode 100644 index 000000000..4cfdd47ad --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js @@ -0,0 +1,88 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var config_loader_1 = require("../config-loader"); +var path_1 = require("path"); +describe("config-loader", function () { + it("should use explicitParams when set", function () { + var result = (0, config_loader_1.configLoader)({ + explicitParams: { + baseUrl: "/foo/bar", + paths: { + asd: ["asd"], + }, + }, + cwd: "/baz", + }); + var successResult = result; + // assert.equal(successResult.resultType, "success"); + // assert.equal(successResult.absoluteBaseUrl, "/foo/bar"); + // assert.equal(successResult.paths["asd"][0], "asd"); + expect(successResult.resultType).toBe("success"); + expect(successResult.absoluteBaseUrl).toBe("/foo/bar"); + expect(successResult.paths["asd"][0]).toBe("asd"); + }); + it("should use explicitParams when set and add cwd when path is relative", function () { + var result = (0, config_loader_1.configLoader)({ + explicitParams: { + baseUrl: "bar/", + paths: { + asd: ["asd"], + }, + }, + cwd: "/baz", + }); + var successResult = result; + // assert.equal(successResult.resultType, "success"); + // assert.equal(successResult.absoluteBaseUrl, join("/baz", "bar/")); + expect(successResult.resultType).toBe("success"); + expect(successResult.absoluteBaseUrl).toBe((0, path_1.join)("/baz", "bar/")); + }); + it("should fallback to tsConfigLoader when explicitParams is not set", function () { + var result = (0, config_loader_1.configLoader)({ + explicitParams: undefined, + cwd: "/baz", + // tslint:disable-next-line:no-any + tsConfigLoader: function (_) { return ({ + tsConfigPath: "/baz/tsconfig.json", + baseUrl: "./src", + paths: {}, + }); }, + }); + var successResult = result; + // assert.equal(successResult.resultType, "success"); + // assert.equal(successResult.absoluteBaseUrl, join("/baz", "src")); + expect(successResult.resultType).toBe("success"); + expect(successResult.absoluteBaseUrl).toBe((0, path_1.join)("/baz", "src")); + }); + it("should show an error message when baseUrl is missing", function () { + var result = (0, config_loader_1.configLoader)({ + explicitParams: undefined, + cwd: "/baz", + // tslint:disable-next-line:no-any + tsConfigLoader: function (_) { return ({ + tsConfigPath: "/baz/tsconfig.json", + baseUrl: undefined, + paths: {}, + }); }, + }); + var failResult = result; + // assert.equal(failResult.resultType, "failed"); + // assert.isTrue(failResult.message.indexOf("baseUrl") > -1); + expect(failResult.resultType).toBe("failed"); + expect(failResult.message.indexOf("baseUrl") > -1).toBeTruthy(); + }); + it("should presume cwd to be a tsconfig file when loadConfig is called with absolute path to tsconfig.json", function () { + // using tsconfig-named.json to ensure that future changes to fix + // https://github.com/dividab/tsconfig-paths/issues/31 + // do not pass this test case just because of a directory walk looking + // for tsconfig.json + var configFile = (0, path_1.join)(__dirname, "tsconfig-named.json"); + var result = (0, config_loader_1.loadConfig)(configFile); + var successResult = result; + // assert.equal(successResult.resultType, "success"); + // assert.equal(successResult.configFileAbsolutePath, configFile); + expect(successResult.resultType).toBe("success"); + expect(successResult.configFileAbsolutePath).toBe(configFile); + }); +}); +//# sourceMappingURL=config-loader.test.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js.map b/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js.map new file mode 100644 index 000000000..0a6bae37b --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config-loader.test.js","sourceRoot":"","sources":["../../src/__tests__/config-loader.test.ts"],"names":[],"mappings":";;AAAA,kDAK0B;AAC1B,6BAA4B;AAE5B,QAAQ,CAAC,eAAe,EAAE;IACxB,EAAE,CAAC,oCAAoC,EAAE;QACvC,IAAM,MAAM,GAAG,IAAA,4BAAY,EAAC;YAC1B,cAAc,EAAE;gBACd,OAAO,EAAE,UAAU;gBACnB,KAAK,EAAE;oBACL,GAAG,EAAE,CAAC,KAAK,CAAC;iBACb;aACF;YACD,GAAG,EAAE,MAAM;SACZ,CAAC,CAAC;QAEH,IAAM,aAAa,GAAG,MAAmC,CAAC;QAC1D,qDAAqD;QACrD,2DAA2D;QAC3D,sDAAsD;QACtD,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,CAAC,aAAa,CAAC,eAAe,CAAC,CA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CAAC,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE;QACzD,IAAM,MAAM,GAAG,IAAA,4BAAY,EAAC;YAC1B,cAAc,EAAE,SAAS;YACzB,GAAG,EAAE,MAAM;YACX,kCAAkC;YAClC,cAAc,EAAE,UAAC,CAAM,IAAK,OAAA,CAAC;gBAC3B,YAAY,EAAE,oBAAoB;gBAClC,OAAO,EAAE,SAAS;gBAClB,KAAK,EAAE,EAAE;aACV,CAAC,EAJ0B,CAI1B;SACH,CAAC,CAAC;QAEH,IAAM,UAAU,GAAG,MAAgC,CAAC;QACpD,iDAAiD;QACjD,6DAA6D;QAC7D,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wGAAwG,EAAE;QAC3G,iEAAiE;QACjE,sDAAsD;QACtD,sEAAsE;QACtE,oBAAoB;QACpB,IAAM,UAAU,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;QAC1D,IAAM,MAAM,GAAG,IAAA,0BAAU,EAAC,UAAU,CAAC,CAAC;QAEtC,IAAM,aAAa,GAAG,MAAmC,CAAC;QAC1D,qDAAqD;QACrD,kEAAkE;QAClE,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.d.ts b/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.d.ts new file mode 100644 index 000000000..b1bc0502f --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.d.ts @@ -0,0 +1,17 @@ +export interface OneTest { + readonly name: string; + readonly only?: boolean; + readonly skip?: boolean; + readonly absoluteBaseUrl: string; + readonly paths: { + [key: string]: Array; + }; + readonly mainFields?: string[]; + readonly addMatchAll?: boolean; + readonly existingFiles: ReadonlyArray; + readonly requestedModule: string; + readonly extensions: ReadonlyArray; + readonly packageJson?: {}; + readonly expectedPath: string | undefined; +} +export declare const tests: ReadonlyArray; diff --git a/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js b/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js new file mode 100644 index 000000000..b82652381 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js @@ -0,0 +1,205 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.tests = void 0; +var path_1 = require("path"); +var filesystem_1 = require("../../filesystem"); +var defaultExtensionsWhenRunningInTsNode = [ + ".js", + ".json", + ".node", + ".ts", + ".tsx", +]; +exports.tests = [ + { + name: "should locate path that matches with star and exists", + absoluteBaseUrl: "/root/", + paths: { + "lib/*": ["location/*"], + }, + existingFiles: [(0, path_1.join)("/root", "location", "mylib", "index.ts")], + requestedModule: "lib/mylib", + expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "location", "mylib", "index.ts")), + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should resolve to correct path when many are specified", + absoluteBaseUrl: "/root/", + paths: { + "lib/*": ["foo1/*", "foo2/*", "location/*", "foo3/*"], + }, + existingFiles: [(0, path_1.join)("/root", "location", "mylib", "index.ts")], + requestedModule: "lib/mylib", + extensions: [".ts"], + expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "location", "mylib", "index.ts")), + }, + { + name: "should locate path that matches with star and prioritize pattern with longest prefix", + absoluteBaseUrl: "/root/", + paths: { + "*": ["location/*"], + "lib/*": ["location/*"], + }, + existingFiles: [ + (0, path_1.join)("/root", "location", "lib", "mylib", "index.ts"), + (0, path_1.join)("/root", "location", "mylib", "index.ts"), + ], + requestedModule: "lib/mylib", + expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "location", "mylib", "index.ts")), + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should locate path that matches with star and exists with extension", + absoluteBaseUrl: "/root/", + paths: { "lib/*": ["location/*"] }, + existingFiles: [(0, path_1.join)("/root", "location", "mylib.myext")], + requestedModule: "lib/mylib", + extensions: [".js", ".myext"], + expectedPath: (0, filesystem_1.removeExtension)((0, path_1.join)("/root", "location", "mylib.myext")), + }, + { + name: "should resolve request with extension specified", + absoluteBaseUrl: "/root/", + paths: { "lib/*": ["location/*"] }, + existingFiles: [(0, path_1.join)("/root", "location", "test.jpg")], + requestedModule: "lib/test.jpg", + expectedPath: (0, path_1.join)("/root", "location", "test.jpg"), + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should locate path that matches without star and exists", + absoluteBaseUrl: "/root/", + paths: { + "lib/foo": ["location/foo"], + }, + existingFiles: [(0, path_1.join)("/root", "location", "foo.ts")], + requestedModule: "lib/foo", + expectedPath: (0, filesystem_1.removeExtension)((0, path_1.join)("/root", "location", "foo.ts")), + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should resolve to parent folder when filename is in subfolder", + absoluteBaseUrl: "/root/", + paths: { "lib/*": ["location/*"] }, + existingFiles: [(0, path_1.join)("/root", "location", "mylib", "index.ts")], + requestedModule: "lib/mylib", + expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "location", "mylib", "index.ts")), + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should resolve from main field in package.json", + absoluteBaseUrl: "/root/", + paths: { "lib/*": ["location/*"] }, + existingFiles: [(0, path_1.join)("/root", "location", "mylib", "kalle.ts")], + packageJson: { main: "./kalle.ts" }, + requestedModule: "lib/mylib", + expectedPath: (0, path_1.join)("/root", "location", "mylib", "kalle.ts"), + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should resolve from main field in package.json (js)", + absoluteBaseUrl: "/root", + paths: { "lib/*": ["location/*"] }, + existingFiles: [(0, path_1.join)("/root", "location", "mylib.js", "kalle.js")], + packageJson: { main: "./kalle.js" }, + requestedModule: "lib/mylib.js", + extensions: [".ts", ".js"], + expectedPath: (0, path_1.join)("/root", "location", "mylib.js", "kalle.js"), + }, + { + name: "should resolve from list of fields by priority in package.json", + absoluteBaseUrl: "/root/", + paths: { "lib/*": ["location/*"] }, + mainFields: ["missing", "browser", "main"], + packageJson: { main: "./main.js", browser: "./browser.js" }, + existingFiles: [ + (0, path_1.join)("/root", "location", "mylibjs", "main.js"), + (0, path_1.join)("/root", "location", "mylibjs", "browser.js"), // browserFilePath + ], + extensions: [".ts", ".js"], + requestedModule: "lib/mylibjs", + expectedPath: (0, path_1.join)("/root", "location", "mylibjs", "browser.js"), + }, + { + name: "should ignore field mappings to missing files in package.json", + absoluteBaseUrl: "/root/", + paths: { "lib/*": ["location/*"] }, + mainFields: ["browser", "main"], + existingFiles: [(0, path_1.join)("/root", "location", "mylibjs", "kalle.js")], + requestedModule: "lib/mylibjs", + packageJson: { + main: "./kalle.js", + browser: "./nope.js", + }, + extensions: [".ts", ".js"], + expectedPath: (0, path_1.join)("/root", "location", "mylibjs", "kalle.js"), + }, + { + name: "should ignore advanced field mappings in package.json", + absoluteBaseUrl: "/root/", + paths: { "lib/*": ["location/*"] }, + existingFiles: [ + (0, path_1.join)("/root", "location", "mylibjs", "kalle.js"), + (0, path_1.join)("/root", "location", "mylibjs", "browser.js"), + ], + requestedModule: "lib/mylibjs", + packageJson: { + main: "./kalle.js", + browser: { mylibjs: "./browser.js", "./kalle.js": "./browser.js" }, + }, + extensions: [".ts", ".js"], + expectedPath: (0, path_1.join)("/root", "location", "mylibjs", "kalle.js"), + }, + { + name: "should resolve to with the help of baseUrl when not explicitly set", + absoluteBaseUrl: "/root/", + paths: {}, + existingFiles: [(0, path_1.join)("/root", "mylib", "index.ts")], + requestedModule: "mylib", + expectedPath: (0, path_1.dirname)((0, path_1.join)("/root", "mylib", "index.ts")), + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should not resolve with the help of baseUrl when asked not to", + absoluteBaseUrl: "/root/", + paths: {}, + addMatchAll: false, + existingFiles: [(0, path_1.join)("/root", "mylib", "index.ts")], + requestedModule: "mylib", + expectedPath: undefined, + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should not locate path that does not match", + absoluteBaseUrl: "/root/", + paths: { "lib/*": ["location/*"] }, + existingFiles: [(0, path_1.join)("root", "location", "mylib")], + requestedModule: "mylib", + expectedPath: undefined, + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should not resolve typings file (index.d.ts)", + absoluteBaseUrl: "/root/", + paths: { + "lib/*": ["location/*"], + }, + existingFiles: [(0, path_1.join)("/root", "location", "mylib", "index.d.ts")], + requestedModule: "lib/mylib", + expectedPath: undefined, + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should resolve main file with cjs file extension", + absoluteBaseUrl: "/root/", + paths: {}, + existingFiles: [(0, path_1.join)("/root", "mylib", "index.cjs")], + packageJson: { + main: "./index.cjs", + }, + requestedModule: "mylib", + expectedPath: (0, path_1.join)("/root", "mylib", "index.cjs"), + extensions: defaultExtensionsWhenRunningInTsNode, + }, +]; +//# sourceMappingURL=match-path-data.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js.map b/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js.map new file mode 100644 index 000000000..ae8372f1a --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js.map @@ -0,0 +1 @@ +{"version":3,"file":"match-path-data.js","sourceRoot":"","sources":["../../../src/__tests__/data/match-path-data.ts"],"names":[],"mappings":";;;AAAA,6BAAqC;AACrC,+CAAmD;AAiBnD,IAAM,oCAAoC,GAA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S;QACvB,UAAU,EAAE,oCAAoC;KACjD;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,YAAY,CAAC;SACxB;QACD,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;QACjE,eAAe,EAAE,WAAW;QAC5B,YAAY,EAAE,SAAS;QACvB,UAAU,EAAE,oCAAoC;KACjD;IACD;QACE,IAAI,EAAE,kDAAkD;QACxD,eAAe,EAAE,QAAQ;QACzB,KAAK,EAAE,EAAE;QACT,aAAa,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACpD,WAAW,EAAE;YACX,IAAI,EAAE,aAAa;SACpB;QACD,eAAe,EAAE,OAAO;QACxB,YAAY,EAAE,IAAA,WAAI,EAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC;QACjD,UAAU,EAAE,oCAAoC;KACjD;CACF,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.d.ts b/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js b/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js new file mode 100644 index 000000000..93345354a --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js @@ -0,0 +1,64 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Filesystem = require("../filesystem"); +var path = require("path"); +describe("filesystem", function () { + var fileThatExists = path.join(__dirname, "../../package.json"); + var fileThatNotExists = path.join(__dirname, "../../package2.json"); + it("should find file that exists, sync", function () { + var result = Filesystem.fileExistsSync(fileThatExists); + // assert.equal(result, true); + expect(result).toBe(true); + }); + it("should not find file that not exists, sync", function () { + var result = Filesystem.fileExistsSync(fileThatNotExists); + // assert.equal(result, false); + expect(result).toBe(false); + }); + it("should find file that exists, async", function (done) { + Filesystem.fileExistsAsync(fileThatExists, function (_err, result) { + try { + // assert.equal(result, true); + expect(result).toBe(true); + done(); + } + catch (error) { + done(error); + } + }); + }); + it("should not find file that not exists, async", function (done) { + Filesystem.fileExistsAsync(fileThatNotExists, function (_err, result) { + try { + // assert.equal(result, false); + expect(result).toBe(false); + done(); + } + catch (error) { + done(error); + } + }); + }); + it("should load json, sync", function () { + var result = Filesystem.readJsonFromDiskSync(fileThatExists); + // assert.isOk(result); + expect(result); + // assert.equal(result.main, "lib/index.js"); + expect(result.main).toBe("lib/index.js"); + }); + it("should load json, async", function (done) { + Filesystem.readJsonFromDiskAsync(fileThatExists, function (_err, result) { + try { + // assert.isOk(result); // Asserts that object is truthy. + expect(result).toBeTruthy(); + // assert.equal(result.main, "lib/index.js"); + expect(result.main).toBe("lib/index.js"); + done(); + } + catch (error) { + done(error); + } + }); + }); +}); +//# sourceMappingURL=filesystem.test.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js.map b/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js.map new file mode 100644 index 000000000..5ad059152 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"filesystem.test.js","sourceRoot":"","sources":["../../src/__tests__/filesystem.test.ts"],"names":[],"mappings":";;AAAA,0CAA4C;AAC5C,2BAA6B;AAE7B,QAAQ,CAAC,YAAY,EAAE;IACrB,IAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IAClE,IAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IAEtE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B,MAAM,CAAC,MAAM,CAAC,CAAC;QACf,6CAA6C;QAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,UAAC,IAAI;QACjC,UAAU,CAAC,qBAAqB,CAAC,cAAc,EAAE,UAAC,IAAI,EAAE,MAAM;YAC5D,IAAI;gBACF,yDAAyD;gBACzD,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,CAAC;gBAC5B,6CAA6C;gBAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;gBACzC,IAAI,EAAE,CAAC;aACR;YAAC,OAAO,KAAK,EAAE;gBACd,IAAI,CAAC,KAAK,CAAC,CAAC;aACb;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.d.ts b/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js b/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js new file mode 100644 index 000000000..1276f75b0 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js @@ -0,0 +1,66 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var mapping_entry_1 = require("../mapping-entry"); +var path_1 = require("path"); +describe("mapping-entry", function () { + it("should change to absolute paths and sort in longest prefix order", function () { + var result = (0, mapping_entry_1.getAbsoluteMappingEntries)("/absolute/base/url", { + "*": ["/foo1", "/foo2"], + "longest/pre/fix/*": ["/foo2/bar"], + "pre/fix/*": ["/foo3"], + }, true); + // assert.deepEqual(result, [ + // { + // pattern: "longest/pre/fix/*", + // paths: [join("/absolute", "base", "url", "foo2", "bar")], + // }, + // { + // pattern: "pre/fix/*", + // paths: [join("/absolute", "base", "url", "foo3")], + // }, + // { + // pattern: "*", + // paths: [ + // join("/absolute", "base", "url", "foo1"), + // join("/absolute", "base", "url", "foo2"), + // ], + // }, + // ]); + expect(result).toEqual([ + { + pattern: "longest/pre/fix/*", + paths: [(0, path_1.join)("/absolute", "base", "url", "foo2", "bar")], + }, + { + pattern: "pre/fix/*", + paths: [(0, path_1.join)("/absolute", "base", "url", "foo3")], + }, + { + pattern: "*", + paths: [ + (0, path_1.join)("/absolute", "base", "url", "foo1"), + (0, path_1.join)("/absolute", "base", "url", "foo2"), + ], + }, + ]); + }); + it("should should add a match-all pattern when requested", function () { + var result = (0, mapping_entry_1.getAbsoluteMappingEntries)("/absolute/base/url", {}, true); + // assert.deepEqual(result, [ + // { + // pattern: "*", + // paths: [join("/absolute", "base", "url", "*")], + // }, + // ]); + expect(result).toEqual([ + { + pattern: "*", + paths: [(0, path_1.join)("/absolute", "base", "url", "*")], + }, + ]); + result = (0, mapping_entry_1.getAbsoluteMappingEntries)("/absolute/base/url", {}, false); + // assert.deepEqual(result, []); + expect(result).toEqual([]); + }); +}); +//# sourceMappingURL=mapping-entry.test.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js.map b/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js.map new file mode 100644 index 000000000..212fc02f6 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapping-entry.test.js","sourceRoot":"","sources":["../../src/__tests__/mapping-entry.test.ts"],"names":[],"mappings":";;AAAA,kDAA6D;AAC7D,6BAA4B;AAE5B,QAAQ,CAAC,eAAe,EAAE;IACxB,EAAE,CAAC,kEAAkE,EAAE;QACrE,I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AAC;YACrB;gBACE,OAAO,EAAE,GAAG;gBACZ,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;aAC/C;SACF,CAAC,CAAC;QAEH,MAAM,GAAG,IAAA,yCAAyB,EAAC,oBAAoB,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QACpE,gCAAgC;QAChC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.d.ts b/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js b/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js new file mode 100644 index 000000000..eddcd8e39 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var match_path_async_1 = require("../match-path-async"); +var Tests = require("./data/match-path-data"); +describe("match-path-async", function () { + Tests.tests.forEach(function (t) { + return it(t.name, function (done) { + var matchPath = (0, match_path_async_1.createMatchPathAsync)(t.absoluteBaseUrl, t.paths, t.mainFields, t.addMatchAll); + matchPath(t.requestedModule, function (_path, callback) { return callback(undefined, t.packageJson); }, function (path, callback) { + return callback(undefined, t.existingFiles.indexOf(path) !== -1); + }, t.extensions, function (_err, result) { + // assert.equal(result, t.expectedPath); + expect(result).toBe(t.expectedPath); + done(); + }); + }); + }); +}); +//# sourceMappingURL=match-path-async.test.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js.map b/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js.map new file mode 100644 index 000000000..72f42f298 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"match-path-async.test.js","sourceRoot":"","sources":["../../src/__tests__/match-path-async.test.ts"],"names":[],"mappings":";;AAAA,wDAA2D;AAC3D,8CAAgD;AAEhD,QAAQ,CAAC,kBAAkB,EAAE;IAC3B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,CAAC;QACpB,OAAA,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,UAAC,IAAI;YACd,IAAM,SAAS,GAAG,IAAA,uCAAoB,EACpC,CAAC,CAAC,eAAe,EACjB,CAAC,CAAC,KAAK,EACP,CAAC,CAAC,UAAU,EACZ,CAAC,CAAC,WAAW,CACd,CAAC;YACF,SAAS,CACP,CAAC,CAAC,eAAe,EACjB,UAAC,KAAK,EAAE,QAAQ,IAAK,OAAA,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,EAAlC,CAAkC,EACvD,UAAC,IAAI,EAAE,QAAQ;gBACb,OAAA,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAAzD,CAAyD,EAC3D,CAAC,CAAC,UAAU,EACZ,UAAC,IAAI,EAAE,MAAM;gBACX,wCAAwC;gBACxC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;gBACpC,IAAI,EAAE,CAAC;YACT,CAAC,CACF,CAAC;QACJ,CAAC,CAAC;IAnBF,CAmBE,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.d.ts b/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js b/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js new file mode 100644 index 000000000..96e40f5cc --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var match_path_sync_1 = require("../match-path-sync"); +var Tests = require("./data/match-path-data"); +describe("match-path-sync", function () { + Tests.tests.forEach(function (t) { + return it(t.name, function () { + var matchPath = (0, match_path_sync_1.createMatchPath)(t.absoluteBaseUrl, t.paths, t.mainFields, t.addMatchAll); + var result = matchPath(t.requestedModule, function (_) { return t.packageJson; }, function (name) { return t.existingFiles.indexOf(name) !== -1; }, t.extensions); + // assert.equal(result, t.expectedPath); + expect(result).toBe(t.expectedPath); + }); + }); +}); +//# sourceMappingURL=match-path-sync.test.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js.map b/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js.map new file mode 100644 index 000000000..ee00edb32 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"match-path-sync.test.js","sourceRoot":"","sources":["../../src/__tests__/match-path-sync.test.ts"],"names":[],"mappings":";;AAAA,sDAAqD;AACrD,8CAAgD;AAEhD,QAAQ,CAAC,iBAAiB,EAAE;IAC1B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,CAAC;QACpB,OAAA,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;YACT,IAAM,SAAS,GAAG,IAAA,iCAAe,EAC/B,CAAC,CAAC,eAAe,EACjB,CAAC,CAAC,KAAK,EACP,CAAC,CAAC,UAAU,EACZ,CAAC,CAAC,WAAW,CACd,CAAC;YACF,IAAM,MAAM,GAAG,SAAS,CACtB,CAAC,CAAC,eAAe,EACjB,UAAC,CAAS,IAAK,OAAA,CAAC,CAAC,WAAW,EAAb,CAAa,EAC5B,UAAC,IAAY,IAAK,OAAA,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAApC,CAAoC,EACtD,CAAC,CAAC,UAAU,CACb,CAAC;YACF,wCAAwC;YACxC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;QACtC,CAAC,CAAC;IAfF,CAeE,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/try-path.test.d.ts b/node_modules/tsconfig-paths/lib/__tests__/try-path.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/try-path.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/tsconfig-paths/lib/__tests__/try-path.test.js b/node_modules/tsconfig-paths/lib/__tests__/try-path.test.js new file mode 100644 index 000000000..245d001a8 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/try-path.test.js @@ -0,0 +1,175 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var try_path_1 = require("../try-path"); +var path_1 = require("path"); +describe("mapping-entry", function () { + var abosolutePathMappings = [ + { + pattern: "longest/pre/fix/*", + paths: [(0, path_1.join)("/absolute", "base", "url", "foo2", "bar")], + }, + { pattern: "pre/fix/*", paths: [(0, path_1.join)("/absolute", "base", "url", "foo3")] }, + { pattern: "*", paths: [(0, path_1.join)("/absolute", "base", "url", "foo1")] }, + ]; + var abosolutePathMappingsStarstWithSlash = [ + { + pattern: "/opt/*", + paths: [(0, path_1.join)("/absolute", "src", "aws-layer")], + }, + { + pattern: "*", + paths: [(0, path_1.join)("/absolute", "src")], + }, + ]; + it("should return no paths for relative requested module", function () { + var result = (0, try_path_1.getPathsToTry)([".ts", "tsx"], abosolutePathMappings, "./requested-module"); + // assert.deepEqual(result, undefined); + expect(result).toBeUndefined(); + }); + it("should return no paths if no pattern match the requested module", function () { + var result = (0, try_path_1.getPathsToTry)([".ts", "tsx"], [ + { + pattern: "longest/pre/fix/*", + paths: [(0, path_1.join)("/absolute", "base", "url", "foo2", "bar")], + }, + { + pattern: "pre/fix/*", + paths: [(0, path_1.join)("/absolute", "base", "url", "foo3")], + }, + ], "requested-module"); + expect(result).toBeUndefined(); + }); + it("should get all paths that matches requested module", function () { + var result = (0, try_path_1.getPathsToTry)([".ts", ".tsx"], abosolutePathMappings, "longest/pre/fix/requested-module"); + // assert.deepEqual(result, [ + // // "longest/pre/fix/*" + // { type: "file", path: join("/absolute", "base", "url", "foo2", "bar") }, + // { + // type: "extension", + // path: join("/absolute", "base", "url", "foo2", "bar.ts"), + // }, + // { + // type: "extension", + // path: join("/absolute", "base", "url", "foo2", "bar.tsx"), + // }, + // { + // type: "package", + // path: join("/absolute", "base", "url", "foo2", "bar", "package.json"), + // }, + // { + // type: "index", + // path: join("/absolute", "base", "url", "foo2", "bar", "index.ts"), + // }, + // { + // type: "index", + // path: join("/absolute", "base", "url", "foo2", "bar", "index.tsx"), + // }, + // // "*" + // { type: "file", path: join("/absolute", "base", "url", "foo1") }, + // { type: "extension", path: join("/absolute", "base", "url", "foo1.ts") }, + // { type: "extension", path: join("/absolute", "base", "url", "foo1.tsx") }, + // { + // type: "package", + // path: join("/absolute", "base", "url", "foo1", "package.json"), + // }, + // { + // type: "index", + // path: join("/absolute", "base", "url", "foo1", "index.ts"), + // }, + // { + // type: "index", + // path: join("/absolute", "base", "url", "foo1", "index.tsx"), + // }, + // ]); + expect(result).toEqual([ + // "longest/pre/fix/*" + { type: "file", path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar") }, + { + type: "extension", + path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar.ts"), + }, + { + type: "extension", + path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar.tsx"), + }, + { + type: "package", + path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar", "package.json"), + }, + { + type: "index", + path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar", "index.ts"), + }, + { + type: "index", + path: (0, path_1.join)("/absolute", "base", "url", "foo2", "bar", "index.tsx"), + }, + // "*" + { type: "file", path: (0, path_1.join)("/absolute", "base", "url", "foo1") }, + { type: "extension", path: (0, path_1.join)("/absolute", "base", "url", "foo1.ts") }, + { type: "extension", path: (0, path_1.join)("/absolute", "base", "url", "foo1.tsx") }, + { + type: "package", + path: (0, path_1.join)("/absolute", "base", "url", "foo1", "package.json"), + }, + { + type: "index", + path: (0, path_1.join)("/absolute", "base", "url", "foo1", "index.ts"), + }, + { + type: "index", + path: (0, path_1.join)("/absolute", "base", "url", "foo1", "index.tsx"), + }, + ]); + }); + it("should resolve paths starting with a slash", function () { + var result = (0, try_path_1.getPathsToTry)([".ts"], abosolutePathMappingsStarstWithSlash, "/opt/utils"); + expect(result).toEqual([ + // "opt/*" + { + path: (0, path_1.join)("/absolute", "src", "aws-layer"), + type: "file", + }, + { + path: (0, path_1.join)("/absolute", "src", "aws-layer.ts"), + type: "extension", + }, + { + path: (0, path_1.join)("/absolute", "src", "aws-layer", "package.json"), + type: "package", + }, + { + path: (0, path_1.join)("/absolute", "src", "aws-layer", "index.ts"), + type: "index", + }, + // "*" + { + path: (0, path_1.join)("/absolute", "src"), + type: "file", + }, + { + path: (0, path_1.join)("/absolute", "src.ts"), + type: "extension", + }, + { + path: (0, path_1.join)("/absolute", "src", "package.json"), + type: "package", + }, + { + path: (0, path_1.join)("/absolute", "src", "index.ts"), + type: "index", + }, + ]); + }); +}); +// describe("match-star", () => { +// it("should match star in last position", () => { +// const result = matchStar("lib/*", "lib/mylib"); +// assert.equal(result, "mylib"); +// }); +// it("should match star in first position", () => { +// const result = matchStar("*/lib", "mylib/lib"); +// assert.equal(result, "mylib"); +// }); +// }); +//# sourceMappingURL=try-path.test.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/try-path.test.js.map b/node_modules/tsconfig-paths/lib/__tests__/try-path.test.js.map new file mode 100644 index 000000000..af98dccff --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/try-path.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"try-path.test.js","sourceRoot":"","sources":["../../src/__tests__/try-path.test.ts"],"names":[],"mappings":";;AAAA,wCAA4C;AAC5C,6BAA4B;AAE5B,QAAQ,CAAC,eAAe,EAAE;IACxB,IAAM,qBAAqB,GAAG;QAC5B;YACE,OAAO,EAAE,mBAAmB;YAC5B,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SACzD;QACD,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE;QAC3E,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE;KACpE,CAAC;IACF,IAAM,oCAAoC,GAAG;QAC3C;YACE,OAAO,EAAE,QAAQ;YACjB,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;SAC/C;QACD;YACE,OAAO,EAAE,GAAG;YACZ,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,WAAW,EAAE,KAAK,CAAC,CAAC;SAClC;KACF,CAAC;IACF,EAAE,CAAC,sDAAsD,EAAE;QACzD,IAAM,MAAM,GAAG,IAAA,wBAAa,EAC1B,CAAC,KAAK,EAAE,KAAK,CAAC,EACd,qBAAqB,EACrB,oBAAoB,CACrB,CAAC;QACF,uCAAuC;QACvC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;YACD;gBACE,IAAI,EAAE,IAAA,WAAI,EAAC,WAAW,EAAE,QAAQ,CAAC;gBACjC,IAAI,EAAE,WAAW;aAClB;YACD;gBACE,IAAI,EAAE,IAAA,WAAI,EAAC,WAAW,EAAE,KAAK,EAAE,cAAc,CAAC;gBAC9C,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,IAAI,EAAE,IAAA,WAAI,EAAC,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC;gBAC1C,IAAI,EAAE,OAAO;aACd;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,iCAAiC;AACjC,qDAAqD;AACrD,sDAAsD;AACtD,qCAAqC;AACrC,QAAQ;AACR,sDAAsD;AACtD,sDAAsD;AACtD,qCAAqC;AACrC,QAAQ;AACR,MAAM"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.d.ts b/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js b/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js new file mode 100644 index 000000000..0e352824b --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js @@ -0,0 +1,246 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tsconfig_loader_1 = require("../tsconfig-loader"); +var path_1 = require("path"); +describe("tsconfig-loader", function () { + it("should find tsconfig in cwd", function () { + var result = (0, tsconfig_loader_1.tsConfigLoader)({ + cwd: "/foo/bar", + getEnv: function (_) { return undefined; }, + loadSync: function (cwd) { + return { + tsConfigPath: "".concat(cwd, "/tsconfig.json"), + baseUrl: "./", + paths: {}, + }; + }, + }); + // assert.equal(result.tsConfigPath, "/foo/bar/tsconfig.json"); + expect(result.tsConfigPath).toBe("/foo/bar/tsconfig.json"); + }); + it("should return loaderResult.tsConfigPath as undefined when not found", function () { + var result = (0, tsconfig_loader_1.tsConfigLoader)({ + cwd: "/foo/bar", + getEnv: function (_) { return undefined; }, + loadSync: function (_) { + return { + tsConfigPath: undefined, + baseUrl: "./", + paths: {}, + }; + }, + }); + // assert.isUndefined(result.tsConfigPath); + expect(result.tsConfigPath).toBeUndefined(); + }); + it("should use TS_NODE_PROJECT env if exists", function () { + var result = (0, tsconfig_loader_1.tsConfigLoader)({ + cwd: "/foo/bar", + getEnv: function (key) { + return key === "TS_NODE_PROJECT" ? "/foo/baz" : undefined; + }, + loadSync: function (cwd, fileName) { + if (cwd === "/foo/bar" && fileName === "/foo/baz") { + return { + tsConfigPath: "/foo/baz/tsconfig.json", + baseUrl: "./", + paths: {}, + }; + } + return { + tsConfigPath: undefined, + baseUrl: "./", + paths: {}, + }; + }, + }); + // assert.equal(result.tsConfigPath, "/foo/baz/tsconfig.json"); + expect(result.tsConfigPath).toBe("/foo/baz/tsconfig.json"); + }); + it("should use TS_NODE_BASEURL env if exists", function () { + var result = (0, tsconfig_loader_1.tsConfigLoader)({ + cwd: "/foo/bar", + getEnv: function (key) { + return key === "TS_NODE_BASEURL" ? "SOME_BASEURL" : undefined; + }, + loadSync: function (_0, _1, baseUrl) { + return { + tsConfigPath: undefined, + baseUrl: baseUrl, + paths: {}, + }; + }, + }); + // assert.equal(result.baseUrl, "SOME_BASEURL"); + expect(result.baseUrl).toBe("SOME_BASEURL"); + }); + it("should not use TS_NODE_BASEURL env if it does not exist", function () { + var result = (0, tsconfig_loader_1.tsConfigLoader)({ + cwd: "/foo/bar", + getEnv: function (_) { + return undefined; + }, + loadSync: function (_0, _1, baseUrl) { + return { + tsConfigPath: undefined, + baseUrl: baseUrl, + paths: {}, + }; + }, + }); + // assert.equal(result.baseUrl, undefined); + expect(result.baseUrl).toBeUndefined(); + }); +}); +describe("walkForTsConfig", function () { + it("should find tsconfig in starting directory", function () { + var pathToTsconfig = (0, path_1.join)("/root", "dir1", "tsconfig.json"); + var res = (0, tsconfig_loader_1.walkForTsConfig)((0, path_1.join)("/root", "dir1"), function (path) { return path === pathToTsconfig; }); + // assert.equal(res, pathToTsconfig); + expect(res).toBe(pathToTsconfig); + }); + it("should find tsconfig in parent directory", function () { + var pathToTsconfig = (0, path_1.join)("/root", "tsconfig.json"); + var res = (0, tsconfig_loader_1.walkForTsConfig)((0, path_1.join)("/root", "dir1"), function (path) { return path === pathToTsconfig; }); + // assert.equal(res, pathToTsconfig); + expect(res).toBe(pathToTsconfig); + }); + it("should return undefined when reaching the top", function () { + var res = (0, tsconfig_loader_1.walkForTsConfig)((0, path_1.join)("/root", "dir1", "kalle"), function () { return false; }); + // assert.equal(res, undefined); + expect(res).toBeUndefined(); + }); +}); +describe("loadConfig", function () { + it("It should load a config", function () { + var config = { compilerOptions: { baseUrl: "hej" } }; + var res = (0, tsconfig_loader_1.loadTsconfig)("/root/dir1/tsconfig.json", function (path) { return path === "/root/dir1/tsconfig.json"; }, function (_) { return JSON.stringify(config); }); + // assert.deepEqual(res, config); + expect(res).toStrictEqual(config); + }); + it("It should load a config with comments", function () { + var config = { compilerOptions: { baseUrl: "hej" } }; + var res = (0, tsconfig_loader_1.loadTsconfig)("/root/dir1/tsconfig.json", function (path) { return path === "/root/dir1/tsconfig.json"; }, function (_) { return "{\n // my comment\n \"compilerOptions\": { \n \"baseUrl\": \"hej\"\n }\n }"; }); + // assert.deepEqual(res, config); + expect(res).toStrictEqual(config); + }); + it("It should load a config with trailing commas", function () { + var config = { compilerOptions: { baseUrl: "hej" } }; + var res = (0, tsconfig_loader_1.loadTsconfig)("/root/dir1/tsconfig.json", function (path) { return path === "/root/dir1/tsconfig.json"; }, function (_) { return "{\n \"compilerOptions\": { \n \"baseUrl\": \"hej\",\n },\n }"; }); + // assert.deepEqual(res, config); + expect(res).toStrictEqual(config); + }); + it("It should load a config with extends and overwrite all options", function () { + var firstConfig = { + extends: "../base-config.json", + compilerOptions: { baseUrl: "kalle", paths: { foo: ["bar2"] } }, + }; + var firstConfigPath = (0, path_1.join)("/root", "dir1", "tsconfig.json"); + var baseConfig = { + compilerOptions: { + baseUrl: "olle", + paths: { foo: ["bar1"] }, + strict: true, + }, + }; + var baseConfigPath = (0, path_1.join)("/root", "base-config.json"); + var res = (0, tsconfig_loader_1.loadTsconfig)((0, path_1.join)("/root", "dir1", "tsconfig.json"), function (path) { return path === firstConfigPath || path === baseConfigPath; }, function (path) { + if (path === firstConfigPath) { + return JSON.stringify(firstConfig); + } + if (path === baseConfigPath) { + return JSON.stringify(baseConfig); + } + return ""; + }); + // assert.deepEqual(res, { + // extends: "../base-config.json", + // compilerOptions: { + // baseUrl: "kalle", + // paths: { foo: ["bar2"] }, + // strict: true, + // }, + // }); + expect(res).toEqual({ + extends: "../base-config.json", + compilerOptions: { + baseUrl: "kalle", + paths: { foo: ["bar2"] }, + strict: true, + }, + }); + }); + it("It should load a config with extends from node_modules and overwrite all options", function () { + var firstConfig = { + extends: "my-package/base-config.json", + compilerOptions: { baseUrl: "kalle", paths: { foo: ["bar2"] } }, + }; + var firstConfigPath = (0, path_1.join)("/root", "dir1", "tsconfig.json"); + var baseConfig = { + compilerOptions: { + baseUrl: "olle", + paths: { foo: ["bar1"] }, + strict: true, + }, + }; + var baseConfigPath = (0, path_1.join)("/root", "dir1", "node_modules", "my-package", "base-config.json"); + var res = (0, tsconfig_loader_1.loadTsconfig)((0, path_1.join)("/root", "dir1", "tsconfig.json"), function (path) { return path === firstConfigPath || path === baseConfigPath; }, function (path) { + if (path === firstConfigPath) { + return JSON.stringify(firstConfig); + } + if (path === baseConfigPath) { + return JSON.stringify(baseConfig); + } + return ""; + }); + // assert.deepEqual(res, { + // extends: "my-package/base-config.json", + // compilerOptions: { + // baseUrl: "kalle", + // paths: { foo: ["bar2"] }, + // strict: true, + // }, + // }); + expect(res).toEqual({ + extends: "my-package/base-config.json", + compilerOptions: { + baseUrl: "kalle", + paths: { foo: ["bar2"] }, + strict: true, + }, + }); + }); + it("Should use baseUrl relative to location of extended tsconfig", function () { + var firstConfig = { compilerOptions: { baseUrl: "." } }; + var firstConfigPath = (0, path_1.join)("/root", "first-config.json"); + var secondConfig = { extends: "../first-config.json" }; + var secondConfigPath = (0, path_1.join)("/root", "dir1", "second-config.json"); + var thirdConfig = { extends: "../second-config.json" }; + var thirdConfigPath = (0, path_1.join)("/root", "dir1", "dir2", "third-config.json"); + var res = (0, tsconfig_loader_1.loadTsconfig)((0, path_1.join)("/root", "dir1", "dir2", "third-config.json"), function (path) { + return path === firstConfigPath || + path === secondConfigPath || + path === thirdConfigPath; + }, function (path) { + if (path === firstConfigPath) { + return JSON.stringify(firstConfig); + } + if (path === secondConfigPath) { + return JSON.stringify(secondConfig); + } + if (path === thirdConfigPath) { + return JSON.stringify(thirdConfig); + } + return ""; + }); + // assert.deepEqual(res, { + // extends: "../second-config.json", + // compilerOptions: { baseUrl: join("..", "..") }, + // }); + expect(res).toEqual({ + extends: "../second-config.json", + compilerOptions: { baseUrl: (0, path_1.join)("..", "..") }, + }); + }); +}); +//# sourceMappingURL=tsconfig-loader.test.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js.map b/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js.map new file mode 100644 index 000000000..7ffcd8cd0 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tsconfig-loader.test.js","sourceRoot":"","sources":["../../src/__tests__/tsconfig-loader.test.ts"],"names":[],"mappings":";;AAAA,sDAI4B;AAC5B,6BAA4B;AAE5B,QAAQ,CAAC,iBAAiB,EAAE;IAC1B,EAAE,CAAC,6BAA6B,EAAE;QAChC,IAAM,MAAM,GAAG,IAAA,gCAAc,EAAC;YAC5B,GAAG,EAAE,UAAU;YACf,MAAM,EAAE,UAAC,CAAS,IAA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N,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;YAClB,OAAO,EAAE,uBAAuB;YAChC,eAAe,EAAE,EAAE,OAAO,EAAE,IAAA,WAAI,EAAC,IAAI,EAAE,IAAI,CAAC,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/config-loader.d.ts b/node_modules/tsconfig-paths/lib/config-loader.d.ts index 537ac2218..2eb8730f5 100644 --- a/node_modules/tsconfig-paths/lib/config-loader.d.ts +++ b/node_modules/tsconfig-paths/lib/config-loader.d.ts @@ -1,4 +1,4 @@ -import * as TsConfigLoader from "./tsconfig-loader"; +import * as TsConfigLoader2 from "./tsconfig-loader"; export interface ExplicitParams { baseUrl: string; paths: { @@ -7,7 +7,7 @@ export interface ExplicitParams { mainFields?: Array; addMatchAll?: boolean; } -export declare type TsConfigLoader = (params: TsConfigLoader.TsConfigLoaderParams) => TsConfigLoader.TsConfigLoaderResult; +export declare type TsConfigLoader = (params: TsConfigLoader2.TsConfigLoaderParams) => TsConfigLoader2.TsConfigLoaderResult; export interface ConfigLoaderParams { cwd: string; explicitParams?: ExplicitParams; @@ -30,4 +30,4 @@ export interface ConfigLoaderFailResult { } export declare type ConfigLoaderResult = ConfigLoaderSuccessResult | ConfigLoaderFailResult; export declare function loadConfig(cwd?: string): ConfigLoaderResult; -export declare function configLoader({ cwd, explicitParams, tsConfigLoader }: ConfigLoaderParams): ConfigLoaderResult; +export declare function configLoader({ cwd, explicitParams, tsConfigLoader, }: ConfigLoaderParams): ConfigLoaderResult; diff --git a/node_modules/tsconfig-paths/lib/config-loader.js b/node_modules/tsconfig-paths/lib/config-loader.js index aa145b6fe..727da0f4b 100644 --- a/node_modules/tsconfig-paths/lib/config-loader.js +++ b/node_modules/tsconfig-paths/lib/config-loader.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var TsConfigLoader = require("./tsconfig-loader"); +exports.configLoader = exports.loadConfig = void 0; +var TsConfigLoader2 = require("./tsconfig-loader"); var path = require("path"); var options_1 = require("./options"); function loadConfig(cwd) { @@ -9,7 +10,7 @@ function loadConfig(cwd) { } exports.loadConfig = loadConfig; function configLoader(_a) { - var cwd = _a.cwd, explicitParams = _a.explicitParams, _b = _a.tsConfigLoader, tsConfigLoader = _b === void 0 ? TsConfigLoader.tsConfigLoader : _b; + var cwd = _a.cwd, explicitParams = _a.explicitParams, _b = _a.tsConfigLoader, tsConfigLoader = _b === void 0 ? TsConfigLoader2.tsConfigLoader : _b; if (explicitParams) { // tslint:disable-next-line:no-shadowed-variable var absoluteBaseUrl_1 = path.isAbsolute(explicitParams.baseUrl) @@ -22,24 +23,24 @@ function configLoader(_a) { absoluteBaseUrl: absoluteBaseUrl_1, paths: explicitParams.paths, mainFields: explicitParams.mainFields, - addMatchAll: explicitParams.addMatchAll + addMatchAll: explicitParams.addMatchAll, }; } // Load tsconfig and create path matching function var loadResult = tsConfigLoader({ cwd: cwd, - getEnv: function (key) { return process.env[key]; } + getEnv: function (key) { return process.env[key]; }, }); if (!loadResult.tsConfigPath) { return { resultType: "failed", - message: "Couldn't find tsconfig.json" + message: "Couldn't find tsconfig.json", }; } if (!loadResult.baseUrl) { return { resultType: "failed", - message: "Missing baseUrl in compilerOptions" + message: "Missing baseUrl in compilerOptions", }; } var tsConfigDir = path.dirname(loadResult.tsConfigPath); @@ -49,7 +50,8 @@ function configLoader(_a) { configFileAbsolutePath: loadResult.tsConfigPath, baseUrl: loadResult.baseUrl, absoluteBaseUrl: absoluteBaseUrl, - paths: loadResult.paths || {} + paths: loadResult.paths || {}, }; } exports.configLoader = configLoader; +//# sourceMappingURL=config-loader.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/config-loader.js.map b/node_modules/tsconfig-paths/lib/config-loader.js.map new file mode 100644 index 000000000..c41d3e361 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/config-loader.js.map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AC,OAAO,EAAE;QACvB,OAAO;YACL,UAAU,EAAE,QAAQ;YACpB,OAAO,EAAE,oCAAoC;SAC9C,CAAC;KACH;IAED,IAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC1D,IAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAEnE,OAAO;QACL,UAAU,EAAE,SAAS;QACrB,sBAAsB,EAAE,UAAU,CAAC,YAAY;QAC/C,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,eAAe,iBAAA;QACf,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,EAAE;KAC9B,CAAC;AACJ,CAAC;AApDD,oCAoDC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/filesystem.js b/node_modules/tsconfig-paths/lib/filesystem.js index eb6397d1c..662ba09ab 100644 --- a/node_modules/tsconfig-paths/lib/filesystem.js +++ b/node_modules/tsconfig-paths/lib/filesystem.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.removeExtension = exports.fileExistsAsync = exports.readJsonFromDiskAsync = exports.readJsonFromDiskSync = exports.fileExistsSync = void 0; var fs = require("fs"); function fileExistsSync(path) { try { @@ -51,3 +52,4 @@ function removeExtension(path) { return path.substring(0, path.lastIndexOf(".")) || path; } exports.removeExtension = removeExtension; +//# sourceMappingURL=filesystem.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/filesystem.js.map b/node_modules/tsconfig-paths/lib/filesystem.js.map new file mode 100644 index 000000000..a802539f1 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/filesystem.js.map @@ -0,0 +1 @@ +{"version":3,"file":"filesystem.js","sourceRoot":"","sources":["../src/filesystem.ts"],"names":[],"mappings":";;;AAAA,uBAAyB;AAkCzB,SAAgB,cAAc,CAAC,IAAY;IACzC,IAAI;QACF,IAAM,KAAK,GA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AS,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;AAC1D,CAAC;AAFD,0CAEC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/index.d.ts b/node_modules/tsconfig-paths/lib/index.d.ts index 02373e987..8a3d68588 100644 --- a/node_modules/tsconfig-paths/lib/index.d.ts +++ b/node_modules/tsconfig-paths/lib/index.d.ts @@ -1,5 +1,5 @@ -export { createMatchPath, matchFromAbsolutePaths, MatchPath } from "./match-path-sync"; -export { createMatchPathAsync, matchFromAbsolutePathsAsync, MatchPathAsync } from "./match-path-async"; +export { createMatchPath, matchFromAbsolutePaths, MatchPath, } from "./match-path-sync"; +export { createMatchPathAsync, matchFromAbsolutePathsAsync, MatchPathAsync, } from "./match-path-async"; export { register } from "./register"; -export { loadConfig, ConfigLoaderResult, ConfigLoaderSuccessResult, ConfigLoaderFailResult } from "./config-loader"; -export { ReadJsonSync, ReadJsonAsync, FileExistsSync, FileExistsAsync } from "./filesystem"; +export { loadConfig, ConfigLoaderResult, ConfigLoaderSuccessResult, ConfigLoaderFailResult, } from "./config-loader"; +export { ReadJsonSync, ReadJsonAsync, FileExistsSync, FileExistsAsync, } from "./filesystem"; diff --git a/node_modules/tsconfig-paths/lib/index.js b/node_modules/tsconfig-paths/lib/index.js index c08ca7f2a..dbd54cc51 100644 --- a/node_modules/tsconfig-paths/lib/index.js +++ b/node_modules/tsconfig-paths/lib/index.js @@ -1,13 +1,15 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.loadConfig = exports.register = exports.matchFromAbsolutePathsAsync = exports.createMatchPathAsync = exports.matchFromAbsolutePaths = exports.createMatchPath = void 0; // register is used from register.js in root dir var match_path_sync_1 = require("./match-path-sync"); -exports.createMatchPath = match_path_sync_1.createMatchPath; -exports.matchFromAbsolutePaths = match_path_sync_1.matchFromAbsolutePaths; +Object.defineProperty(exports, "createMatchPath", { enumerable: true, get: function () { return match_path_sync_1.createMatchPath; } }); +Object.defineProperty(exports, "matchFromAbsolutePaths", { enumerable: true, get: function () { return match_path_sync_1.matchFromAbsolutePaths; } }); var match_path_async_1 = require("./match-path-async"); -exports.createMatchPathAsync = match_path_async_1.createMatchPathAsync; -exports.matchFromAbsolutePathsAsync = match_path_async_1.matchFromAbsolutePathsAsync; +Object.defineProperty(exports, "createMatchPathAsync", { enumerable: true, get: function () { return match_path_async_1.createMatchPathAsync; } }); +Object.defineProperty(exports, "matchFromAbsolutePathsAsync", { enumerable: true, get: function () { return match_path_async_1.matchFromAbsolutePathsAsync; } }); var register_1 = require("./register"); -exports.register = register_1.register; +Object.defineProperty(exports, "register", { enumerable: true, get: function () { return register_1.register; } }); var config_loader_1 = require("./config-loader"); -exports.loadConfig = config_loader_1.loadConfig; +Object.defineProperty(exports, "loadConfig", { enumerable: true, get: function () { return config_loader_1.loadConfig; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/index.js.map b/node_modules/tsconfig-paths/lib/index.js.map new file mode 100644 index 000000000..c1f1d823c --- /dev/null +++ b/node_modules/tsconfig-paths/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAgD;AAChD,qDAI2B;AAHzB,kHAAA,eAAe,OAAA;AACf,yHAAA,sBAAsB,OAAA;AAGxB,uDAI4B;AAH1B,wHAAA,oBAAoB,OAAA;AACpB,+HAAA,2BAA2B,OAAA;AAG7B,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,iDAKyB;AAJvB,2GAAA,UAAU,OAAA"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/mapping-entry.js b/node_modules/tsconfig-paths/lib/mapping-entry.js index a8762f774..bcb24fe22 100644 --- a/node_modules/tsconfig-paths/lib/mapping-entry.js +++ b/node_modules/tsconfig-paths/lib/mapping-entry.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAbsoluteMappingEntries = void 0; var path = require("path"); /** * Converts an absolute baseUrl and paths to an array of absolute mapping entries. @@ -13,7 +14,7 @@ var path = require("path"); function getAbsoluteMappingEntries(absoluteBaseUrl, paths, addMatchAll) { // Resolve all paths to absolute form once here, and sort them by // longest prefix once here, this saves time on each request later. - // We need to put them in an array to preseve the sorting order. + // We need to put them in an array to preserve the sorting order. var sortedKeys = sortByLongestPrefix(Object.keys(paths)); var absolutePaths = []; for (var _i = 0, sortedKeys_1 = sortedKeys; _i < sortedKeys_1.length; _i++) { @@ -22,7 +23,7 @@ function getAbsoluteMappingEntries(absoluteBaseUrl, paths, addMatchAll) { pattern: key, paths: paths[key].map(function (pathToResolve) { return path.join(absoluteBaseUrl, pathToResolve); - }) + }), }); } // If there is no match-all path specified in the paths section of tsconfig, then try to match @@ -30,7 +31,7 @@ function getAbsoluteMappingEntries(absoluteBaseUrl, paths, addMatchAll) { if (!paths["*"] && addMatchAll) { absolutePaths.push({ pattern: "*", - paths: [absoluteBaseUrl.replace(/\/$/, "") + "/*"] + paths: ["".concat(absoluteBaseUrl.replace(/\/$/, ""), "/*")], }); } return absolutePaths; @@ -49,3 +50,4 @@ function getPrefixLength(pattern) { var prefixLength = pattern.indexOf("*"); return pattern.substr(0, prefixLength).length; } +//# sourceMappingURL=mapping-entry.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/mapping-entry.js.map b/node_modules/tsconfig-paths/lib/mapping-entry.js.map new file mode 100644 index 000000000..b408a48f8 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/mapping-entry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapping-entry.js","sourceRoot":"","sources":["../src/mapping-entry.ts"],"names":[],"mappings":";;;AAAA,2BAA6B;AAW7B;;;;;;;;GAQG;AACH,SAAgB,yBAAyB,CACvC,eAAuB,EACvB,KAAY,EACZ,WAAoB;IAEpB,iEAAiE;IACjE,mEAAmE;IACnE,iEAAiE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modules/tsconfig-paths/lib/match-path-async.d.ts index c199f9f63..bf35c64c0 100644 --- a/node_modules/tsconfig-paths/lib/match-path-async.d.ts +++ b/node_modules/tsconfig-paths/lib/match-path-async.d.ts @@ -18,4 +18,4 @@ export declare function createMatchPathAsync(absoluteBaseUrl: string, paths: { /** * See the sync version for docs. */ -export declare function matchFromAbsolutePathsAsync(absolutePathMappings: ReadonlyArray, requestedModule: string, readJson: Filesystem.ReadJsonAsync | undefined, fileExists: Filesystem.FileExistsAsync | undefined, extensions: ReadonlyArray | undefined, callback: MatchPathAsyncCallback, mainFields?: string[]): void; +export declare function matchFromAbsolutePathsAsync(absolutePathMappings: ReadonlyArray, requestedModule: string, readJson: Filesystem.ReadJsonAsync | undefined, fileExists: Filesystem.FileExistsAsync | undefined, extensions: readonly string[] | undefined, callback: MatchPathAsyncCallback, mainFields?: string[]): void; diff --git a/node_modules/tsconfig-paths/lib/match-path-async.js b/node_modules/tsconfig-paths/lib/match-path-async.js index 511cfb7cf..d78e4217d 100644 --- a/node_modules/tsconfig-paths/lib/match-path-async.js +++ b/node_modules/tsconfig-paths/lib/match-path-async.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.matchFromAbsolutePathsAsync = exports.createMatchPathAsync = void 0; var path = require("path"); var TryPath = require("./try-path"); var MappingEntry = require("./mapping-entry"); @@ -68,7 +69,6 @@ function findFirstExistingPath(tryPaths, readJson, fileExists, doneCallback, ind return doneCallback(err); } if (exists) { - // Not sure why we don't just return the full path? Why strip it? return doneCallback(undefined, TryPath.getStrippedPath(tryPath)); } if (index === tryPaths.length - 1) { @@ -89,8 +89,7 @@ function findFirstExistingPath(tryPaths, readJson, fileExists, doneCallback, ind return doneCallback(mainFieldErr); } if (mainFieldMappedFile) { - // Not sure why we don't just return the full path? Why strip it? - return doneCallback(undefined, Filesystem.removeExtension(mainFieldMappedFile)); + return doneCallback(undefined, mainFieldMappedFile); } // No field in package json was a valid option. Continue with the next path. return findFirstExistingPath(tryPaths, readJson, fileExists, doneCallback, index + 1, mainFields); @@ -111,3 +110,4 @@ function findFirstExistingPath(tryPaths, readJson, fileExists, doneCallback, ind TryPath.exhaustiveTypeException(tryPath.type); } } +//# sourceMappingURL=match-path-async.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/match-path-async.js.map b/node_modules/tsconfig-paths/lib/match-path-async.js.map new file mode 100644 index 000000000..386d64b9f --- /dev/null +++ b/node_modules/tsconfig-paths/lib/match-path-async.js.map @@ -0,0 +1 @@ +{"version":3,"file":"match-path-async.js","sourceRoot":"","sources":["../src/match-path-async.ts"],"names":[],"mappings":";;;AAAA,2BAA6B;AAC7B,oCAAsC;AACtC,8CAAgD;AAChD,yCAA2C;AAmB3C;;GAEG;AACH,SAAgB,oBAAoB,CAClC,eAAuB,EACvB,KAAuC,EACvC,UAA+B,EAC/B,WAA2B;IAD3B,2BAAA,EAAA,cAAwB,MAAM,CAAC;IAC/B,4BAAA,EAAA,kBAA2B;IAE3B,IAAM,aAAa,GAAG,YAAY,CAAC,yBAAyB,CAC1D,eAAe,EACf,KAAK,EACL,WAAW,CACZ,CAAC;IAEF,OAAO,UACL,eAAuB,EACvB,QAA8C,EAC9C,UAAkD,EAClD,UAA6C,EAC7C,QAAgC;QAEhC,OAAA,2BAA2B,CACzB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,CACX;IARD,CAQC,CAAC;AACN,CAAC;AA5BD,oDA4BC;AAED;;GAEG;AACH,SAAgB,2BAA2B,CACzC,oBAA8D,EAC9D,eAAuB,EACvB,QAAqE,EACrE,UAAmE,EACnE,UAAmE,EACnE,QAAgC,EAChC,UAA+B;IAJ/B,yBAAA,EAAA,WAAqC,UAAU,CAAC,qBAAqB;IACrE,2BAAA,EAAA,aAAyC,UAAU,CAAC,eAAe;IACnE,2BAAA,EAAA,aAAoC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CA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,IAAI,YAAY,EAAE;wBAChB,OAAO,YAAY,CAAC,YAAY,CAAC,CAAC;qBACnC;oBACD,IAAI,mBAAmB,EAAE;wBACvB,OAAO,YAAY,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;qBACrD;oBAED,4EAA4E;oBAC5E,OAAO,qBAAqB,CAC1B,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,KAAK,GAAG,CAAC,EACT,UAAU,CACX,CAAC;gBACJ,CAAC,CACF,CAAC;aACH;YAED,wFAAwF;YACxF,8FAA8F;YAC9F,4EAA4E;YAC5E,EAAE;YACF,0CAA0C;YAC1C,qEAAqE;YACrE,EAAE;YACF,8BAA8B;YAC9B,OAAO,qBAAqB,CAC1B,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,KAAK,GAAG,CAAC,EACT,UAAU,CACX,CAAC;QACJ,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KAC/C;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/match-path-sync.d.ts b/node_modules/tsconfig-paths/lib/match-path-sync.d.ts index 090d438e2..3c622cb72 100644 --- a/node_modules/tsconfig-paths/lib/match-path-sync.d.ts +++ b/node_modules/tsconfig-paths/lib/match-path-sync.d.ts @@ -22,7 +22,7 @@ export declare function createMatchPath(absoluteBaseUrl: string, paths: { * @param absolutePathMappings The paths to try as specified in tsconfig but resolved to absolute form. * @param requestedModule The required module name. * @param readJson Function that can read json from a path (useful for testing). - * @param fileExists Function that checks for existance of a file at a path (useful for testing). + * @param fileExists Function that checks for existence of a file at a path (useful for testing). * @param extensions File extensions to probe for (useful for testing). * @param mainFields A list of package.json field names to try when resolving module files. * @returns the found path, or undefined if no path was found. diff --git a/node_modules/tsconfig-paths/lib/match-path-sync.js b/node_modules/tsconfig-paths/lib/match-path-sync.js index b7013374a..b6df1afe1 100644 --- a/node_modules/tsconfig-paths/lib/match-path-sync.js +++ b/node_modules/tsconfig-paths/lib/match-path-sync.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.matchFromAbsolutePaths = exports.createMatchPath = void 0; var path = require("path"); var Filesystem = require("./filesystem"); var MappingEntry = require("./mapping-entry"); @@ -26,7 +27,7 @@ exports.createMatchPath = createMatchPath; * @param absolutePathMappings The paths to try as specified in tsconfig but resolved to absolute form. * @param requestedModule The required module name. * @param readJson Function that can read json from a path (useful for testing). - * @param fileExists Function that checks for existance of a file at a path (useful for testing). + * @param fileExists Function that checks for existence of a file at a path (useful for testing). * @param extensions File extensions to probe for (useful for testing). * @param mainFields A list of package.json field names to try when resolving module files. * @returns the found path, or undefined if no path was found. @@ -65,7 +66,6 @@ function findFirstExistingPath(tryPaths, readJson, fileExists, mainFields) { tryPath.type === "extension" || tryPath.type === "index") { if (fileExists(tryPath.path)) { - // Not sure why we don't just return the full path? Why strip it? return TryPath.getStrippedPath(tryPath); } } @@ -74,8 +74,7 @@ function findFirstExistingPath(tryPaths, readJson, fileExists, mainFields) { if (packageJson) { var mainFieldMappedFile = findFirstExistingMainFieldMappedFile(packageJson, mainFields, tryPath.path, fileExists); if (mainFieldMappedFile) { - // Not sure why we don't just return the full path? Why strip it? - return Filesystem.removeExtension(mainFieldMappedFile); + return mainFieldMappedFile; } } } @@ -85,3 +84,4 @@ function findFirstExistingPath(tryPaths, readJson, fileExists, mainFields) { } return undefined; } +//# sourceMappingURL=match-path-sync.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/match-path-sync.js.map b/node_modules/tsconfig-paths/lib/match-path-sync.js.map new file mode 100644 index 000000000..0c4998134 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/match-path-sync.js.map @@ -0,0 +1 @@ +{"version":3,"file":"match-path-sync.js","sourceRoot":"","sources":["../src/match-path-sync.ts"],"names":[],"mappings":";;;AAAA,2BAA6B;AAC7B,yCAA2C;AAC3C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ACF;aAAM;YACL,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SAC/C;KACF;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/options.js b/node_modules/tsconfig-paths/lib/options.js index 2581f9a55..4c3d9abf5 100644 --- a/node_modules/tsconfig-paths/lib/options.js +++ b/node_modules/tsconfig-paths/lib/options.js @@ -1,13 +1,15 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.options = void 0; var minimist = require("minimist"); var argv = minimist(process.argv.slice(2), { string: ["project"], alias: { - project: ["P"] - } + project: ["P"], + }, }); var project = argv && argv.project; exports.options = { - cwd: project || process.cwd() + cwd: project || process.cwd(), }; +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/options.js.map b/node_modules/tsconfig-paths/lib/options.js.map new file mode 100644 index 000000000..ff3a9e40e --- /dev/null +++ b/node_modules/tsconfig-paths/lib/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":";;;AAAA,mCAAqC;AAErC,IAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IAC3C,MAAM,EAAE,CAAC,SAAS,CAAC;IACnB,KAAK,EAAE;QACL,OAAO,EAAE,CAAC,GAAG,CAAC;KACf;CACF,CAAC,CAAC;AAEH,IAAM,OAAO,GAAG,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC;AAMxB,QAAA,OAAO,GAAY;IAC9B,GAAG,EAAE,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE;CAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/register.js b/node_modules/tsconfig-paths/lib/register.js index c12b99641..b00a77261 100644 --- a/node_modules/tsconfig-paths/lib/register.js +++ b/node_modules/tsconfig-paths/lib/register.js @@ -1,5 +1,15 @@ "use strict"; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; Object.defineProperty(exports, "__esModule", { value: true }); +exports.register = void 0; var match_path_sync_1 = require("./match-path-sync"); var config_loader_1 = require("./config-loader"); var options_1 = require("./options"); @@ -32,7 +42,7 @@ function getCoreModules(builtinModules) { "util", "v8", "vm", - "zlib" + "zlib", ]; var coreModules = {}; for (var _i = 0, builtinModules_1 = builtinModules; _i < builtinModules_1.length; _i++) { @@ -46,15 +56,15 @@ function getCoreModules(builtinModules) { * Returns a function to undo paths registration. */ function register(explicitParams) { - var configLoaderResult = config_loader_1.configLoader({ + var configLoaderResult = (0, config_loader_1.configLoader)({ cwd: options_1.options.cwd, - explicitParams: explicitParams + explicitParams: explicitParams, }); if (configLoaderResult.resultType === "failed") { - console.warn(configLoaderResult.message + ". tsconfig-paths will be skipped"); + console.warn("".concat(configLoaderResult.message, ". tsconfig-paths will be skipped")); return noOp; } - var matchPath = match_path_sync_1.createMatchPath(configLoaderResult.absoluteBaseUrl, configLoaderResult.paths, configLoaderResult.mainFields, configLoaderResult.addMatchAll); + var matchPath = (0, match_path_sync_1.createMatchPath)(configLoaderResult.absoluteBaseUrl, configLoaderResult.paths, configLoaderResult.mainFields, configLoaderResult.addMatchAll); // Patch node's module loading // tslint:disable-next-line:no-require-imports variable-name var Module = require("module"); @@ -66,7 +76,7 @@ function register(explicitParams) { if (!isCoreModule) { var found = matchPath(request); if (found) { - var modifiedArguments = [found].concat([].slice.call(arguments, 1)); // Passes all arguments. Even those that is not specified above. + var modifiedArguments = __spreadArray([found], [].slice.call(arguments, 1), true); // Passes all arguments. Even those that is not specified above. // tslint:disable-next-line:no-invalid-this return originalResolveFilename.apply(this, modifiedArguments); } @@ -80,3 +90,4 @@ function register(explicitParams) { }; } exports.register = register; +//# sourceMappingURL=register.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/register.js.map b/node_modules/tsconfig-paths/lib/register.js.map new file mode 100644 index 000000000..3c10fa5f5 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/register.js.map @@ -0,0 +1 @@ +{"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAoD;AACpD,iDAA+D;AAC/D,qCAAoC;AAEpC,IAAM,IAAI,GAAG,cAAY,OAAA,KAAK,CAAC,EAAN,CAAM,CAAC;AAEhC,SAAS,cAAc,CACrB,cAAoC;IAEpC,cAAc,GAAG,cAAc,IAAI;QACjC,QAAQ;QACR,QAAQ;QACR,eAAe;QACf,SAAS;QACT,QAAQ;QACR,OAAO;QACP,KAAK;QACL,QAAQ;QACR,QAAQ;QACR,IAAI;QACJ,MAAM;QACN,OAAO;QACP,KAAK;QACL,IAAI;QACJ,MAAM;QACN,UAAU;QACV,aAAa;QACb,UAAU;QACV,QAAQ;QACR,gBAAgB;QAChB,KAAK;QACL,KAAK;QACL,KAAK;QACL,MAAM;QACN,IAAI;QACJ,IAAI;QACJ,MAAM;KACP,CAAC;IAEF,IAAM,WAAW,GAA+B,EAAE,CAAC;IACnD,KAAmB,UAAc,EAAd,iCAAc,EAAd,4BAAc,EAAd,IAAc,EAAE;QAA9B,IAAI,QAAM,uBAAA;QACb,WAAW,CAAC,QAAM,CAAC,GAAG,IAAI,CAAC;KAC5B;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;GAGG;AACH,SAAgB,QAAQ,CAAC,cAA8B;IACrD,IAAM,kBAAkB,GAAG,IAAA,4BAAY,EAAC;QACtC,GAAG,EAAE,iBAAO,CAAC,GAAG;QAChB,cAAc,gBAAA;KACf,CAAC,CAAC;IAEH,IAAI,kBAAkB,CAAC,UAAU,KAAK,QAAQ,EAAE;QAC9C,OAAO,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2105..de11ccbf9 100644 --- a/node_modules/tsconfig-paths/lib/try-path.js +++ b/node_modules/tsconfig-paths/lib/try-path.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.exhaustiveTypeException = exports.getStrippedPath = exports.getPathsToTry = void 0; var path = require("path"); var path_1 = require("path"); var filesystem_1 = require("./filesystem"); @@ -11,10 +12,7 @@ var filesystem_1 = require("./filesystem"); * 4. Check for files named as request ending in "index" with any of the extensions. */ function getPathsToTry(extensions, absolutePathMappings, requestedModule) { - if (!absolutePathMappings || - !requestedModule || - requestedModule[0] === "." || - requestedModule[0] === path.sep) { + if (!absolutePathMappings || !requestedModule || requestedModule[0] === ".") { return undefined; } var pathsToTry = []; @@ -30,7 +28,7 @@ function getPathsToTry(extensions, absolutePathMappings, requestedModule) { pathsToTry.push.apply(pathsToTry, extensions.map(function (e) { return ({ type: "extension", path: physicalPath + e }); })); pathsToTry.push({ type: "package", - path: path.join(physicalPath, "/package.json") + path: path.join(physicalPath, "/package.json"), }); var indexPath = path.join(physicalPath, "/index"); pathsToTry.push.apply(pathsToTry, extensions.map(function (e) { return ({ type: "index", path: indexPath + e }); })); @@ -47,18 +45,18 @@ exports.getPathsToTry = getPathsToTry; // Not sure why we don't just return the full found path? function getStrippedPath(tryPath) { return tryPath.type === "index" - ? path_1.dirname(tryPath.path) + ? (0, path_1.dirname)(tryPath.path) : tryPath.type === "file" ? tryPath.path : tryPath.type === "extension" - ? filesystem_1.removeExtension(tryPath.path) + ? (0, filesystem_1.removeExtension)(tryPath.path) : tryPath.type === "package" ? tryPath.path : exhaustiveTypeException(tryPath.type); } exports.getStrippedPath = getStrippedPath; function exhaustiveTypeException(check) { - throw new Error("Unknown type " + check); + throw new Error("Unknown type ".concat(check)); } exports.exhaustiveTypeException = exhaustiveTypeException; /** @@ -89,3 +87,4 @@ function matchStar(pattern, search) { } return search.substr(star, search.length - part2.length); } +//# sourceMappingURL=try-path.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/try-path.js.map b/node_modules/tsconfig-paths/lib/try-path.js.map new file mode 100644 index 000000000..30cda5757 --- /dev/null +++ b/node_modules/tsconfig-paths/lib/try-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"try-path.js","sourceRoot":"","sources":["../src/try-path.ts"],"names":[],"mappings":";;;AAAA,2BAA6B;AAE7B,6BAA+B;AAC/B,2CAA+C;AAO/C;;;;;;GAMG;AACH,SAAgB,aAAa,CAC3B,UAAiC,EACjC,oBAAiD,EACjD,eAAuB;IAEvB,IAAI,CAAC,oBAAoB,IAAI,CAAC,eAAe,IAAI,eAAe,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QAC3E,OAAO,SAAS,CAAC;KAClB;IAED,IAAM,UAAU,GAAmB,EAAE,CAAC;IACtC,KAAoB,UAAoB,EAApB,6CAAoB,EAApB,kCAAoB,EAApB,IAAoB,EAAE;QAArC,IAAM,KAAK,6BAAA;QACd,IAAM,SAAS,GACb,KAAK,CAAC,OAAO,KAAK,eAAe;YAC/B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAChD,IAAI,SAAS,KAAK,SAAS,EAAE;oCAChB,mBAAmB;gBAC5B,IAAM,YAAY,GAAG,mBAAmB,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;gBACjE,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;gBACtD,UAAU,CAAC,IAAI,OAAf,UAAU,EACL,UAAU,CAAC,GAAG,CACf,UAAC,CAAC,IAAK,OAAA,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,GAAG,CAAC,EAAc,CAAA,EAA1D,CAA0D,CAClE,EACD;gBACF,UAAU,CAAC,IAAI,CAAC;oBACd,IAAI,EAAE,SAAS;oBACf,IAAI,EAA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C,CAAC;AAFD,0DAEC;AAED;;;;;;GAMG;AACH,SAAS,SAAS,CAAC,OAAe,EAAE,MAAc;IAChD,IAAI,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE;QAClC,OAAO,SAAS,CAAC;KAClB;IACD,IAAI,OAAO,KAAK,GAAG,EAAE;QACnB,OAAO,MAAM,CAAC;KACf;IACD,IAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,IAAI,KAAK,CAAC,CAAC,EAAE;QACf,OAAO,SAAS,CAAC;KAClB;IACD,IAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IACzC,IAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAC1C,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,KAAK,EAAE;QACpC,OAAO,SAAS,CAAC;KAClB;IACD,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE;QACzD,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAC3D,CAAC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/tsconfig-loader.d.ts b/node_modules/tsconfig-paths/lib/tsconfig-loader.d.ts index bcf5acef1..649a8042c 100644 --- a/node_modules/tsconfig-paths/lib/tsconfig-loader.d.ts +++ b/node_modules/tsconfig-paths/lib/tsconfig-loader.d.ts @@ -21,8 +21,8 @@ export interface TsConfigLoaderResult { export interface TsConfigLoaderParams { getEnv: (key: string) => string | undefined; cwd: string; - loadSync?(cwd: string, filename?: string): TsConfigLoaderResult; + loadSync?(cwd: string, filename?: string, baseUrl?: string): TsConfigLoaderResult; } -export declare function tsConfigLoader({ getEnv, cwd, loadSync }: TsConfigLoaderParams): TsConfigLoaderResult; +export declare function tsConfigLoader({ getEnv, cwd, loadSync, }: TsConfigLoaderParams): TsConfigLoaderResult; export declare function walkForTsConfig(directory: string, existsSync?: (path: string) => boolean): string | undefined; export declare function loadTsconfig(configFilePath: string, existsSync?: (path: string) => boolean, readFileSync?: (filename: string) => string): Tsconfig | undefined; diff --git a/node_modules/tsconfig-paths/lib/tsconfig-loader.js b/node_modules/tsconfig-paths/lib/tsconfig-loader.js index 684247d07..fd9315324 100644 --- a/node_modules/tsconfig-paths/lib/tsconfig-loader.js +++ b/node_modules/tsconfig-paths/lib/tsconfig-loader.js @@ -1,13 +1,17 @@ "use strict"; -var __assign = (this && this.__assign) || Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.loadTsconfig = exports.walkForTsConfig = exports.tsConfigLoader = void 0; var path = require("path"); var fs = require("fs"); // tslint:disable:no-require-imports @@ -16,26 +20,29 @@ var StripBom = require("strip-bom"); function tsConfigLoader(_a) { var getEnv = _a.getEnv, cwd = _a.cwd, _b = _a.loadSync, loadSync = _b === void 0 ? loadSyncDefault : _b; var TS_NODE_PROJECT = getEnv("TS_NODE_PROJECT"); + var TS_NODE_BASEURL = getEnv("TS_NODE_BASEURL"); // tsconfig.loadSync handles if TS_NODE_PROJECT is a file or directory - var loadResult = loadSync(cwd, TS_NODE_PROJECT); + // and also overrides baseURL if TS_NODE_BASEURL is available. + var loadResult = loadSync(cwd, TS_NODE_PROJECT, TS_NODE_BASEURL); return loadResult; } exports.tsConfigLoader = tsConfigLoader; -function loadSyncDefault(cwd, filename) { +function loadSyncDefault(cwd, filename, baseUrl) { // Tsconfig.loadSync uses path.resolve. This is why we can use an absolute path as filename var configPath = resolveConfigPath(cwd, filename); if (!configPath) { return { tsConfigPath: undefined, baseUrl: undefined, - paths: undefined + paths: undefined, }; } var config = loadTsconfig(configPath); return { tsConfigPath: configPath, - baseUrl: config && config.compilerOptions && config.compilerOptions.baseUrl, - paths: config && config.compilerOptions && config.compilerOptions.paths + baseUrl: baseUrl || + (config && config.compilerOptions && config.compilerOptions.baseUrl), + paths: config && config.compilerOptions && config.compilerOptions.paths, }; } function resolveConfigPath(cwd, filename) { @@ -83,15 +90,22 @@ function loadTsconfig(configFilePath, existsSync, readFileSync) { extendedConfig += ".json"; } var currentDir = path.dirname(configFilePath); - var base = loadTsconfig(path.join(currentDir, extendedConfig), existsSync, readFileSync) || {}; + var extendedConfigPath = path.join(currentDir, extendedConfig); + if (extendedConfig.indexOf("/") !== -1 && + extendedConfig.indexOf(".") !== -1 && + !existsSync(extendedConfigPath)) { + extendedConfigPath = path.join(currentDir, "node_modules", extendedConfig); + } + var base = loadTsconfig(extendedConfigPath, existsSync, readFileSync) || {}; // baseUrl should be interpreted as relative to the base tsconfig, // but we need to update it so it is relative to the original tsconfig being loaded - if (base && base.compilerOptions && base.compilerOptions.baseUrl) { + if (base.compilerOptions && base.compilerOptions.baseUrl) { var extendsDir = path.dirname(extendedConfig); base.compilerOptions.baseUrl = path.join(extendsDir, base.compilerOptions.baseUrl); } - return __assign({}, base, config, { compilerOptions: __assign({}, base.compilerOptions, config.compilerOptions) }); + return __assign(__assign(__assign({}, base), config), { compilerOptions: __assign(__assign({}, base.compilerOptions), config.compilerOptions) }); } return config; } exports.loadTsconfig = loadTsconfig; +//# sourceMappingURL=tsconfig-loader.js.map \ No newline at end of file diff --git a/node_modules/tsconfig-paths/lib/tsconfig-loader.js.map b/node_modules/tsconfig-paths/lib/tsconfig-loader.js.map new file mode 100644 index 000000000..3bb4b71cc --- /dev/null +++ b/node_modules/tsconfig-paths/lib/tsconfig-loader.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tsconfig-loader.js","sourceRoot":"","sources":["../src/tsconfig-loader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2BAA6B;AAC7B,uBAAyB;AACzB,oCAAoC;AACpC,6BAAgC;AAChC,oCAAuC;AA+BvC,SAAgB,cAAc,CAAC,EAIR;QAHrB,MAAM,YAAA,EACN,GAAG,SAAA,EACH,gBAA0B,EAA1B,QAAQ,mBAAG,eAAe,KAAA;IAE1B,IAAM,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAClD,IAAM,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAElD,sEAAsE;IACtE,8DAA8D;IAC9D,IAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;IACnE,OAAO,UAAU,CAAC;AACpB,CAAC;AAZD,wCAYC;AAED,SAAS,eAAe,CACtB,GAAW,EACX,QAAiB,EACjB,OAAgB;IAEhB,2FAA2F;IAE3F,IAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAEpD,IAAI,CAAC,UAAU,EAAE;QACf,OAAO;YACL,YAAY,EAAE,SAAS;YACvB,OAAO,EAAE,SAAS;YAClB,KAAK,EAAE,SAAS;SACjB,CAAC;KACH;IACD,IAAM,MAAM,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IAExC,OAAO;QACL,YAAY,EAAE,UAAU;QACxB,OAAO,EACL,OAAO;YACP,CAAC,MAAM,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC;QACtE,KAAK,EAAE,MAAM,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,KAAK;KACxE,CAAC;A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c,CAAC,CAAC;YAChD,IAAI,CAAC,eAAe,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CACtC,UAAU,EACV,IAAI,CAAC,eAAe,CAAC,OAAO,CAC7B,CAAC;SACH;QAED,sCACK,IAAI,GACJ,MAAM,KACT,eAAe,wBACV,IAAI,CAAC,eAAe,GACpB,MAAM,CAAC,eAAe,KAE3B;KACH;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AA3DD,oCA2DC"} \ No newline at end of file diff --git a/node_modules/tsconfig-paths/package.json b/node_modules/tsconfig-paths/package.json index 0a0b49adf..ad59c3e8a 100644 --- a/node_modules/tsconfig-paths/package.json +++ b/node_modules/tsconfig-paths/package.json @@ -1,36 +1,41 @@ { "name": "tsconfig-paths", - "version": "3.9.0", + "version": "3.14.1", "description": "Load node modules according to tsconfig paths, in run-time or via API.", "main": "lib/index.js", - "types": "lib/index", + "types": "lib/index.d.ts", "author": "Jonas Kello", "license": "MIT", "repository": "https://github.com/dividab/tsconfig-paths", + "files": [ + "/src", + "/lib", + "register.js", + "package.json", + "CHANGELOG.md", + "LICENSE", + "README.md" + ], "devDependencies": { - "@types/chai": "^4.1.4", - "@types/minimist": "^1.2.0", - "@types/mocha": "^5.2.3", + "@types/jest": "^27.0.3", + "@types/minimist": "^1.2.2", "@types/node": "^6.0.54", "@types/strip-bom": "^3.0.0", "@types/strip-json-comments": "^0.0.30", - "chai": "^4.1.2", - "codecov": "^3.1.0", - "husky": "^0.14.3", - "lint-staged": "^4.3.0", - "mocha": "^5.2.0", - "nyc": "^11.4.1", - "prettier": "1.7.4", + "husky": "^4.2.5", + "jest": "^27.3.1", + "lint-staged": "^10.2.11", + "prettier": "^2.0.5", "rimraf": "^2.6.2", - "shelljs": "^0.7.5", - "ts-node": "^7.0.0", + "ts-jest": "^27.0.7", + "ts-node": "^10.7.0", "tslint": "^5.8.0", - "typescript": "^2.4.1" + "typescript": "^4.5.2" }, "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.1", - "minimist": "^1.2.0", + "minimist": "^1.2.6", "strip-bom": "^3.0.0" }, "scripts": { @@ -39,25 +44,24 @@ "example:project": "yarn build && ts-node -r ./register.js -P ./example/project/tsconfig.json ./example/project/main.ts", "example:api": "cd example/api && ts-node main.ts", "example:perf": "cd example/perf && ts-node main.ts", - "test": "mocha", - "build": "rimraf lib && tsc -p src", - "build:test": "rimraf ./test/js_out && tsc -p test", + "test": "jest", + "test-coverage": "jest --coverage", + "build": "rimraf lib && tsc -p .", "lint": "tslint './{src,tests}/**/*.ts{,x}'", - "verify": "yarn build && yarn lint && yarn coverage", - "coverage": "rimraf coverage .nyc_output && nyc yarn test", - "report-coverage": "codecov -f coverage/*.json", - "precommit": "lint-staged", - "publish:major": "yarn build && node scripts/publish.js major", - "publish:minor": "yarn build && node scripts/publish.js minor", - "publish:patch": "yarn build && node scripts/publish.js patch", + "verify": "yarn build && yarn lint && yarn test-coverage", "preversion": "yarn verify", "postversion": "git push --tags && yarn publish --new-version $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\"" }, "lint-staged": { - "*.ts": [ - "tslint", + "*.{ts,tsx}": "tslint", + "*.{ts,tsx,json,css}": [ "prettier --write", "git add" ] + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } } } diff --git a/node_modules/tsconfig-paths/register.js b/node_modules/tsconfig-paths/register.js index c7d41ea70..c366c408a 100644 --- a/node_modules/tsconfig-paths/register.js +++ b/node_modules/tsconfig-paths/register.js @@ -1 +1 @@ -require('./').register(); +require("./").register(); diff --git a/node_modules/tsconfig-paths/test/config-loader-tests.ts b/node_modules/tsconfig-paths/src/__tests__/config-loader.test.ts similarity index 55% rename from node_modules/tsconfig-paths/test/config-loader-tests.ts rename to node_modules/tsconfig-paths/src/__tests__/config-loader.test.ts index 483ba4329..b9f88afde 100644 --- a/node_modules/tsconfig-paths/test/config-loader-tests.ts +++ b/node_modules/tsconfig-paths/src/__tests__/config-loader.test.ts @@ -1,10 +1,9 @@ -import { assert } from "chai"; import { configLoader, loadConfig, ConfigLoaderFailResult, - ConfigLoaderSuccessResult -} from "../src/config-loader"; + ConfigLoaderSuccessResult, +} from "../config-loader"; import { join } from "path"; describe("config-loader", (): void => { @@ -13,16 +12,19 @@ describe("config-loader", (): void => { explicitParams: { baseUrl: "/foo/bar", paths: { - asd: ["asd"] - } + asd: ["asd"], + }, }, - cwd: "/baz" + cwd: "/baz", }); const successResult = result as ConfigLoaderSuccessResult; - assert.equal(successResult.resultType, "success"); - assert.equal(successResult.absoluteBaseUrl, "/foo/bar"); - assert.equal(successResult.paths["asd"][0], "asd"); + // assert.equal(successResult.resultType, "success"); + // assert.equal(successResult.absoluteBaseUrl, "/foo/bar"); + // assert.equal(successResult.paths["asd"][0], "asd"); + expect(successResult.resultType).toBe("success"); + expect(successResult.absoluteBaseUrl).toBe("/foo/bar"); + expect(successResult.paths["asd"][0]).toBe("asd"); }); it("should use explicitParams when set and add cwd when path is relative", () => { @@ -30,15 +32,17 @@ describe("config-loader", (): void => { explicitParams: { baseUrl: "bar/", paths: { - asd: ["asd"] - } + asd: ["asd"], + }, }, - cwd: "/baz" + cwd: "/baz", }); const successResult = result as ConfigLoaderSuccessResult; - assert.equal(successResult.resultType, "success"); - assert.equal(successResult.absoluteBaseUrl, join("/baz", "bar/")); + // assert.equal(successResult.resultType, "success"); + // assert.equal(successResult.absoluteBaseUrl, join("/baz", "bar/")); + expect(successResult.resultType).toBe("success"); + expect(successResult.absoluteBaseUrl).toBe(join("/baz", "bar/")); }); it("should fallback to tsConfigLoader when explicitParams is not set", () => { @@ -49,13 +53,15 @@ describe("config-loader", (): void => { tsConfigLoader: (_: any) => ({ tsConfigPath: "/baz/tsconfig.json", baseUrl: "./src", - paths: {} - }) + paths: {}, + }), }); const successResult = result as ConfigLoaderSuccessResult; - assert.equal(successResult.resultType, "success"); - assert.equal(successResult.absoluteBaseUrl, join("/baz", "src")); + // assert.equal(successResult.resultType, "success"); + // assert.equal(successResult.absoluteBaseUrl, join("/baz", "src")); + expect(successResult.resultType).toBe("success"); + expect(successResult.absoluteBaseUrl).toBe(join("/baz", "src")); }); it("should show an error message when baseUrl is missing", () => { @@ -66,13 +72,15 @@ describe("config-loader", (): void => { tsConfigLoader: (_: any) => ({ tsConfigPath: "/baz/tsconfig.json", baseUrl: undefined, - paths: {} - }) + paths: {}, + }), }); const failResult = result as ConfigLoaderFailResult; - assert.equal(failResult.resultType, "failed"); - assert.isTrue(failResult.message.indexOf("baseUrl") > -1); + // assert.equal(failResult.resultType, "failed"); + // assert.isTrue(failResult.message.indexOf("baseUrl") > -1); + expect(failResult.resultType).toBe("failed"); + expect(failResult.message.indexOf("baseUrl") > -1).toBeTruthy(); }); it("should presume cwd to be a tsconfig file when loadConfig is called with absolute path to tsconfig.json", () => { @@ -84,7 +92,9 @@ describe("config-loader", (): void => { const result = loadConfig(configFile); const successResult = result as ConfigLoaderSuccessResult; - assert.equal(successResult.resultType, "success"); - assert.equal(successResult.configFileAbsolutePath, configFile); + // assert.equal(successResult.resultType, "success"); + // assert.equal(successResult.configFileAbsolutePath, configFile); + expect(successResult.resultType).toBe("success"); + expect(successResult.configFileAbsolutePath).toBe(configFile); }); }); diff --git a/node_modules/tsconfig-paths/test/data/match-path-data.ts b/node_modules/tsconfig-paths/src/__tests__/data/match-path-data.ts similarity index 72% rename from node_modules/tsconfig-paths/test/data/match-path-data.ts rename to node_modules/tsconfig-paths/src/__tests__/data/match-path-data.ts index d0c60a1d2..e9c07c20e 100644 --- a/node_modules/tsconfig-paths/test/data/match-path-data.ts +++ b/node_modules/tsconfig-paths/src/__tests__/data/match-path-data.ts @@ -1,5 +1,5 @@ import { join, dirname } from "path"; -import { removeExtension } from "../../src/filesystem"; +import { removeExtension } from "../../filesystem"; export interface OneTest { readonly name: string; @@ -11,32 +11,41 @@ export interface OneTest { readonly addMatchAll?: boolean; readonly existingFiles: ReadonlyArray; readonly requestedModule: string; - readonly extensions?: ReadonlyArray; + readonly extensions: ReadonlyArray; readonly packageJson?: {}; readonly expectedPath: string | undefined; } +const defaultExtensionsWhenRunningInTsNode = [ + ".js", + ".json", + ".node", + ".ts", + ".tsx", +]; + export const tests: ReadonlyArray = [ { name: "should locate path that matches with star and exists", absoluteBaseUrl: "/root/", paths: { - "lib/*": ["location/*"] + "lib/*": ["location/*"], }, existingFiles: [join("/root", "location", "mylib", "index.ts")], requestedModule: "lib/mylib", - expectedPath: dirname(join("/root", "location", "mylib", "index.ts")) + expectedPath: dirname(join("/root", "location", "mylib", "index.ts")), + extensions: defaultExtensionsWhenRunningInTsNode, }, { name: "should resolve to correct path when many are specified", absoluteBaseUrl: "/root/", paths: { - "lib/*": ["foo1/*", "foo2/*", "location/*", "foo3/*"] + "lib/*": ["foo1/*", "foo2/*", "location/*", "foo3/*"], }, existingFiles: [join("/root", "location", "mylib", "index.ts")], requestedModule: "lib/mylib", extensions: [".ts"], - expectedPath: dirname(join("/root", "location", "mylib", "index.ts")) + expectedPath: dirname(join("/root", "location", "mylib", "index.ts")), }, { name: @@ -44,14 +53,15 @@ export const tests: ReadonlyArray = [ absoluteBaseUrl: "/root/", paths: { "*": ["location/*"], - "lib/*": ["location/*"] + "lib/*": ["location/*"], }, existingFiles: [ join("/root", "location", "lib", "mylib", "index.ts"), - join("/root", "location", "mylib", "index.ts") + join("/root", "location", "mylib", "index.ts"), ], requestedModule: "lib/mylib", - expectedPath: dirname(join("/root", "location", "mylib", "index.ts")) + expectedPath: dirname(join("/root", "location", "mylib", "index.ts")), + extensions: defaultExtensionsWhenRunningInTsNode, }, { name: "should locate path that matches with star and exists with extension", @@ -60,7 +70,7 @@ export const tests: ReadonlyArray = [ existingFiles: [join("/root", "location", "mylib.myext")], requestedModule: "lib/mylib", extensions: [".js", ".myext"], - expectedPath: removeExtension(join("/root", "location", "mylib.myext")) + expectedPath: removeExtension(join("/root", "location", "mylib.myext")), }, { name: "should resolve request with extension specified", @@ -68,17 +78,19 @@ export const tests: ReadonlyArray = [ paths: { "lib/*": ["location/*"] }, existingFiles: [join("/root", "location", "test.jpg")], requestedModule: "lib/test.jpg", - expectedPath: join("/root", "location", "test.jpg") + expectedPath: join("/root", "location", "test.jpg"), + extensions: defaultExtensionsWhenRunningInTsNode, }, { name: "should locate path that matches without star and exists", absoluteBaseUrl: "/root/", paths: { - "lib/foo": ["location/foo"] + "lib/foo": ["location/foo"], }, existingFiles: [join("/root", "location", "foo.ts")], requestedModule: "lib/foo", - expectedPath: removeExtension(join("/root", "location", "foo.ts")) + expectedPath: removeExtension(join("/root", "location", "foo.ts")), + extensions: defaultExtensionsWhenRunningInTsNode, }, { name: "should resolve to parent folder when filename is in subfolder", @@ -86,7 +98,8 @@ export const tests: ReadonlyArray = [ paths: { "lib/*": ["location/*"] }, existingFiles: [join("/root", "location", "mylib", "index.ts")], requestedModule: "lib/mylib", - expectedPath: dirname(join("/root", "location", "mylib", "index.ts")) + expectedPath: dirname(join("/root", "location", "mylib", "index.ts")), + extensions: defaultExtensionsWhenRunningInTsNode, }, { name: "should resolve from main field in package.json", @@ -95,9 +108,8 @@ export const tests: ReadonlyArray = [ existingFiles: [join("/root", "location", "mylib", "kalle.ts")], packageJson: { main: "./kalle.ts" }, requestedModule: "lib/mylib", - expectedPath: removeExtension( - join("/root", "location", "mylib", "kalle.ts") - ) + expectedPath: join("/root", "location", "mylib", "kalle.ts"), + extensions: defaultExtensionsWhenRunningInTsNode, }, { name: "should resolve from main field in package.json (js)", @@ -107,22 +119,7 @@ export const tests: ReadonlyArray = [ packageJson: { main: "./kalle.js" }, requestedModule: "lib/mylib.js", extensions: [".ts", ".js"], - expectedPath: removeExtension( - join("/root", "location", "mylib.js", "kalle.js") - ) - }, - { - name: - "should resolve from main field in package.json and correctly remove file extension", - absoluteBaseUrl: "/root/", - paths: { "lib/*": ["location/*"] }, - existingFiles: [join("/root", "location", "mylibjs", "kalle.js")], - packageJson: { main: "./kalle.js" }, - extensions: [".ts", ".js"], - requestedModule: "lib/mylibjs", - expectedPath: removeExtension( - join("/root", "location", "mylibjs", "kalle.js") - ) + expectedPath: join("/root", "location", "mylib.js", "kalle.js"), }, { name: "should resolve from list of fields by priority in package.json", @@ -132,13 +129,11 @@ export const tests: ReadonlyArray = [ packageJson: { main: "./main.js", browser: "./browser.js" }, existingFiles: [ join("/root", "location", "mylibjs", "main.js"), // mainFilePath - join("/root", "location", "mylibjs", "browser.js") // browserFilePath + join("/root", "location", "mylibjs", "browser.js"), // browserFilePath ], extensions: [".ts", ".js"], requestedModule: "lib/mylibjs", - expectedPath: removeExtension( - join("/root", "location", "mylibjs", "browser.js") - ) + expectedPath: join("/root", "location", "mylibjs", "browser.js"), }, { name: "should ignore field mappings to missing files in package.json", @@ -149,12 +144,10 @@ export const tests: ReadonlyArray = [ requestedModule: "lib/mylibjs", packageJson: { main: "./kalle.js", - browser: "./nope.js" + browser: "./nope.js", }, extensions: [".ts", ".js"], - expectedPath: removeExtension( - join("/root", "location", "mylibjs", "kalle.js") - ) + expectedPath: join("/root", "location", "mylibjs", "kalle.js"), }, { name: "should ignore advanced field mappings in package.json", @@ -162,17 +155,15 @@ export const tests: ReadonlyArray = [ paths: { "lib/*": ["location/*"] }, existingFiles: [ join("/root", "location", "mylibjs", "kalle.js"), - join("/root", "location", "mylibjs", "browser.js") + join("/root", "location", "mylibjs", "browser.js"), ], requestedModule: "lib/mylibjs", packageJson: { main: "./kalle.js", - browser: { mylibjs: "./browser.js", "./kalle.js": "./browser.js" } + browser: { mylibjs: "./browser.js", "./kalle.js": "./browser.js" }, }, extensions: [".ts", ".js"], - expectedPath: removeExtension( - join("/root", "location", "mylibjs", "kalle.js") - ) + expectedPath: join("/root", "location", "mylibjs", "kalle.js"), }, { name: "should resolve to with the help of baseUrl when not explicitly set", @@ -180,7 +171,8 @@ export const tests: ReadonlyArray = [ paths: {}, existingFiles: [join("/root", "mylib", "index.ts")], requestedModule: "mylib", - expectedPath: dirname(join("/root", "mylib", "index.ts")) + expectedPath: dirname(join("/root", "mylib", "index.ts")), + extensions: defaultExtensionsWhenRunningInTsNode, }, { name: "should not resolve with the help of baseUrl when asked not to", @@ -189,7 +181,8 @@ export const tests: ReadonlyArray = [ addMatchAll: false, existingFiles: [join("/root", "mylib", "index.ts")], requestedModule: "mylib", - expectedPath: undefined + expectedPath: undefined, + extensions: defaultExtensionsWhenRunningInTsNode, }, { name: "should not locate path that does not match", @@ -197,16 +190,30 @@ export const tests: ReadonlyArray = [ paths: { "lib/*": ["location/*"] }, existingFiles: [join("root", "location", "mylib")], requestedModule: "mylib", - expectedPath: undefined + expectedPath: undefined, + extensions: defaultExtensionsWhenRunningInTsNode, }, { name: "should not resolve typings file (index.d.ts)", absoluteBaseUrl: "/root/", paths: { - "lib/*": ["location/*"] + "lib/*": ["location/*"], }, existingFiles: [join("/root", "location", "mylib", "index.d.ts")], requestedModule: "lib/mylib", - expectedPath: undefined - } + expectedPath: undefined, + extensions: defaultExtensionsWhenRunningInTsNode, + }, + { + name: "should resolve main file with cjs file extension", + absoluteBaseUrl: "/root/", + paths: {}, + existingFiles: [join("/root", "mylib", "index.cjs")], + packageJson: { + main: "./index.cjs", + }, + requestedModule: "mylib", + expectedPath: join("/root", "mylib", "index.cjs"), + extensions: defaultExtensionsWhenRunningInTsNode, + }, ]; diff --git a/node_modules/tsconfig-paths/src/__tests__/filesystem.test.ts b/node_modules/tsconfig-paths/src/__tests__/filesystem.test.ts new file mode 100644 index 000000000..73585ce35 --- /dev/null +++ b/node_modules/tsconfig-paths/src/__tests__/filesystem.test.ts @@ -0,0 +1,65 @@ +import * as Filesystem from "../filesystem"; +import * as path from "path"; + +describe("filesystem", () => { + const fileThatExists = path.join(__dirname, "../../package.json"); + const fileThatNotExists = path.join(__dirname, "../../package2.json"); + + it("should find file that exists, sync", () => { + const result = Filesystem.fileExistsSync(fileThatExists); + // assert.equal(result, true); + expect(result).toBe(true); + }); + + it("should not find file that not exists, sync", () => { + const result = Filesystem.fileExistsSync(fileThatNotExists); + // assert.equal(result, false); + expect(result).toBe(false); + }); + + it("should find file that exists, async", (done) => { + Filesystem.fileExistsAsync(fileThatExists, (_err, result) => { + try { + // assert.equal(result, true); + expect(result).toBe(true); + done(); + } catch (error) { + done(error); + } + }); + }); + + it("should not find file that not exists, async", (done) => { + Filesystem.fileExistsAsync(fileThatNotExists, (_err, result) => { + try { + // assert.equal(result, false); + expect(result).toBe(false); + done(); + } catch (error) { + done(error); + } + }); + }); + + it("should load json, sync", () => { + const result = Filesystem.readJsonFromDiskSync(fileThatExists); + // assert.isOk(result); + expect(result); + // assert.equal(result.main, "lib/index.js"); + expect(result.main).toBe("lib/index.js"); + }); + + it("should load json, async", (done) => { + Filesystem.readJsonFromDiskAsync(fileThatExists, (_err, result) => { + try { + // assert.isOk(result); // Asserts that object is truthy. + expect(result).toBeTruthy(); + // assert.equal(result.main, "lib/index.js"); + expect(result.main).toBe("lib/index.js"); + done(); + } catch (error) { + done(error); + } + }); + }); +}); diff --git a/node_modules/tsconfig-paths/src/__tests__/mapping-entry.test.ts b/node_modules/tsconfig-paths/src/__tests__/mapping-entry.test.ts new file mode 100644 index 000000000..81f9ef874 --- /dev/null +++ b/node_modules/tsconfig-paths/src/__tests__/mapping-entry.test.ts @@ -0,0 +1,70 @@ +import { getAbsoluteMappingEntries } from "../mapping-entry"; +import { join } from "path"; + +describe("mapping-entry", () => { + it("should change to absolute paths and sort in longest prefix order", () => { + const result = getAbsoluteMappingEntries( + "/absolute/base/url", + { + "*": ["/foo1", "/foo2"], + "longest/pre/fix/*": ["/foo2/bar"], + "pre/fix/*": ["/foo3"], + }, + true + ); + // assert.deepEqual(result, [ + // { + // pattern: "longest/pre/fix/*", + // paths: [join("/absolute", "base", "url", "foo2", "bar")], + // }, + // { + // pattern: "pre/fix/*", + // paths: [join("/absolute", "base", "url", "foo3")], + // }, + // { + // pattern: "*", + // paths: [ + // join("/absolute", "base", "url", "foo1"), + // join("/absolute", "base", "url", "foo2"), + // ], + // }, + // ]); + expect(result).toEqual([ + { + pattern: "longest/pre/fix/*", + paths: [join("/absolute", "base", "url", "foo2", "bar")], + }, + { + pattern: "pre/fix/*", + paths: [join("/absolute", "base", "url", "foo3")], + }, + { + pattern: "*", + paths: [ + join("/absolute", "base", "url", "foo1"), + join("/absolute", "base", "url", "foo2"), + ], + }, + ]); + }); + + it("should should add a match-all pattern when requested", () => { + let result = getAbsoluteMappingEntries("/absolute/base/url", {}, true); + // assert.deepEqual(result, [ + // { + // pattern: "*", + // paths: [join("/absolute", "base", "url", "*")], + // }, + // ]); + expect(result).toEqual([ + { + pattern: "*", + paths: [join("/absolute", "base", "url", "*")], + }, + ]); + + result = getAbsoluteMappingEntries("/absolute/base/url", {}, false); + // assert.deepEqual(result, []); + expect(result).toEqual([]); + }); +}); diff --git a/node_modules/tsconfig-paths/test/match-path-async-tests.ts b/node_modules/tsconfig-paths/src/__tests__/match-path-async.test.ts similarity index 71% rename from node_modules/tsconfig-paths/test/match-path-async-tests.ts rename to node_modules/tsconfig-paths/src/__tests__/match-path-async.test.ts index e55bcc66e..259ead9fa 100644 --- a/node_modules/tsconfig-paths/test/match-path-async-tests.ts +++ b/node_modules/tsconfig-paths/src/__tests__/match-path-async.test.ts @@ -1,10 +1,9 @@ -import { assert } from "chai"; -import { createMatchPathAsync } from "../src/match-path-async"; +import { createMatchPathAsync } from "../match-path-async"; import * as Tests from "./data/match-path-data"; describe("match-path-async", () => { - Tests.tests.forEach(t => - it(t.name, done => { + Tests.tests.forEach((t) => + it(t.name, (done) => { const matchPath = createMatchPathAsync( t.absoluteBaseUrl, t.paths, @@ -18,7 +17,8 @@ describe("match-path-async", () => { callback(undefined, t.existingFiles.indexOf(path) !== -1), t.extensions, (_err, result) => { - assert.equal(result, t.expectedPath); + // assert.equal(result, t.expectedPath); + expect(result).toBe(t.expectedPath); done(); } ); diff --git a/node_modules/tsconfig-paths/test/match-path-sync-tests.ts b/node_modules/tsconfig-paths/src/__tests__/match-path-sync.test.ts similarity index 62% rename from node_modules/tsconfig-paths/test/match-path-sync-tests.ts rename to node_modules/tsconfig-paths/src/__tests__/match-path-sync.test.ts index 668bc4ad3..c925d74ff 100644 --- a/node_modules/tsconfig-paths/test/match-path-sync-tests.ts +++ b/node_modules/tsconfig-paths/src/__tests__/match-path-sync.test.ts @@ -1,9 +1,8 @@ -import { assert } from "chai"; -import { createMatchPath } from "../src/match-path-sync"; +import { createMatchPath } from "../match-path-sync"; import * as Tests from "./data/match-path-data"; describe("match-path-sync", () => { - Tests.tests.forEach(t => + Tests.tests.forEach((t) => it(t.name, () => { const matchPath = createMatchPath( t.absoluteBaseUrl, @@ -14,10 +13,11 @@ describe("match-path-sync", () => { const result = matchPath( t.requestedModule, (_: string) => t.packageJson, - (name: string) => t.existingFiles.indexOf(name) !== -1, // fileExists + (name: string) => t.existingFiles.indexOf(name) !== -1, t.extensions ); - assert.equal(result, t.expectedPath); + // assert.equal(result, t.expectedPath); + expect(result).toBe(t.expectedPath); }) ); }); diff --git a/node_modules/tsconfig-paths/src/__tests__/try-path.test.ts b/node_modules/tsconfig-paths/src/__tests__/try-path.test.ts new file mode 100644 index 000000000..deb69a060 --- /dev/null +++ b/node_modules/tsconfig-paths/src/__tests__/try-path.test.ts @@ -0,0 +1,193 @@ +import { getPathsToTry } from "../try-path"; +import { join } from "path"; + +describe("mapping-entry", () => { + const abosolutePathMappings = [ + { + pattern: "longest/pre/fix/*", + paths: [join("/absolute", "base", "url", "foo2", "bar")], + }, + { pattern: "pre/fix/*", paths: [join("/absolute", "base", "url", "foo3")] }, + { pattern: "*", paths: [join("/absolute", "base", "url", "foo1")] }, + ]; + const abosolutePathMappingsStarstWithSlash = [ + { + pattern: "/opt/*", + paths: [join("/absolute", "src", "aws-layer")], + }, + { + pattern: "*", + paths: [join("/absolute", "src")], + }, + ]; + it("should return no paths for relative requested module", () => { + const result = getPathsToTry( + [".ts", "tsx"], + abosolutePathMappings, + "./requested-module" + ); + // assert.deepEqual(result, undefined); + expect(result).toBeUndefined(); + }); + + it("should return no paths if no pattern match the requested module", () => { + const result = getPathsToTry( + [".ts", "tsx"], + [ + { + pattern: "longest/pre/fix/*", + paths: [join("/absolute", "base", "url", "foo2", "bar")], + }, + { + pattern: "pre/fix/*", + paths: [join("/absolute", "base", "url", "foo3")], + }, + ], + "requested-module" + ); + expect(result).toBeUndefined(); + }); + + it("should get all paths that matches requested module", () => { + const result = getPathsToTry( + [".ts", ".tsx"], + abosolutePathMappings, + "longest/pre/fix/requested-module" + ); + // assert.deepEqual(result, [ + // // "longest/pre/fix/*" + // { type: "file", path: join("/absolute", "base", "url", "foo2", "bar") }, + // { + // type: "extension", + // path: join("/absolute", "base", "url", "foo2", "bar.ts"), + // }, + // { + // type: "extension", + // path: join("/absolute", "base", "url", "foo2", "bar.tsx"), + // }, + // { + // type: "package", + // path: join("/absolute", "base", "url", "foo2", "bar", "package.json"), + // }, + // { + // type: "index", + // path: join("/absolute", "base", "url", "foo2", "bar", "index.ts"), + // }, + // { + // type: "index", + // path: join("/absolute", "base", "url", "foo2", "bar", "index.tsx"), + // }, + // // "*" + // { type: "file", path: join("/absolute", "base", "url", "foo1") }, + // { type: "extension", path: join("/absolute", "base", "url", "foo1.ts") }, + // { type: "extension", path: join("/absolute", "base", "url", "foo1.tsx") }, + // { + // type: "package", + // path: join("/absolute", "base", "url", "foo1", "package.json"), + // }, + // { + // type: "index", + // path: join("/absolute", "base", "url", "foo1", "index.ts"), + // }, + // { + // type: "index", + // path: join("/absolute", "base", "url", "foo1", "index.tsx"), + // }, + // ]); + expect(result).toEqual([ + // "longest/pre/fix/*" + { type: "file", path: join("/absolute", "base", "url", "foo2", "bar") }, + { + type: "extension", + path: join("/absolute", "base", "url", "foo2", "bar.ts"), + }, + { + type: "extension", + path: join("/absolute", "base", "url", "foo2", "bar.tsx"), + }, + { + type: "package", + path: join("/absolute", "base", "url", "foo2", "bar", "package.json"), + }, + { + type: "index", + path: join("/absolute", "base", "url", "foo2", "bar", "index.ts"), + }, + { + type: "index", + path: join("/absolute", "base", "url", "foo2", "bar", "index.tsx"), + }, + // "*" + { type: "file", path: join("/absolute", "base", "url", "foo1") }, + { type: "extension", path: join("/absolute", "base", "url", "foo1.ts") }, + { type: "extension", path: join("/absolute", "base", "url", "foo1.tsx") }, + { + type: "package", + path: join("/absolute", "base", "url", "foo1", "package.json"), + }, + { + type: "index", + path: join("/absolute", "base", "url", "foo1", "index.ts"), + }, + { + type: "index", + path: join("/absolute", "base", "url", "foo1", "index.tsx"), + }, + ]); + }); + + it("should resolve paths starting with a slash", () => { + const result = getPathsToTry( + [".ts"], + abosolutePathMappingsStarstWithSlash, + "/opt/utils" + ); + expect(result).toEqual([ + // "opt/*" + { + path: join("/absolute", "src", "aws-layer"), + type: "file", + }, + { + path: join("/absolute", "src", "aws-layer.ts"), + type: "extension", + }, + { + path: join("/absolute", "src", "aws-layer", "package.json"), + type: "package", + }, + { + path: join("/absolute", "src", "aws-layer", "index.ts"), + type: "index", + }, + // "*" + { + path: join("/absolute", "src"), + type: "file", + }, + { + path: join("/absolute", "src.ts"), + type: "extension", + }, + { + path: join("/absolute", "src", "package.json"), + type: "package", + }, + { + path: join("/absolute", "src", "index.ts"), + type: "index", + }, + ]); + }); +}); + +// describe("match-star", () => { +// it("should match star in last position", () => { +// const result = matchStar("lib/*", "lib/mylib"); +// assert.equal(result, "mylib"); +// }); +// it("should match star in first position", () => { +// const result = matchStar("*/lib", "mylib/lib"); +// assert.equal(result, "mylib"); +// }); +// }); diff --git a/node_modules/tsconfig-paths/test/tsconfig-loader-tests.ts b/node_modules/tsconfig-paths/src/__tests__/tsconfig-loader.test.ts similarity index 51% rename from node_modules/tsconfig-paths/test/tsconfig-loader-tests.ts rename to node_modules/tsconfig-paths/src/__tests__/tsconfig-loader.test.ts index 002bcb402..7394482cf 100644 --- a/node_modules/tsconfig-paths/test/tsconfig-loader-tests.ts +++ b/node_modules/tsconfig-paths/src/__tests__/tsconfig-loader.test.ts @@ -1,9 +1,8 @@ -import { assert } from "chai"; import { loadTsconfig, tsConfigLoader, - walkForTsConfig -} from "../src/tsconfig-loader"; + walkForTsConfig, +} from "../tsconfig-loader"; import { join } from "path"; describe("tsconfig-loader", () => { @@ -15,12 +14,13 @@ describe("tsconfig-loader", () => { return { tsConfigPath: `${cwd}/tsconfig.json`, baseUrl: "./", - paths: {} + paths: {}, }; - } + }, }); - assert.equal(result.tsConfigPath, "/foo/bar/tsconfig.json"); + // assert.equal(result.tsConfigPath, "/foo/bar/tsconfig.json"); + expect(result.tsConfigPath).toBe("/foo/bar/tsconfig.json"); }); it("should return loaderResult.tsConfigPath as undefined when not found", () => { @@ -31,12 +31,13 @@ describe("tsconfig-loader", () => { return { tsConfigPath: undefined, baseUrl: "./", - paths: {} + paths: {}, }; - } + }, }); - assert.isUndefined(result.tsConfigPath); + // assert.isUndefined(result.tsConfigPath); + expect(result.tsConfigPath).toBeUndefined(); }); it("should use TS_NODE_PROJECT env if exists", () => { @@ -49,19 +50,57 @@ describe("tsconfig-loader", () => { return { tsConfigPath: "/foo/baz/tsconfig.json", baseUrl: "./", - paths: {} + paths: {}, }; } return { tsConfigPath: undefined, baseUrl: "./", - paths: {} + paths: {}, }; - } + }, + }); + + // assert.equal(result.tsConfigPath, "/foo/baz/tsconfig.json"); + expect(result.tsConfigPath).toBe("/foo/baz/tsconfig.json"); + }); + + it("should use TS_NODE_BASEURL env if exists", () => { + const result = tsConfigLoader({ + cwd: "/foo/bar", + getEnv: (key: string) => + key === "TS_NODE_BASEURL" ? "SOME_BASEURL" : undefined, + loadSync: (_0: string, _1: string, baseUrl: string) => { + return { + tsConfigPath: undefined, + baseUrl, + paths: {}, + }; + }, }); - assert.equal(result.tsConfigPath, "/foo/baz/tsconfig.json"); + // assert.equal(result.baseUrl, "SOME_BASEURL"); + expect(result.baseUrl).toBe("SOME_BASEURL"); + }); + + it("should not use TS_NODE_BASEURL env if it does not exist", () => { + const result = tsConfigLoader({ + cwd: "/foo/bar", + getEnv: (_: string) => { + return undefined; + }, + loadSync: (_0: string, _1: string, baseUrl: string) => { + return { + tsConfigPath: undefined, + baseUrl, + paths: {}, + }; + }, + }); + + // assert.equal(result.baseUrl, undefined); + expect(result.baseUrl).toBeUndefined(); }); }); @@ -70,23 +109,26 @@ describe("walkForTsConfig", () => { const pathToTsconfig = join("/root", "dir1", "tsconfig.json"); const res = walkForTsConfig( join("/root", "dir1"), - path => path === pathToTsconfig + (path) => path === pathToTsconfig ); - assert.equal(res, pathToTsconfig); + // assert.equal(res, pathToTsconfig); + expect(res).toBe(pathToTsconfig); }); it("should find tsconfig in parent directory", () => { const pathToTsconfig = join("/root", "tsconfig.json"); const res = walkForTsConfig( join("/root", "dir1"), - path => path === pathToTsconfig + (path) => path === pathToTsconfig ); - assert.equal(res, pathToTsconfig); + // assert.equal(res, pathToTsconfig); + expect(res).toBe(pathToTsconfig); }); it("should return undefined when reaching the top", () => { const res = walkForTsConfig(join("/root", "dir1", "kalle"), () => false); - assert.equal(res, undefined); + // assert.equal(res, undefined); + expect(res).toBeUndefined(); }); }); @@ -95,59 +137,62 @@ describe("loadConfig", () => { const config = { compilerOptions: { baseUrl: "hej" } }; const res = loadTsconfig( "/root/dir1/tsconfig.json", - path => path === "/root/dir1/tsconfig.json", - _ => JSON.stringify(config) + (path) => path === "/root/dir1/tsconfig.json", + (_) => JSON.stringify(config) ); - assert.deepEqual(res, config); + // assert.deepEqual(res, config); + expect(res).toStrictEqual(config); }); it("It should load a config with comments", () => { const config = { compilerOptions: { baseUrl: "hej" } }; const res = loadTsconfig( "/root/dir1/tsconfig.json", - path => path === "/root/dir1/tsconfig.json", - _ => `{ + (path) => path === "/root/dir1/tsconfig.json", + (_) => `{ // my comment "compilerOptions": { "baseUrl": "hej" } }` ); - assert.deepEqual(res, config); + // assert.deepEqual(res, config); + expect(res).toStrictEqual(config); }); it("It should load a config with trailing commas", () => { const config = { compilerOptions: { baseUrl: "hej" } }; const res = loadTsconfig( "/root/dir1/tsconfig.json", - path => path === "/root/dir1/tsconfig.json", - _ => `{ + (path) => path === "/root/dir1/tsconfig.json", + (_) => `{ "compilerOptions": { "baseUrl": "hej", }, }` ); - assert.deepEqual(res, config); + // assert.deepEqual(res, config); + expect(res).toStrictEqual(config); }); it("It should load a config with extends and overwrite all options", () => { const firstConfig = { extends: "../base-config.json", - compilerOptions: { baseUrl: "kalle", paths: { foo: ["bar2"] } } + compilerOptions: { baseUrl: "kalle", paths: { foo: ["bar2"] } }, }; const firstConfigPath = join("/root", "dir1", "tsconfig.json"); const baseConfig = { compilerOptions: { baseUrl: "olle", paths: { foo: ["bar1"] }, - strict: true - } + strict: true, + }, }; const baseConfigPath = join("/root", "base-config.json"); const res = loadTsconfig( join("/root", "dir1", "tsconfig.json"), - path => path === firstConfigPath || path === baseConfigPath, - path => { + (path) => path === firstConfigPath || path === baseConfigPath, + (path) => { if (path === firstConfigPath) { return JSON.stringify(firstConfig); } @@ -158,13 +203,73 @@ describe("loadConfig", () => { } ); - assert.deepEqual(res, { + // assert.deepEqual(res, { + // extends: "../base-config.json", + // compilerOptions: { + // baseUrl: "kalle", + // paths: { foo: ["bar2"] }, + // strict: true, + // }, + // }); + expect(res).toEqual({ extends: "../base-config.json", compilerOptions: { baseUrl: "kalle", paths: { foo: ["bar2"] }, - strict: true + strict: true, + }, + }); + }); + + it("It should load a config with extends from node_modules and overwrite all options", () => { + const firstConfig = { + extends: "my-package/base-config.json", + compilerOptions: { baseUrl: "kalle", paths: { foo: ["bar2"] } }, + }; + const firstConfigPath = join("/root", "dir1", "tsconfig.json"); + const baseConfig = { + compilerOptions: { + baseUrl: "olle", + paths: { foo: ["bar1"] }, + strict: true, + }, + }; + const baseConfigPath = join( + "/root", + "dir1", + "node_modules", + "my-package", + "base-config.json" + ); + const res = loadTsconfig( + join("/root", "dir1", "tsconfig.json"), + (path) => path === firstConfigPath || path === baseConfigPath, + (path) => { + if (path === firstConfigPath) { + return JSON.stringify(firstConfig); + } + if (path === baseConfigPath) { + return JSON.stringify(baseConfig); + } + return ""; } + ); + + // assert.deepEqual(res, { + // extends: "my-package/base-config.json", + // compilerOptions: { + // baseUrl: "kalle", + // paths: { foo: ["bar2"] }, + // strict: true, + // }, + // }); + expect(res).toEqual({ + extends: "my-package/base-config.json", + compilerOptions: { + baseUrl: "kalle", + paths: { foo: ["bar2"] }, + strict: true, + }, }); }); @@ -177,11 +282,11 @@ describe("loadConfig", () => { const thirdConfigPath = join("/root", "dir1", "dir2", "third-config.json"); const res = loadTsconfig( join("/root", "dir1", "dir2", "third-config.json"), - path => + (path) => path === firstConfigPath || path === secondConfigPath || path === thirdConfigPath, - path => { + (path) => { if (path === firstConfigPath) { return JSON.stringify(firstConfig); } @@ -195,9 +300,13 @@ describe("loadConfig", () => { } ); - assert.deepEqual(res, { + // assert.deepEqual(res, { + // extends: "../second-config.json", + // compilerOptions: { baseUrl: join("..", "..") }, + // }); + expect(res).toEqual({ extends: "../second-config.json", - compilerOptions: { baseUrl: join("..", "..") } + compilerOptions: { baseUrl: join("..", "..") }, }); }); }); diff --git a/node_modules/tsconfig-paths/test/tsconfig-named.json b/node_modules/tsconfig-paths/src/__tests__/tsconfig-named.json similarity index 100% rename from node_modules/tsconfig-paths/test/tsconfig-named.json rename to node_modules/tsconfig-paths/src/__tests__/tsconfig-named.json diff --git a/node_modules/tsconfig-paths/src/config-loader.ts b/node_modules/tsconfig-paths/src/config-loader.ts new file mode 100644 index 000000000..3e1b17adc --- /dev/null +++ b/node_modules/tsconfig-paths/src/config-loader.ts @@ -0,0 +1,97 @@ +import * as TsConfigLoader2 from "./tsconfig-loader"; +import * as path from "path"; +import { options } from "./options"; + +export interface ExplicitParams { + baseUrl: string; + paths: { [key: string]: Array }; + mainFields?: Array; + addMatchAll?: boolean; +} + +export type TsConfigLoader = ( + params: TsConfigLoader2.TsConfigLoaderParams +) => TsConfigLoader2.TsConfigLoaderResult; + +export interface ConfigLoaderParams { + cwd: string; + explicitParams?: ExplicitParams; + tsConfigLoader?: TsConfigLoader; +} + +export interface ConfigLoaderSuccessResult { + resultType: "success"; + configFileAbsolutePath: string; + baseUrl: string; + absoluteBaseUrl: string; + paths: { [key: string]: Array }; + mainFields?: Array; + addMatchAll?: boolean; +} + +export interface ConfigLoaderFailResult { + resultType: "failed"; + message: string; +} + +export type ConfigLoaderResult = + | ConfigLoaderSuccessResult + | ConfigLoaderFailResult; + +export function loadConfig(cwd: string = options.cwd): ConfigLoaderResult { + return configLoader({ cwd: cwd }); +} + +export function configLoader({ + cwd, + explicitParams, + tsConfigLoader = TsConfigLoader2.tsConfigLoader, +}: ConfigLoaderParams): ConfigLoaderResult { + if (explicitParams) { + // tslint:disable-next-line:no-shadowed-variable + const absoluteBaseUrl = path.isAbsolute(explicitParams.baseUrl) + ? explicitParams.baseUrl + : path.join(cwd, explicitParams.baseUrl); + + return { + resultType: "success", + configFileAbsolutePath: "", + baseUrl: explicitParams.baseUrl, + absoluteBaseUrl, + paths: explicitParams.paths, + mainFields: explicitParams.mainFields, + addMatchAll: explicitParams.addMatchAll, + }; + } + + // Load tsconfig and create path matching function + const loadResult = tsConfigLoader({ + cwd, + getEnv: (key: string) => process.env[key], + }); + + if (!loadResult.tsConfigPath) { + return { + resultType: "failed", + message: "Couldn't find tsconfig.json", + }; + } + + if (!loadResult.baseUrl) { + return { + resultType: "failed", + message: "Missing baseUrl in compilerOptions", + }; + } + + const tsConfigDir = path.dirname(loadResult.tsConfigPath); + const absoluteBaseUrl = path.join(tsConfigDir, loadResult.baseUrl); + + return { + resultType: "success", + configFileAbsolutePath: loadResult.tsConfigPath, + baseUrl: loadResult.baseUrl, + absoluteBaseUrl, + paths: loadResult.paths || {}, + }; +} diff --git a/node_modules/tsconfig-paths/src/filesystem.ts b/node_modules/tsconfig-paths/src/filesystem.ts new file mode 100644 index 000000000..a6773a74f --- /dev/null +++ b/node_modules/tsconfig-paths/src/filesystem.ts @@ -0,0 +1,87 @@ +import * as fs from "fs"; + +/** + * Typing for the fields of package.json we care about + */ +export interface PackageJson { + [key: string]: string; +} + +/** + * A function that json from a file + */ +export interface ReadJsonSync { + // tslint:disable-next-line:no-any + (packageJsonPath: string): any | undefined; +} + +export interface FileExistsSync { + (name: string): boolean; +} + +export interface FileExistsAsync { + (path: string, callback: (err?: Error, exists?: boolean) => void): void; +} + +export interface ReadJsonAsyncCallback { + // tslint:disable-next-line:no-any + (err?: Error, content?: any): void; +} + +export interface ReadJsonAsync { + (path: string, callback: ReadJsonAsyncCallback): void; +} + +export function fileExistsSync(path: string): boolean { + try { + const stats = fs.statSync(path); + return stats.isFile(); + } catch (err) { + // If error, assume file did not exist + return false; + } +} + +/** + * Reads package.json from disk + * @param file Path to package.json + */ +// tslint:disable-next-line:no-any +export function readJsonFromDiskSync(packageJsonPath: string): any | undefined { + if (!fs.existsSync(packageJsonPath)) { + return undefined; + } + return require(packageJsonPath); +} + +export function readJsonFromDiskAsync( + path: string, + // tslint:disable-next-line:no-any + callback: (err?: Error, content?: any) => void +): void { + fs.readFile(path, "utf8", (err, result) => { + // If error, assume file did not exist + if (err || !result) { + return callback(); + } + const json = JSON.parse(result); + return callback(undefined, json); + }); +} + +export function fileExistsAsync( + path2: string, + callback2: (err?: Error, exists?: boolean) => void +): void { + fs.stat(path2, (err: Error, stats: fs.Stats) => { + if (err) { + // If error assume file does not exist + return callback2(undefined, false); + } + callback2(undefined, stats ? stats.isFile() : false); + }); +} + +export function removeExtension(path: string): string { + return path.substring(0, path.lastIndexOf(".")) || path; +} diff --git a/node_modules/tsconfig-paths/src/index.ts b/node_modules/tsconfig-paths/src/index.ts new file mode 100644 index 000000000..650f1852f --- /dev/null +++ b/node_modules/tsconfig-paths/src/index.ts @@ -0,0 +1,24 @@ +// register is used from register.js in root dir +export { + createMatchPath, + matchFromAbsolutePaths, + MatchPath, +} from "./match-path-sync"; +export { + createMatchPathAsync, + matchFromAbsolutePathsAsync, + MatchPathAsync, +} from "./match-path-async"; +export { register } from "./register"; +export { + loadConfig, + ConfigLoaderResult, + ConfigLoaderSuccessResult, + ConfigLoaderFailResult, +} from "./config-loader"; +export { + ReadJsonSync, + ReadJsonAsync, + FileExistsSync, + FileExistsAsync, +} from "./filesystem"; diff --git a/node_modules/tsconfig-paths/src/mapping-entry.ts b/node_modules/tsconfig-paths/src/mapping-entry.ts new file mode 100644 index 000000000..5d900b3f4 --- /dev/null +++ b/node_modules/tsconfig-paths/src/mapping-entry.ts @@ -0,0 +1,64 @@ +import * as path from "path"; + +export interface MappingEntry { + readonly pattern: string; + readonly paths: ReadonlyArray; +} + +export interface Paths { + readonly [key: string]: ReadonlyArray; +} + +/** + * Converts an absolute baseUrl and paths to an array of absolute mapping entries. + * The array is sorted by longest prefix. + * Having an array with entries allows us to keep a sorting order rather than + * sort by keys each time we use the mappings. + * @param absoluteBaseUrl + * @param paths + * @param addMatchAll + */ +export function getAbsoluteMappingEntries( + absoluteBaseUrl: string, + paths: Paths, + addMatchAll: boolean +): ReadonlyArray { + // Resolve all paths to absolute form once here, and sort them by + // longest prefix once here, this saves time on each request later. + // We need to put them in an array to preserve the sorting order. + const sortedKeys = sortByLongestPrefix(Object.keys(paths)); + const absolutePaths: Array = []; + for (const key of sortedKeys) { + absolutePaths.push({ + pattern: key, + paths: paths[key].map((pathToResolve) => + path.join(absoluteBaseUrl, pathToResolve) + ), + }); + } + // If there is no match-all path specified in the paths section of tsconfig, then try to match + // all paths relative to baseUrl, this is how typescript works. + if (!paths["*"] && addMatchAll) { + absolutePaths.push({ + pattern: "*", + paths: [`${absoluteBaseUrl.replace(/\/$/, "")}/*`], + }); + } + + return absolutePaths; +} + +/** + * Sort path patterns. + * If a module name can be matched with multiple patterns then pattern with the longest prefix will be picked. + */ +function sortByLongestPrefix(arr: Array): Array { + return arr + .concat() + .sort((a: string, b: string) => getPrefixLength(b) - getPrefixLength(a)); +} + +function getPrefixLength(pattern: string): number { + const prefixLength = pattern.indexOf("*"); + return pattern.substr(0, prefixLength).length; +} diff --git a/node_modules/tsconfig-paths/src/match-path-async.ts b/node_modules/tsconfig-paths/src/match-path-async.ts new file mode 100644 index 000000000..9673f2a21 --- /dev/null +++ b/node_modules/tsconfig-paths/src/match-path-async.ts @@ -0,0 +1,218 @@ +import * as path from "path"; +import * as TryPath from "./try-path"; +import * as MappingEntry from "./mapping-entry"; +import * as Filesystem from "./filesystem"; + +/** + * Function that can match a path async + */ +export interface MatchPathAsync { + ( + requestedModule: string, + readJson: Filesystem.ReadJsonAsync | undefined, + fileExists: Filesystem.FileExistsAsync | undefined, + extensions: ReadonlyArray | undefined, + callback: MatchPathAsyncCallback + ): void; +} + +export interface MatchPathAsyncCallback { + (err?: Error, path?: string): void; +} + +/** + * See the sync version for docs. + */ +export function createMatchPathAsync( + absoluteBaseUrl: string, + paths: { [key: string]: Array }, + mainFields: string[] = ["main"], + addMatchAll: boolean = true +): MatchPathAsync { + const absolutePaths = MappingEntry.getAbsoluteMappingEntries( + absoluteBaseUrl, + paths, + addMatchAll + ); + + return ( + requestedModule: string, + readJson: Filesystem.ReadJsonAsync | undefined, + fileExists: Filesystem.FileExistsAsync | undefined, + extensions: ReadonlyArray | undefined, + callback: MatchPathAsyncCallback + ) => + matchFromAbsolutePathsAsync( + absolutePaths, + requestedModule, + readJson, + fileExists, + extensions, + callback, + mainFields + ); +} + +/** + * See the sync version for docs. + */ +export function matchFromAbsolutePathsAsync( + absolutePathMappings: ReadonlyArray, + requestedModule: string, + readJson: Filesystem.ReadJsonAsync = Filesystem.readJsonFromDiskAsync, + fileExists: Filesystem.FileExistsAsync = Filesystem.fileExistsAsync, + extensions: ReadonlyArray = Object.keys(require.extensions), + callback: MatchPathAsyncCallback, + mainFields: string[] = ["main"] +): void { + const tryPaths = TryPath.getPathsToTry( + extensions, + absolutePathMappings, + requestedModule + ); + + if (!tryPaths) { + return callback(); + } + + findFirstExistingPath( + tryPaths, + readJson, + fileExists, + callback, + 0, + mainFields + ); +} + +function findFirstExistingMainFieldMappedFile( + packageJson: Filesystem.PackageJson, + mainFields: string[], + packageJsonPath: string, + fileExistsAsync: Filesystem.FileExistsAsync, + doneCallback: (err?: Error, filepath?: string) => void, + index: number = 0 +): void { + if (index >= mainFields.length) { + return doneCallback(undefined, undefined); + } + + const tryNext = () => + findFirstExistingMainFieldMappedFile( + packageJson, + mainFields, + packageJsonPath, + fileExistsAsync, + doneCallback, + index + 1 + ); + + const mainFieldMapping = packageJson[mainFields[index]]; + if (typeof mainFieldMapping !== "string") { + // Skip mappings that are not pointers to replacement files + return tryNext(); + } + + const mappedFilePath = path.join( + path.dirname(packageJsonPath), + mainFieldMapping + ); + fileExistsAsync(mappedFilePath, (err?: Error, exists?: boolean) => { + if (err) { + return doneCallback(err); + } + if (exists) { + return doneCallback(undefined, mappedFilePath); + } + return tryNext(); + }); +} + +// Recursive loop to probe for physical files +function findFirstExistingPath( + tryPaths: ReadonlyArray, + readJson: Filesystem.ReadJsonAsync, + fileExists: Filesystem.FileExistsAsync, + doneCallback: MatchPathAsyncCallback, + index: number = 0, + mainFields: string[] = ["main"] +): void { + const tryPath = tryPaths[index]; + if ( + tryPath.type === "file" || + tryPath.type === "extension" || + tryPath.type === "index" + ) { + fileExists(tryPath.path, (err: Error, exists: boolean) => { + if (err) { + return doneCallback(err); + } + if (exists) { + return doneCallback(undefined, TryPath.getStrippedPath(tryPath)); + } + if (index === tryPaths.length - 1) { + return doneCallback(); + } + // Continue with the next path + return findFirstExistingPath( + tryPaths, + readJson, + fileExists, + doneCallback, + index + 1, + mainFields + ); + }); + } else if (tryPath.type === "package") { + readJson(tryPath.path, (err, packageJson) => { + if (err) { + return doneCallback(err); + } + if (packageJson) { + return findFirstExistingMainFieldMappedFile( + packageJson, + mainFields, + tryPath.path, + fileExists, + (mainFieldErr?: Error, mainFieldMappedFile?: string) => { + if (mainFieldErr) { + return doneCallback(mainFieldErr); + } + if (mainFieldMappedFile) { + return doneCallback(undefined, mainFieldMappedFile); + } + + // No field in package json was a valid option. Continue with the next path. + return findFirstExistingPath( + tryPaths, + readJson, + fileExists, + doneCallback, + index + 1, + mainFields + ); + } + ); + } + + // This is async code, we need to return unconditionally, otherwise the code still falls + // through and keeps recursing. While this might work in general, libraries that use neo-async + // like Webpack will actually not allow you to call the same callback twice. + // + // An example of where this caused issues: + // https://github.com/dividab/tsconfig-paths-webpack-plugin/issues/11 + // + // Continue with the next path + return findFirstExistingPath( + tryPaths, + readJson, + fileExists, + doneCallback, + index + 1, + mainFields + ); + }); + } else { + TryPath.exhaustiveTypeException(tryPath.type); + } +} diff --git a/node_modules/tsconfig-paths/src/match-path-sync.ts b/node_modules/tsconfig-paths/src/match-path-sync.ts new file mode 100644 index 000000000..953c8a67f --- /dev/null +++ b/node_modules/tsconfig-paths/src/match-path-sync.ts @@ -0,0 +1,141 @@ +import * as path from "path"; +import * as Filesystem from "./filesystem"; +import * as MappingEntry from "./mapping-entry"; +import * as TryPath from "./try-path"; + +/** + * Function that can match a path + */ +export interface MatchPath { + ( + requestedModule: string, + readJson?: Filesystem.ReadJsonSync, + fileExists?: (name: string) => boolean, + extensions?: ReadonlyArray + ): string | undefined; +} + +/** + * Creates a function that can resolve paths according to tsconfig paths property. + * @param absoluteBaseUrl Absolute version of baseUrl as specified in tsconfig. + * @param paths The paths as specified in tsconfig. + * @param mainFields A list of package.json field names to try when resolving module files. + * @param addMatchAll Add a match-all "*" rule if none is present + * @returns a function that can resolve paths. + */ +export function createMatchPath( + absoluteBaseUrl: string, + paths: { [key: string]: Array }, + mainFields: string[] = ["main"], + addMatchAll: boolean = true +): MatchPath { + const absolutePaths = MappingEntry.getAbsoluteMappingEntries( + absoluteBaseUrl, + paths, + addMatchAll + ); + + return ( + requestedModule: string, + readJson?: Filesystem.ReadJsonSync, + fileExists?: Filesystem.FileExistsSync, + extensions?: Array + ) => + matchFromAbsolutePaths( + absolutePaths, + requestedModule, + readJson, + fileExists, + extensions, + mainFields + ); +} + +/** + * Finds a path from tsconfig that matches a module load request. + * @param absolutePathMappings The paths to try as specified in tsconfig but resolved to absolute form. + * @param requestedModule The required module name. + * @param readJson Function that can read json from a path (useful for testing). + * @param fileExists Function that checks for existence of a file at a path (useful for testing). + * @param extensions File extensions to probe for (useful for testing). + * @param mainFields A list of package.json field names to try when resolving module files. + * @returns the found path, or undefined if no path was found. + */ +export function matchFromAbsolutePaths( + absolutePathMappings: ReadonlyArray, + requestedModule: string, + readJson: Filesystem.ReadJsonSync = Filesystem.readJsonFromDiskSync, + fileExists: Filesystem.FileExistsSync = Filesystem.fileExistsSync, + extensions: Array = Object.keys(require.extensions), + mainFields: string[] = ["main"] +): string | undefined { + const tryPaths = TryPath.getPathsToTry( + extensions, + absolutePathMappings, + requestedModule + ); + + if (!tryPaths) { + return undefined; + } + + return findFirstExistingPath(tryPaths, readJson, fileExists, mainFields); +} + +function findFirstExistingMainFieldMappedFile( + packageJson: Filesystem.PackageJson, + mainFields: string[], + packageJsonPath: string, + fileExists: Filesystem.FileExistsSync +): string | undefined { + for (let index = 0; index < mainFields.length; index++) { + const mainFieldName = mainFields[index]; + const candidateMapping = packageJson[mainFieldName]; + if (candidateMapping && typeof candidateMapping === "string") { + const candidateFilePath = path.join( + path.dirname(packageJsonPath), + candidateMapping + ); + if (fileExists(candidateFilePath)) { + return candidateFilePath; + } + } + } + + return undefined; +} + +function findFirstExistingPath( + tryPaths: ReadonlyArray, + readJson: Filesystem.ReadJsonSync = Filesystem.readJsonFromDiskSync, + fileExists: Filesystem.FileExistsSync, + mainFields: string[] = ["main"] +): string | undefined { + for (const tryPath of tryPaths) { + if ( + tryPath.type === "file" || + tryPath.type === "extension" || + tryPath.type === "index" + ) { + if (fileExists(tryPath.path)) { + return TryPath.getStrippedPath(tryPath); + } + } else if (tryPath.type === "package") { + const packageJson: Filesystem.PackageJson = readJson(tryPath.path); + if (packageJson) { + const mainFieldMappedFile = findFirstExistingMainFieldMappedFile( + packageJson, + mainFields, + tryPath.path, + fileExists + ); + if (mainFieldMappedFile) { + return mainFieldMappedFile; + } + } + } else { + TryPath.exhaustiveTypeException(tryPath.type); + } + } + return undefined; +} diff --git a/node_modules/tsconfig-paths/src/options.ts b/node_modules/tsconfig-paths/src/options.ts new file mode 100644 index 000000000..9733f0ad9 --- /dev/null +++ b/node_modules/tsconfig-paths/src/options.ts @@ -0,0 +1,18 @@ +import * as minimist from "minimist"; + +const argv = minimist(process.argv.slice(2), { + string: ["project"], + alias: { + project: ["P"], + }, +}); + +const project = argv && argv.project; + +export interface Options { + cwd: string; +} + +export const options: Options = { + cwd: project || process.cwd(), +}; diff --git a/node_modules/tsconfig-paths/src/register.ts b/node_modules/tsconfig-paths/src/register.ts new file mode 100644 index 000000000..715e2562e --- /dev/null +++ b/node_modules/tsconfig-paths/src/register.ts @@ -0,0 +1,97 @@ +import { createMatchPath } from "./match-path-sync"; +import { configLoader, ExplicitParams } from "./config-loader"; +import { options } from "./options"; + +const noOp = (): void => void 0; + +function getCoreModules( + builtinModules: string[] | undefined +): { [key: string]: boolean } { + builtinModules = builtinModules || [ + "assert", + "buffer", + "child_process", + "cluster", + "crypto", + "dgram", + "dns", + "domain", + "events", + "fs", + "http", + "https", + "net", + "os", + "path", + "punycode", + "querystring", + "readline", + "stream", + "string_decoder", + "tls", + "tty", + "url", + "util", + "v8", + "vm", + "zlib", + ]; + + const coreModules: { [key: string]: boolean } = {}; + for (let module of builtinModules) { + coreModules[module] = true; + } + + return coreModules; +} + +/** + * Installs a custom module load function that can adhere to paths in tsconfig. + * Returns a function to undo paths registration. + */ +export function register(explicitParams: ExplicitParams): () => void { + const configLoaderResult = configLoader({ + cwd: options.cwd, + explicitParams, + }); + + if (configLoaderResult.resultType === "failed") { + console.warn( + `${configLoaderResult.message}. tsconfig-paths will be skipped` + ); + + return noOp; + } + + const matchPath = createMatchPath( + configLoaderResult.absoluteBaseUrl, + configLoaderResult.paths, + configLoaderResult.mainFields, + configLoaderResult.addMatchAll + ); + + // Patch node's module loading + // tslint:disable-next-line:no-require-imports variable-name + const Module = require("module"); + const originalResolveFilename = Module._resolveFilename; + const coreModules = getCoreModules(Module.builtinModules); + // tslint:disable-next-line:no-any + Module._resolveFilename = function (request: string, _parent: any): string { + const isCoreModule = coreModules.hasOwnProperty(request); + if (!isCoreModule) { + const found = matchPath(request); + if (found) { + const modifiedArguments = [found, ...[].slice.call(arguments, 1)]; // Passes all arguments. Even those that is not specified above. + // tslint:disable-next-line:no-invalid-this + return originalResolveFilename.apply(this, modifiedArguments); + } + } + // tslint:disable-next-line:no-invalid-this + return originalResolveFilename.apply(this, arguments); + }; + + return () => { + // Return node's module loading to original state. + Module._resolveFilename = originalResolveFilename; + }; +} diff --git a/node_modules/tsconfig-paths/src/try-path.ts b/node_modules/tsconfig-paths/src/try-path.ts new file mode 100644 index 000000000..f7ebede0e --- /dev/null +++ b/node_modules/tsconfig-paths/src/try-path.ts @@ -0,0 +1,102 @@ +import * as path from "path"; +import { MappingEntry } from "./mapping-entry"; +import { dirname } from "path"; +import { removeExtension } from "./filesystem"; + +export interface TryPath { + readonly type: "file" | "extension" | "index" | "package"; + readonly path: string; +} + +/** + * Builds a list of all physical paths to try by: + * 1. Check for file named exactly as request. + * 2. Check for files named as request ending in any of the extensions. + * 3. Check for file specified in package.json's main property. + * 4. Check for files named as request ending in "index" with any of the extensions. + */ +export function getPathsToTry( + extensions: ReadonlyArray, + absolutePathMappings: ReadonlyArray, + requestedModule: string +): ReadonlyArray | undefined { + if (!absolutePathMappings || !requestedModule || requestedModule[0] === ".") { + return undefined; + } + + const pathsToTry: Array = []; + for (const entry of absolutePathMappings) { + const starMatch = + entry.pattern === requestedModule + ? "" + : matchStar(entry.pattern, requestedModule); + if (starMatch !== undefined) { + for (const physicalPathPattern of entry.paths) { + const physicalPath = physicalPathPattern.replace("*", starMatch); + pathsToTry.push({ type: "file", path: physicalPath }); + pathsToTry.push( + ...extensions.map( + (e) => ({ type: "extension", path: physicalPath + e } as TryPath) + ) + ); + pathsToTry.push({ + type: "package", + path: path.join(physicalPath, "/package.json"), + }); + const indexPath = path.join(physicalPath, "/index"); + pathsToTry.push( + ...extensions.map( + (e) => ({ type: "index", path: indexPath + e } as TryPath) + ) + ); + } + } + } + return pathsToTry.length === 0 ? undefined : pathsToTry; +} + +// Not sure why we don't just return the full found path? +export function getStrippedPath(tryPath: TryPath): string { + return tryPath.type === "index" + ? dirname(tryPath.path) + : tryPath.type === "file" + ? tryPath.path + : tryPath.type === "extension" + ? removeExtension(tryPath.path) + : tryPath.type === "package" + ? tryPath.path + : exhaustiveTypeException(tryPath.type); +} + +export function exhaustiveTypeException(check: never): never { + throw new Error(`Unknown type ${check}`); +} + +/** + * Matches pattern with a single star against search. + * Star must match at least one character to be considered a match. + * @param patttern for example "foo*" + * @param search for example "fooawesomebar" + * @returns the part of search that * matches, or undefined if no match. + */ +function matchStar(pattern: string, search: string): string | undefined { + if (search.length < pattern.length) { + return undefined; + } + if (pattern === "*") { + return search; + } + const star = pattern.indexOf("*"); + if (star === -1) { + return undefined; + } + const part1 = pattern.substring(0, star); + const part2 = pattern.substring(star + 1); + if (search.substr(0, star) !== part1) { + return undefined; + } + if (search.substr(search.length - part2.length) !== part2) { + return undefined; + } + return search.substr(star, search.length - part2.length); +} diff --git a/node_modules/tsconfig-paths/src/tsconfig-loader.ts b/node_modules/tsconfig-paths/src/tsconfig-loader.ts new file mode 100644 index 000000000..c2dfb04a5 --- /dev/null +++ b/node_modules/tsconfig-paths/src/tsconfig-loader.ts @@ -0,0 +1,172 @@ +import * as path from "path"; +import * as fs from "fs"; +// tslint:disable:no-require-imports +import JSON5 = require("json5"); +import StripBom = require("strip-bom"); +// tslint:enable:no-require-imports + +/** + * Typing for the parts of tsconfig that we care about + */ +export interface Tsconfig { + extends?: string; + compilerOptions?: { + baseUrl?: string; + paths?: { [key: string]: Array }; + strict?: boolean; + }; +} + +export interface TsConfigLoaderResult { + tsConfigPath: string | undefined; + baseUrl: string | undefined; + paths: { [key: string]: Array } | undefined; +} + +export interface TsConfigLoaderParams { + getEnv: (key: string) => string | undefined; + cwd: string; + loadSync?( + cwd: string, + filename?: string, + baseUrl?: string + ): TsConfigLoaderResult; +} + +export function tsConfigLoader({ + getEnv, + cwd, + loadSync = loadSyncDefault, +}: TsConfigLoaderParams): TsConfigLoaderResult { + const TS_NODE_PROJECT = getEnv("TS_NODE_PROJECT"); + const TS_NODE_BASEURL = getEnv("TS_NODE_BASEURL"); + + // tsconfig.loadSync handles if TS_NODE_PROJECT is a file or directory + // and also overrides baseURL if TS_NODE_BASEURL is available. + const loadResult = loadSync(cwd, TS_NODE_PROJECT, TS_NODE_BASEURL); + return loadResult; +} + +function loadSyncDefault( + cwd: string, + filename?: string, + baseUrl?: string +): TsConfigLoaderResult { + // Tsconfig.loadSync uses path.resolve. This is why we can use an absolute path as filename + + const configPath = resolveConfigPath(cwd, filename); + + if (!configPath) { + return { + tsConfigPath: undefined, + baseUrl: undefined, + paths: undefined, + }; + } + const config = loadTsconfig(configPath); + + return { + tsConfigPath: configPath, + baseUrl: + baseUrl || + (config && config.compilerOptions && config.compilerOptions.baseUrl), + paths: config && config.compilerOptions && config.compilerOptions.paths, + }; +} + +function resolveConfigPath(cwd: string, filename?: string): string | undefined { + if (filename) { + const absolutePath = fs.lstatSync(filename).isDirectory() + ? path.resolve(filename, "./tsconfig.json") + : path.resolve(cwd, filename); + + return absolutePath; + } + + if (fs.statSync(cwd).isFile()) { + return path.resolve(cwd); + } + + const configAbsolutePath = walkForTsConfig(cwd); + return configAbsolutePath ? path.resolve(configAbsolutePath) : undefined; +} + +export function walkForTsConfig( + directory: string, + existsSync: (path: string) => boolean = fs.existsSync +): string | undefined { + const configPath = path.join(directory, "./tsconfig.json"); + if (existsSync(configPath)) { + return configPath; + } + + const parentDirectory = path.join(directory, "../"); + + // If we reached the top + if (directory === parentDirectory) { + return undefined; + } + + return walkForTsConfig(parentDirectory, existsSync); +} + +export function loadTsconfig( + configFilePath: string, + existsSync: (path: string) => boolean = fs.existsSync, + readFileSync: (filename: string) => string = (filename: string) => + fs.readFileSync(filename, "utf8") +): Tsconfig | undefined { + if (!existsSync(configFilePath)) { + return undefined; + } + + const configString = readFileSync(configFilePath); + const cleanedJson = StripBom(configString); + const config: Tsconfig = JSON5.parse(cleanedJson); + let extendedConfig = config.extends; + + if (extendedConfig) { + if ( + typeof extendedConfig === "string" && + extendedConfig.indexOf(".json") === -1 + ) { + extendedConfig += ".json"; + } + const currentDir = path.dirname(configFilePath); + let extendedConfigPath = path.join(currentDir, extendedConfig); + if ( + extendedConfig.indexOf("/") !== -1 && + extendedConfig.indexOf(".") !== -1 && + !existsSync(extendedConfigPath) + ) { + extendedConfigPath = path.join( + currentDir, + "node_modules", + extendedConfig + ); + } + + const base = + loadTsconfig(extendedConfigPath, existsSync, readFileSync) || {}; + + // baseUrl should be interpreted as relative to the base tsconfig, + // but we need to update it so it is relative to the original tsconfig being loaded + if (base.compilerOptions && base.compilerOptions.baseUrl) { + const extendsDir = path.dirname(extendedConfig); + base.compilerOptions.baseUrl = path.join( + extendsDir, + base.compilerOptions.baseUrl + ); + } + + return { + ...base, + ...config, + compilerOptions: { + ...base.compilerOptions, + ...config.compilerOptions, + }, + }; + } + return config; +} diff --git a/node_modules/tsconfig-paths/test/filesystem-tests.ts b/node_modules/tsconfig-paths/test/filesystem-tests.ts deleted file mode 100644 index 49d60580f..000000000 --- a/node_modules/tsconfig-paths/test/filesystem-tests.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { assert } from "chai"; -import * as Filesystem from "../src/filesystem"; -import * as path from "path"; - -describe("filesystem", () => { - const fileThatExists = path.join(__dirname, "../package.json"); - const fileThatNotExists = path.join(__dirname, "../package2.json"); - - it("should find file that exists, sync", () => { - const result = Filesystem.fileExistsSync(fileThatExists); - assert.equal(result, true); - }); - - it("should not find file that not exists, sync", () => { - const result = Filesystem.fileExistsSync(fileThatNotExists); - assert.equal(result, false); - }); - - it("should find file that exists, async", done => { - Filesystem.fileExistsAsync(fileThatExists, (_err, result) => { - assert.equal(result, true); - done(); - }); - }); - - it("should not find file that not exists, async", done => { - Filesystem.fileExistsAsync(fileThatNotExists, (_err, result) => { - assert.equal(result, false); - done(); - }); - }); - - it("should load json, sync", () => { - const result = Filesystem.readJsonFromDiskSync(fileThatExists); - assert.isOk(result); - assert.equal(result.main, "lib/index.js"); - }); - - it("should load json, async", done => { - Filesystem.readJsonFromDiskAsync(fileThatExists, (_err, result) => { - assert.isOk(result); - assert.equal(result.main, "lib/index.js"); - done(); - }); - }); -}); diff --git a/node_modules/tsconfig-paths/test/mapping-entry-test.ts b/node_modules/tsconfig-paths/test/mapping-entry-test.ts deleted file mode 100644 index 004888f33..000000000 --- a/node_modules/tsconfig-paths/test/mapping-entry-test.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { assert } from "chai"; -import { getAbsoluteMappingEntries } from "../src/mapping-entry"; -import { join } from "path"; - -describe("mapping-entry", () => { - it("should change to absolute paths and sort in longest prefix order", () => { - const result = getAbsoluteMappingEntries( - "/absolute/base/url", - { - "*": ["/foo1", "/foo2"], - "longest/pre/fix/*": ["/foo2/bar"], - "pre/fix/*": ["/foo3"] - }, - true - ); - assert.deepEqual(result, [ - { - pattern: "longest/pre/fix/*", - paths: [join("/absolute", "base", "url", "foo2", "bar")] - }, - { - pattern: "pre/fix/*", - paths: [join("/absolute", "base", "url", "foo3")] - }, - { - pattern: "*", - paths: [ - join("/absolute", "base", "url", "foo1"), - join("/absolute", "base", "url", "foo2") - ] - } - ]); - }); - - it("should should add a match-all pattern when requested", () => { - let result = getAbsoluteMappingEntries("/absolute/base/url", {}, true); - assert.deepEqual(result, [ - { - pattern: "*", - paths: [join("/absolute", "base", "url", "*")] - } - ]); - - result = getAbsoluteMappingEntries("/absolute/base/url", {}, false); - assert.deepEqual(result, []); - }); -}); diff --git a/node_modules/tsconfig-paths/test/mocha.opts b/node_modules/tsconfig-paths/test/mocha.opts deleted file mode 100644 index 1c00f5fdf..000000000 --- a/node_modules/tsconfig-paths/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require ts-node/register ---recursive test/ -test/**/*.ts diff --git a/node_modules/tsconfig-paths/test/try-path-tests.ts b/node_modules/tsconfig-paths/test/try-path-tests.ts deleted file mode 100644 index da8efdf56..000000000 --- a/node_modules/tsconfig-paths/test/try-path-tests.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { assert } from "chai"; -import { getPathsToTry } from "../src/try-path"; -import { join } from "path"; - -describe("mapping-entry", () => { - const abosolutePathMappings = [ - { - pattern: "longest/pre/fix/*", - paths: [join("/absolute", "base", "url", "foo2", "bar")] - }, - { pattern: "pre/fix/*", paths: [join("/absolute", "base", "url", "foo3")] }, - { pattern: "*", paths: [join("/absolute", "base", "url", "foo1")] } - ]; - it("should return no paths for relative requested module", () => { - const result = getPathsToTry( - [".ts", "tsx"], - abosolutePathMappings, - "./requested-module" - ); - assert.deepEqual(result, undefined); - }); - - it("should return no paths if no pattern match the requested module", () => { - const result = getPathsToTry( - [".ts", "tsx"], - [ - { - pattern: "longest/pre/fix/*", - paths: [join("/absolute", "base", "url", "foo2", "bar")] - }, - { - pattern: "pre/fix/*", - paths: [join("/absolute", "base", "url", "foo3")] - } - ], - "requested-module" - ); - assert.deepEqual(result, undefined); - }); - - it("should get all paths that matches requested module", () => { - const result = getPathsToTry( - [".ts", ".tsx"], - abosolutePathMappings, - "longest/pre/fix/requested-module" - ); - assert.deepEqual(result, [ - // "longest/pre/fix/*" - { type: "file", path: join("/absolute", "base", "url", "foo2", "bar") }, - { - type: "extension", - path: join("/absolute", "base", "url", "foo2", "bar.ts") - }, - { - type: "extension", - path: join("/absolute", "base", "url", "foo2", "bar.tsx") - }, - { - type: "package", - path: join("/absolute", "base", "url", "foo2", "bar", "package.json") - }, - { - type: "index", - path: join("/absolute", "base", "url", "foo2", "bar", "index.ts") - }, - { - type: "index", - path: join("/absolute", "base", "url", "foo2", "bar", "index.tsx") - }, - // "*" - { type: "file", path: join("/absolute", "base", "url", "foo1") }, - { type: "extension", path: join("/absolute", "base", "url", "foo1.ts") }, - { type: "extension", path: join("/absolute", "base", "url", "foo1.tsx") }, - { - type: "package", - path: join("/absolute", "base", "url", "foo1", "package.json") - }, - { - type: "index", - path: join("/absolute", "base", "url", "foo1", "index.ts") - }, - { - type: "index", - path: join("/absolute", "base", "url", "foo1", "index.tsx") - } - ]); - }); -}); - -// describe("match-star", () => { -// it("should match star in last position", () => { -// const result = matchStar("lib/*", "lib/mylib"); -// assert.equal(result, "mylib"); -// }); -// it("should match star in first position", () => { -// const result = matchStar("*/lib", "mylib/lib"); -// assert.equal(result, "mylib"); -// }); -// }); diff --git a/node_modules/tsconfig-paths/test/tsconfig.json b/node_modules/tsconfig-paths/test/tsconfig.json deleted file mode 100644 index 12f379d27..000000000 --- a/node_modules/tsconfig-paths/test/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../base-tsconfig.json", - "compilerOptions": { - "module": "commonjs", - "target": "es6", - "sourceMap": true, - "outDir": "./js_out" - } -} diff --git a/node_modules/tsconfig-paths/tslint.json b/node_modules/tsconfig-paths/tslint.json deleted file mode 100644 index 4cb0bca9f..000000000 --- a/node_modules/tsconfig-paths/tslint.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "rules": { - "no-any": true, - "no-internal-module": true, - "no-namespace": true, - "no-reference": true, - "no-var-requires": true, - "typedef": [true, "call-signature", "parameter", "property-declaration"], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - }, - { - "call-signature": "onespace", - "index-signature": "onespace", - "parameter": "onespace", - "property-declaration": "onespace", - "variable-declaration": "onespace" - } - ], - "curly": true, - "forin": true, - "label-position": true, - "no-arg": true, - "no-bitwise": true, - "no-conditional-assignment": true, - // "no-console": [ - // true, - // "log" - // ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-variable": true, - "no-empty": true, - "no-eval": true, - "no-invalid-this": true, - // "no-null-keyword": true, - "no-shadowed-variable": true, - // "no-string-literal": true, - "no-switch-case-fall-through": true, - "no-unsafe-finally": true, - "no-unused-expression": true, - "no-var-keyword": true, - "radix": true, - "switch-default": true, - "triple-equals": true, - "use-isnan": true, - "eofline": true, - "indent": [true, "spaces"], - "max-file-line-count": [true, 800], - "max-line-length": [true, 160], - "no-default-export": true, - "no-mergeable-namespace": true, - "no-require-imports": true, - "align": [true, "statements"], - //"arrow-parens": true, - "class-name": true, - "jsdoc-format": true, - "new-parens": true, - "no-angle-bracket-type-assertion": true, - "no-consecutive-blank-lines": [true, 1], - "no-parameter-properties": true, - // "object-literal-key-quotes": [ - // true, - // "as-needed" - // ], - "one-line": [ - true, - "check-catch", - "check-finally", - "check-else", - "check-open-brace", - "check-whitespace" - ], - "one-variable-per-declaration": [true], - "variable-name": [ - true, - "ban-keywords", - "check-format", - "allow-leading-underscore" - ] - } -} diff --git a/node_modules/typed-array-length/.eslintrc b/node_modules/typed-array-length/.eslintrc new file mode 100644 index 000000000..c66fbb291 --- /dev/null +++ b/node_modules/typed-array-length/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 11], + "max-statements": [2, 14], + "new-cap": [2, { "capIsNewExceptions": ["IsCallable"] }], + }, +} diff --git a/node_modules/typed-array-length/.github/FUNDING.yml b/node_modules/typed-array-length/.github/FUNDING.yml new file mode 100644 index 000000000..7d6aac43f --- /dev/null +++ b/node_modules/typed-array-length/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/typed-array-length +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/typed-array-length/.nycrc b/node_modules/typed-array-length/.nycrc new file mode 100644 index 000000000..1826526e0 --- /dev/null +++ b/node_modules/typed-array-length/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/typed-array-length/CHANGELOG.md b/node_modules/typed-array-length/CHANGELOG.md new file mode 100644 index 000000000..a5b969fa1 --- /dev/null +++ b/node_modules/typed-array-length/CHANGELOG.md @@ -0,0 +1,69 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.4](https://github.com/inspect-js/typed-array-length/compare/v1.0.3...v1.0.4) - 2022-05-23 + +### Commits + +- [actions] reuse common workflows [`dfd4a37`](https://github.com/inspect-js/typed-array-length/commit/dfd4a37d851a28e3d74d892a69874e02f2e58c37) +- [meta] use `npmignore` to autogenerate an npmignore file [`a837e80`](https://github.com/inspect-js/typed-array-length/commit/a837e80d4029f26785ab9f3aa571ca782ac8e851) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `object-inspect`, `tape` [`7b05a87`](https://github.com/inspect-js/typed-array-length/commit/7b05a8772af399e52bb448618a246cd34d3e3273) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c495f6e`](https://github.com/inspect-js/typed-array-length/commit/c495f6e050a4a7463a82c9195f31f44cf2760945) +- [meta] simplify "exports" [`e42a6b6`](https://github.com/inspect-js/typed-array-length/commit/e42a6b6b0dc243fce32df20a75a7962782ef2a83) +- [Fix] ensure `for-each` dependency is properly listed [`8ec761c`](https://github.com/inspect-js/typed-array-length/commit/8ec761ca56c13927281d626958a2f55211e14f45) +- [Deps] update `call-bind`, `is-typed-array` [`2cc173a`](https://github.com/inspect-js/typed-array-length/commit/2cc173a4216e167db896bea7b8e03edf8b2d3833) +- [meta] add `safe-publish-latest` [`e8e3afa`](https://github.com/inspect-js/typed-array-length/commit/e8e3afa431ce98bbdbb68c9f8e3c029cc5128c6c) +- [Deps] update `is-typed-array` [`cd8084d`](https://github.com/inspect-js/typed-array-length/commit/cd8084db59b734ac4519b6d47f96233b6f73b1a6) + +## [v1.0.3](https://github.com/inspect-js/typed-array-length/compare/v1.0.2...v1.0.3) - 2020-12-05 + +### Commits + +- [Tests] migrate tests to Github Actions [`a578b83`](https://github.com/inspect-js/typed-array-length/commit/a578b83e68055c1e7c7120bc4583e1d6926fc268) +- [meta] avoid publishing github workflows [`f064a4b`](https://github.com/inspect-js/typed-array-length/commit/f064a4bf9090202154249d969be0799c34804ad4) +- [Tests] run `nyc` on all tests [`69b841e`](https://github.com/inspect-js/typed-array-length/commit/69b841e43042358c71c3290342514b6d107f08d1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`4594e83`](https://github.com/inspect-js/typed-array-length/commit/4594e83250579cdbff870aa951e7af56ca169489) +- [actions] add "Allow Edits" workflow [`81e953b`](https://github.com/inspect-js/typed-array-length/commit/81e953ba6b3f59c5657e0d17fa1e7619b94891f5) +- [Deps] update `is-typed-array`; use `call-bind` instead of `es-abstract` [`e7da56b`](https://github.com/inspect-js/typed-array-length/commit/e7da56b3c03b7f0db9bb110444ec1ccf19d7e9f9) +- [readme] remove travis badge [`6d610d8`](https://github.com/inspect-js/typed-array-length/commit/6d610d83cb78ac5286c5ca273f4b3c7289f7686e) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`2d0ad64`](https://github.com/inspect-js/typed-array-length/commit/2d0ad644a11f754e61b49d327fdf891605abbe58) + +## [v1.0.2](https://github.com/inspect-js/typed-array-length/compare/v1.0.1...v1.0.2) - 2020-04-22 + +### Commits + +- [Dev Deps] update `make-arrow-function`, `make-generator-function` [`4facf69`](https://github.com/inspect-js/typed-array-length/commit/4facf697cafb36b9c1057dc4ca1a21d8550c564e) +- [Deps] update `is-typed-array`, `es-abstract` [`aaf3585`](https://github.com/inspect-js/typed-array-length/commit/aaf3585429896b9520dedd886c07aa4a96b50615) +- [Dev Deps] update `aud`, `auto-changelog` [`f10e298`](https://github.com/inspect-js/typed-array-length/commit/f10e298c7733b8de59231c1581c9b000c205edbd) +- [meta] allow `package.json` to be required/imported [`104f4c6`](https://github.com/inspect-js/typed-array-length/commit/104f4c6a6363e600d54aeb7abd90e37d99693aaf) +- [Tests] only audit prod deps [`c748ab5`](https://github.com/inspect-js/typed-array-length/commit/c748ab596de505483df14ca7eeda7f27aeb20383) +- [Deps] update `es-abstract` [`6cd213e`](https://github.com/inspect-js/typed-array-length/commit/6cd213ec654da3325abc8190f8c07c860474d944) +- [Dev Deps] update `tape` [`2b0b2ea`](https://github.com/inspect-js/typed-array-length/commit/2b0b2ea9be106e8a068597c3f499ef703cce1edb) +- [Dev Deps] update `@ljharb/eslint-config` [`cf462f3`](https://github.com/inspect-js/typed-array-length/commit/cf462f3352cf2fd592e624746371e3de800a265d) +- [Deps] update `is-typed-array` [`ff46995`](https://github.com/inspect-js/typed-array-length/commit/ff469955b5d92942ba066c77eac7467e0c4de1ec) + +## [v1.0.1](https://github.com/inspect-js/typed-array-length/compare/v1.0.0...v1.0.1) - 2020-01-19 + +### Commits + +- readme [`d3643fd`](https://github.com/inspect-js/typed-array-length/commit/d3643fd11919844b1f42041ef980a1f33215b515) +- [meta] fix "exports" field [`006e28b`](https://github.com/inspect-js/typed-array-length/commit/006e28b30b11f8948e607d13ef0e96c3d7d7f61f) + +## v1.0.0 - 2020-01-18 + +### Commits + +- Initial commit [`5f9e2ec`](https://github.com/inspect-js/typed-array-length/commit/5f9e2ec6650f80dc894e354e9e98181b09006346) +- Tests [`6b9cadb`](https://github.com/inspect-js/typed-array-length/commit/6b9cadb0c274933bc7ee5e3fc6a5a380163cbe76) +- Implementation [`6a3cb50`](https://github.com/inspect-js/typed-array-length/commit/6a3cb50429f40fc4ac9020bbf9539560c1b70213) +- npm init [`41d42cd`](https://github.com/inspect-js/typed-array-length/commit/41d42cddfd3d47df6c9d480cf77787eae1109432) +- [meta] add `auto-changelog` [`4fd159b`](https://github.com/inspect-js/typed-array-length/commit/4fd159bc6535e86c370a2186d60a68656f0d8917) +- [meta] add `funding` field; create FUNDING.yml [`6a9fca7`](https://github.com/inspect-js/typed-array-length/commit/6a9fca7e0fdf3ff3fd4b0f18596471ca3d050a39) +- [actions] add automatic rebasing / merge commit blocking [`8303296`](https://github.com/inspect-js/typed-array-length/commit/83032967b14afd37c382d4bf2c1fc5c95e3764bd) +- [Tests] add `npm run lint` [`47a9c21`](https://github.com/inspect-js/typed-array-length/commit/47a9c211f474dbe8528f6b28f50080eacd5bf7eb) +- [Tests] use shared travis-ci configs [`d0c8915`](https://github.com/inspect-js/typed-array-length/commit/d0c89153e1c50f1eadd0b42521bcdcf3366b8af5) +- Only apps should have lockfiles [`3eaef9c`](https://github.com/inspect-js/typed-array-length/commit/3eaef9cd192b1a25d1930739e7c0044e39ad3c0d) diff --git a/node_modules/typed-array-length/LICENSE b/node_modules/typed-array-length/LICENSE new file mode 100644 index 000000000..707437b57 --- /dev/null +++ b/node_modules/typed-array-length/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/typed-array-length/README.md b/node_modules/typed-array-length/README.md new file mode 100644 index 000000000..5e78c2004 --- /dev/null +++ b/node_modules/typed-array-length/README.md @@ -0,0 +1,64 @@ +# typed-array-length [![Version Badge][2]][1] + +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Robustly get the length of a Typed Array, or `false` if it is not a Typed Array. Works cross-realm, in every engine, even if the `length` property is overridden. + +## Example + +```js +var typedArrayLength = require('typed-array-length'); +var assert = require('assert'); + +assert.equal(false, typedArrayLength(undefined)); +assert.equal(false, typedArrayLength(null)); +assert.equal(false, typedArrayLength(false)); +assert.equal(false, typedArrayLength(true)); +assert.equal(false, typedArrayLength([])); +assert.equal(false, typedArrayLength({})); +assert.equal(false, typedArrayLength(/a/g)); +assert.equal(false, typedArrayLength(new RegExp('a', 'g'))); +assert.equal(false, typedArrayLength(new Date())); +assert.equal(false, typedArrayLength(42)); +assert.equal(false, typedArrayLength(NaN)); +assert.equal(false, typedArrayLength(Infinity)); +assert.equal(false, typedArrayLength(new Number(42))); +assert.equal(false, typedArrayLength('foo')); +assert.equal(false, typedArrayLength(Object('foo'))); +assert.equal(false, typedArrayLength(function () {})); +assert.equal(false, typedArrayLength(function* () {})); +assert.equal(false, typedArrayLength(x => x * x)); +assert.equal(false, typedArrayLength([])); + +assert.equal(1, typedArrayLength(new Int8Array(1))); +assert.equal(2, typedArrayLength(new Uint8Array(2))); +assert.equal(3, typedArrayLength(new Uint8ClampedArray(3))); +assert.equal(4, typedArrayLength(new Int16Array(4))); +assert.equal(5, typedArrayLength(new Uint16Array(5))); +assert.equal(6, typedArrayLength(new Int32Array(6))); +assert.equal(7, typedArrayLength(new Uint32Array(7))); +assert.equal(8, typedArrayLength(new Float32Array(8))); +assert.equal(9, typedArrayLength(new Float64Array(9))); +assert.equal(10, typedArrayLength(new BigInt64Array(10))); +assert.equal(11, typedArrayLength(new BigUint64Array(11))); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/typed-array-length +[2]: https://versionbadg.es/inspect-js/typed-array-length.svg +[5]: https://david-dm.org/inspect-js/typed-array-length.svg +[6]: https://david-dm.org/inspect-js/typed-array-length +[7]: https://david-dm.org/inspect-js/typed-array-length/dev-status.svg +[8]: https://david-dm.org/inspect-js/typed-array-length#info=devDependencies +[11]: https://nodei.co/npm/typed-array-length.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/typed-array-length.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/typed-array-length.svg +[downloads-url]: http://npm-stat.com/charts.html?package=typed-array-length diff --git a/node_modules/typed-array-length/index.js b/node_modules/typed-array-length/index.js new file mode 100644 index 000000000..f78eb66f1 --- /dev/null +++ b/node_modules/typed-array-length/index.js @@ -0,0 +1,77 @@ +'use strict'; + +var forEach = require('for-each'); +var callBind = require('call-bind'); + +var typedArrays = [ + 'Float32Array', + 'Float64Array', + 'Int8Array', + 'Int16Array', + 'Int32Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Uint16Array', + 'Uint32Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +var getters = {}; +var hasProto = [].__proto__ === Array.prototype; // eslint-disable-line no-proto +var gOPD = Object.getOwnPropertyDescriptor; +var oDP = Object.defineProperty; +if (gOPD) { + var getLength = function (x) { + return x.length; + }; + forEach(typedArrays, function (typedArray) { + // In Safari 7, Typed Array constructors are typeof object + if (typeof global[typedArray] === 'function' || typeof global[typedArray] === 'object') { + var Proto = global[typedArray].prototype; + var descriptor = gOPD(Proto, 'length'); + if (!descriptor && hasProto) { + var superProto = Proto.__proto__; // eslint-disable-line no-proto + descriptor = gOPD(superProto, 'length'); + } + // Opera 12.16 has a magic length data property on instances AND on Proto + if (descriptor && descriptor.get) { + getters[typedArray] = callBind(descriptor.get); + } else if (oDP) { + // this is likely an engine where instances have a magic length data property + var arr = new global[typedArray](2); + descriptor = gOPD(arr, 'length'); + if (descriptor && descriptor.configurable) { + oDP(arr, 'length', { value: 3 }); + } + if (arr.length === 2) { + getters[typedArray] = getLength; + } + } + } + }); +} + +var tryTypedArrays = function tryAllTypedArrays(value) { + var foundLength; + forEach(getters, function (getter) { + if (typeof foundLength !== 'number') { + try { + var length = getter(value); + if (typeof length === 'number') { + foundLength = length; + } + } catch (e) {} + } + }); + return foundLength; +}; + +var isTypedArray = require('is-typed-array'); + +module.exports = function typedArrayLength(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); +}; diff --git a/node_modules/typed-array-length/package.json b/node_modules/typed-array-length/package.json new file mode 100644 index 000000000..a6c7a57ff --- /dev/null +++ b/node_modules/typed-array-length/package.json @@ -0,0 +1,89 @@ +{ + "name": "typed-array-length", + "version": "1.0.4", + "description": "Robustly get the length of a Typed Array", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "tests-only": "nyc tape 'test/**/*.js'", + "test:harmony": "nyc node --harmony --es-staging test", + "test": "npm run tests-only && npm run test:harmony", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/typed-array-length.git" + }, + "keywords": [ + "typed", + "array", + "length", + "robust", + "es", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/typed-array-length/issues" + }, + "homepage": "https://github.com/inspect-js/typed-array-length#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "is-callable": "^1.2.4", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "testling": { + "files": "test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/typed-array-length/test/index.js b/node_modules/typed-array-length/test/index.js new file mode 100644 index 000000000..8852fee80 --- /dev/null +++ b/node_modules/typed-array-length/test/index.js @@ -0,0 +1,85 @@ +'use strict'; + +var test = require('tape'); +var typedArrayLength = require('../'); +var isCallable = require('is-callable'); +var generators = require('make-generator-function')(); +var arrowFn = require('make-arrow-function')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + st.equal(false, typedArrayLength(), 'undefined is not typed array'); + st.equal(false, typedArrayLength(null), 'null is not typed array'); + st.equal(false, typedArrayLength(false), 'false is not typed array'); + st.equal(false, typedArrayLength(true), 'true is not typed array'); + st.end(); + }); + + t.equal(false, typedArrayLength({}), 'object is not typed array'); + t.equal(false, typedArrayLength(/a/g), 'regex literal is not typed array'); + t.equal(false, typedArrayLength(new RegExp('a', 'g')), 'regex object is not typed array'); + t.equal(false, typedArrayLength(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.equal(false, typedArrayLength(42), 'number is not typed array'); + st.equal(false, typedArrayLength(Object(42)), 'number object is not typed array'); + st.equal(false, typedArrayLength(NaN), 'NaN is not typed array'); + st.equal(false, typedArrayLength(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.equal(false, typedArrayLength('foo'), 'string primitive is not typed array'); + st.equal(false, typedArrayLength(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.equal(false, typedArrayLength(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.equal(false, typedArrayLength(genFn), 'generator function ' + inspect(genFn) + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: !arrowFn }, function (t) { + t.equal(false, typedArrayLength(arrowFn), 'arrow function is not typed array'); + t.end(); +}); + +test('Typed Arrays', function (t) { + forEach(typedArrayNames, function (typedArray) { + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var length = 10; + var arr = new TypedArray(length); + t.equal(typedArrayLength(arr), length, 'new ' + typedArray + '(10) is typed array of length ' + length); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/node_modules/unbox-primitive/.eslintignore b/node_modules/unbox-primitive/.eslintignore deleted file mode 100644 index 404abb221..000000000 --- a/node_modules/unbox-primitive/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/unbox-primitive/CHANGELOG.md b/node_modules/unbox-primitive/CHANGELOG.md index 4da114c4e..7f930e888 100644 --- a/node_modules/unbox-primitive/CHANGELOG.md +++ b/node_modules/unbox-primitive/CHANGELOG.md @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.0.2](https://github.com/ljharb/unbox-primitive/compare/v1.0.1...v1.0.2) - 2022-04-24 + +### Commits + +- [actions] reuse common workflows [`e6420b9`](https://github.com/ljharb/unbox-primitive/commit/e6420b94eed3558ef3ecddbd3d85fe2f400d1db1) +- [actions] update codecov uploader [`b90aff2`](https://github.com/ljharb/unbox-primitive/commit/b90aff2b17b70c1a7200eb5faa3f9e64ebf055f9) +- [readme] add github actions/codecov badges; update URLs [`bcc39b9`](https://github.com/ljharb/unbox-primitive/commit/bcc39b9d6d101bad199c95604f94999f80d6da97) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`a704a32`](https://github.com/ljharb/unbox-primitive/commit/a704a32ec4af43cd0631317ae3a537012adc1610) +- [Refactor] use `call-bind` instead of `function-bind` [`0a609f1`](https://github.com/ljharb/unbox-primitive/commit/0a609f1be6269cbf501482aacd9a0a1bd8596108) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`6a45317`](https://github.com/ljharb/unbox-primitive/commit/6a4531757d74af97c9d0770b102f81ce6ff0a8dc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`795c76f`](https://github.com/ljharb/unbox-primitive/commit/795c76f14c4df3c7ae934f7b14a98c07951ea9c7) +- [Deps] update `has-bigints`, `has-symbols` [`257a065`](https://github.com/ljharb/unbox-primitive/commit/257a065496b4190c296d674bff342ea40cf8e176) + ## [v1.0.1](https://github.com/ljharb/unbox-primitive/compare/v1.0.0...v1.0.1) - 2021-03-25 ### Commits diff --git a/node_modules/unbox-primitive/README.md b/node_modules/unbox-primitive/README.md index f267e332e..1ce1cabb2 100644 --- a/node_modules/unbox-primitive/README.md +++ b/node_modules/unbox-primitive/README.md @@ -1,11 +1,13 @@ -# unbox-primitive [![Version Badge][2]][1] +# unbox-primitive [![Version Badge][npm-version-svg]][package-url] -[![dependency status][5]][6] -[![dev dependency status][7]][8] +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url] -[![npm badge][11]][1] +[![npm badge][npm-badge-png]][package-url] Unbox a boxed JS primitive value. This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and works despite ES6 Symbol.toStringTag. @@ -28,14 +30,18 @@ assert.equal(unboxPrimitive(new BigInt(42)), 42n); ## Tests Simply clone the repo, `npm install`, and run `npm test` -[1]: https://npmjs.org/package/unbox-primitive -[2]: https://versionbadg.es/ljharb/unbox-primitive.svg -[5]: https://david-dm.org/ljharb/unbox-primitive.svg -[6]: https://david-dm.org/ljharb/unbox-primitive -[7]: https://david-dm.org/ljharb/unbox-primitive/dev-status.svg -[8]: https://david-dm.org/ljharb/unbox-primitive#info=devDependencies -[11]: https://nodei.co/npm/unbox-primitive.png?downloads=true&stars=true +[package-url]: https://npmjs.org/package/unbox-primitive +[npm-version-svg]: https://versionbadg.es/ljharb/unbox-primitive.svg +[deps-svg]: https://david-dm.org/ljharb/unbox-primitive.svg +[deps-url]: https://david-dm.org/ljharb/unbox-primitive +[dev-deps-svg]: https://david-dm.org/ljharb/unbox-primitive/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/unbox-primitive#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/unbox-primitive.png?downloads=true&stars=true [license-image]: https://img.shields.io/npm/l/unbox-primitive.svg [license-url]: LICENSE [downloads-image]: https://img.shields.io/npm/dm/unbox-primitive.svg [downloads-url]: https://npm-stat.com/charts.html?package=unbox-primitive +[codecov-image]: https://codecov.io/gh/ljharb/unbox-primitive/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/unbox-primitive/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/unbox-primitive +[actions-url]: https://github.com/ljharb/unbox-primitive/actions diff --git a/node_modules/unbox-primitive/index.js b/node_modules/unbox-primitive/index.js index f5e9f3b54..5cde47909 100644 --- a/node_modules/unbox-primitive/index.js +++ b/node_modules/unbox-primitive/index.js @@ -1,15 +1,15 @@ 'use strict'; var whichBoxedPrimitive = require('which-boxed-primitive'); -var bind = require('function-bind'); +var callBound = require('call-bind/callBound'); var hasSymbols = require('has-symbols')(); var hasBigInts = require('has-bigints')(); -var stringToString = bind.call(Function.call, String.prototype.toString); -var numberValueOf = bind.call(Function.call, Number.prototype.valueOf); -var booleanValueOf = bind.call(Function.call, Boolean.prototype.valueOf); -var symbolValueOf = hasSymbols && bind.call(Function.call, Symbol.prototype.valueOf); -var bigIntValueOf = hasBigInts && bind.call(Function.call, BigInt.prototype.valueOf); +var stringToString = callBound('String.prototype.toString'); +var numberValueOf = callBound('Number.prototype.valueOf'); +var booleanValueOf = callBound('Boolean.prototype.valueOf'); +var symbolValueOf = hasSymbols && callBound('Symbol.prototype.valueOf'); +var bigIntValueOf = hasBigInts && callBound('BigInt.prototype.valueOf'); module.exports = function unboxPrimitive(value) { var which = whichBoxedPrimitive(value); diff --git a/node_modules/unbox-primitive/package.json b/node_modules/unbox-primitive/package.json index 02058f0e7..235596bd8 100644 --- a/node_modules/unbox-primitive/package.json +++ b/node_modules/unbox-primitive/package.json @@ -1,15 +1,16 @@ { "name": "unbox-primitive", - "version": "1.0.1", + "version": "1.0.2", "description": "Unbox a boxed JS primitive value.", "main": "index.js", "scripts": { - "prepublish": "not-in-publish || safe-publish-latest", - "lint": "eslint .", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=js,mjs .", "pretest": "npm run lint", "tests-only": "nyc tape 'test/**/*.js'", "test": "npm run tests-only", - "posttest": "npx aud --production", + "posttest": "aud --production", "version": "auto-changelog && git add CHANGELOG.md", "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, @@ -35,22 +36,22 @@ }, "homepage": "https://github.com/ljharb/unbox-primitive#readme", "devDependencies": { - "@ljharb/eslint-config": "^17.5.1", - "aud": "^1.1.4", - "auto-changelog": "^2.2.1", - "eslint": "^7.22.0", + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", "for-each": "^0.3.3", "in-publish": "^2.0.1", "nyc": "^10.3.2", - "object-inspect": "^1.9.0", + "object-inspect": "^1.12.0", "object-is": "^1.1.5", - "safe-publish-latest": "^1.1.4", - "tape": "^5.2.2" + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" }, "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" }, "auto-changelog": { diff --git a/node_modules/validate-npm-package-license/LICENSE b/node_modules/validate-npm-package-license/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/node_modules/validate-npm-package-license/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/validate-npm-package-license/README.md b/node_modules/validate-npm-package-license/README.md deleted file mode 100644 index 702bc7b4f..000000000 --- a/node_modules/validate-npm-package-license/README.md +++ /dev/null @@ -1,113 +0,0 @@ -validate-npm-package-license -============================ - -Give me a string and I'll tell you if it's a valid npm package license string. - -```javascript -var valid = require('validate-npm-package-license'); -``` - -SPDX license identifiers are valid license strings: - -```javascript - -var assert = require('assert'); -var validSPDXExpression = { - validForNewPackages: true, - validForOldPackages: true, - spdx: true -}; - -assert.deepEqual(valid('MIT'), validSPDXExpression); -assert.deepEqual(valid('BSD-2-Clause'), validSPDXExpression); -assert.deepEqual(valid('Apache-2.0'), validSPDXExpression); -assert.deepEqual(valid('ISC'), validSPDXExpression); -``` -The function will return a warning and suggestion for nearly-correct license identifiers: - -```javascript -assert.deepEqual( - valid('Apache 2.0'), - { - validForOldPackages: false, - validForNewPackages: false, - warnings: [ - 'license should be ' + - 'a valid SPDX license expression (without "LicenseRef"), ' + - '"UNLICENSED", or ' + - '"SEE LICENSE IN "', - 'license is similar to the valid expression "Apache-2.0"' - ] - } -); -``` - -SPDX expressions are valid, too ... - -```javascript -// Simple SPDX license expression for dual licensing -assert.deepEqual( - valid('(GPL-3.0-only OR BSD-2-Clause)'), - validSPDXExpression -); -``` - -... except if they contain `LicenseRef`: - -```javascript -var warningAboutLicenseRef = { - validForOldPackages: false, - validForNewPackages: false, - spdx: true, - warnings: [ - 'license should be ' + - 'a valid SPDX license expression (without "LicenseRef"), ' + - '"UNLICENSED", or ' + - '"SEE LICENSE IN "', - ] -}; - -assert.deepEqual( - valid('LicenseRef-Made-Up'), - warningAboutLicenseRef -); - -assert.deepEqual( - valid('(MIT OR LicenseRef-Made-Up)'), - warningAboutLicenseRef -); -``` - -If you can't describe your licensing terms with standardized SPDX identifiers, put the terms in a file in the package and point users there: - -```javascript -assert.deepEqual( - valid('SEE LICENSE IN LICENSE.txt'), - { - validForNewPackages: true, - validForOldPackages: true, - inFile: 'LICENSE.txt' - } -); - -assert.deepEqual( - valid('SEE LICENSE IN license.md'), - { - validForNewPackages: true, - validForOldPackages: true, - inFile: 'license.md' - } -); -``` - -If there aren't any licensing terms, use `UNLICENSED`: - -```javascript -var unlicensed = { - validForNewPackages: true, - validForOldPackages: true, - unlicensed: true -}; -assert.deepEqual(valid('UNLICENSED'), unlicensed); -assert.deepEqual(valid('UNLICENCED'), unlicensed); -``` diff --git a/node_modules/validate-npm-package-license/index.js b/node_modules/validate-npm-package-license/index.js deleted file mode 100644 index 35eaa7325..000000000 --- a/node_modules/validate-npm-package-license/index.js +++ /dev/null @@ -1,86 +0,0 @@ -var parse = require('spdx-expression-parse'); -var correct = require('spdx-correct'); - -var genericWarning = ( - 'license should be ' + - 'a valid SPDX license expression (without "LicenseRef"), ' + - '"UNLICENSED", or ' + - '"SEE LICENSE IN "' -); - -var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/; - -function startsWith(prefix, string) { - return string.slice(0, prefix.length) === prefix; -} - -function usesLicenseRef(ast) { - if (ast.hasOwnProperty('license')) { - var license = ast.license; - return ( - startsWith('LicenseRef', license) || - startsWith('DocumentRef', license) - ); - } else { - return ( - usesLicenseRef(ast.left) || - usesLicenseRef(ast.right) - ); - } -} - -module.exports = function(argument) { - var ast; - - try { - ast = parse(argument); - } catch (e) { - var match - if ( - argument === 'UNLICENSED' || - argument === 'UNLICENCED' - ) { - return { - validForOldPackages: true, - validForNewPackages: true, - unlicensed: true - }; - } else if (match = fileReferenceRE.exec(argument)) { - return { - validForOldPackages: true, - validForNewPackages: true, - inFile: match[1] - }; - } else { - var result = { - validForOldPackages: false, - validForNewPackages: false, - warnings: [genericWarning] - }; - if (argument.trim().length !== 0) { - var corrected = correct(argument); - if (corrected) { - result.warnings.push( - 'license is similar to the valid expression "' + corrected + '"' - ); - } - } - return result; - } - } - - if (usesLicenseRef(ast)) { - return { - validForNewPackages: false, - validForOldPackages: false, - spdx: true, - warnings: [genericWarning] - }; - } else { - return { - validForNewPackages: true, - validForOldPackages: true, - spdx: true - }; - } -}; diff --git a/node_modules/validate-npm-package-license/package.json b/node_modules/validate-npm-package-license/package.json deleted file mode 100644 index 9e92af4f4..000000000 --- a/node_modules/validate-npm-package-license/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "validate-npm-package-license", - "description": "Give me a string and I'll tell you if it's a valid npm package license string", - "version": "3.0.4", - "author": "Kyle E. Mitchell (https://kemitchell.com)", - "contributors": [ - "Mark Stacey " - ], - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - }, - "devDependencies": { - "defence-cli": "^2.0.1", - "replace-require-self": "^1.0.0" - }, - "keywords": [ - "license", - "npm", - "package", - "validation" - ], - "license": "Apache-2.0", - "repository": "kemitchell/validate-npm-package-license.js", - "scripts": { - "test": "defence README.md | replace-require-self | node" - } -} diff --git a/node_modules/which-typed-array/.editorconfig b/node_modules/which-typed-array/.editorconfig new file mode 100644 index 000000000..bc228f826 --- /dev/null +++ b/node_modules/which-typed-array/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 150 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/is-bigint/test/.eslintrc b/node_modules/which-typed-array/.eslintrc similarity index 50% rename from node_modules/is-bigint/test/.eslintrc rename to node_modules/which-typed-array/.eslintrc index 1ac0d47b3..8b2ada071 100644 --- a/node_modules/is-bigint/test/.eslintrc +++ b/node_modules/which-typed-array/.eslintrc @@ -1,7 +1,9 @@ { + "root": true, + + "extends": "@ljharb", + "rules": { "max-statements-per-line": [2, { "max": 2 }], - "no-restricted-properties": 0, - "symbol-description": 0, - } + }, } diff --git a/node_modules/which-typed-array/.github/FUNDING.yml b/node_modules/which-typed-array/.github/FUNDING.yml new file mode 100644 index 000000000..d6aa18036 --- /dev/null +++ b/node_modules/which-typed-array/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/which-typed-array +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/which-typed-array/.nycrc b/node_modules/which-typed-array/.nycrc new file mode 100644 index 000000000..1826526e0 --- /dev/null +++ b/node_modules/which-typed-array/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/which-typed-array/CHANGELOG.md b/node_modules/which-typed-array/CHANGELOG.md new file mode 100644 index 000000000..c1b2cb5ff --- /dev/null +++ b/node_modules/which-typed-array/CHANGELOG.md @@ -0,0 +1,175 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.9](https://github.com/inspect-js/which-typed-array/compare/v1.1.8...v1.1.9) - 2022-11-02 + +### Commits + +- [Dev Deps] update `aud`, `is-callable`, `tape` [`9a20b3c`](https://github.com/inspect-js/which-typed-array/commit/9a20b3cb8f5d087789a8160395517bffe27b4339) +- [Refactor] use `gopd` instead of `es-abstract` helper [`00157af`](https://github.com/inspect-js/which-typed-array/commit/00157af909842b8b5affa5485d3574ec92d94065) +- [Deps] update `is-typed-array` [`6714240`](https://github.com/inspect-js/which-typed-array/commit/6714240e748cbbb634cb1e405ad762bc52acde66) +- [meta] add `sideEffects` flag [`89b96cc`](https://github.com/inspect-js/which-typed-array/commit/89b96cc3decc78d9621598e94fa1c2bb87eabf2e) + +## [v1.1.8](https://github.com/inspect-js/which-typed-array/compare/v1.1.7...v1.1.8) - 2022-05-14 + +### Commits + +- [actions] reuse common workflows [`95ea6c0`](https://github.com/inspect-js/which-typed-array/commit/95ea6c02dc5ec4ed0ee1b9c4692bb060108c8637) +- [meta] use `npmignore` to autogenerate an npmignore file [`d08436a`](https://github.com/inspect-js/which-typed-array/commit/d08436a19cdd76219732f5040a01cdb92ef2820e) +- [readme] add github actions/codecov badges [`35ae3af`](https://github.com/inspect-js/which-typed-array/commit/35ae3af6a0bb328c9d9b9bbb53e47122f269d81a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`86e6e3a`](https://github.com/inspect-js/which-typed-array/commit/86e6e3af60b2436f0ff34968d9d6240a23f40528) +- [actions] update codecov uploader [`0aa6e30`](https://github.com/inspect-js/which-typed-array/commit/0aa6e3026ab4198c4364737ed4f0315a2ecc432a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`a881a78`](https://github.com/inspect-js/which-typed-array/commit/a881a785f094e823e1cefe2ae9e4ebe31a8e996e) +- [Refactor] use `for-each` instead of `foreach` [`9dafa03`](https://github.com/inspect-js/which-typed-array/commit/9dafa0377fc5c690059a9d454f1dd4d365c5c902) +- [Deps] update `es-abstract`, `is-typed-array` [`0684022`](https://github.com/inspect-js/which-typed-array/commit/068402297608f321a4ec99ebce741b3eb38fcfdd) +- [Deps] update `es-abstract`, `is-typed-array` [`633a529`](https://github.com/inspect-js/which-typed-array/commit/633a529081b5c48d9675abb8aea425e6e33d528e) + +## [v1.1.7](https://github.com/inspect-js/which-typed-array/compare/v1.1.6...v1.1.7) - 2021-08-30 + +### Commits + +- [Refactor] use `globalThis` if available [`2a16d1f`](https://github.com/inspect-js/which-typed-array/commit/2a16d1fd520871ce6b23c60f0bd2113cf33b2533) +- [meta] changelog cleanup [`ba99f56`](https://github.com/inspect-js/which-typed-array/commit/ba99f56b45e6acde7aef4a1f34bb00e44088ccee) +- [Dev Deps] update `@ljharb/eslint-config` [`19a6e04`](https://github.com/inspect-js/which-typed-array/commit/19a6e04ce0094fb3fd6d0d2cbc58d320556ddf50) +- [Deps] update `available-typed-arrays` [`50dbc58`](https://github.com/inspect-js/which-typed-array/commit/50dbc5810a24c468b49409e1f0a79d03501e3dd6) +- [Deps] update `is-typed-array` [`c1b83ea`](https://github.com/inspect-js/which-typed-array/commit/c1b83eae65f042e46b6ae941ac4e814b7965a0f7) + +## [v1.1.6](https://github.com/inspect-js/which-typed-array/compare/v1.1.5...v1.1.6) - 2021-08-06 + +### Fixed + +- [Fix] if Symbol.toStringTag exists but is not present, use Object.prototype.toString [`#51`](https://github.com/inspect-js/which-typed-array/issues/51) [`#49`](https://github.com/inspect-js/which-typed-array/issues/49) + +### Commits + +- [Dev Deps] update `is-callable`, `tape` [`63eb1e3`](https://github.com/inspect-js/which-typed-array/commit/63eb1e3faede3f328bbbb4a5fcffc2e4769cf4ec) +- [Deps] update `is-typed-array` [`c5056f0`](https://github.com/inspect-js/which-typed-array/commit/c5056f0007d4c9434f1fa69eff183109468b4769) + +## [v1.1.5](https://github.com/inspect-js/which-typed-array/compare/v1.1.4...v1.1.5) - 2021-08-05 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`63fa8dd`](https://github.com/inspect-js/which-typed-array/commit/63fa8dd1dc9c0f0dbbaa16d1de0eb89797324c5d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `tape` [`1107c74`](https://github.com/inspect-js/which-typed-array/commit/1107c74c52ed6eb4a719faec88e16c4343976d73) +- [Deps] update `available-typed-arrays`, `call-bind`, `es-abstract`, `is-typed-array` [`f953454`](https://github.com/inspect-js/which-typed-array/commit/f953454b2c6f589f09573ddc961431f970c2e1b6) +- [Fix] use `has-tostringtag` to behave correctly in the presence of symbol shams [`8aee720`](https://github.com/inspect-js/which-typed-array/commit/8aee7207abcd72c799ac324b214fbb6ca7ae4a28) +- [meta] use `prepublishOnly` script for npm 7+ [`6c5167b`](https://github.com/inspect-js/which-typed-array/commit/6c5167b4cd06cb62a5487a2e797d8e41cc2970b1) + +## [v1.1.4](https://github.com/inspect-js/which-typed-array/compare/v1.1.3...v1.1.4) - 2020-12-05 + +### Commits + +- [meta] npmignore github action workflows [`aa427e7`](https://github.com/inspect-js/which-typed-array/commit/aa427e79a230a985953695a8129ceb6bb7d42527) + +## [v1.1.3](https://github.com/inspect-js/which-typed-array/compare/v1.1.2...v1.1.3) - 2020-12-05 + +### Commits + +- [Tests] migrate tests to Github Actions [`803d4dd`](https://github.com/inspect-js/which-typed-array/commit/803d4ddb601ff03e587be792bd452de0e2783d03) +- [Tests] run `nyc` on all tests [`205a13f`](https://github.com/inspect-js/which-typed-array/commit/205a13f7aa172e014ddc2079c84af6ba575581c8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `is-callable`, `tape` [`97ceb07`](https://github.com/inspect-js/which-typed-array/commit/97ceb070d5aea1c3a696c6f695800ae468bafc0b) +- [actions] add "Allow Edits" workflow [`b140492`](https://github.com/inspect-js/which-typed-array/commit/b14049211eff32bd4149767def4f939483810051) +- [Deps] update `es-abstract`; use `call-bind` where applicable [`2abdb87`](https://github.com/inspect-js/which-typed-array/commit/2abdb871961b4e1b58925115a7d56a9cc5966a02) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`256d34b`](https://github.com/inspect-js/which-typed-array/commit/256d34b8bdb67b8af0e9f83c9a318e54f3340e3b) +- [Dev Deps] update `auto-changelog`; add `aud` [`ddea96f`](https://github.com/inspect-js/which-typed-array/commit/ddea96fe320dbdd0c7d7569812399a7f64d43e04) +- [meta] gitignore nyc output [`8a812bd`](https://github.com/inspect-js/which-typed-array/commit/8a812bd1ce7c5609988fb4fe2e9af2089eccd07d) + +## [v1.1.2](https://github.com/inspect-js/which-typed-array/compare/v1.1.1...v1.1.2) - 2020-04-07 + +### Commits + +- [Dev Deps] update `make-arrow-function`, `make-generator-function` [`28c61ef`](https://github.com/inspect-js/which-typed-array/commit/28c61eff4903ff6509f65c2f500858b9cb4636f1) +- [Dev Deps] update `@ljharb/eslint-config` [`a233879`](https://github.com/inspect-js/which-typed-array/commit/a2338798d3a4a3169cda54e322b2f2eb0e976ad0) +- [Dev Deps] update `auto-changelog` [`df0134c`](https://github.com/inspect-js/which-typed-array/commit/df0134c0e20ec6d94993988ad670e1b3cf350bea) +- [Fix] move `foreach` to dependencies [`6ef29c0`](https://github.com/inspect-js/which-typed-array/commit/6ef29c0dbb91a7ec21df7ce8736f99f41efea39e) +- [Tests] only audit prod deps [`eb21044`](https://github.com/inspect-js/which-typed-array/commit/eb210446bd7a433657204d2314ef56fe264c21ad) +- [Deps] update `es-abstract` [`5ef0236`](https://github.com/inspect-js/which-typed-array/commit/5ef02368d9876a1074123aa7725d6759b4f3e358) +- [Dev Deps] update `tape` [`7456037`](https://github.com/inspect-js/which-typed-array/commit/745603728c6c3da8bdddee321e8a9196f4827aa3) +- [Deps] update `available-typed-arrays` [`8a856c9`](https://github.com/inspect-js/which-typed-array/commit/8a856c9aa707c1e6f7a52e834485356b31395ea6) + +## [v1.1.1](https://github.com/inspect-js/which-typed-array/compare/v1.1.0...v1.1.1) - 2020-01-24 + +### Commits + +- [Tests] use shared travis-ci configs [`0a627d9`](https://github.com/inspect-js/which-typed-array/commit/0a627d9694d0eabdaee63b19e605584166995a79) +- [meta] add `auto-changelog` [`2a14c58`](https://github.com/inspect-js/which-typed-array/commit/2a14c58b79f72e32ef2078efb40d31a4bf8c197a) +- [meta] remove unused Makefile and associated utilities [`75f7f22`](https://github.com/inspect-js/which-typed-array/commit/75f7f222199f42618c290de363c542b11f5a5632) +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`4162327`](https://github.com/inspect-js/which-typed-array/commit/416232725e7d127cbd886af0f8988dae612a342f) +- [Refactor] use `es-abstract`’s `callBound`, `available-typed-arrays`, `has-symbols` [`9b04a2a`](https://github.com/inspect-js/which-typed-array/commit/9b04a2a14c758600cffcf59485b7b3c85839c266) +- [readme] fix repo URLs, remove testling [`03ed52f`](https://github.com/inspect-js/which-typed-array/commit/03ed52f3ae4fcd35614bcda7e947b14e62009c71) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape` [`bfbcf3e`](https://github.com/inspect-js/which-typed-array/commit/bfbcf3ec9c449bd0089ed805c01a32ba4e7e5938) +- [actions] add automatic rebasing / merge commit blocking [`cc88ac5`](https://github.com/inspect-js/which-typed-array/commit/cc88ac56bcfb71cb26c656ebde4c560a22fadd85) +- [meta] create FUNDING.yml [`acbc723`](https://github.com/inspect-js/which-typed-array/commit/acbc7230929b1256c83df28be4a456eed3e147e9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is-callable`, `tape` [`f1ab63e`](https://github.com/inspect-js/which-typed-array/commit/f1ab63e9366027eae2e29398c035181dac164132) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` [`ac9f50b`](https://github.com/inspect-js/which-typed-array/commit/ac9f50b59558933292dff993df2e68eaa44b07e2) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`aaaa15d`](https://github.com/inspect-js/which-typed-array/commit/aaaa15dfb5bd8228c0cfb8f2aba267efb405b0a1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`602fc9a`](https://github.com/inspect-js/which-typed-array/commit/602fc9a0a7d708236f90c76f592e6a980ecde940) +- [Deps] update `available-typed-arrays`, `is-typed-array` [`b2d69b6`](https://github.com/inspect-js/which-typed-array/commit/b2d69b639bf14344d09f8512dbc060cd4f533161) +- [meta] add `funding` field [`156f613`](https://github.com/inspect-js/which-typed-array/commit/156f613d0ce547c4b15e1ae279198b66e3cef55e) + +## [v1.1.0](https://github.com/inspect-js/which-typed-array/compare/v1.0.1...v1.1.0) - 2019-02-16 + +### Commits + +- [Tests] remove `jscs` [`381c9b4`](https://github.com/inspect-js/which-typed-array/commit/381c9b4bd858da1adedf23d8555af3a3ed901a83) +- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`, `v5.8`; improve matrix; newer npm breaks on older node [`7015c19`](https://github.com/inspect-js/which-typed-array/commit/7015c196ba86540b04d18d9b1d2c368909492023) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`ad67885`](https://github.com/inspect-js/which-typed-array/commit/ad678853e245986720d7650be1c974a9ff3ac814) +- [Tests] up to `node` `v11.6`, `v10.15`, `v8.15`, `v6.16` [`dd94bfb`](https://github.com/inspect-js/which-typed-array/commit/dd94bfb6309a92d1537352f2d1100f9e913ebc01) +- [Refactor] use an array instead of an object for storing Typed Array names [`de98bc1`](https://github.com/inspect-js/which-typed-array/commit/de98bc1d44af92909a34212e276deb5d79ac428a) +- [meta] ignore `test.html` [`06cfb1b`](https://github.com/inspect-js/which-typed-array/commit/06cfb1bc0ca7881d1bd1621fa946a16366cd6afc) +- [Tests] up to `node` `v7.0`, `v6.9`, `v4.6`; improve test matrix [`df76eaa`](https://github.com/inspect-js/which-typed-array/commit/df76eaa39b94b28147e81a89bb587e8aa3e3dba3) +- [New] add `BigInt64Array` and `BigUint64Array` [`d6bca3a`](https://github.com/inspect-js/which-typed-array/commit/d6bca3a68ccfe33f6659a24b770068e89dab1592) +- [Dev Deps] update `jscs`, `nsp`, `eslint` [`f23b45b`](https://github.com/inspect-js/which-typed-array/commit/f23b45b2796bd1f63ddddf28b4b80b9709478cb3) +- [Dev Deps] update `@ljharb/eslint-config`, `eslint`, `semver`, `tape` [`ddb4484`](https://github.com/inspect-js/which-typed-array/commit/ddb4484adc3b45c4396632611556055f3b2f5990) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `is-callable`, `replace`, `semver`, `tape` [`4524e59`](https://github.com/inspect-js/which-typed-array/commit/4524e593e9387c185d5632696c62c1600c0b380f) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`1ec7056`](https://github.com/inspect-js/which-typed-array/commit/1ec70568565c479a6168b03e0a5aec6ec9ac5a21) +- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`799487d`](https://github.com/inspect-js/which-typed-array/commit/799487d666b32d1ae0d27cfededf2f5480c5faea) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`8092598`](https://github.com/inspect-js/which-typed-array/commit/8092598998a1f9f8005b4e3d299eb09c96fa2e21) +- [Tests] up to `node` `v11.10` [`a5aabb1`](https://github.com/inspect-js/which-typed-array/commit/a5aabb1910e8408f857a791253487824c7c758d3) +- [Dev Deps] update `@ljharb/eslint-config`, `eslint`, `nsp`, `semver`, `tape` [`277be33`](https://github.com/inspect-js/which-typed-array/commit/277be331d9f05ff95644d6bcd896547ca620cd8e) +- [Tests] use `npm audit` instead of `nsp` [`ee97dc7`](https://github.com/inspect-js/which-typed-array/commit/ee97dc7c5d384d68f60ce6cb5a85d9509e75f72b) +- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config` [`262ffb0`](https://github.com/inspect-js/which-typed-array/commit/262ffb025facb0795b33fbd5131183bdbc0a40f6) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`d6bbcfc`](https://github.com/inspect-js/which-typed-array/commit/d6bbcfc3eea427f0156fbdcf9ae11dbf3745a755) +- [Tests] up to `node` `v6.2` [`2ff89eb`](https://github.com/inspect-js/which-typed-array/commit/2ff89eb91754146c0bc1ae689f37458d84f6e690) +- Only apps should have lockfiles [`e2bc271`](https://github.com/inspect-js/which-typed-array/commit/e2bc271e1e9a6481a2836f892177825a808c331c) +- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`b79e93b`](https://github.com/inspect-js/which-typed-array/commit/b79e93bf15c871ce0ff24fa3ad61001707eea463) +- [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config` [`016dbff`](https://github.com/inspect-js/which-typed-array/commit/016dbff8c49c32cda7ec80d86006c8a7c43bc40c) +- [Dev Deps] update `eslint`, `tape` [`6ce4bbc`](https://github.com/inspect-js/which-typed-array/commit/6ce4bbc5f6caf632cbcf9ababbfe36e1bf4093d7) +- [Tests] on `node` `v10.1` [`f0683a0`](https://github.com/inspect-js/which-typed-array/commit/f0683a0c17e039e926ecaad4c4c341cd8e5878f1) +- [Tests] up to `node` `v7.2` [`2f29cef`](https://github.com/inspect-js/which-typed-array/commit/2f29cef42d30f87259cd6687c25a79ae4651d0c9) +- [Dev Deps] update `replace` [`73b5ba6`](https://github.com/inspect-js/which-typed-array/commit/73b5ba6e87638d13553985977cab9d1bad33e242) +- [Deps] update `function-bind` [`c8a18c2`](https://github.com/inspect-js/which-typed-array/commit/c8a18c2982e6b126ecc1d4655ec2e53b05535b20) +- [Tests] on `node` `v5.12` [`812102b`](https://github.com/inspect-js/which-typed-array/commit/812102bf223422da8f7a89e5a1308214dd158571) +- [Tests] on `node` `v5.10` [`271584f`](https://github.com/inspect-js/which-typed-array/commit/271584f3a8b10ef68a7d419ac0062b444e63d07c) + +## [v1.0.1](https://github.com/inspect-js/which-typed-array/compare/v1.0.0...v1.0.1) - 2016-03-19 + +### Commits + +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `is-callable` [`4a628c5`](https://github.com/inspect-js/which-typed-array/commit/4a628c520d8e080a9fa7e8218947d3b2ceedca72) +- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `is-callable` [`8e09372`](https://github.com/inspect-js/which-typed-array/commit/8e09372ded877a191cbf777060483227d5071e84) +- [Tests] up to `node` `v5.6`, `v4.3` [`3a35bf9`](https://github.com/inspect-js/which-typed-array/commit/3a35bf9fb9c7f8e6ac1b579ed2754087351ad1a5) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`9410d5e`](https://github.com/inspect-js/which-typed-array/commit/9410d5e35db4b834827b31ea1723bbeebbcde5ba) +- [Fix] `Symbol.toStringTag` is on the super-[[Prototype]] of Float32Array, not the [[Prototype]]. [`7c40a3a`](https://github.com/inspect-js/which-typed-array/commit/7c40a3a05046bbbd188340fb19471ad913e4af05) +- [Tests] up to `node` `v5.9`, `v4.4` [`07878e7`](https://github.com/inspect-js/which-typed-array/commit/07878e7cd23d586ddb9e85a03f675e0a574db246) +- Use the object form of "author" in package.json [`65caa56`](https://github.com/inspect-js/which-typed-array/commit/65caa560d1c0c15c1080b25a9df55c7373c73f08) +- [Tests] use pretest/posttest for linting/security [`c170f7e`](https://github.com/inspect-js/which-typed-array/commit/c170f7ebcf07475d6420f2d2d2d08b1646280cd4) +- [Deps] update `is-typed-array` [`9ab324e`](https://github.com/inspect-js/which-typed-array/commit/9ab324e746a7552b2d9363777fc5c9f5c2e31ce7) +- [Deps] update `function-bind` [`a723142`](https://github.com/inspect-js/which-typed-array/commit/a723142c70a5b6a4f8f5feecc9705619590f4eeb) +- [Deps] update `is-typed-array` [`ed82ce4`](https://github.com/inspect-js/which-typed-array/commit/ed82ce4e8ecc657fc6e839d23ef6347497bc93be) +- [Tests] on `node` `v4.2` [`f581c20`](https://github.com/inspect-js/which-typed-array/commit/f581c2031990668894a8e5a08eaf01a2548e822c) + +## v1.0.0 - 2015-10-05 + +### Commits + +- Dotfiles / Makefile [`667f89a`](https://github.com/inspect-js/which-typed-array/commit/667f89a9046502594e2559dbf5568e062af3b770) +- Tests. [`a14d05e`](https://github.com/inspect-js/which-typed-array/commit/a14d05ef443d2ac678cb0567befc0abf8cf21709) +- package.json [`560b1aa`](https://github.com/inspect-js/which-typed-array/commit/560b1aa4f8bbc5d41d9cee96c93faf08c25be0e5) +- Read me [`a22096e`](https://github.com/inspect-js/which-typed-array/commit/a22096e05773f93b34e672d3f743ec6f1963bc24) +- Implementation [`0b1ae28`](https://github.com/inspect-js/which-typed-array/commit/0b1ae2848372f6256cf075d687e3722878e67aca) +- Initial commit [`4b32f0a`](https://github.com/inspect-js/which-typed-array/commit/4b32f0a9d32165d6ab91797d6971ea83cf4ce9da) diff --git a/node_modules/which-typed-array/LICENSE b/node_modules/which-typed-array/LICENSE new file mode 100644 index 000000000..b43df444e --- /dev/null +++ b/node_modules/which-typed-array/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/which-typed-array/README.md b/node_modules/which-typed-array/README.md new file mode 100644 index 000000000..1b922cd85 --- /dev/null +++ b/node_modules/which-typed-array/README.md @@ -0,0 +1,70 @@ +# which-typed-array [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag. + +## Example + +```js +var whichTypedArray = require('which-typed-array'); +var assert = require('assert'); + +assert.equal(false, whichTypedArray(undefined)); +assert.equal(false, whichTypedArray(null)); +assert.equal(false, whichTypedArray(false)); +assert.equal(false, whichTypedArray(true)); +assert.equal(false, whichTypedArray([])); +assert.equal(false, whichTypedArray({})); +assert.equal(false, whichTypedArray(/a/g)); +assert.equal(false, whichTypedArray(new RegExp('a', 'g'))); +assert.equal(false, whichTypedArray(new Date())); +assert.equal(false, whichTypedArray(42)); +assert.equal(false, whichTypedArray(NaN)); +assert.equal(false, whichTypedArray(Infinity)); +assert.equal(false, whichTypedArray(new Number(42))); +assert.equal(false, whichTypedArray('foo')); +assert.equal(false, whichTypedArray(Object('foo'))); +assert.equal(false, whichTypedArray(function () {})); +assert.equal(false, whichTypedArray(function* () {})); +assert.equal(false, whichTypedArray(x => x * x)); +assert.equal(false, whichTypedArray([])); + +assert.equal('Int8Array', whichTypedArray(new Int8Array())); +assert.equal('Uint8Array', whichTypedArray(new Uint8Array())); +assert.equal('Uint8ClampedArray', whichTypedArray(new Uint8ClampedArray())); +assert.equal('Int16Array', whichTypedArray(new Int16Array())); +assert.equal('Uint16Array', whichTypedArray(new Uint16Array())); +assert.equal('Int32Array', whichTypedArray(new Int32Array())); +assert.equal('Uint32Array', whichTypedArray(new Uint32Array())); +assert.equal('Float32Array', whichTypedArray(new Float32Array())); +assert.equal('Float64Array', whichTypedArray(new Float64Array())); +assert.equal('BigInt64Array', whichTypedArray(new BigInt64Array())); +assert.equal('BigUint64Array', whichTypedArray(new BigUint64Array())); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/which-typed-array +[npm-version-svg]: https://versionbadg.es/inspect-js/which-typed-array.svg +[deps-svg]: https://david-dm.org/inspect-js/which-typed-array.svg +[deps-url]: https://david-dm.org/inspect-js/which-typed-array +[dev-deps-svg]: https://david-dm.org/inspect-js/which-typed-array/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/which-typed-array#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/which-typed-array.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/which-typed-array.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/which-typed-array.svg +[downloads-url]: https://npm-stat.com/charts.html?package=which-typed-array +[codecov-image]: https://codecov.io/gh/inspect-js/which-typed-array/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/which-typed-array/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/which-typed-array +[actions-url]: https://github.com/inspect-js/which-typed-array/actions diff --git a/node_modules/which-typed-array/index.js b/node_modules/which-typed-array/index.js new file mode 100644 index 000000000..42080bee7 --- /dev/null +++ b/node_modules/which-typed-array/index.js @@ -0,0 +1,55 @@ +'use strict'; + +var forEach = require('for-each'); +var availableTypedArrays = require('available-typed-arrays'); +var callBound = require('call-bind/callBound'); +var gOPD = require('gopd'); + +var $toString = callBound('Object.prototype.toString'); +var hasToStringTag = require('has-tostringtag/shams')(); + +var g = typeof globalThis === 'undefined' ? global : globalThis; +var typedArrays = availableTypedArrays(); + +var $slice = callBound('String.prototype.slice'); +var toStrTags = {}; +var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof'); +if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function (typedArray) { + if (typeof g[typedArray] === 'function') { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + descriptor = gOPD(superProto, Symbol.toStringTag); + } + toStrTags[typedArray] = descriptor.get; + } + } + }); +} + +var tryTypedArrays = function tryAllTypedArrays(value) { + var foundName = false; + forEach(toStrTags, function (getter, typedArray) { + if (!foundName) { + try { + var name = getter.call(value); + if (name === typedArray) { + foundName = name; + } + } catch (e) {} + } + }); + return foundName; +}; + +var isTypedArray = require('is-typed-array'); + +module.exports = function whichTypedArray(value) { + if (!isTypedArray(value)) { return false; } + if (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); } + return tryTypedArrays(value); +}; diff --git a/node_modules/which-typed-array/package.json b/node_modules/which-typed-array/package.json new file mode 100644 index 000000000..9cd5e64fb --- /dev/null +++ b/node_modules/which-typed-array/package.json @@ -0,0 +1,116 @@ +{ + "name": "which-typed-array", + "version": "1.1.9", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.", + "license": "MIT", + "main": "index.js", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only && npm run test:harmony", + "tests-only": "nyc tape test", + "test:harmony": "nyc node --harmony --es-staging test", + "posttest": "aud --production", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/which-typed-array.git" + }, + "keywords": [ + "array", + "TypedArray", + "typed array", + "which", + "typed", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Uint16Array", + "Int32Array", + "Uint32Array", + "Float32Array", + "Float64Array", + "ES6", + "toStringTag", + "Symbol.toStringTag", + "@@toStringTag" + ], + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "is-callable": "^1.2.7", + "make-arrow-function": "^1.2.0", + "make-generator-function": "^2.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/which-typed-array/test/index.js b/node_modules/which-typed-array/test/index.js new file mode 100644 index 000000000..e6711b2c5 --- /dev/null +++ b/node_modules/which-typed-array/test/index.js @@ -0,0 +1,99 @@ +'use strict'; + +var test = require('tape'); +var whichTypedArray = require('../'); +var isCallable = require('is-callable'); +var hasToStringTag = require('has-tostringtag/shams')(); +var generators = require('make-generator-function')(); +var arrows = require('make-arrow-function').list(); +var forEach = require('for-each'); + +var typedArrayNames = [ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; + +test('not arrays', function (t) { + t.test('non-number/string primitives', function (st) { + st.equal(false, whichTypedArray(), 'undefined is not typed array'); + st.equal(false, whichTypedArray(null), 'null is not typed array'); + st.equal(false, whichTypedArray(false), 'false is not typed array'); + st.equal(false, whichTypedArray(true), 'true is not typed array'); + st.end(); + }); + + t.equal(false, whichTypedArray({}), 'object is not typed array'); + t.equal(false, whichTypedArray(/a/g), 'regex literal is not typed array'); + t.equal(false, whichTypedArray(new RegExp('a', 'g')), 'regex object is not typed array'); + t.equal(false, whichTypedArray(new Date()), 'new Date() is not typed array'); + + t.test('numbers', function (st) { + st.equal(false, whichTypedArray(42), 'number is not typed array'); + st.equal(false, whichTypedArray(Object(42)), 'number object is not typed array'); + st.equal(false, whichTypedArray(NaN), 'NaN is not typed array'); + st.equal(false, whichTypedArray(Infinity), 'Infinity is not typed array'); + st.end(); + }); + + t.test('strings', function (st) { + st.equal(false, whichTypedArray('foo'), 'string primitive is not typed array'); + st.equal(false, whichTypedArray(Object('foo')), 'string object is not typed array'); + st.end(); + }); + + t.end(); +}); + +test('Functions', function (t) { + t.equal(false, whichTypedArray(function () {}), 'function is not typed array'); + t.end(); +}); + +test('Generators', { skip: generators.length === 0 }, function (t) { + forEach(generators, function (genFn) { + t.equal(false, whichTypedArray(genFn), 'generator function ' + genFn + ' is not typed array'); + }); + t.end(); +}); + +test('Arrow functions', { skip: arrows.length === 0 }, function (t) { + forEach(arrows, function (arrowFn) { + t.equal(false, whichTypedArray(arrowFn), 'arrow function ' + arrowFn + ' is not typed array'); + }); + t.end(); +}); + +test('@@toStringTag', { skip: !hasToStringTag }, function (t) { + forEach(typedArrayNames, function (typedArray) { + if (typeof global[typedArray] === 'function') { + var fakeTypedArray = []; + fakeTypedArray[Symbol.toStringTag] = typedArray; + t.equal(false, whichTypedArray(fakeTypedArray), 'faked ' + typedArray + ' is not typed array'); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); + +test('Typed Arrays', function (t) { + forEach(typedArrayNames, function (typedArray) { + var TypedArray = global[typedArray]; + if (isCallable(TypedArray)) { + var arr = new TypedArray(10); + t.equal(typedArray, whichTypedArray(arr), 'new ' + typedArray + '(10) is typed array of type ' + typedArray); + } else { + t.comment('# SKIP ' + typedArray + ' is not supported'); + } + }); + t.end(); +}); diff --git a/package-lock.json b/package-lock.json index 0b9b3299b..0c0c5d108 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,12 +46,11 @@ "@types/semver": "^7.3.8", "@types/sinon": "^10.0.2", "@typescript-eslint/eslint-plugin": "^5.48.2", - "@typescript-eslint/parser": "^5.48.2", "ava": "^4.3.3", "eslint": "^7.32.0", "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-github": "^4.2.0", - "eslint-plugin-import": "^2.24.0", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-no-async-foreach": "^0.1.1", "micromatch": "4.0.4", "nock": "^13.1.1", @@ -835,7 +834,8 @@ }, "node_modules/@types/json5": { "version": "0.0.29", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, "node_modules/@types/node": { @@ -1042,6 +1042,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.48.2.tgz", "integrity": "sha512-38zMsKsG2sIuM5Oi/olurGwYJXzmtdsHhn5mI/pQogP+BjYVkK5iRazCQ8RGS0V+YLk282uWElN70zAAUmaYHw==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "5.48.2", "@typescript-eslint/types": "5.48.2", @@ -1349,16 +1350,16 @@ } }, "node_modules/array-includes": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", - "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", - "get-intrinsic": "^1.1.1", - "is-string": "^1.0.5" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" }, "engines": { "node": ">= 0.4" @@ -1375,14 +1376,33 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", - "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -1674,6 +1694,18 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.0", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" @@ -2059,15 +2091,19 @@ "dev": true }, "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dev": true, "dependencies": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/del": { @@ -2168,36 +2204,45 @@ "node": ">=8.6" } }, - "node_modules/error-ex": { - "version": "1.3.2", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, "node_modules/es-abstract": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", - "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz", + "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", "dev": true, "dependencies": { + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", - "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", - "object-inspect": "^1.10.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.4", + "is-array-buffer": "^3.0.1", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" }, "engines": { "node": ">= 0.4" @@ -2206,6 +2251,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -2310,13 +2378,14 @@ } }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.5.tgz", - "integrity": "sha512-XMoPKjSpXbkeJ7ZZ9icLnJMTY5Mc1kZbCakHquaFsXPpyWOwK0TK6CODO+0ca54UoM9LKOxyUNnoVZRl8TeaAg==", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", "dev": true, "dependencies": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { @@ -2329,16 +2398,20 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", - "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", "dev": true, "dependencies": { - "debug": "^3.2.7", - "pkg-dir": "^2.0.0" + "debug": "^3.2.7" }, "engines": { "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, "node_modules/eslint-module-utils/node_modules/debug": { @@ -2350,85 +2423,6 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-module-utils/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "dependencies": { - "find-up": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/eslint-plugin-eslint-comments": { "version": "3.2.0", "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", @@ -2630,112 +2624,50 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.0.tgz", - "integrity": "sha512-Kc6xqT9hiYi2cgybOc0I2vC9OgAYga5o/rAFinam/yF/t5uBqxQbauNPMC6fgb640T/89P0gFoO27FOilJ/Cqg==", + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", "dev": true, "dependencies": { - "array-includes": "^3.1.3", - "array.prototype.flat": "^1.2.4", - "debug": "^2.6.9", + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.5", - "eslint-module-utils": "^2.6.2", - "find-up": "^2.0.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", "has": "^1.0.3", - "is-core-module": "^2.4.0", - "minimatch": "^3.0.4", - "object.values": "^1.1.3", - "pkg-up": "^2.0.0", - "read-pkg-up": "^3.0.0", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.9.0" + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "2.6.9", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/ms": { - "version": "2.0.0", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/eslint-plugin-import/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" + "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-import/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "engines": { - "node": ">=4" + "bin": { + "semver": "bin/semver.js" } }, "node_modules/eslint-plugin-no-async-foreach": { @@ -3235,6 +3167,15 @@ "integrity": "sha512-OMQjaErSFHmHqZe+PSidH5n8j3O0F2DdnVh8JB4j4eUQ2k6KvB0qGfrKIhapvez5JerBbmWkaLYUYWISaESoXg==", "dev": true }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/form-data": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", @@ -3276,11 +3217,38 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gar": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/gar/-/gar-1.0.4.tgz", @@ -3308,14 +3276,30 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3385,6 +3369,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -3404,6 +3403,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -3422,9 +3433,9 @@ } }, "node_modules/has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3438,38 +3449,72 @@ "node": ">=4" } }, - "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", "dev": true, - "engines": { - "node": ">= 0.4" + "dependencies": { + "get-intrinsic": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true, "engines": { - "node": ">=10.17.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, "engines": { - "node": ">= 4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "engines": { + "node": ">= 4" } }, "node_modules/ignore-by-default": { @@ -3533,6 +3578,20 @@ "version": "2.0.3", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "node_modules/internal-slot": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", + "integrity": "sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ip-regex": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", @@ -3550,16 +3609,28 @@ "node": ">=8" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "node_modules/is-array-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", + "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3577,12 +3648,13 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", - "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -3596,9 +3668,9 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "node_modules/is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "engines": { "node": ">= 0.4" @@ -3608,9 +3680,9 @@ } }, "node_modules/is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -3620,10 +3692,13 @@ } }, "node_modules/is-date-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", - "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -3663,9 +3738,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, "engines": { "node": ">= 0.4" @@ -3682,10 +3757,13 @@ } }, "node_modules/is-number-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", - "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -3724,13 +3802,13 @@ "dev": true }, "node_modules/is-regex": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", - "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -3739,6 +3817,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -3752,10 +3842,13 @@ } }, "node_modules/is-string": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", - "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -3778,6 +3871,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unicode-supported": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.2.0.tgz", @@ -3790,6 +3902,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -3828,11 +3952,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -3850,8 +3969,9 @@ "dev": true }, "node_modules/json5": { - "version": "1.0.1", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -4134,10 +4254,13 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/ms": { "version": "2.1.2", @@ -4211,25 +4334,6 @@ "node": ">=12.19" } }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4252,9 +4356,9 @@ } }, "node_modules/object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4270,14 +4374,14 @@ } }, "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { @@ -4288,14 +4392,14 @@ } }, "node_modules/object.values": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", - "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.2" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "engines": { "node": ">= 0.4" @@ -4433,18 +4537,6 @@ "node": ">=6" } }, - "node_modules/parse-json": { - "version": "4.0.0", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/parse-ms": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", @@ -4536,85 +4628,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "dependencies": { - "find-up": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-up/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/plur": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz", @@ -4713,146 +4726,33 @@ "node": ">=6" } }, - "node_modules/read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { - "pify": "^3.0.0" + "picomatch": "^2.2.1" }, "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" + "node": ">=8.10.0" } }, - "node_modules/read-pkg-up/node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "node_modules/regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "dev": true, "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" }, "engines": { - "node": ">=4" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" + "node": ">= 0.4" }, - "engines": { - "node": ">=8.10.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/regexpp": { @@ -4906,13 +4806,17 @@ } }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4983,6 +4887,20 @@ "version": "1.1.9", "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==" }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -5050,6 +4968,20 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -5151,34 +5083,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/spdx-correct": { - "version": "3.1.0", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.0", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.5", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -5221,26 +5125,28 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5260,7 +5166,8 @@ }, "node_modules/strip-bom": { "version": "3.0.0", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, "engines": { "node": ">=4" @@ -5362,6 +5269,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/svg-element-attributes": { "version": "1.3.1", "integrity": "sha512-Bh05dSOnJBf3miNMqpsormfNtfidA/GxQVakhtn0T4DECWKeXQRQUceYjJ+OxYiiLdGe4Jo9iFV8wICFapFeIA==", @@ -5535,13 +5454,14 @@ "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, "node_modules/tsconfig-paths": { - "version": "3.9.0", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", "dev": true, "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.1", - "minimist": "^1.2.0", + "minimist": "^1.2.6", "strip-bom": "^3.0.0" } }, @@ -5604,6 +5524,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { "version": "4.9.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", @@ -5618,14 +5552,14 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" }, "funding": { @@ -5672,15 +5606,6 @@ "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", "dev": true }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -5735,6 +5660,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", diff --git a/package.json b/package.json index a5d3ec1a3..e1ed0bd70 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "eslint": "^7.32.0", "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-github": "^4.2.0", - "eslint-plugin-import": "^2.24.0", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-no-async-foreach": "^0.1.1", "micromatch": "4.0.4", "nock": "^13.1.1",