step-node-agent 3.26.4 → 3.26.5-CustomizedJv2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/{has-property-descriptors → call-bind-apply-helpers}/.github/FUNDING.yml +1 -1
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +23 -0
- package/node_modules/{call-bind → call-bind-apply-helpers}/LICENSE +1 -1
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +46 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/{call-bind → call-bound}/.github/FUNDING.yml +1 -1
- package/node_modules/call-bound/CHANGELOG.md +34 -0
- package/node_modules/{has-property-descriptors → call-bound}/LICENSE +1 -1
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +13 -0
- package/node_modules/call-bound/index.js +18 -0
- package/node_modules/{call-bind → call-bound}/package.json +27 -23
- package/node_modules/{call-bind/test/callBound.js → call-bound/test/index.js} +1 -1
- package/node_modules/{define-data-property → dunder-proto}/.github/FUNDING.yml +1 -1
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/{has-proto → dunder-proto}/package.json +34 -36
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +14 -0
- package/node_modules/es-define-property/index.js +1 -3
- package/node_modules/es-define-property/package.json +12 -12
- package/node_modules/es-define-property/test/index.js +1 -0
- package/node_modules/es-define-property/tsconfig.json +2 -42
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/{set-function-length → es-object-atoms}/.github/FUNDING.yml +1 -1
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/{define-data-property → es-object-atoms}/LICENSE +1 -1
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/express/History.md +10 -1
- package/node_modules/express/package.json +6 -2
- package/node_modules/get-intrinsic/CHANGELOG.md +35 -0
- package/node_modules/get-intrinsic/index.js +39 -21
- package/node_modules/get-intrinsic/package.json +23 -19
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +2 -2
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/{has-proto → get-proto}/.github/FUNDING.yml +1 -1
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/{has-proto → get-proto}/LICENSE +1 -1
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/{has-property-descriptors → get-proto}/package.json +35 -31
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/CHANGELOG.md +20 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +2 -3
- package/node_modules/gopd/package.json +16 -10
- package/node_modules/gopd/test/index.js +2 -1
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +16 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +1 -0
- package/node_modules/has-symbols/package.json +19 -9
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +5 -2
- package/node_modules/has-symbols/test/shams/core-js.js +1 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +1 -0
- package/node_modules/has-symbols/test/tests.js +4 -2
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/is-core-module/CHANGELOG.md +13 -0
- package/node_modules/is-core-module/core.json +1 -0
- package/node_modules/is-core-module/package.json +3 -3
- package/node_modules/is-core-module/test/index.js +3 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/object-inspect/CHANGELOG.md +8 -0
- package/node_modules/object-inspect/index.js +10 -7
- package/node_modules/object-inspect/package.json +5 -4
- package/node_modules/object-inspect/test/values.js +50 -0
- package/node_modules/path-to-regexp/index.js +13 -3
- package/node_modules/path-to-regexp/package.json +1 -1
- package/node_modules/psl/README.md +7 -14
- package/node_modules/psl/SECURITY.md +13 -0
- package/node_modules/psl/data/rules.js +536 -529
- package/node_modules/psl/dist/psl.cjs +1 -1
- package/node_modules/psl/dist/psl.mjs +726 -715
- package/node_modules/psl/dist/psl.umd.cjs +1 -1
- package/node_modules/psl/index.js +52 -74
- package/node_modules/psl/package.json +10 -7
- package/node_modules/resolve/lib/core.json +4 -0
- package/node_modules/resolve/package.json +12 -9
- package/node_modules/side-channel/.eslintrc +1 -0
- package/node_modules/side-channel/CHANGELOG.md +15 -0
- package/node_modules/side-channel/README.md +60 -1
- package/node_modules/side-channel/index.d.ts +9 -22
- package/node_modules/side-channel/index.js +20 -106
- package/node_modules/side-channel/package.json +20 -19
- package/node_modules/side-channel/test/index.js +76 -55
- package/node_modules/side-channel/tsconfig.json +2 -43
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +113 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +104 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/yaml/README.md +27 -8
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +1 -1
- package/node_modules/yaml/browser/dist/log.js +1 -4
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +2 -11
- package/node_modules/yaml/browser/dist/util.js +1 -1
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +4 -4
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +6 -6
- package/node_modules/yaml/dist/compose/compose-node.d.ts +7 -7
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +4 -4
- package/node_modules/yaml/dist/compose/composer.d.ts +7 -6
- package/node_modules/yaml/dist/compose/composer.js +2 -1
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +5 -5
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +5 -5
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +5 -5
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +2 -2
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -7
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +4 -4
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +2 -2
- package/node_modules/yaml/dist/compose/resolve-props.js +1 -1
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +1 -1
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +1 -1
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +2 -2
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +3 -3
- package/node_modules/yaml/dist/doc/Document.d.ts +11 -11
- package/node_modules/yaml/dist/doc/anchors.d.ts +2 -2
- package/node_modules/yaml/dist/doc/createNode.d.ts +4 -4
- package/node_modules/yaml/dist/doc/directives.d.ts +1 -1
- package/node_modules/yaml/dist/index.d.ts +21 -18
- package/node_modules/yaml/dist/log.js +4 -2
- package/node_modules/yaml/dist/nodes/Alias.d.ts +9 -8
- package/node_modules/yaml/dist/nodes/Collection.d.ts +4 -4
- package/node_modules/yaml/dist/nodes/Node.d.ts +10 -10
- package/node_modules/yaml/dist/nodes/Pair.d.ts +9 -8
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +4 -3
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +10 -10
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +10 -10
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +3 -3
- package/node_modules/yaml/dist/nodes/identity.d.ts +7 -7
- package/node_modules/yaml/dist/nodes/toJS.d.ts +2 -2
- package/node_modules/yaml/dist/options.d.ts +10 -10
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +4 -4
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +1 -1
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +2 -2
- package/node_modules/yaml/dist/parse/cst.d.ts +4 -3
- package/node_modules/yaml/dist/parse/lexer.d.ts +1 -1
- package/node_modules/yaml/dist/parse/parser.d.ts +4 -4
- package/node_modules/yaml/dist/parse/parser.js +2 -1
- package/node_modules/yaml/dist/public-api.d.ts +6 -5
- package/node_modules/yaml/dist/schema/Schema.d.ts +4 -4
- package/node_modules/yaml/dist/schema/common/map.d.ts +1 -1
- package/node_modules/yaml/dist/schema/common/null.d.ts +1 -1
- package/node_modules/yaml/dist/schema/common/seq.d.ts +1 -1
- package/node_modules/yaml/dist/schema/common/string.d.ts +1 -1
- package/node_modules/yaml/dist/schema/core/bool.d.ts +1 -1
- package/node_modules/yaml/dist/schema/core/float.d.ts +1 -1
- package/node_modules/yaml/dist/schema/core/int.d.ts +1 -1
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -1
- package/node_modules/yaml/dist/schema/json/schema.d.ts +1 -1
- package/node_modules/yaml/dist/schema/tags.d.ts +2 -2
- package/node_modules/yaml/dist/schema/types.d.ts +8 -8
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +1 -1
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +6 -5
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +1 -1
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +1 -1
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +1 -1
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +3 -3
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +11 -17
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +7 -7
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -1
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +9 -9
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +1 -1
- package/node_modules/yaml/dist/stringify/stringify.d.ts +3 -3
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +2 -2
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +3 -3
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +1 -1
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +2 -2
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +2 -2
- package/node_modules/yaml/dist/util.d.ts +16 -12
- package/node_modules/yaml/dist/util.js +2 -2
- package/node_modules/yaml/dist/visit.d.ts +7 -7
- package/node_modules/yaml/package.json +4 -4
- package/package.json +1 -1
- package/node_modules/call-bind/.eslintignore +0 -1
- package/node_modules/call-bind/CHANGELOG.md +0 -93
- package/node_modules/call-bind/README.md +0 -64
- package/node_modules/call-bind/callBound.js +0 -15
- package/node_modules/call-bind/index.js +0 -35
- package/node_modules/call-bind/test/index.js +0 -80
- package/node_modules/define-data-property/.eslintrc +0 -24
- package/node_modules/define-data-property/CHANGELOG.md +0 -70
- package/node_modules/define-data-property/README.md +0 -67
- package/node_modules/define-data-property/index.d.ts +0 -12
- package/node_modules/define-data-property/index.js +0 -56
- package/node_modules/define-data-property/package.json +0 -106
- package/node_modules/define-data-property/test/index.js +0 -392
- package/node_modules/define-data-property/tsconfig.json +0 -59
- package/node_modules/has-property-descriptors/.eslintrc +0 -13
- package/node_modules/has-property-descriptors/CHANGELOG.md +0 -35
- package/node_modules/has-property-descriptors/README.md +0 -43
- package/node_modules/has-property-descriptors/index.js +0 -22
- package/node_modules/has-property-descriptors/test/index.js +0 -57
- package/node_modules/has-proto/CHANGELOG.md +0 -38
- package/node_modules/has-proto/README.md +0 -38
- package/node_modules/has-proto/index.d.ts +0 -3
- package/node_modules/has-proto/index.js +0 -15
- package/node_modules/has-proto/test/index.js +0 -19
- package/node_modules/has-proto/tsconfig.json +0 -49
- package/node_modules/set-function-length/.eslintrc +0 -27
- package/node_modules/set-function-length/CHANGELOG.md +0 -70
- package/node_modules/set-function-length/LICENSE +0 -21
- package/node_modules/set-function-length/README.md +0 -56
- package/node_modules/set-function-length/env.d.ts +0 -9
- package/node_modules/set-function-length/env.js +0 -25
- package/node_modules/set-function-length/index.d.ts +0 -7
- package/node_modules/set-function-length/index.js +0 -42
- package/node_modules/set-function-length/package.json +0 -102
- /package/node_modules/{call-bind → call-bind-apply-helpers}/.eslintrc +0 -0
- /package/node_modules/{call-bind → call-bind-apply-helpers}/.nycrc +0 -0
- /package/node_modules/{has-property-descriptors → call-bound}/.nycrc +0 -0
- /package/node_modules/{set-function-length → call-bound}/tsconfig.json +0 -0
- /package/node_modules/{has-proto → dunder-proto}/.eslintrc +0 -0
- /package/node_modules/{define-data-property → dunder-proto}/.nycrc +0 -0
- /package/node_modules/{set-function-length → side-channel-list}/.nycrc +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SchemaOptions } from '../options
|
|
2
|
-
import type { CollectionTag, ScalarTag } from './types
|
|
1
|
+
import type { SchemaOptions } from '../options';
|
|
2
|
+
import type { CollectionTag, ScalarTag } from './types';
|
|
3
3
|
declare const tagsByName: {
|
|
4
4
|
binary: ScalarTag;
|
|
5
5
|
bool: ScalarTag & {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { CreateNodeContext } from '../doc/createNode
|
|
2
|
-
import type { Node } from '../nodes/Node
|
|
3
|
-
import type { Scalar } from '../nodes/Scalar
|
|
4
|
-
import type { YAMLMap } from '../nodes/YAMLMap
|
|
5
|
-
import type { YAMLSeq } from '../nodes/YAMLSeq
|
|
6
|
-
import type { ParseOptions } from '../options
|
|
7
|
-
import type { StringifyContext } from '../stringify/stringify
|
|
8
|
-
import type { Schema } from './Schema
|
|
1
|
+
import type { CreateNodeContext } from '../doc/createNode';
|
|
2
|
+
import type { Node } from '../nodes/Node';
|
|
3
|
+
import type { Scalar } from '../nodes/Scalar';
|
|
4
|
+
import type { YAMLMap } from '../nodes/YAMLMap';
|
|
5
|
+
import type { YAMLSeq } from '../nodes/YAMLSeq';
|
|
6
|
+
import type { ParseOptions } from '../options';
|
|
7
|
+
import type { StringifyContext } from '../stringify/stringify';
|
|
8
|
+
import type { Schema } from './Schema';
|
|
9
9
|
interface TagBase {
|
|
10
10
|
/**
|
|
11
11
|
* An optional factory function, used e.g. by collections when wrapping JS objects as AST nodes.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ScalarTag } from '../types
|
|
1
|
+
import type { ScalarTag } from '../types';
|
|
2
2
|
export declare const binary: ScalarTag;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var node_buffer = require('node:buffer');
|
|
3
4
|
var Scalar = require('../../nodes/Scalar.js');
|
|
4
5
|
var stringifyString = require('../../stringify/stringifyString.js');
|
|
5
6
|
|
|
@@ -16,8 +17,8 @@ const binary = {
|
|
|
16
17
|
* document.querySelector('#photo').src = URL.createObjectURL(blob)
|
|
17
18
|
*/
|
|
18
19
|
resolve(src, onError) {
|
|
19
|
-
if (typeof Buffer === 'function') {
|
|
20
|
-
return Buffer.from(src, 'base64');
|
|
20
|
+
if (typeof node_buffer.Buffer === 'function') {
|
|
21
|
+
return node_buffer.Buffer.from(src, 'base64');
|
|
21
22
|
}
|
|
22
23
|
else if (typeof atob === 'function') {
|
|
23
24
|
// On IE 11, atob() can't handle newlines
|
|
@@ -35,11 +36,11 @@ const binary = {
|
|
|
35
36
|
stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
36
37
|
const buf = value; // checked earlier by binary.identify()
|
|
37
38
|
let str;
|
|
38
|
-
if (typeof Buffer === 'function') {
|
|
39
|
+
if (typeof node_buffer.Buffer === 'function') {
|
|
39
40
|
str =
|
|
40
|
-
buf instanceof Buffer
|
|
41
|
+
buf instanceof node_buffer.Buffer
|
|
41
42
|
? buf.toString('base64')
|
|
42
|
-
: Buffer.from(buf.buffer).toString('base64');
|
|
43
|
+
: node_buffer.Buffer.from(buf.buffer).toString('base64');
|
|
43
44
|
}
|
|
44
45
|
else if (typeof btoa === 'function') {
|
|
45
46
|
let s = '';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ToJSContext } from '../../nodes/toJS
|
|
2
|
-
import type { MapLike } from '../../nodes/YAMLMap
|
|
3
|
-
import type { ScalarTag } from '../types
|
|
1
|
+
import type { ToJSContext } from '../../nodes/toJS';
|
|
2
|
+
import type { MapLike } from '../../nodes/YAMLMap';
|
|
3
|
+
import type { ScalarTag } from '../types';
|
|
4
4
|
export declare const merge: ScalarTag & {
|
|
5
5
|
identify(value: unknown): boolean;
|
|
6
6
|
test: RegExp;
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
import { ToJSContext } from '../../nodes/toJS
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import type {
|
|
5
|
-
import {
|
|
1
|
+
import type { ToJSContext } from '../../nodes/toJS';
|
|
2
|
+
import { YAMLMap } from '../../nodes/YAMLMap';
|
|
3
|
+
import { YAMLSeq } from '../../nodes/YAMLSeq';
|
|
4
|
+
import type { CreateNodeContext } from '../../util';
|
|
5
|
+
import type { Schema } from '../Schema';
|
|
6
|
+
import type { CollectionTag } from '../types';
|
|
6
7
|
export declare class YAMLOMap extends YAMLSeq {
|
|
7
8
|
static tag: string;
|
|
8
9
|
constructor();
|
|
9
|
-
add:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
get: {
|
|
15
|
-
(key: unknown, keepScalar: true): import("../../index.js").Scalar<any> | undefined;
|
|
16
|
-
(key: unknown, keepScalar?: false): any;
|
|
17
|
-
(key: unknown, keepScalar?: boolean): any;
|
|
18
|
-
};
|
|
19
|
-
has: (key: unknown) => boolean;
|
|
20
|
-
set: (key: any, value: any) => void;
|
|
10
|
+
add: typeof YAMLMap.prototype.add;
|
|
11
|
+
delete: typeof YAMLMap.prototype.delete;
|
|
12
|
+
get: typeof YAMLMap.prototype.get;
|
|
13
|
+
has: typeof YAMLMap.prototype.has;
|
|
14
|
+
set: typeof YAMLMap.prototype.set;
|
|
21
15
|
/**
|
|
22
16
|
* If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
|
|
23
17
|
* but TypeScript won't allow widening the signature of a child method.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { CreateNodeContext } from '../../doc/createNode
|
|
2
|
-
import type { ParsedNode } from '../../nodes/Node
|
|
3
|
-
import { Pair } from '../../nodes/Pair
|
|
4
|
-
import { YAMLMap } from '../../nodes/YAMLMap
|
|
5
|
-
import { YAMLSeq } from '../../nodes/YAMLSeq
|
|
6
|
-
import type { Schema } from '../../schema/Schema
|
|
7
|
-
import type { CollectionTag } from '../types
|
|
1
|
+
import type { CreateNodeContext } from '../../doc/createNode';
|
|
2
|
+
import type { ParsedNode } from '../../nodes/Node';
|
|
3
|
+
import { Pair } from '../../nodes/Pair';
|
|
4
|
+
import type { YAMLMap } from '../../nodes/YAMLMap';
|
|
5
|
+
import { YAMLSeq } from '../../nodes/YAMLSeq';
|
|
6
|
+
import type { Schema } from '../../schema/Schema';
|
|
7
|
+
import type { CollectionTag } from '../types';
|
|
8
8
|
export declare function resolvePairs(seq: YAMLSeq.Parsed<ParsedNode | Pair<ParsedNode, ParsedNode | null>> | YAMLMap.Parsed, onError: (message: string) => void): YAMLSeq.Parsed<Pair<ParsedNode, ParsedNode | null>>;
|
|
9
9
|
export declare function createPairs(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSeq<unknown>;
|
|
10
10
|
export declare const pairs: CollectionTag;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const schema: (import(
|
|
1
|
+
export declare const schema: (import('../types').CollectionTag | import('../types').ScalarTag)[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Pair } from '../../nodes/Pair
|
|
2
|
-
import { Scalar } from '../../nodes/Scalar
|
|
3
|
-
import { ToJSContext } from '../../nodes/toJS
|
|
4
|
-
import { YAMLMap } from '../../nodes/YAMLMap
|
|
5
|
-
import type { Schema } from '../../schema/Schema
|
|
6
|
-
import type { StringifyContext } from '../../stringify/stringify
|
|
7
|
-
import { CreateNodeContext } from '../../util
|
|
8
|
-
import type { CollectionTag } from '../types
|
|
1
|
+
import { Pair } from '../../nodes/Pair';
|
|
2
|
+
import type { Scalar } from '../../nodes/Scalar';
|
|
3
|
+
import type { ToJSContext } from '../../nodes/toJS';
|
|
4
|
+
import { YAMLMap } from '../../nodes/YAMLMap';
|
|
5
|
+
import type { Schema } from '../../schema/Schema';
|
|
6
|
+
import type { StringifyContext } from '../../stringify/stringify';
|
|
7
|
+
import type { CreateNodeContext } from '../../util';
|
|
8
|
+
import type { CollectionTag } from '../types';
|
|
9
9
|
export declare class YAMLSet<T = unknown> extends YAMLMap<T, Scalar<null> | null> {
|
|
10
10
|
static tag: string;
|
|
11
11
|
constructor(schema?: Schema);
|
|
@@ -23,6 +23,6 @@ export declare class YAMLSet<T = unknown> extends YAMLMap<T, Scalar<null> | null
|
|
|
23
23
|
set(key: T, value: null): void;
|
|
24
24
|
toJSON(_?: unknown, ctx?: ToJSContext): any;
|
|
25
25
|
toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
|
|
26
|
-
static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSet
|
|
26
|
+
static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSet;
|
|
27
27
|
}
|
|
28
28
|
export declare const set: CollectionTag;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Document } from '../doc/Document
|
|
2
|
-
import type { Alias } from '../nodes/Alias
|
|
3
|
-
import type { ToStringOptions } from '../options
|
|
1
|
+
import type { Document } from '../doc/Document';
|
|
2
|
+
import type { Alias } from '../nodes/Alias';
|
|
3
|
+
import type { ToStringOptions } from '../options';
|
|
4
4
|
export type StringifyContext = {
|
|
5
5
|
actualString?: boolean;
|
|
6
6
|
allNullValues?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Collection } from '../nodes/Collection
|
|
2
|
-
import { StringifyContext } from './stringify
|
|
1
|
+
import type { Collection } from '../nodes/Collection';
|
|
2
|
+
import type { StringifyContext } from './stringify';
|
|
3
3
|
interface StringifyCollectionOptions {
|
|
4
4
|
blockItemPrefix: string;
|
|
5
5
|
flowChars: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Document } from '../doc/Document
|
|
2
|
-
import type { Node } from '../nodes/Node
|
|
3
|
-
import type { ToStringOptions } from '../options
|
|
1
|
+
import type { Document } from '../doc/Document';
|
|
2
|
+
import type { Node } from '../nodes/Node';
|
|
3
|
+
import type { ToStringOptions } from '../options';
|
|
4
4
|
export declare function stringifyDocument(doc: Readonly<Document<Node, boolean>>, options: ToStringOptions): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Scalar } from '../nodes/Scalar
|
|
1
|
+
import type { Scalar } from '../nodes/Scalar';
|
|
2
2
|
export declare function stringifyNumber({ format, minFractionDigits, tag, value }: Scalar): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Pair } from '../nodes/Pair
|
|
2
|
-
import { StringifyContext } from './stringify
|
|
1
|
+
import type { Pair } from '../nodes/Pair';
|
|
2
|
+
import type { StringifyContext } from './stringify';
|
|
3
3
|
export declare function stringifyPair({ key, value }: Readonly<Pair>, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Scalar } from '../nodes/Scalar
|
|
2
|
-
import type { StringifyContext } from './stringify
|
|
1
|
+
import { Scalar } from '../nodes/Scalar';
|
|
2
|
+
import type { StringifyContext } from './stringify';
|
|
3
3
|
interface StringifyScalar {
|
|
4
4
|
value: string;
|
|
5
5
|
comment?: string | null;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
export { createNode
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
1
|
+
export { createNode } from './doc/createNode';
|
|
2
|
+
export type { CreateNodeContext } from './doc/createNode';
|
|
3
|
+
export { debug, warn } from './log';
|
|
4
|
+
export type { LogLevelId } from './log';
|
|
5
|
+
export { createPair } from './nodes/Pair';
|
|
6
|
+
export { toJS } from './nodes/toJS';
|
|
7
|
+
export type { ToJSContext } from './nodes/toJS';
|
|
8
|
+
export { findPair } from './nodes/YAMLMap';
|
|
9
|
+
export { map as mapTag } from './schema/common/map';
|
|
10
|
+
export { seq as seqTag } from './schema/common/seq';
|
|
11
|
+
export { string as stringTag } from './schema/common/string';
|
|
12
|
+
export { foldFlowLines } from './stringify/foldFlowLines';
|
|
13
|
+
export type { FoldOptions } from './stringify/foldFlowLines';
|
|
14
|
+
export type { StringifyContext } from './stringify/stringify';
|
|
15
|
+
export { stringifyNumber } from './stringify/stringifyNumber';
|
|
16
|
+
export { stringifyString } from './stringify/stringifyString';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var createNode = require('./doc/createNode.js');
|
|
4
4
|
var log = require('./log.js');
|
|
5
5
|
var Pair = require('./nodes/Pair.js');
|
|
6
|
-
var YAMLMap = require('./nodes/YAMLMap.js');
|
|
7
6
|
var toJS = require('./nodes/toJS.js');
|
|
7
|
+
var YAMLMap = require('./nodes/YAMLMap.js');
|
|
8
8
|
var map = require('./schema/common/map.js');
|
|
9
9
|
var seq = require('./schema/common/seq.js');
|
|
10
10
|
var string = require('./schema/common/string.js');
|
|
@@ -18,8 +18,8 @@ exports.createNode = createNode.createNode;
|
|
|
18
18
|
exports.debug = log.debug;
|
|
19
19
|
exports.warn = log.warn;
|
|
20
20
|
exports.createPair = Pair.createPair;
|
|
21
|
-
exports.findPair = YAMLMap.findPair;
|
|
22
21
|
exports.toJS = toJS.toJS;
|
|
22
|
+
exports.findPair = YAMLMap.findPair;
|
|
23
23
|
exports.mapTag = map.map;
|
|
24
24
|
exports.seqTag = seq.seq;
|
|
25
25
|
exports.stringTag = string.string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Document } from './doc/Document
|
|
2
|
-
import type { Alias } from './nodes/Alias
|
|
3
|
-
import { Node } from './nodes/Node
|
|
4
|
-
import type { Pair } from './nodes/Pair
|
|
5
|
-
import type { Scalar } from './nodes/Scalar
|
|
6
|
-
import type { YAMLMap } from './nodes/YAMLMap
|
|
7
|
-
import type { YAMLSeq } from './nodes/YAMLSeq
|
|
1
|
+
import type { Document } from './doc/Document';
|
|
2
|
+
import type { Alias } from './nodes/Alias';
|
|
3
|
+
import type { Node } from './nodes/Node';
|
|
4
|
+
import type { Pair } from './nodes/Pair';
|
|
5
|
+
import type { Scalar } from './nodes/Scalar';
|
|
6
|
+
import type { YAMLMap } from './nodes/YAMLMap';
|
|
7
|
+
import type { YAMLSeq } from './nodes/YAMLSeq';
|
|
8
8
|
export type visitorFn<T> = (key: number | 'key' | 'value' | null, node: T, path: readonly (Document | Node | Pair)[]) => void | symbol | number | Node | Pair;
|
|
9
9
|
export type visitor = visitorFn<unknown> | {
|
|
10
10
|
Alias?: visitorFn<Alias>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yaml",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"author": "Eemeli Aro <eemeli@gmail.com>",
|
|
6
6
|
"repository": "github:eemeli/yaml",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@eslint/js": "^9.9.1",
|
|
75
75
|
"@rollup/plugin-babel": "^6.0.3",
|
|
76
76
|
"@rollup/plugin-replace": "^5.0.2",
|
|
77
|
-
"@rollup/plugin-typescript": "^
|
|
77
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
78
78
|
"@types/jest": "^29.2.4",
|
|
79
79
|
"@types/node": "^20.11.20",
|
|
80
80
|
"babel-jest": "^29.0.1",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"jest-ts-webcompat-resolver": "^1.0.0",
|
|
87
87
|
"prettier": "^3.0.2",
|
|
88
88
|
"rollup": "^4.12.0",
|
|
89
|
-
"tslib": "^2.1
|
|
90
|
-
"typescript": "^5.
|
|
89
|
+
"tslib": "^2.8.1",
|
|
90
|
+
"typescript": "^5.7.2",
|
|
91
91
|
"typescript-eslint": "^8.4.0"
|
|
92
92
|
},
|
|
93
93
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
coverage/
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [v1.0.7](https://github.com/ljharb/call-bind/compare/v1.0.6...v1.0.7) - 2024-02-12
|
|
9
|
-
|
|
10
|
-
### Commits
|
|
11
|
-
|
|
12
|
-
- [Refactor] use `es-define-property` [`09b76a0`](https://github.com/ljharb/call-bind/commit/09b76a01634440461d44a80c9924ec4b500f3b03)
|
|
13
|
-
- [Deps] update `get-intrinsic`, `set-function-length` [`ad5136d`](https://github.com/ljharb/call-bind/commit/ad5136ddda2a45c590959829ad3dce0c9f4e3590)
|
|
14
|
-
|
|
15
|
-
## [v1.0.6](https://github.com/ljharb/call-bind/compare/v1.0.5...v1.0.6) - 2024-02-05
|
|
16
|
-
|
|
17
|
-
### Commits
|
|
18
|
-
|
|
19
|
-
- [Dev Deps] update `aud`, `npmignore`, `tape` [`d564d5c`](https://github.com/ljharb/call-bind/commit/d564d5ce3e06a19df4d499c77f8d1a9da44e77aa)
|
|
20
|
-
- [Deps] update `get-intrinsic`, `set-function-length` [`cfc2bdc`](https://github.com/ljharb/call-bind/commit/cfc2bdca7b633df0e0e689e6b637f668f1c6792e)
|
|
21
|
-
- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`64cd289`](https://github.com/ljharb/call-bind/commit/64cd289ae5862c250a4ca80aa8d461047c166af5)
|
|
22
|
-
- [meta] add missing `engines.node` [`32a4038`](https://github.com/ljharb/call-bind/commit/32a4038857b62179f7f9b7b3df2c5260036be582)
|
|
23
|
-
|
|
24
|
-
## [v1.0.5](https://github.com/ljharb/call-bind/compare/v1.0.4...v1.0.5) - 2023-10-19
|
|
25
|
-
|
|
26
|
-
### Commits
|
|
27
|
-
|
|
28
|
-
- [Fix] throw an error on non-functions as early as possible [`f262408`](https://github.com/ljharb/call-bind/commit/f262408f822c840fbc268080f3ad7c429611066d)
|
|
29
|
-
- [Deps] update `set-function-length` [`3fff271`](https://github.com/ljharb/call-bind/commit/3fff27145a1e3a76a5b74f1d7c3c43d0fa3b9871)
|
|
30
|
-
|
|
31
|
-
## [v1.0.4](https://github.com/ljharb/call-bind/compare/v1.0.3...v1.0.4) - 2023-10-19
|
|
32
|
-
|
|
33
|
-
## [v1.0.3](https://github.com/ljharb/call-bind/compare/v1.0.2...v1.0.3) - 2023-10-19
|
|
34
|
-
|
|
35
|
-
### Commits
|
|
36
|
-
|
|
37
|
-
- [actions] reuse common workflows [`a994df6`](https://github.com/ljharb/call-bind/commit/a994df69f401f4bf735a4ccd77029b85d1549453)
|
|
38
|
-
- [meta] use `npmignore` to autogenerate an npmignore file [`eef3ef2`](https://github.com/ljharb/call-bind/commit/eef3ef21e1f002790837fedb8af2679c761fbdf5)
|
|
39
|
-
- [readme] flesh out content [`1845ccf`](https://github.com/ljharb/call-bind/commit/1845ccfd9976a607884cfc7157c93192cc16cf22)
|
|
40
|
-
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`5b47d53`](https://github.com/ljharb/call-bind/commit/5b47d53d2fd74af5ea0a44f1d51e503cd42f7a90)
|
|
41
|
-
- [Refactor] use `set-function-length` [`a0e165c`](https://github.com/ljharb/call-bind/commit/a0e165c5dc61db781cbc919b586b1c2b8da0b150)
|
|
42
|
-
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`9c50103`](https://github.com/ljharb/call-bind/commit/9c50103f44137279a817317cf6cc421a658f85b4)
|
|
43
|
-
- [meta] simplify "exports" [`019c6d0`](https://github.com/ljharb/call-bind/commit/019c6d06b0e1246ceed8e579f57e44441cbbf6d9)
|
|
44
|
-
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `safe-publish-latest`, `tape` [`23bd718`](https://github.com/ljharb/call-bind/commit/23bd718a288d3b03042062b4ef5153b3cea83f11)
|
|
45
|
-
- [actions] update codecov uploader [`62552d7`](https://github.com/ljharb/call-bind/commit/62552d79cc79e05825e99aaba134ae5b37f33da5)
|
|
46
|
-
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`ec81665`](https://github.com/ljharb/call-bind/commit/ec81665b300f87eabff597afdc8b8092adfa7afd)
|
|
47
|
-
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`35d67fc`](https://github.com/ljharb/call-bind/commit/35d67fcea883e686650f736f61da5ddca2592de8)
|
|
48
|
-
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`0266d8d`](https://github.com/ljharb/call-bind/commit/0266d8d2a45086a922db366d0c2932fa463662ff)
|
|
49
|
-
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`43a5b28`](https://github.com/ljharb/call-bind/commit/43a5b28a444e710e1bbf92adb8afb5cf7523a223)
|
|
50
|
-
- [Deps] update `define-data-property`, `function-bind`, `get-intrinsic` [`780eb36`](https://github.com/ljharb/call-bind/commit/780eb36552514f8cc99c70821ce698697c2726a5)
|
|
51
|
-
- [Dev Deps] update `aud`, `tape` [`90d50ad`](https://github.com/ljharb/call-bind/commit/90d50ad03b061e0268b3380b0065fcaec183dc05)
|
|
52
|
-
- [meta] use `prepublishOnly` script for npm 7+ [`44c5433`](https://github.com/ljharb/call-bind/commit/44c5433b7980e02b4870007046407cf6fc543329)
|
|
53
|
-
- [Deps] update `get-intrinsic` [`86bfbfc`](https://github.com/ljharb/call-bind/commit/86bfbfcf34afdc6eabc93ce3d408548d0e27d958)
|
|
54
|
-
- [Deps] update `get-intrinsic` [`5c53354`](https://github.com/ljharb/call-bind/commit/5c5335489be0294c18cd7a8bb6e08226ee019ff5)
|
|
55
|
-
- [actions] update checkout action [`4c393a8`](https://github.com/ljharb/call-bind/commit/4c393a8173b3c8e5b30d5b3297b3b94d48bf87f3)
|
|
56
|
-
- [Deps] update `get-intrinsic` [`4e70bde`](https://github.com/ljharb/call-bind/commit/4e70bdec0626acb11616d66250fc14565e716e91)
|
|
57
|
-
- [Deps] update `get-intrinsic` [`55ae803`](https://github.com/ljharb/call-bind/commit/55ae803a920bd93c369cd798c20de31f91e9fc60)
|
|
58
|
-
|
|
59
|
-
## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11
|
|
60
|
-
|
|
61
|
-
### Commits
|
|
62
|
-
|
|
63
|
-
- [Fix] properly include the receiver in the bound length [`dbae7bc`](https://github.com/ljharb/call-bind/commit/dbae7bc676c079a0d33c0a43e9ef92cb7b01345d)
|
|
64
|
-
|
|
65
|
-
## [v1.0.1](https://github.com/ljharb/call-bind/compare/v1.0.0...v1.0.1) - 2021-01-08
|
|
66
|
-
|
|
67
|
-
### Commits
|
|
68
|
-
|
|
69
|
-
- [Tests] migrate tests to Github Actions [`b6db284`](https://github.com/ljharb/call-bind/commit/b6db284c36f8ccd195b88a6764fe84b7223a0da1)
|
|
70
|
-
- [meta] do not publish github action workflow files [`ec7fe46`](https://github.com/ljharb/call-bind/commit/ec7fe46e60cfa4764ee943d2755f5e5a366e578e)
|
|
71
|
-
- [Fix] preserve original function’s length when possible [`adbceaa`](https://github.com/ljharb/call-bind/commit/adbceaa3cac4b41ea78bb19d7ccdbaaf7e0bdadb)
|
|
72
|
-
- [Tests] gather coverage data on every job [`d69e23c`](https://github.com/ljharb/call-bind/commit/d69e23cc65f101ba1d4c19bb07fa8eb0ec624be8)
|
|
73
|
-
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2fd3586`](https://github.com/ljharb/call-bind/commit/2fd3586c5d47b335364c14293114c6b625ae1f71)
|
|
74
|
-
- [Deps] update `get-intrinsic` [`f23e931`](https://github.com/ljharb/call-bind/commit/f23e9318cc271c2add8bb38cfded85ee7baf8eee)
|
|
75
|
-
- [Deps] update `get-intrinsic` [`72d9f44`](https://github.com/ljharb/call-bind/commit/72d9f44e184465ba8dd3fb48260bbcff234985f2)
|
|
76
|
-
- [meta] fix FUNDING.yml [`e723573`](https://github.com/ljharb/call-bind/commit/e723573438c5a68dcec31fb5d96ea6b7e4a93be8)
|
|
77
|
-
- [eslint] ignore coverage output [`15e76d2`](https://github.com/ljharb/call-bind/commit/15e76d28a5f43e504696401e5b31ebb78ee1b532)
|
|
78
|
-
- [meta] add Automatic Rebase and Require Allow Edits workflows [`8fa4dab`](https://github.com/ljharb/call-bind/commit/8fa4dabb23ba3dd7bb92c9571c1241c08b56e4b6)
|
|
79
|
-
|
|
80
|
-
## v1.0.0 - 2020-10-30
|
|
81
|
-
|
|
82
|
-
### Commits
|
|
83
|
-
|
|
84
|
-
- Initial commit [`306cf98`](https://github.com/ljharb/call-bind/commit/306cf98c7ec9e7ef66b653ec152277ac1381eb50)
|
|
85
|
-
- Tests [`e10d0bb`](https://github.com/ljharb/call-bind/commit/e10d0bbdadc7a10ecedc9a1c035112d3e368b8df)
|
|
86
|
-
- Implementation [`43852ed`](https://github.com/ljharb/call-bind/commit/43852eda0f187327b7fad2423ca972149a52bd65)
|
|
87
|
-
- npm init [`408f860`](https://github.com/ljharb/call-bind/commit/408f860b773a2f610805fd3613d0d71bac1b6249)
|
|
88
|
-
- [meta] add Automatic Rebase and Require Allow Edits workflows [`fb349b2`](https://github.com/ljharb/call-bind/commit/fb349b2e48defbec8b5ec8a8395cc8f69f220b13)
|
|
89
|
-
- [meta] add `auto-changelog` [`c4001fc`](https://github.com/ljharb/call-bind/commit/c4001fc43031799ef908211c98d3b0fb2b60fde4)
|
|
90
|
-
- [meta] add "funding"; create `FUNDING.yml` [`d4d6d29`](https://github.com/ljharb/call-bind/commit/d4d6d2974a14bc2e98830468eda7fe6d6a776717)
|
|
91
|
-
- [Tests] add `npm run lint` [`dedfb98`](https://github.com/ljharb/call-bind/commit/dedfb98bd0ecefb08ddb9a94061bd10cde4332af)
|
|
92
|
-
- Only apps should have lockfiles [`54ac776`](https://github.com/ljharb/call-bind/commit/54ac77653db45a7361dc153d2f478e743f110650)
|
|
93
|
-
- [meta] add `safe-publish-latest` [`9ea8e43`](https://github.com/ljharb/call-bind/commit/9ea8e435b950ce9b705559cd651039f9bf40140f)
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# call-bind <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
-
|
|
3
|
-
[![github actions][actions-image]][actions-url]
|
|
4
|
-
[![coverage][codecov-image]][codecov-url]
|
|
5
|
-
[![dependency status][deps-svg]][deps-url]
|
|
6
|
-
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
|
7
|
-
[![License][license-image]][license-url]
|
|
8
|
-
[![Downloads][downloads-image]][downloads-url]
|
|
9
|
-
|
|
10
|
-
[![npm badge][npm-badge-png]][package-url]
|
|
11
|
-
|
|
12
|
-
Robustly `.call.bind()` a function.
|
|
13
|
-
|
|
14
|
-
## Getting started
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
npm install --save call-bind
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Usage/Examples
|
|
21
|
-
|
|
22
|
-
```js
|
|
23
|
-
const assert = require('assert');
|
|
24
|
-
const callBind = require('call-bind');
|
|
25
|
-
const callBound = require('call-bind/callBound');
|
|
26
|
-
|
|
27
|
-
function f(a, b) {
|
|
28
|
-
assert.equal(this, 1);
|
|
29
|
-
assert.equal(a, 2);
|
|
30
|
-
assert.equal(b, 3);
|
|
31
|
-
assert.equal(arguments.length, 2);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const fBound = callBind(f);
|
|
35
|
-
|
|
36
|
-
const slice = callBound('Array.prototype.slice');
|
|
37
|
-
|
|
38
|
-
delete Function.prototype.call;
|
|
39
|
-
delete Function.prototype.bind;
|
|
40
|
-
|
|
41
|
-
fBound(1, 2, 3);
|
|
42
|
-
|
|
43
|
-
assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Tests
|
|
47
|
-
|
|
48
|
-
Clone the repo, `npm install`, and run `npm test`
|
|
49
|
-
|
|
50
|
-
[package-url]: https://npmjs.org/package/call-bind
|
|
51
|
-
[npm-version-svg]: https://versionbadg.es/ljharb/call-bind.svg
|
|
52
|
-
[deps-svg]: https://david-dm.org/ljharb/call-bind.svg
|
|
53
|
-
[deps-url]: https://david-dm.org/ljharb/call-bind
|
|
54
|
-
[dev-deps-svg]: https://david-dm.org/ljharb/call-bind/dev-status.svg
|
|
55
|
-
[dev-deps-url]: https://david-dm.org/ljharb/call-bind#info=devDependencies
|
|
56
|
-
[npm-badge-png]: https://nodei.co/npm/call-bind.png?downloads=true&stars=true
|
|
57
|
-
[license-image]: https://img.shields.io/npm/l/call-bind.svg
|
|
58
|
-
[license-url]: LICENSE
|
|
59
|
-
[downloads-image]: https://img.shields.io/npm/dm/call-bind.svg
|
|
60
|
-
[downloads-url]: https://npm-stat.com/charts.html?package=call-bind
|
|
61
|
-
[codecov-image]: https://codecov.io/gh/ljharb/call-bind/branch/main/graphs/badge.svg
|
|
62
|
-
[codecov-url]: https://app.codecov.io/gh/ljharb/call-bind/
|
|
63
|
-
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bind
|
|
64
|
-
[actions-url]: https://github.com/ljharb/call-bind/actions
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var GetIntrinsic = require('get-intrinsic');
|
|
4
|
-
|
|
5
|
-
var callBind = require('./');
|
|
6
|
-
|
|
7
|
-
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
8
|
-
|
|
9
|
-
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
10
|
-
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
11
|
-
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
12
|
-
return callBind(intrinsic);
|
|
13
|
-
}
|
|
14
|
-
return intrinsic;
|
|
15
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var bind = require('function-bind');
|
|
4
|
-
var GetIntrinsic = require('get-intrinsic');
|
|
5
|
-
var setFunctionLength = require('set-function-length');
|
|
6
|
-
|
|
7
|
-
var $TypeError = require('es-errors/type');
|
|
8
|
-
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
9
|
-
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
10
|
-
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
11
|
-
|
|
12
|
-
var $defineProperty = require('es-define-property');
|
|
13
|
-
var $max = GetIntrinsic('%Math.max%');
|
|
14
|
-
|
|
15
|
-
module.exports = function callBind(originalFunction) {
|
|
16
|
-
if (typeof originalFunction !== 'function') {
|
|
17
|
-
throw new $TypeError('a function is required');
|
|
18
|
-
}
|
|
19
|
-
var func = $reflectApply(bind, $call, arguments);
|
|
20
|
-
return setFunctionLength(
|
|
21
|
-
func,
|
|
22
|
-
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
|
23
|
-
true
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
var applyBind = function applyBind() {
|
|
28
|
-
return $reflectApply(bind, $apply, arguments);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
if ($defineProperty) {
|
|
32
|
-
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
33
|
-
} else {
|
|
34
|
-
module.exports.apply = applyBind;
|
|
35
|
-
}
|