step-node-agent 3.26.3 → 3.26.5
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/CHANGELOG.md +13 -0
- package/node_modules/call-bind/index.js +6 -17
- package/node_modules/call-bind/package.json +14 -16
- package/node_modules/call-bind/test/index.js +4 -10
- package/node_modules/call-bind-apply-helpers/.eslintrc +16 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +23 -0
- package/node_modules/{has-proto → 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/{has-proto → dunder-proto}/.github/FUNDING.yml +1 -1
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +15 -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 +23 -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 +29 -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 +41 -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/express/History.md +10 -1
- package/node_modules/express/package.json +6 -2
- package/node_modules/get-intrinsic/CHANGELOG.md +18 -0
- package/node_modules/get-intrinsic/index.js +20 -20
- package/node_modules/get-intrinsic/package.json +21 -19
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +2 -2
- 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/path-to-regexp/index.js +13 -3
- package/node_modules/path-to-regexp/package.json +1 -1
- package/node_modules/psl/README.md +75 -31
- package/node_modules/psl/SECURITY.md +13 -0
- package/node_modules/psl/data/rules.js +9778 -0
- package/node_modules/psl/dist/psl.cjs +1 -0
- package/node_modules/psl/dist/psl.mjs +10008 -0
- package/node_modules/psl/dist/psl.umd.cjs +1 -0
- package/node_modules/psl/index.js +59 -81
- package/node_modules/psl/package.json +24 -15
- package/node_modules/psl/types/index.d.ts +52 -0
- package/node_modules/psl/types/test.ts +14 -0
- package/node_modules/psl/types/tsconfig.json +22 -0
- package/node_modules/psl/vite.config.js +20 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +1 -1
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +20 -11
- package/node_modules/yaml/dist/schema/json/schema.js +1 -1
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +1 -1
- package/node_modules/yaml/dist/stringify/stringifyString.js +20 -11
- package/node_modules/yaml/package.json +1 -1
- package/package.json +1 -1
- 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/psl/browserstack.yml +0 -73
- package/node_modules/psl/data/rules.json +0 -9779
- package/node_modules/psl/dist/psl.js +0 -10498
- package/node_modules/psl/dist/psl.min.js +0 -1
- package/node_modules/psl/eslint.config.js +0 -9
- package/node_modules/psl/local.log +0 -12
- package/node_modules/psl/log/usage.log +0 -20
- package/node_modules/psl/playwright.config.js +0 -31
- package/node_modules/psl/test-results/.last-run.json +0 -4
- /package/node_modules/{has-proto → dunder-proto}/.eslintrc +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-intrinsic",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Get and robustly cache all JS language-level intrinsics at first require time",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"pretest": "npm run lint",
|
|
18
18
|
"tests-only": "nyc tape 'test/**/*.js'",
|
|
19
19
|
"test": "npm run tests-only",
|
|
20
|
-
"posttest": "
|
|
20
|
+
"posttest": "npx npm@'>= 10.2' audit --production",
|
|
21
21
|
"version": "auto-changelog && git add CHANGELOG.md",
|
|
22
22
|
"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
23
|
},
|
|
@@ -43,26 +43,35 @@
|
|
|
43
43
|
"url": "https://github.com/ljharb/get-intrinsic/issues"
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://github.com/ljharb/get-intrinsic#readme",
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"call-bind-apply-helpers": "^1.0.0",
|
|
48
|
+
"dunder-proto": "^1.0.0",
|
|
49
|
+
"es-define-property": "^1.0.1",
|
|
50
|
+
"es-errors": "^1.3.0",
|
|
51
|
+
"function-bind": "^1.1.2",
|
|
52
|
+
"gopd": "^1.2.0",
|
|
53
|
+
"has-symbols": "^1.1.0",
|
|
54
|
+
"hasown": "^2.0.2"
|
|
55
|
+
},
|
|
46
56
|
"devDependencies": {
|
|
47
|
-
"@ljharb/eslint-config": "^21.1.
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"es-abstract": "^1.
|
|
52
|
-
"es-value-fixtures": "^1.
|
|
57
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
58
|
+
"auto-changelog": "^2.5.0",
|
|
59
|
+
"call-bound": "^1.0.1",
|
|
60
|
+
"encoding": "^0.1.13",
|
|
61
|
+
"es-abstract": "^1.23.5",
|
|
62
|
+
"es-value-fixtures": "^1.5.0",
|
|
53
63
|
"eslint": "=8.8.0",
|
|
54
64
|
"evalmd": "^0.0.19",
|
|
55
65
|
"for-each": "^0.3.3",
|
|
56
|
-
"gopd": "^1.0.1",
|
|
57
66
|
"make-async-function": "^1.0.0",
|
|
58
67
|
"make-async-generator-function": "^1.0.0",
|
|
59
68
|
"make-generator-function": "^2.0.0",
|
|
60
|
-
"mock-property": "^1.0
|
|
69
|
+
"mock-property": "^1.1.0",
|
|
61
70
|
"npmignore": "^0.3.1",
|
|
62
71
|
"nyc": "^10.3.2",
|
|
63
|
-
"object-inspect": "^1.13.
|
|
72
|
+
"object-inspect": "^1.13.3",
|
|
64
73
|
"safe-publish-latest": "^2.0.0",
|
|
65
|
-
"tape": "^5.
|
|
74
|
+
"tape": "^5.9.0"
|
|
66
75
|
},
|
|
67
76
|
"auto-changelog": {
|
|
68
77
|
"output": "CHANGELOG.md",
|
|
@@ -72,13 +81,6 @@
|
|
|
72
81
|
"backfillLimit": false,
|
|
73
82
|
"hideCredit": true
|
|
74
83
|
},
|
|
75
|
-
"dependencies": {
|
|
76
|
-
"es-errors": "^1.3.0",
|
|
77
|
-
"function-bind": "^1.1.2",
|
|
78
|
-
"has-proto": "^1.0.1",
|
|
79
|
-
"has-symbols": "^1.0.3",
|
|
80
|
-
"hasown": "^2.0.0"
|
|
81
|
-
},
|
|
82
84
|
"testling": {
|
|
83
85
|
"files": "test/GetIntrinsic.js"
|
|
84
86
|
},
|
|
@@ -10,10 +10,10 @@ var asyncFns = require('make-async-function').list();
|
|
|
10
10
|
var asyncGenFns = require('make-async-generator-function')();
|
|
11
11
|
var mockProperty = require('mock-property');
|
|
12
12
|
|
|
13
|
-
var callBound = require('call-
|
|
13
|
+
var callBound = require('call-bound');
|
|
14
14
|
var v = require('es-value-fixtures');
|
|
15
15
|
var $gOPD = require('gopd');
|
|
16
|
-
var DefinePropertyOrThrow = require('es-abstract/
|
|
16
|
+
var DefinePropertyOrThrow = require('es-abstract/2023/DefinePropertyOrThrow');
|
|
17
17
|
|
|
18
18
|
var $isProto = callBound('%Object.prototype.isPrototypeOf%');
|
|
19
19
|
|
|
@@ -5,6 +5,26 @@ 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
|
+
## [v1.2.0](https://github.com/ljharb/gopd/compare/v1.1.0...v1.2.0) - 2024-12-03
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [New] add `gOPD` entry point; remove `get-intrinsic` [`5b61232`](https://github.com/ljharb/gopd/commit/5b61232dedea4591a314bcf16101b1961cee024e)
|
|
13
|
+
|
|
14
|
+
## [v1.1.0](https://github.com/ljharb/gopd/compare/v1.0.1...v1.1.0) - 2024-11-29
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [New] add types [`f585e39`](https://github.com/ljharb/gopd/commit/f585e397886d270e4ba84e53d226e4f9ca2eb0e6)
|
|
19
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `tape` [`0b8e4fd`](https://github.com/ljharb/gopd/commit/0b8e4fded64397a7726a9daa144a6cc9a5e2edfa)
|
|
20
|
+
- [Dev Deps] update `aud`, `npmignore`, `tape` [`48378b2`](https://github.com/ljharb/gopd/commit/48378b2443f09a4f7efbd0fb6c3ee845a6cabcf3)
|
|
21
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`78099ee`](https://github.com/ljharb/gopd/commit/78099eeed41bfdc134c912280483689cc8861c31)
|
|
22
|
+
- [Tests] replace `aud` with `npm audit` [`4e0d0ac`](https://github.com/ljharb/gopd/commit/4e0d0ac47619d24a75318a8e1f543ee04b2a2632)
|
|
23
|
+
- [meta] add missing `engines.node` [`1443316`](https://github.com/ljharb/gopd/commit/14433165d07835c680155b3dfd62d9217d735eca)
|
|
24
|
+
- [Deps] update `get-intrinsic` [`eee5f51`](https://github.com/ljharb/gopd/commit/eee5f51769f3dbaf578b70e2a3199116b01aa670)
|
|
25
|
+
- [Deps] update `get-intrinsic` [`550c378`](https://github.com/ljharb/gopd/commit/550c3780e3a9c77b62565712a001b4ed64ea61f5)
|
|
26
|
+
- [Dev Deps] add missing peer dep [`8c2ecf8`](https://github.com/ljharb/gopd/commit/8c2ecf848122e4e30abfc5b5086fb48b390dce75)
|
|
27
|
+
|
|
8
28
|
## [v1.0.1](https://github.com/ljharb/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01
|
|
9
29
|
|
|
10
30
|
### Commits
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Object.getOwnPropertyDescriptor;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gopd",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./index.js",
|
|
8
|
+
"./gOPD": "./gOPD.js",
|
|
8
9
|
"./package.json": "./package.json"
|
|
9
10
|
},
|
|
10
11
|
"sideEffects": false,
|
|
@@ -12,12 +13,13 @@
|
|
|
12
13
|
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
13
14
|
"prepublishOnly": "safe-publish-latest",
|
|
14
15
|
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
16
|
+
"prelint": "tsc -p . && attw -P",
|
|
15
17
|
"lint": "eslint --ext=js,mjs .",
|
|
16
18
|
"postlint": "evalmd README.md",
|
|
17
19
|
"pretest": "npm run lint",
|
|
18
20
|
"tests-only": "tape 'test/**/*.js'",
|
|
19
21
|
"test": "npm run tests-only",
|
|
20
|
-
"posttest": "
|
|
22
|
+
"posttest": "npx npm@'>=10.2' audit --production",
|
|
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
|
},
|
|
@@ -41,19 +43,20 @@
|
|
|
41
43
|
"url": "https://github.com/ljharb/gopd/issues"
|
|
42
44
|
},
|
|
43
45
|
"homepage": "https://github.com/ljharb/gopd#readme",
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"get-intrinsic": "^1.1.3"
|
|
46
|
-
},
|
|
47
46
|
"devDependencies": {
|
|
48
|
-
"@
|
|
49
|
-
"
|
|
50
|
-
"
|
|
47
|
+
"@arethetypeswrong/cli": "^0.17.0",
|
|
48
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
49
|
+
"@ljharb/tsconfig": "^0.2.0",
|
|
50
|
+
"@types/tape": "^5.6.5",
|
|
51
|
+
"auto-changelog": "^2.5.0",
|
|
52
|
+
"encoding": "^0.1.13",
|
|
51
53
|
"eslint": "=8.8.0",
|
|
52
54
|
"evalmd": "^0.0.19",
|
|
53
55
|
"in-publish": "^2.0.1",
|
|
54
|
-
"npmignore": "^0.3.
|
|
56
|
+
"npmignore": "^0.3.1",
|
|
55
57
|
"safe-publish-latest": "^2.0.0",
|
|
56
|
-
"tape": "^5.
|
|
58
|
+
"tape": "^5.9.0",
|
|
59
|
+
"typescript": "next"
|
|
57
60
|
},
|
|
58
61
|
"auto-changelog": {
|
|
59
62
|
"output": "CHANGELOG.md",
|
|
@@ -67,5 +70,8 @@
|
|
|
67
70
|
"ignore": [
|
|
68
71
|
".github/workflows"
|
|
69
72
|
]
|
|
73
|
+
},
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": ">= 0.4"
|
|
70
76
|
}
|
|
71
77
|
}
|
|
@@ -10,6 +10,7 @@ test('gOPD', function (t) {
|
|
|
10
10
|
var obj = { x: 1 };
|
|
11
11
|
st.ok('x' in obj, 'property exists');
|
|
12
12
|
|
|
13
|
+
// @ts-expect-error TS can't figure out narrowing from `skip`
|
|
13
14
|
var desc = gOPD(obj, 'x');
|
|
14
15
|
st.deepEqual(
|
|
15
16
|
desc,
|
|
@@ -25,7 +26,7 @@ test('gOPD', function (t) {
|
|
|
25
26
|
st.end();
|
|
26
27
|
});
|
|
27
28
|
|
|
28
|
-
t.test('not supported', { skip: gOPD }, function (st) {
|
|
29
|
+
t.test('not supported', { skip: !!gOPD }, function (st) {
|
|
29
30
|
st.notOk(gOPD, 'is falsy');
|
|
30
31
|
|
|
31
32
|
st.end();
|
|
@@ -5,6 +5,22 @@ 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
|
+
## [v1.1.0](https://github.com/inspect-js/has-symbols/compare/v1.0.3...v1.1.0) - 2024-12-02
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [actions] update workflows [`548c0bf`](https://github.com/inspect-js/has-symbols/commit/548c0bf8c9b1235458df7a1c0490b0064647a282)
|
|
13
|
+
- [actions] further shard; update action deps [`bec56bb`](https://github.com/inspect-js/has-symbols/commit/bec56bb0fb44b43a786686b944875a3175cf3ff3)
|
|
14
|
+
- [meta] use `npmignore` to autogenerate an npmignore file [`ac81032`](https://github.com/inspect-js/has-symbols/commit/ac81032809157e0a079e5264e9ce9b6f1275777e)
|
|
15
|
+
- [New] add types [`6469cbf`](https://github.com/inspect-js/has-symbols/commit/6469cbff1866cfe367b2b3d181d9296ec14b2a3d)
|
|
16
|
+
- [actions] update rebase action to use reusable workflow [`9c9d4d0`](https://github.com/inspect-js/has-symbols/commit/9c9d4d0d8938e4b267acdf8e421f4e92d1716d72)
|
|
17
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`adb5887`](https://github.com/inspect-js/has-symbols/commit/adb5887ca9444849b08beb5caaa9e1d42320cdfb)
|
|
18
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`13ec198`](https://github.com/inspect-js/has-symbols/commit/13ec198ec80f1993a87710af1606a1970b22c7cb)
|
|
19
|
+
- [Dev Deps] update `auto-changelog`, `core-js`, `tape` [`941be52`](https://github.com/inspect-js/has-symbols/commit/941be5248387cab1da72509b22acf3fdb223f057)
|
|
20
|
+
- [Tests] replace `aud` with `npm audit` [`74f49e9`](https://github.com/inspect-js/has-symbols/commit/74f49e9a9d17a443020784234a1c53ce765b3559)
|
|
21
|
+
- [Dev Deps] update `npmignore` [`9c0ac04`](https://github.com/inspect-js/has-symbols/commit/9c0ac0452a834f4c2a4b54044f2d6a89f17e9a70)
|
|
22
|
+
- [Dev Deps] add missing peer dep [`52337a5`](https://github.com/inspect-js/has-symbols/commit/52337a5621cced61f846f2afdab7707a8132cc12)
|
|
23
|
+
|
|
8
24
|
## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01
|
|
9
25
|
|
|
10
26
|
### Commits
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
4
4
|
var hasSymbolSham = require('./shams');
|
|
5
5
|
|
|
6
|
+
/** @type {import('.')} */
|
|
6
7
|
module.exports = function hasNativeSymbols() {
|
|
7
8
|
if (typeof origSymbol !== 'function') { return false; }
|
|
8
9
|
if (typeof Symbol !== 'function') { return false; }
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "has-symbols",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Determine if the JS environment has Symbol support. Supports spec, or shams.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
7
8
|
"prepublishOnly": "safe-publish-latest",
|
|
8
9
|
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
9
10
|
"pretest": "npm run --silent lint",
|
|
10
11
|
"test": "npm run tests-only",
|
|
11
|
-
"posttest": "
|
|
12
|
-
"tests-only": "npm run test:stock && npm run test:
|
|
12
|
+
"posttest": "npx npm@'>=10.2' audit --production",
|
|
13
|
+
"tests-only": "npm run test:stock && npm run test:shams",
|
|
13
14
|
"test:stock": "nyc node test",
|
|
14
15
|
"test:staging": "nyc node --harmony --es-staging test",
|
|
15
16
|
"test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs",
|
|
16
17
|
"test:shams:corejs": "nyc node test/shams/core-js.js",
|
|
17
18
|
"test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js",
|
|
18
19
|
"lint": "eslint --ext=js,mjs .",
|
|
20
|
+
"postlint": "tsc -p . && attw -P",
|
|
19
21
|
"version": "auto-changelog && git add CHANGELOG.md",
|
|
20
22
|
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
21
23
|
},
|
|
@@ -54,15 +56,22 @@
|
|
|
54
56
|
},
|
|
55
57
|
"homepage": "https://github.com/ljharb/has-symbols#readme",
|
|
56
58
|
"devDependencies": {
|
|
57
|
-
"@
|
|
58
|
-
"
|
|
59
|
-
"
|
|
59
|
+
"@arethetypeswrong/cli": "^0.17.0",
|
|
60
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
61
|
+
"@ljharb/tsconfig": "^0.2.0",
|
|
62
|
+
"@types/core-js": "^2.5.8",
|
|
63
|
+
"@types/tape": "^5.6.5",
|
|
64
|
+
"auto-changelog": "^2.5.0",
|
|
60
65
|
"core-js": "^2.6.12",
|
|
66
|
+
"encoding": "^0.1.13",
|
|
61
67
|
"eslint": "=8.8.0",
|
|
62
68
|
"get-own-property-symbols": "^0.9.5",
|
|
69
|
+
"in-publish": "^2.0.1",
|
|
70
|
+
"npmignore": "^0.3.1",
|
|
63
71
|
"nyc": "^10.3.2",
|
|
64
72
|
"safe-publish-latest": "^2.0.0",
|
|
65
|
-
"tape": "^5.
|
|
73
|
+
"tape": "^5.9.0",
|
|
74
|
+
"typescript": "next"
|
|
66
75
|
},
|
|
67
76
|
"testling": {
|
|
68
77
|
"files": "test/index.js",
|
|
@@ -93,9 +102,10 @@
|
|
|
93
102
|
"backfillLimit": false,
|
|
94
103
|
"hideCredit": true
|
|
95
104
|
},
|
|
96
|
-
"
|
|
105
|
+
"publishConfig": {
|
|
97
106
|
"ignore": [
|
|
98
|
-
"
|
|
107
|
+
".github/workflows",
|
|
108
|
+
"types"
|
|
99
109
|
]
|
|
100
110
|
}
|
|
101
111
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
/** @type {import('./shams')} */
|
|
3
4
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
4
5
|
module.exports = function hasSymbols() {
|
|
5
6
|
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
6
7
|
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
7
8
|
|
|
9
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
8
10
|
var obj = {};
|
|
9
11
|
var sym = Symbol('test');
|
|
10
12
|
var symObj = Object(sym);
|
|
@@ -23,7 +25,7 @@ module.exports = function hasSymbols() {
|
|
|
23
25
|
|
|
24
26
|
var symVal = 42;
|
|
25
27
|
obj[sym] = symVal;
|
|
26
|
-
for (
|
|
28
|
+
for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
27
29
|
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
28
30
|
|
|
29
31
|
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
@@ -34,7 +36,8 @@ module.exports = function hasSymbols() {
|
|
|
34
36
|
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
35
37
|
|
|
36
38
|
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
37
|
-
|
|
39
|
+
// eslint-disable-next-line no-extra-parens
|
|
40
|
+
var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
|
|
38
41
|
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
39
42
|
}
|
|
40
43
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
/** @type {(t: import('tape').Test) => false | void} */
|
|
3
4
|
// eslint-disable-next-line consistent-return
|
|
4
5
|
module.exports = function runSymbolTests(t) {
|
|
5
6
|
t.equal(typeof Symbol, 'function', 'global Symbol is a function');
|
|
@@ -31,6 +32,7 @@ module.exports = function runSymbolTests(t) {
|
|
|
31
32
|
|
|
32
33
|
t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function');
|
|
33
34
|
|
|
35
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
34
36
|
var obj = {};
|
|
35
37
|
var sym = Symbol('test');
|
|
36
38
|
var symObj = Object(sym);
|
|
@@ -40,8 +42,8 @@ module.exports = function runSymbolTests(t) {
|
|
|
40
42
|
|
|
41
43
|
var symVal = 42;
|
|
42
44
|
obj[sym] = symVal;
|
|
43
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
44
|
-
for (
|
|
45
|
+
// eslint-disable-next-line no-restricted-syntax, no-unused-vars
|
|
46
|
+
for (var _ in obj) { t.fail('symbol property key was found in for..in of object'); }
|
|
45
47
|
|
|
46
48
|
t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object');
|
|
47
49
|
t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object');
|
|
@@ -65,23 +65,33 @@ function pathToRegexp(path, keys, options) {
|
|
|
65
65
|
return new RegExp(path.join('|'), flags);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
if (typeof path !== 'string') {
|
|
69
|
+
throw new TypeError('path must be a string, array of strings, or regular expression');
|
|
70
|
+
}
|
|
71
|
+
|
|
68
72
|
path = path.replace(
|
|
69
73
|
/\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g,
|
|
70
74
|
function (match, slash, format, key, capture, star, optional, offset) {
|
|
71
|
-
pos = offset + match.length;
|
|
72
|
-
|
|
73
75
|
if (match[0] === '\\') {
|
|
74
76
|
backtrack += match;
|
|
77
|
+
pos += 2;
|
|
75
78
|
return match;
|
|
76
79
|
}
|
|
77
80
|
|
|
78
81
|
if (match === '.') {
|
|
79
82
|
backtrack += '\\.';
|
|
80
83
|
extraOffset += 1;
|
|
84
|
+
pos += 1;
|
|
81
85
|
return '\\.';
|
|
82
86
|
}
|
|
83
87
|
|
|
84
|
-
|
|
88
|
+
if (slash || format) {
|
|
89
|
+
backtrack = '';
|
|
90
|
+
} else {
|
|
91
|
+
backtrack += path.slice(pos, offset);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
pos = offset + match.length;
|
|
85
95
|
|
|
86
96
|
if (match === '*') {
|
|
87
97
|
extraOffset += 3;
|