step-node-agent 3.26.5 → 3.27.0
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/call-bind-apply-helpers/.eslintrc +1 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +7 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +38 -20
- package/node_modules/call-bind-apply-helpers/index.js +1 -1
- package/node_modules/call-bind-apply-helpers/package.json +8 -8
- package/node_modules/call-bind-apply-helpers/test/index.js +4 -4
- package/node_modules/{call-bind → call-bound}/.eslintrc +0 -3
- package/node_modules/{define-data-property → call-bound}/.github/FUNDING.yml +1 -1
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/{call-bind → call-bound}/LICENSE +1 -1
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/{call-bind → call-bound}/package.json +23 -17
- package/node_modules/{call-bind/test/callBound.js → call-bound/test/index.js} +12 -5
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/dunder-proto/CHANGELOG.md +9 -0
- package/node_modules/dunder-proto/get.js +10 -3
- package/node_modules/dunder-proto/package.json +4 -4
- package/node_modules/dunder-proto/set.js +7 -1
- package/node_modules/dunder-proto/test/set.js +10 -1
- 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/{has-property-descriptors → 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/get-intrinsic/.eslintrc +4 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +25 -0
- package/node_modules/get-intrinsic/index.js +25 -6
- package/node_modules/get-intrinsic/package.json +11 -9
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/{call-bind → get-proto}/.github/FUNDING.yml +1 -1
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/{define-data-property → 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/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/{set-function-length → math-intrinsics}/LICENSE +1 -1
- 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/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/{has-property-descriptors → side-channel-list}/.github/FUNDING.yml +1 -1
- 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-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/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 -106
- 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 -24
- package/node_modules/call-bind/test/index.js +0 -74
- 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/set-function-length/.eslintrc +0 -27
- package/node_modules/set-function-length/CHANGELOG.md +0 -70
- 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-bound}/.nycrc +0 -0
- /package/node_modules/{has-property-descriptors → get-proto}/.nycrc +0 -0
- /package/node_modules/{define-data-property → side-channel-list}/.nycrc +0 -0
- /package/node_modules/{set-function-length → side-channel-list}/tsconfig.json +0 -0
- /package/node_modules/{set-function-length → side-channel-map}/.nycrc +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var reflectGetProto = require('./Reflect.getPrototypeOf');
|
|
4
|
+
var originalGetProto = require('./Object.getPrototypeOf');
|
|
5
|
+
|
|
6
|
+
var getDunderProto = require('dunder-proto/get');
|
|
7
|
+
|
|
8
|
+
/** @type {import('.')} */
|
|
9
|
+
module.exports = reflectGetProto
|
|
10
|
+
? function getProto(O) {
|
|
11
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
12
|
+
return reflectGetProto(O);
|
|
13
|
+
}
|
|
14
|
+
: originalGetProto
|
|
15
|
+
? function getProto(O) {
|
|
16
|
+
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
|
17
|
+
throw new TypeError('getProto: not an object');
|
|
18
|
+
}
|
|
19
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
20
|
+
return originalGetProto(O);
|
|
21
|
+
}
|
|
22
|
+
: getDunderProto
|
|
23
|
+
? function getProto(O) {
|
|
24
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
25
|
+
return getDunderProto(O);
|
|
26
|
+
}
|
|
27
|
+
: null;
|
|
@@ -1,65 +1,66 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
2
|
+
"name": "get-proto",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Robustly get the [[Prototype]] of an object",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./index.js",
|
|
8
|
+
"./Reflect.getPrototypeOf": "./Reflect.getPrototypeOf.js",
|
|
9
|
+
"./Object.getPrototypeOf": "./Object.getPrototypeOf.js",
|
|
8
10
|
"./package.json": "./package.json"
|
|
9
11
|
},
|
|
10
|
-
"sideEffects": false,
|
|
11
12
|
"scripts": {
|
|
12
13
|
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
13
|
-
"prepublishOnly": "safe-publish-latest",
|
|
14
14
|
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
15
|
-
"
|
|
15
|
+
"prepublishOnly": "safe-publish-latest",
|
|
16
|
+
"pretest": "npm run --silent lint",
|
|
17
|
+
"test": "npm run tests-only",
|
|
18
|
+
"posttest": "npx npm@\">=10.2\" audit --production",
|
|
19
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
16
20
|
"prelint": "evalmd README.md",
|
|
17
21
|
"lint": "eslint --ext=js,mjs .",
|
|
18
|
-
"
|
|
19
|
-
"test": "npm run tests-only",
|
|
20
|
-
"posttest": "aud --production",
|
|
22
|
+
"postlint": "tsc && attw -P",
|
|
21
23
|
"version": "auto-changelog && git add CHANGELOG.md",
|
|
22
24
|
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
23
25
|
},
|
|
24
26
|
"repository": {
|
|
25
27
|
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/
|
|
28
|
+
"url": "git+https://github.com/ljharb/get-proto.git"
|
|
27
29
|
},
|
|
28
30
|
"keywords": [
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"defineProperty",
|
|
35
|
-
"getOwnPropertyDescriptor"
|
|
31
|
+
"get",
|
|
32
|
+
"proto",
|
|
33
|
+
"prototype",
|
|
34
|
+
"getPrototypeOf",
|
|
35
|
+
"[[Prototype]]"
|
|
36
36
|
],
|
|
37
37
|
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
38
|
-
"funding": {
|
|
39
|
-
"url": "https://github.com/sponsors/ljharb"
|
|
40
|
-
},
|
|
41
38
|
"license": "MIT",
|
|
42
39
|
"bugs": {
|
|
43
|
-
"url": "https://github.com/
|
|
40
|
+
"url": "https://github.com/ljharb/get-proto/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/ljharb/get-proto#readme",
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"dunder-proto": "^1.0.1",
|
|
45
|
+
"es-object-atoms": "^1.0.0"
|
|
44
46
|
},
|
|
45
|
-
"homepage": "https://github.com/inspect-js/has-property-descriptors#readme",
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@
|
|
48
|
-
"
|
|
49
|
-
"
|
|
48
|
+
"@arethetypeswrong/cli": "^0.17.2",
|
|
49
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
50
|
+
"@ljharb/tsconfig": "^0.2.3",
|
|
51
|
+
"@types/tape": "^5.8.0",
|
|
52
|
+
"auto-changelog": "^2.5.0",
|
|
50
53
|
"eslint": "=8.8.0",
|
|
51
54
|
"evalmd": "^0.0.19",
|
|
52
55
|
"in-publish": "^2.0.1",
|
|
53
56
|
"npmignore": "^0.3.1",
|
|
54
57
|
"nyc": "^10.3.2",
|
|
55
58
|
"safe-publish-latest": "^2.0.0",
|
|
56
|
-
"tape": "^5.
|
|
57
|
-
|
|
58
|
-
"dependencies": {
|
|
59
|
-
"es-define-property": "^1.0.0"
|
|
59
|
+
"tape": "^5.9.0",
|
|
60
|
+
"typescript": "next"
|
|
60
61
|
},
|
|
61
|
-
"
|
|
62
|
-
"
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">= 0.4"
|
|
63
64
|
},
|
|
64
65
|
"auto-changelog": {
|
|
65
66
|
"output": "CHANGELOG.md",
|
|
@@ -73,5 +74,8 @@
|
|
|
73
74
|
"ignore": [
|
|
74
75
|
".github/workflows"
|
|
75
76
|
]
|
|
77
|
+
},
|
|
78
|
+
"testling": {
|
|
79
|
+
"files": "test/index.js"
|
|
76
80
|
}
|
|
77
81
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
var getProto = require('../');
|
|
6
|
+
|
|
7
|
+
test('getProto', function (t) {
|
|
8
|
+
t.equal(typeof getProto, 'function', 'is a function');
|
|
9
|
+
|
|
10
|
+
t.test('can get', { skip: !getProto }, function (st) {
|
|
11
|
+
if (getProto) { // TS doesn't understand tape's skip
|
|
12
|
+
var proto = { b: 2 };
|
|
13
|
+
st.equal(getProto(proto), Object.prototype, 'proto: returns the [[Prototype]]');
|
|
14
|
+
|
|
15
|
+
st.test('nullish value', function (s2t) {
|
|
16
|
+
// @ts-expect-error
|
|
17
|
+
s2t['throws'](function () { return getProto(undefined); }, TypeError, 'undefined is not an object');
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
s2t['throws'](function () { return getProto(null); }, TypeError, 'null is not an object');
|
|
20
|
+
s2t.end();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// @ts-expect-error
|
|
24
|
+
st['throws'](function () { getProto(true); }, 'throws for true');
|
|
25
|
+
// @ts-expect-error
|
|
26
|
+
st['throws'](function () { getProto(false); }, 'throws for false');
|
|
27
|
+
// @ts-expect-error
|
|
28
|
+
st['throws'](function () { getProto(42); }, 'throws for 42');
|
|
29
|
+
// @ts-expect-error
|
|
30
|
+
st['throws'](function () { getProto(NaN); }, 'throws for NaN');
|
|
31
|
+
// @ts-expect-error
|
|
32
|
+
st['throws'](function () { getProto(0); }, 'throws for +0');
|
|
33
|
+
// @ts-expect-error
|
|
34
|
+
st['throws'](function () { getProto(-0); }, 'throws for -0');
|
|
35
|
+
// @ts-expect-error
|
|
36
|
+
st['throws'](function () { getProto(Infinity); }, 'throws for ∞');
|
|
37
|
+
// @ts-expect-error
|
|
38
|
+
st['throws'](function () { getProto(-Infinity); }, 'throws for -∞');
|
|
39
|
+
// @ts-expect-error
|
|
40
|
+
st['throws'](function () { getProto(''); }, 'throws for empty string');
|
|
41
|
+
// @ts-expect-error
|
|
42
|
+
st['throws'](function () { getProto('foo'); }, 'throws for non-empty string');
|
|
43
|
+
st.equal(getProto(/a/g), RegExp.prototype);
|
|
44
|
+
st.equal(getProto(new Date()), Date.prototype);
|
|
45
|
+
st.equal(getProto(function () {}), Function.prototype);
|
|
46
|
+
st.equal(getProto([]), Array.prototype);
|
|
47
|
+
st.equal(getProto({}), Object.prototype);
|
|
48
|
+
|
|
49
|
+
var nullObject = { __proto__: null };
|
|
50
|
+
if ('toString' in nullObject) {
|
|
51
|
+
st.comment('no null objects in this engine');
|
|
52
|
+
st.equal(getProto(nullObject), Object.prototype, '"null" object has Object.prototype as [[Prototype]]');
|
|
53
|
+
} else {
|
|
54
|
+
st.equal(getProto(nullObject), null, 'null object has null [[Prototype]]');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
st.end();
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
t.test('can not get', { skip: !!getProto }, function (st) {
|
|
62
|
+
st.equal(getProto, null);
|
|
63
|
+
|
|
64
|
+
st.end();
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
t.end();
|
|
68
|
+
});
|
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v2.16.1](https://github.com/inspect-js/is-core-module/compare/v2.16.0...v2.16.1) - 2024-12-21
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- [Fix] `node:sqlite` is available in node ^22.13 [`#17`](https://github.com/inspect-js/is-core-module/issues/17)
|
|
13
|
+
|
|
14
|
+
## [v2.16.0](https://github.com/inspect-js/is-core-module/compare/v2.15.1...v2.16.0) - 2024-12-13
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [New] add `node:sqlite` [`1ee94d2`](https://github.com/inspect-js/is-core-module/commit/1ee94d20857e22cdb24e9b4bb1a2097f2e03e26f)
|
|
19
|
+
- [Dev Deps] update `auto-changelog`, `tape` [`aa84aa3`](https://github.com/inspect-js/is-core-module/commit/aa84aa34face677f14e08ec1c737f0c4bba27260)
|
|
20
|
+
|
|
8
21
|
## [v2.15.1](https://github.com/inspect-js/is-core-module/compare/v2.15.0...v2.15.1) - 2024-08-21
|
|
9
22
|
|
|
10
23
|
### Commits
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"node:repl": [">= 14.18 && < 15", ">= 16"],
|
|
92
92
|
"node:sea": [">= 20.12 && < 21", ">= 21.7"],
|
|
93
93
|
"smalloc": ">= 0.11.5 && < 3",
|
|
94
|
+
"node:sqlite": [">= 22.13 && < 23", ">= 23.4"],
|
|
94
95
|
"_stream_duplex": ">= 0.9.4",
|
|
95
96
|
"node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
|
|
96
97
|
"_stream_transform": ">= 0.9.4",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "is-core-module",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.1",
|
|
4
4
|
"description": "Is this specifier a node.js core module?",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@ljharb/eslint-config": "^21.1.1",
|
|
49
|
-
"auto-changelog": "^2.
|
|
49
|
+
"auto-changelog": "^2.5.0",
|
|
50
50
|
"encoding": "^0.1.13",
|
|
51
51
|
"eslint": "=8.8.0",
|
|
52
52
|
"in-publish": "^2.0.1",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"nyc": "^10.3.2",
|
|
56
56
|
"safe-publish-latest": "^2.0.0",
|
|
57
57
|
"semver": "^6.3.1",
|
|
58
|
-
"tape": "^5.
|
|
58
|
+
"tape": "^5.9.0"
|
|
59
59
|
},
|
|
60
60
|
"auto-changelog": {
|
|
61
61
|
"output": "CHANGELOG.md",
|
|
@@ -92,6 +92,9 @@ test('core modules', function (t) {
|
|
|
92
92
|
if (semver.satisfies(process.version, '^20.12 || >= 21.7')) {
|
|
93
93
|
libs = libs.concat('node:sea');
|
|
94
94
|
}
|
|
95
|
+
if (semver.satisfies(process.version, '>= 23.4')) {
|
|
96
|
+
libs = libs.concat('node:sqlite');
|
|
97
|
+
}
|
|
95
98
|
|
|
96
99
|
for (var i = 0; i < libs.length; ++i) {
|
|
97
100
|
var mod = libs[i];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/math-intrinsics
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with a single custom sponsorship URL
|
|
@@ -0,0 +1,24 @@
|
|
|
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.1.0](https://github.com/es-shims/math-intrinsics/compare/v1.0.0...v1.1.0) - 2024-12-18
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [New] add `round` [`7cfb044`](https://github.com/es-shims/math-intrinsics/commit/7cfb04460c0fbdf1ca101eecbac3f59d11994130)
|
|
13
|
+
- [Tests] add attw [`e96be8f`](https://github.com/es-shims/math-intrinsics/commit/e96be8fbf58449eafe976446a0470e6ea561ad8d)
|
|
14
|
+
- [Dev Deps] update `@types/tape` [`30d0023`](https://github.com/es-shims/math-intrinsics/commit/30d00234ce8a3fa0094a61cd55d6686eb91e36ec)
|
|
15
|
+
|
|
16
|
+
## v1.0.0 - 2024-12-11
|
|
17
|
+
|
|
18
|
+
### Commits
|
|
19
|
+
|
|
20
|
+
- Initial implementation, tests, readme, types [`b898caa`](https://github.com/es-shims/math-intrinsics/commit/b898caae94e9994a94a42b8740f7bbcfd0a868fe)
|
|
21
|
+
- Initial commit [`02745b0`](https://github.com/es-shims/math-intrinsics/commit/02745b03a62255af8a332771987b55d127538d9c)
|
|
22
|
+
- [New] add `constants/maxArrayLength`, `mod` [`b978178`](https://github.com/es-shims/math-intrinsics/commit/b978178a57685bd23ed1c7efe2137f3784f5fcc5)
|
|
23
|
+
- npm init [`a39fc57`](https://github.com/es-shims/math-intrinsics/commit/a39fc57e5639a645d0bd52a0dc56202480223be2)
|
|
24
|
+
- Only apps should have lockfiles [`9451580`](https://github.com/es-shims/math-intrinsics/commit/94515800fb34db4f3cc7e99290042d45609ac7bd)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# math-intrinsics <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
+
|
|
3
|
+
[![github actions][actions-image]][actions-url]
|
|
4
|
+
[![coverage][codecov-image]][codecov-url]
|
|
5
|
+
[![License][license-image]][license-url]
|
|
6
|
+
[![Downloads][downloads-image]][downloads-url]
|
|
7
|
+
|
|
8
|
+
[![npm badge][npm-badge-png]][package-url]
|
|
9
|
+
|
|
10
|
+
ES Math-related intrinsics and helpers, robustly cached.
|
|
11
|
+
|
|
12
|
+
- `abs`
|
|
13
|
+
- `floor`
|
|
14
|
+
- `isFinite`
|
|
15
|
+
- `isInteger`
|
|
16
|
+
- `isNaN`
|
|
17
|
+
- `isNegativeZero`
|
|
18
|
+
- `max`
|
|
19
|
+
- `min`
|
|
20
|
+
- `mod`
|
|
21
|
+
- `pow`
|
|
22
|
+
- `round`
|
|
23
|
+
- `sign`
|
|
24
|
+
- `constants/maxArrayLength`
|
|
25
|
+
- `constants/maxSafeInteger`
|
|
26
|
+
- `constants/maxValue`
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Tests
|
|
30
|
+
Simply clone the repo, `npm install`, and run `npm test`
|
|
31
|
+
|
|
32
|
+
## Security
|
|
33
|
+
|
|
34
|
+
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
|
|
35
|
+
|
|
36
|
+
[package-url]: https://npmjs.org/package/math-intrinsics
|
|
37
|
+
[npm-version-svg]: https://versionbadg.es/es-shims/math-intrinsics.svg
|
|
38
|
+
[deps-svg]: https://david-dm.org/es-shims/math-intrinsics.svg
|
|
39
|
+
[deps-url]: https://david-dm.org/es-shims/math-intrinsics
|
|
40
|
+
[dev-deps-svg]: https://david-dm.org/es-shims/math-intrinsics/dev-status.svg
|
|
41
|
+
[dev-deps-url]: https://david-dm.org/es-shims/math-intrinsics#info=devDependencies
|
|
42
|
+
[npm-badge-png]: https://nodei.co/npm/math-intrinsics.png?downloads=true&stars=true
|
|
43
|
+
[license-image]: https://img.shields.io/npm/l/math-intrinsics.svg
|
|
44
|
+
[license-url]: LICENSE
|
|
45
|
+
[downloads-image]: https://img.shields.io/npm/dm/es-object.svg
|
|
46
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=math-intrinsics
|
|
47
|
+
[codecov-image]: https://codecov.io/gh/es-shims/math-intrinsics/branch/main/graphs/badge.svg
|
|
48
|
+
[codecov-url]: https://app.codecov.io/gh/es-shims/math-intrinsics/
|
|
49
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/math-intrinsics
|
|
50
|
+
[actions-url]: https://github.com/es-shims/math-intrinsics/actions
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Math.abs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Math.floor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var $isNaN = require('./isNaN');
|
|
4
|
+
|
|
5
|
+
/** @type {import('./isFinite')} */
|
|
6
|
+
module.exports = function isFinite(x) {
|
|
7
|
+
return (typeof x === 'number' || typeof x === 'bigint')
|
|
8
|
+
&& !$isNaN(x)
|
|
9
|
+
&& x !== Infinity
|
|
10
|
+
&& x !== -Infinity;
|
|
11
|
+
};
|
|
12
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var $abs = require('./abs');
|
|
4
|
+
var $floor = require('./floor');
|
|
5
|
+
|
|
6
|
+
var $isNaN = require('./isNaN');
|
|
7
|
+
var $isFinite = require('./isFinite');
|
|
8
|
+
|
|
9
|
+
/** @type {import('./isInteger')} */
|
|
10
|
+
module.exports = function isInteger(argument) {
|
|
11
|
+
if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
var absValue = $abs(argument);
|
|
15
|
+
return $floor(absValue) === absValue;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Number.isNaN;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Math.max;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Math.min;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "math-intrinsics",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "ES Math-related intrinsics and helpers, robustly cached.",
|
|
5
|
+
"main": false,
|
|
6
|
+
"exports": {
|
|
7
|
+
"./abs": "./abs.js",
|
|
8
|
+
"./floor": "./floor.js",
|
|
9
|
+
"./isFinite": "./isFinite.js",
|
|
10
|
+
"./isInteger": "./isInteger.js",
|
|
11
|
+
"./isNaN": "./isNaN.js",
|
|
12
|
+
"./isNegativeZero": "./isNegativeZero.js",
|
|
13
|
+
"./max": "./max.js",
|
|
14
|
+
"./min": "./min.js",
|
|
15
|
+
"./mod": "./mod.js",
|
|
16
|
+
"./pow": "./pow.js",
|
|
17
|
+
"./sign": "./sign.js",
|
|
18
|
+
"./round": "./round.js",
|
|
19
|
+
"./constants/maxArrayLength": "./constants/maxArrayLength.js",
|
|
20
|
+
"./constants/maxSafeInteger": "./constants/maxSafeInteger.js",
|
|
21
|
+
"./constants/maxValue": "./constants/maxValue.js",
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"scripts": {
|
|
26
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
27
|
+
"prepublishOnly": "safe-publish-latest",
|
|
28
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
29
|
+
"pretest": "npm run lint",
|
|
30
|
+
"test": "npm run tests-only",
|
|
31
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
32
|
+
"posttest": "npx npm@'>= 10.2' audit --production",
|
|
33
|
+
"prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
|
|
34
|
+
"lint": "eslint --ext=js,mjs .",
|
|
35
|
+
"postlint": "tsc && attw -P",
|
|
36
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
37
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/es-shims/math-intrinsics.git"
|
|
42
|
+
},
|
|
43
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/es-shims/math-intrinsics/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/es-shims/math-intrinsics#readme",
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@arethetypeswrong/cli": "^0.17.1",
|
|
51
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
52
|
+
"@ljharb/tsconfig": "^0.2.2",
|
|
53
|
+
"@types/for-each": "^0.3.3",
|
|
54
|
+
"@types/object-inspect": "^1.13.0",
|
|
55
|
+
"@types/tape": "^5.8.0",
|
|
56
|
+
"auto-changelog": "^2.5.0",
|
|
57
|
+
"eclint": "^2.8.1",
|
|
58
|
+
"es-value-fixtures": "^1.5.0",
|
|
59
|
+
"eslint": "^8.8.0",
|
|
60
|
+
"evalmd": "^0.0.19",
|
|
61
|
+
"for-each": "^0.3.3",
|
|
62
|
+
"in-publish": "^2.0.1",
|
|
63
|
+
"npmignore": "^0.3.1",
|
|
64
|
+
"nyc": "^10.3.2",
|
|
65
|
+
"object-inspect": "^1.13.3",
|
|
66
|
+
"safe-publish-latest": "^2.0.0",
|
|
67
|
+
"tape": "^5.9.0",
|
|
68
|
+
"typescript": "next"
|
|
69
|
+
},
|
|
70
|
+
"auto-changelog": {
|
|
71
|
+
"output": "CHANGELOG.md",
|
|
72
|
+
"template": "keepachangelog",
|
|
73
|
+
"unreleased": false,
|
|
74
|
+
"commitLimit": false,
|
|
75
|
+
"backfillLimit": false,
|
|
76
|
+
"hideCredit": true
|
|
77
|
+
},
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"ignore": [
|
|
80
|
+
".github/workflows"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"engines": {
|
|
84
|
+
"node": ">= 0.4"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Math.pow;
|