step-node-agent 3.23.0 → 3.23.2
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/.eslintrc +0 -1
- package/node_modules/call-bind/.nycrc +0 -4
- package/node_modules/call-bind/CHANGELOG.md +35 -0
- package/node_modules/call-bind/README.md +63 -1
- package/node_modules/call-bind/index.js +10 -13
- package/node_modules/call-bind/package.json +33 -23
- package/node_modules/call-bind/test/callBound.js +0 -1
- package/node_modules/call-bind/test/index.js +18 -4
- package/node_modules/define-data-property/.eslintrc +24 -0
- package/node_modules/define-data-property/.github/FUNDING.yml +12 -0
- package/node_modules/define-data-property/.nycrc +13 -0
- package/node_modules/define-data-property/CHANGELOG.md +41 -0
- package/node_modules/define-data-property/LICENSE +21 -0
- package/node_modules/define-data-property/README.md +67 -0
- package/node_modules/define-data-property/index.d.ts +3 -0
- package/node_modules/define-data-property/index.d.ts.map +1 -0
- package/node_modules/define-data-property/index.js +68 -0
- package/node_modules/define-data-property/package.json +113 -0
- package/node_modules/define-data-property/test/index.js +392 -0
- package/node_modules/define-data-property/tsconfig.json +59 -0
- package/node_modules/function-bind/.eslintrc +11 -5
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/README.md +25 -27
- package/node_modules/function-bind/implementation.js +44 -12
- package/node_modules/function-bind/package.json +38 -14
- package/node_modules/get-intrinsic/CHANGELOG.md +8 -0
- package/node_modules/get-intrinsic/index.js +1 -1
- package/node_modules/get-intrinsic/package.json +11 -11
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +25 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/index.js +16 -0
- package/node_modules/gopd/package.json +71 -0
- package/node_modules/gopd/test/index.js +35 -0
- package/node_modules/has-property-descriptors/.eslintrc +13 -0
- package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
- package/node_modules/has-property-descriptors/.nycrc +9 -0
- package/node_modules/has-property-descriptors/CHANGELOG.md +27 -0
- package/node_modules/has-property-descriptors/LICENSE +21 -0
- package/node_modules/has-property-descriptors/README.md +43 -0
- package/node_modules/has-property-descriptors/index.js +33 -0
- package/node_modules/has-property-descriptors/package.json +77 -0
- package/node_modules/has-property-descriptors/test/index.js +57 -0
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +20 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.d.ts.map +1 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +49 -0
- package/node_modules/is-core-module/CHANGELOG.md +7 -0
- package/node_modules/is-core-module/index.js +2 -2
- package/node_modules/is-core-module/package.json +4 -4
- package/node_modules/object-inspect/CHANGELOG.md +19 -0
- package/node_modules/object-inspect/index.js +8 -0
- package/node_modules/object-inspect/package.json +8 -6
- package/node_modules/object-inspect/test/global.js +17 -0
- package/node_modules/punycode/README.md +23 -1
- package/node_modules/punycode/package.json +3 -3
- package/node_modules/punycode/punycode.es6.js +1 -1
- package/node_modules/punycode/punycode.js +1 -1
- package/node_modules/set-function-length/.eslintrc +27 -0
- package/node_modules/set-function-length/.github/FUNDING.yml +12 -0
- package/node_modules/set-function-length/.nycrc +13 -0
- package/node_modules/set-function-length/CHANGELOG.md +41 -0
- package/node_modules/set-function-length/LICENSE +21 -0
- package/node_modules/set-function-length/README.md +56 -0
- package/node_modules/set-function-length/env.js +19 -0
- package/node_modules/set-function-length/index.js +41 -0
- package/node_modules/set-function-length/package.json +84 -0
- package/node_modules/sshpk/bin/sshpk-conv +6 -6
- package/node_modules/sshpk/lib/formats/pkcs8.js +24 -12
- package/node_modules/sshpk/package.json +2 -3
- package/package.json +2 -3
- package/node_modules/function-bind/.editorconfig +0 -20
- package/node_modules/function-bind/.jscs.json +0 -176
- package/node_modules/function-bind/.npmignore +0 -22
- package/node_modules/function-bind/.travis.yml +0 -168
- package/node_modules/has/LICENSE-MIT +0 -22
- package/node_modules/has/README.md +0 -18
- package/node_modules/has/package.json +0 -45
- package/node_modules/has/src/index.js +0 -8
- package/node_modules/has/test/index.js +0 -16
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
+
|
|
5
|
+
/* Projects */
|
|
6
|
+
|
|
7
|
+
/* Language and Environment */
|
|
8
|
+
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
|
9
|
+
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
10
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
11
|
+
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
12
|
+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
13
|
+
|
|
14
|
+
/* Modules */
|
|
15
|
+
"module": "commonjs", /* Specify what module code is generated. */
|
|
16
|
+
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
17
|
+
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
18
|
+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
19
|
+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
20
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
21
|
+
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
22
|
+
"resolveJsonModule": true, /* Enable importing .json files. */
|
|
23
|
+
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
|
24
|
+
|
|
25
|
+
/* JavaScript Support */
|
|
26
|
+
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
27
|
+
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
28
|
+
"maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
29
|
+
|
|
30
|
+
/* Emit */
|
|
31
|
+
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
32
|
+
"declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
33
|
+
"noEmit": true, /* Disable emitting files from a compilation. */
|
|
34
|
+
|
|
35
|
+
/* Interop Constraints */
|
|
36
|
+
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
37
|
+
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
|
38
|
+
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
|
39
|
+
|
|
40
|
+
/* Type Checking */
|
|
41
|
+
"strict": true, /* Enable all strict type-checking options. */
|
|
42
|
+
|
|
43
|
+
/* Completeness */
|
|
44
|
+
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
45
|
+
},
|
|
46
|
+
"exclude": [
|
|
47
|
+
"coverage"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -5,6 +5,13 @@ 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.13.1](https://github.com/inspect-js/is-core-module/compare/v2.13.0...v2.13.1) - 2023-10-20
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Refactor] use `hasown` instead of `has` [`0e52096`](https://github.com/inspect-js/is-core-module/commit/0e520968b0a725276b67420ab4b877486b243ae0)
|
|
13
|
+
- [Dev Deps] update `mock-property`, `tape` [`8736b35`](https://github.com/inspect-js/is-core-module/commit/8736b35464d0f297b55da2c6b30deee04b8303c5)
|
|
14
|
+
|
|
8
15
|
## [v2.13.0](https://github.com/inspect-js/is-core-module/compare/v2.12.1...v2.13.0) - 2023-08-05
|
|
9
16
|
|
|
10
17
|
### Commits
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var hasOwn = require('hasown');
|
|
4
4
|
|
|
5
5
|
function specifierIncluded(current, specifier) {
|
|
6
6
|
var nodeParts = current.split('.');
|
|
@@ -65,5 +65,5 @@ function versionIncluded(nodeVersion, specifierValue) {
|
|
|
65
65
|
var data = require('./core.json');
|
|
66
66
|
|
|
67
67
|
module.exports = function isCore(x, nodeVersion) {
|
|
68
|
-
return
|
|
68
|
+
return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);
|
|
69
69
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "is-core-module",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.1",
|
|
4
4
|
"description": "Is this specifier a node.js core module?",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://github.com/inspect-js/is-core-module",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"
|
|
45
|
+
"hasown": "^2.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@ljharb/eslint-config": "^21.1.0",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"auto-changelog": "^2.4.0",
|
|
51
51
|
"eslint": "=8.8.0",
|
|
52
52
|
"in-publish": "^2.0.1",
|
|
53
|
-
"mock-property": "^1.0.
|
|
53
|
+
"mock-property": "^1.0.2",
|
|
54
54
|
"npmignore": "^0.3.0",
|
|
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.7.1"
|
|
59
59
|
},
|
|
60
60
|
"auto-changelog": {
|
|
61
61
|
"output": "CHANGELOG.md",
|
|
@@ -5,6 +5,25 @@ 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.13.1](https://github.com/inspect-js/object-inspect/compare/v1.13.0...v1.13.1) - 2023-10-19
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Fix] in IE 8, global can !== window despite them being prototypes of each other [`30d0859`](https://github.com/inspect-js/object-inspect/commit/30d0859dc4606cf75c2410edcd5d5c6355f8d372)
|
|
13
|
+
|
|
14
|
+
## [v1.13.0](https://github.com/inspect-js/object-inspect/compare/v1.12.3...v1.13.0) - 2023-10-14
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [New] add special handling for the global object [`431bab2`](https://github.com/inspect-js/object-inspect/commit/431bab21a490ee51d35395966a504501e8c685da)
|
|
19
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`fd4f619`](https://github.com/inspect-js/object-inspect/commit/fd4f6193562b4b0e95dcf5c0201b4e8cbbc4f58d)
|
|
20
|
+
- [Dev Deps] update `mock-property`, `tape` [`b453f6c`](https://github.com/inspect-js/object-inspect/commit/b453f6ceeebf8a1b738a1029754092e0367a4134)
|
|
21
|
+
- [Dev Deps] update `error-cause` [`e8ffc57`](https://github.com/inspect-js/object-inspect/commit/e8ffc577d73b92bb6a4b00c44f14e3319e374888)
|
|
22
|
+
- [Dev Deps] update `tape` [`054b8b9`](https://github.com/inspect-js/object-inspect/commit/054b8b9b98633284cf989e582450ebfbbe53503c)
|
|
23
|
+
- [Dev Deps] temporarily remove `aud` due to breaking change in transitive deps [`2476845`](https://github.com/inspect-js/object-inspect/commit/2476845e0678dd290c541c81cd3dec8420782c52)
|
|
24
|
+
- [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak` [`383fa5e`](https://github.com/inspect-js/object-inspect/commit/383fa5eebc0afd705cc778a4b49d8e26452e49a8)
|
|
25
|
+
- [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm < 6 [`68c244c`](https://github.com/inspect-js/object-inspect/commit/68c244c5174cdd877e5dcb8ee90aa3f44b2f25be)
|
|
26
|
+
|
|
8
27
|
## [v1.12.3](https://github.com/inspect-js/object-inspect/compare/v1.12.2...v1.12.3) - 2023-01-12
|
|
9
28
|
|
|
10
29
|
### Commits
|
|
@@ -239,6 +239,14 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
|
|
239
239
|
if (isString(obj)) {
|
|
240
240
|
return markBoxed(inspect(String(obj)));
|
|
241
241
|
}
|
|
242
|
+
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
|
|
243
|
+
/* eslint-env browser */
|
|
244
|
+
if (typeof window !== 'undefined' && obj === window) {
|
|
245
|
+
return '{ [object Window] }';
|
|
246
|
+
}
|
|
247
|
+
if (obj === global) {
|
|
248
|
+
return '{ [object globalThis] }';
|
|
249
|
+
}
|
|
242
250
|
if (!isDate(obj) && !isRegExp(obj)) {
|
|
243
251
|
var ys = arrObjKeys(obj, inspect);
|
|
244
252
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "object-inspect",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "string representations of objects in node and the browser",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@ljharb/eslint-config": "^21.0
|
|
8
|
+
"@ljharb/eslint-config": "^21.1.0",
|
|
9
9
|
"@pkgjs/support": "^0.0.6",
|
|
10
|
-
"aud": "^2.0.2",
|
|
11
10
|
"auto-changelog": "^2.4.0",
|
|
12
11
|
"core-js": "^2.6.12",
|
|
13
|
-
"error-cause": "^1.0.
|
|
12
|
+
"error-cause": "^1.0.6",
|
|
14
13
|
"es-value-fixtures": "^1.4.2",
|
|
15
14
|
"eslint": "=8.8.0",
|
|
16
15
|
"for-each": "^0.3.3",
|
|
17
16
|
"functions-have-names": "^1.2.3",
|
|
17
|
+
"glob": "=10.3.7",
|
|
18
|
+
"globalthis": "^1.0.3",
|
|
18
19
|
"has-tostringtag": "^1.0.0",
|
|
19
20
|
"in-publish": "^2.0.1",
|
|
21
|
+
"jackspeak": "=2.1.1",
|
|
20
22
|
"make-arrow-function": "^1.2.0",
|
|
21
|
-
"mock-property": "^1.0.
|
|
23
|
+
"mock-property": "^1.0.2",
|
|
22
24
|
"npmignore": "^0.3.0",
|
|
23
25
|
"nyc": "^10.3.2",
|
|
24
26
|
"safe-publish-latest": "^2.0.0",
|
|
25
27
|
"string.prototype.repeat": "^1.0.0",
|
|
26
|
-
"tape": "^5.
|
|
28
|
+
"tape": "^5.7.1"
|
|
27
29
|
},
|
|
28
30
|
"scripts": {
|
|
29
31
|
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var inspect = require('../');
|
|
4
|
+
|
|
5
|
+
var test = require('tape');
|
|
6
|
+
var globalThis = require('globalthis')();
|
|
7
|
+
|
|
8
|
+
test('global object', function (t) {
|
|
9
|
+
/* eslint-env browser */
|
|
10
|
+
var expected = typeof window === 'undefined' ? 'globalThis' : 'Window';
|
|
11
|
+
t.equal(
|
|
12
|
+
inspect([globalThis]),
|
|
13
|
+
'[ { [object ' + expected + '] } ]'
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
t.end();
|
|
17
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Punycode.js [](https://www.npmjs.com/package/
|
|
1
|
+
# Punycode.js [](https://www.npmjs.com/package/punycode) [](https://www.jsdelivr.com/package/npm/punycode)
|
|
2
2
|
|
|
3
3
|
Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891).
|
|
4
4
|
|
|
@@ -115,6 +115,28 @@ punycode.ucs2.encode([0x1D306]);
|
|
|
115
115
|
|
|
116
116
|
A string representing the current Punycode.js version number.
|
|
117
117
|
|
|
118
|
+
## For maintainers
|
|
119
|
+
|
|
120
|
+
### How to publish a new release
|
|
121
|
+
|
|
122
|
+
1. On the `main` branch, bump the version number in `package.json`:
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
npm version patch -m 'Release v%s'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/).
|
|
129
|
+
|
|
130
|
+
Note that this produces a Git commit + tag.
|
|
131
|
+
|
|
132
|
+
1. Push the release commit and tag:
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
git push && git push --tags
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Our CI then automatically publishes the new release to npm, under both the [`punycode`](https://www.npmjs.com/package/punycode) and [`punycode.js`](https://www.npmjs.com/package/punycode.js) names.
|
|
139
|
+
|
|
118
140
|
## Author
|
|
119
141
|
|
|
120
142
|
| [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "punycode",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.",
|
|
5
5
|
"homepage": "https://mths.be/punycode",
|
|
6
6
|
"main": "punycode.js",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"build": "node scripts/prepublish.js"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"codecov": "^
|
|
48
|
-
"
|
|
47
|
+
"codecov": "^3.8.3",
|
|
48
|
+
"nyc": "^15.1.0",
|
|
49
49
|
"mocha": "^10.2.0"
|
|
50
50
|
},
|
|
51
51
|
"jspm": {
|
|
@@ -422,7 +422,7 @@ const punycode = {
|
|
|
422
422
|
* @memberOf punycode
|
|
423
423
|
* @type String
|
|
424
424
|
*/
|
|
425
|
-
'version': '2.1
|
|
425
|
+
'version': '2.3.1',
|
|
426
426
|
/**
|
|
427
427
|
* An object of methods to convert from JavaScript's internal character
|
|
428
428
|
* representation (UCS-2) to Unicode code points, and back.
|
|
@@ -422,7 +422,7 @@ const punycode = {
|
|
|
422
422
|
* @memberOf punycode
|
|
423
423
|
* @type String
|
|
424
424
|
*/
|
|
425
|
-
'version': '2.1
|
|
425
|
+
'version': '2.3.1',
|
|
426
426
|
/**
|
|
427
427
|
* An object of methods to convert from JavaScript's internal character
|
|
428
428
|
* representation (UCS-2) to Unicode code points, and back.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
|
|
4
|
+
"extends": "@ljharb",
|
|
5
|
+
|
|
6
|
+
"rules": {
|
|
7
|
+
"id-length": "off",
|
|
8
|
+
"new-cap": ["error", {
|
|
9
|
+
"capIsNewExceptions": [
|
|
10
|
+
"GetIntrinsic"
|
|
11
|
+
],
|
|
12
|
+
}],
|
|
13
|
+
"no-extra-parens": "off",
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
"overrides": [
|
|
17
|
+
{
|
|
18
|
+
"files": ["test/**/*.js"],
|
|
19
|
+
"rules": {
|
|
20
|
+
"id-length": "off",
|
|
21
|
+
"max-lines-per-function": "off",
|
|
22
|
+
"multiline-comment-style": "off",
|
|
23
|
+
"no-empty-function": "off",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
}
|
|
@@ -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/set-function-name
|
|
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,41 @@
|
|
|
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.1](https://github.com/ljharb/set-function-length/compare/v1.1.0...v1.1.1) - 2023-10-19
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- [Fix] move `define-data-property` to runtime deps [`#2`](https://github.com/ljharb/set-function-length/issues/2)
|
|
13
|
+
|
|
14
|
+
### Commits
|
|
15
|
+
|
|
16
|
+
- [Dev Deps] update `object-inspect`; add missing `call-bind` [`5aecf79`](https://github.com/ljharb/set-function-length/commit/5aecf79e7d6400957a5d9bd9ac20d4528908ca18)
|
|
17
|
+
|
|
18
|
+
## [v1.1.0](https://github.com/ljharb/set-function-length/compare/v1.0.1...v1.1.0) - 2023-10-13
|
|
19
|
+
|
|
20
|
+
### Commits
|
|
21
|
+
|
|
22
|
+
- [New] add `env` entry point [`475c87a`](https://github.com/ljharb/set-function-length/commit/475c87aa2f59b700aaed589d980624ec596acdcb)
|
|
23
|
+
- [Tests] add coverage with `nyc` [`14f0bf8`](https://github.com/ljharb/set-function-length/commit/14f0bf8c145ae60bf14a026420a06bb7be132c36)
|
|
24
|
+
- [eslint] fix linting failure [`fb516f9`](https://github.com/ljharb/set-function-length/commit/fb516f93c664057138c53559ef63c8622a093335)
|
|
25
|
+
- [Deps] update `define-data-property` [`d727e7c`](https://github.com/ljharb/set-function-length/commit/d727e7c6c9a40d7bf26797694e500ea68741feea)
|
|
26
|
+
|
|
27
|
+
## [v1.0.1](https://github.com/ljharb/set-function-length/compare/v1.0.0...v1.0.1) - 2023-10-12
|
|
28
|
+
|
|
29
|
+
### Commits
|
|
30
|
+
|
|
31
|
+
- [Refactor] use `get-intrinsic`, since it‘s in the dep graph anyways [`278a954`](https://github.com/ljharb/set-function-length/commit/278a954a06cd849051c569ff7aee56df6798933e)
|
|
32
|
+
- [meta] add `exports` [`72acfe5`](https://github.com/ljharb/set-function-length/commit/72acfe5a0310071fb205a72caba5ecbab24336a0)
|
|
33
|
+
|
|
34
|
+
## v1.0.0 - 2023-10-12
|
|
35
|
+
|
|
36
|
+
### Commits
|
|
37
|
+
|
|
38
|
+
- Initial implementation, tests, readme [`fce14e1`](https://github.com/ljharb/set-function-length/commit/fce14e17586460e4f294405173be72b6ffdf7e5f)
|
|
39
|
+
- Initial commit [`ca7ba85`](https://github.com/ljharb/set-function-length/commit/ca7ba857c7c283f9d26e21f14e71cd388f2cb722)
|
|
40
|
+
- npm init [`6a7e493`](https://github.com/ljharb/set-function-length/commit/6a7e493927736cebcaf5c1a84e69b8e6b7b744d8)
|
|
41
|
+
- Only apps should have lockfiles [`d2bf6c4`](https://github.com/ljharb/set-function-length/commit/d2bf6c43de8a51b02a0aa53e8d62cb50c4a2b0da)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Jordan Harband and contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# set-function-length <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
|
+
Set a function’s length.
|
|
11
|
+
|
|
12
|
+
Arguments:
|
|
13
|
+
- `fn`: the function
|
|
14
|
+
- `length`: the new length. Must be an integer between 0 and 2**32.
|
|
15
|
+
- `loose`: Optional. If true, and the length fails to be set, do not throw. Default false.
|
|
16
|
+
|
|
17
|
+
Returns `fn`.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
var setFunctionLength = require('set-function-length');
|
|
23
|
+
var assert = require('assert');
|
|
24
|
+
|
|
25
|
+
function zero() {}
|
|
26
|
+
function one(_) {}
|
|
27
|
+
function two(_, __) {}
|
|
28
|
+
|
|
29
|
+
assert.equal(zero.length, 0);
|
|
30
|
+
assert.equal(one.length, 1);
|
|
31
|
+
assert.equal(two.length, 2);
|
|
32
|
+
|
|
33
|
+
assert.equal(setFunctionLength(zero, 10), zero);
|
|
34
|
+
assert.equal(setFunctionLength(one, 11), one);
|
|
35
|
+
assert.equal(setFunctionLength(two, 12), two);
|
|
36
|
+
|
|
37
|
+
assert.equal(zero.length, 10);
|
|
38
|
+
assert.equal(one.length, 11);
|
|
39
|
+
assert.equal(two.length, 12);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[package-url]: https://npmjs.org/package/set-function-length
|
|
43
|
+
[npm-version-svg]: https://versionbadg.es/ljharb/set-function-length.svg
|
|
44
|
+
[deps-svg]: https://david-dm.org/ljharb/set-function-length.svg
|
|
45
|
+
[deps-url]: https://david-dm.org/ljharb/set-function-length
|
|
46
|
+
[dev-deps-svg]: https://david-dm.org/ljharb/set-function-length/dev-status.svg
|
|
47
|
+
[dev-deps-url]: https://david-dm.org/ljharb/set-function-length#info=devDependencies
|
|
48
|
+
[npm-badge-png]: https://nodei.co/npm/set-function-length.png?downloads=true&stars=true
|
|
49
|
+
[license-image]: https://img.shields.io/npm/l/set-function-length.svg
|
|
50
|
+
[license-url]: LICENSE
|
|
51
|
+
[downloads-image]: https://img.shields.io/npm/dm/set-function-length.svg
|
|
52
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=set-function-length
|
|
53
|
+
[codecov-image]: https://codecov.io/gh/ljharb/set-function-length/branch/main/graphs/badge.svg
|
|
54
|
+
[codecov-url]: https://app.codecov.io/gh/ljharb/set-function-length/
|
|
55
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/set-function-length
|
|
56
|
+
[actions-url]: https://github.com/ljharb/set-function-length/actions
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var gOPD = require('gopd');
|
|
4
|
+
|
|
5
|
+
var functionsHaveConfigurableLengths = gOPD && gOPD(function () {}, 'length').configurable;
|
|
6
|
+
|
|
7
|
+
var functionsHaveWritableLengths = gOPD && gOPD(function () {}, 'length').writable;
|
|
8
|
+
|
|
9
|
+
var boundFnsHaveConfigurableLengths = gOPD && gOPD(function () {}.bind(), 'length').configurable;
|
|
10
|
+
|
|
11
|
+
var boundFnsHaveWritableLengths = gOPD && gOPD(function () {}.bind(), 'length').writable;
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
__proto__: null,
|
|
15
|
+
boundFnsHaveConfigurableLengths: boundFnsHaveConfigurableLengths,
|
|
16
|
+
boundFnsHaveWritableLengths: boundFnsHaveWritableLengths,
|
|
17
|
+
functionsHaveConfigurableLengths: functionsHaveConfigurableLengths,
|
|
18
|
+
functionsHaveWritableLengths: functionsHaveWritableLengths
|
|
19
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
4
|
+
var define = require('define-data-property');
|
|
5
|
+
var hasDescriptors = require('has-property-descriptors')();
|
|
6
|
+
var gOPD = require('gopd');
|
|
7
|
+
|
|
8
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
9
|
+
var $floor = GetIntrinsic('%Math.floor%');
|
|
10
|
+
|
|
11
|
+
module.exports = function setFunctionLength(fn, length) {
|
|
12
|
+
if (typeof fn !== 'function') {
|
|
13
|
+
throw new $TypeError('`fn` is not a function');
|
|
14
|
+
}
|
|
15
|
+
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {
|
|
16
|
+
throw new $TypeError('`length` must be a positive 32-bit integer');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var loose = arguments.length > 2 && !!arguments[2];
|
|
20
|
+
|
|
21
|
+
var functionLengthIsConfigurable = true;
|
|
22
|
+
var functionLengthIsWritable = true;
|
|
23
|
+
if ('length' in fn && gOPD) {
|
|
24
|
+
var desc = gOPD(fn, 'length');
|
|
25
|
+
if (desc && !desc.configurable) {
|
|
26
|
+
functionLengthIsConfigurable = false;
|
|
27
|
+
}
|
|
28
|
+
if (desc && !desc.writable) {
|
|
29
|
+
functionLengthIsWritable = false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
34
|
+
if (hasDescriptors) {
|
|
35
|
+
define(fn, 'length', length, true, true);
|
|
36
|
+
} else {
|
|
37
|
+
define(fn, 'length', length);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return fn;
|
|
41
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "set-function-length",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "Set a function's length property",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./env": "./env.js",
|
|
9
|
+
"./package.json": "./package.json"
|
|
10
|
+
},
|
|
11
|
+
"directories": {
|
|
12
|
+
"test": "test"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
16
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
17
|
+
"prepublishOnly": "safe-publish-latest",
|
|
18
|
+
"prelint": "evalmd README.md",
|
|
19
|
+
"lint": "eslint --ext=js,mjs .",
|
|
20
|
+
"pretest": "npm run lint",
|
|
21
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
22
|
+
"test": "npm run tests-only",
|
|
23
|
+
"posttest": "aud --production",
|
|
24
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
25
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/ljharb/set-function-length.git"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"javascript",
|
|
33
|
+
"ecmascript",
|
|
34
|
+
"set",
|
|
35
|
+
"function",
|
|
36
|
+
"length",
|
|
37
|
+
"function.length"
|
|
38
|
+
],
|
|
39
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/ljharb/set-function-length/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/ljharb/set-function-length#readme",
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@ljharb/eslint-config": "^21.1.0",
|
|
47
|
+
"aud": "^2.0.3",
|
|
48
|
+
"auto-changelog": "^2.4.0",
|
|
49
|
+
"call-bind": "^1.0.4",
|
|
50
|
+
"es-value-fixtures": "^1.4.2",
|
|
51
|
+
"eslint": "=8.8.0",
|
|
52
|
+
"evalmd": "^0.0.19",
|
|
53
|
+
"for-each": "^0.3.3",
|
|
54
|
+
"in-publish": "^2.0.1",
|
|
55
|
+
"npmignore": "^0.3.0",
|
|
56
|
+
"nyc": "^10.3.2",
|
|
57
|
+
"object-inspect": "^1.13.1",
|
|
58
|
+
"safe-publish-latest": "^2.0.0",
|
|
59
|
+
"tape": "^5.7.1"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"define-data-property": "^1.1.1",
|
|
63
|
+
"get-intrinsic": "^1.2.1",
|
|
64
|
+
"gopd": "^1.0.1",
|
|
65
|
+
"has-property-descriptors": "^1.0.0"
|
|
66
|
+
},
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">= 0.4"
|
|
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
|
+
"test"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -91,12 +91,12 @@ if (require.main === module) {
|
|
|
91
91
|
console.error('sshpk-conv: converts between SSH key formats\n');
|
|
92
92
|
console.error(help);
|
|
93
93
|
console.error('\navailable key formats:');
|
|
94
|
-
console.error('
|
|
95
|
-
console.error('
|
|
96
|
-
console.error('
|
|
97
|
-
console.error('
|
|
98
|
-
console.error('
|
|
99
|
-
console.error('
|
|
94
|
+
console.error(' - pem, pkcs1 eg id_rsa');
|
|
95
|
+
console.error(' - ssh eg id_rsa.pub');
|
|
96
|
+
console.error(' - pkcs8 format you want for openssl');
|
|
97
|
+
console.error(' - openssh like output of ssh-keygen -o');
|
|
98
|
+
console.error(' - rfc4253 raw OpenSSH wire format');
|
|
99
|
+
console.error(' - dnssec dnssec-keygen format');
|
|
100
100
|
console.error(' - putty PuTTY ppk format');
|
|
101
101
|
console.error('\navailable fingerprint formats:');
|
|
102
102
|
console.error(' - hex colon-separated hex for SSH');
|