step-node-agent 3.24.2 → 3.24.4
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/express/History.md +14 -5
- package/node_modules/express/Readme.md +1 -1
- package/node_modules/express/lib/router/index.js +1 -1
- package/node_modules/express/lib/router/route.js +7 -2
- package/node_modules/express/lib/utils.js +3 -4
- package/node_modules/express/package.json +5 -6
- package/node_modules/hasown/CHANGELOG.md +12 -0
- package/node_modules/hasown/index.d.ts +2 -2
- package/node_modules/hasown/package.json +5 -2
- package/node_modules/hasown/tsconfig.json +3 -46
- package/node_modules/set-function-length/CHANGELOG.md +11 -0
- package/node_modules/set-function-length/env.d.ts +9 -6
- package/node_modules/set-function-length/env.js +1 -0
- package/node_modules/set-function-length/index.d.ts +6 -6
- package/node_modules/set-function-length/index.js +1 -3
- package/node_modules/set-function-length/package.json +11 -13
- package/node_modules/set-function-length/tsconfig.json +7 -57
- package/node_modules/side-channel/CHANGELOG.md +9 -0
- package/node_modules/side-channel/index.d.ts +27 -0
- package/node_modules/side-channel/index.js +19 -7
- package/node_modules/side-channel/package.json +11 -9
- package/node_modules/side-channel/test/index.js +1 -1
- package/node_modules/side-channel/tsconfig.json +50 -0
- package/package.json +1 -1
- package/node_modules/express/node_modules/body-parser/HISTORY.md +0 -657
- package/node_modules/express/node_modules/body-parser/LICENSE +0 -23
- package/node_modules/express/node_modules/body-parser/README.md +0 -464
- package/node_modules/express/node_modules/body-parser/SECURITY.md +0 -25
- package/node_modules/express/node_modules/body-parser/index.js +0 -156
- package/node_modules/express/node_modules/body-parser/lib/read.js +0 -205
- package/node_modules/express/node_modules/body-parser/lib/types/json.js +0 -236
- package/node_modules/express/node_modules/body-parser/lib/types/raw.js +0 -101
- package/node_modules/express/node_modules/body-parser/lib/types/text.js +0 -121
- package/node_modules/express/node_modules/body-parser/lib/types/urlencoded.js +0 -284
- package/node_modules/express/node_modules/body-parser/package.json +0 -56
- package/node_modules/express/node_modules/raw-body/HISTORY.md +0 -303
- package/node_modules/express/node_modules/raw-body/LICENSE +0 -22
- package/node_modules/express/node_modules/raw-body/README.md +0 -223
- package/node_modules/express/node_modules/raw-body/SECURITY.md +0 -24
- package/node_modules/express/node_modules/raw-body/index.d.ts +0 -87
- package/node_modules/express/node_modules/raw-body/index.js +0 -329
- package/node_modules/express/node_modules/raw-body/package.json +0 -49
- package/node_modules/set-function-length/env.d.ts.map +0 -1
- package/node_modules/set-function-length/index.d.ts.map +0 -1
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
4.18.3 / 2024-02-26
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
* Fix routing requests without method
|
|
5
|
+
* deps: body-parser@1.20.2
|
|
6
|
+
- Fix strict json error message on Node.js 19+
|
|
7
|
+
- deps: content-type@~1.0.5
|
|
8
|
+
- deps: raw-body@2.5.2
|
|
9
|
+
|
|
1
10
|
4.18.2 / 2022-10-08
|
|
2
11
|
===================
|
|
3
12
|
|
|
@@ -2111,7 +2120,7 @@
|
|
|
2111
2120
|
* deps: connect@2.21.0
|
|
2112
2121
|
- deprecate `connect(middleware)` -- use `app.use(middleware)` instead
|
|
2113
2122
|
- deprecate `connect.createServer()` -- use `connect()` instead
|
|
2114
|
-
- fix `res.setHeader()` patch to work with
|
|
2123
|
+
- fix `res.setHeader()` patch to work with get -> append -> set pattern
|
|
2115
2124
|
- deps: compression@~1.0.8
|
|
2116
2125
|
- deps: errorhandler@~1.1.1
|
|
2117
2126
|
- deps: express-session@~1.5.0
|
|
@@ -3322,8 +3331,8 @@ Shaw]
|
|
|
3322
3331
|
* Added node v0.1.97 compatibility
|
|
3323
3332
|
* Added support for deleting cookies via Request#cookie('key', null)
|
|
3324
3333
|
* Updated haml submodule
|
|
3325
|
-
* Fixed not-found page, now using
|
|
3326
|
-
* Fixed show-exceptions page, now using
|
|
3334
|
+
* Fixed not-found page, now using charset utf-8
|
|
3335
|
+
* Fixed show-exceptions page, now using charset utf-8
|
|
3327
3336
|
* Fixed view support due to fs.readFile Buffers
|
|
3328
3337
|
* Changed; mime.type() no longer accepts ".type" due to node extname() changes
|
|
3329
3338
|
|
|
@@ -3358,7 +3367,7 @@ Shaw]
|
|
|
3358
3367
|
==================
|
|
3359
3368
|
|
|
3360
3369
|
* Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s
|
|
3361
|
-
encoding is set to 'utf8' or 'utf-8'.
|
|
3370
|
+
encoding is set to 'utf8' or 'utf-8').
|
|
3362
3371
|
* Added "encoding" option to Request#render(). Closes #299
|
|
3363
3372
|
* Added "dump exceptions" setting, which is enabled by default.
|
|
3364
3373
|
* Added simple ejs template engine support
|
|
@@ -3397,7 +3406,7 @@ Shaw]
|
|
|
3397
3406
|
* Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js
|
|
3398
3407
|
* Added callback function support to Request#halt() as 3rd/4th arg
|
|
3399
3408
|
* Added preprocessing of route param wildcards using param(). Closes #251
|
|
3400
|
-
* Added view partial support (with collections etc)
|
|
3409
|
+
* Added view partial support (with collections etc.)
|
|
3401
3410
|
* Fixed bug preventing falsey params (such as ?page=0). Closes #286
|
|
3402
3411
|
* Fixed setting of multiple cookies. Closes #199
|
|
3403
3412
|
* Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml)
|
|
@@ -104,7 +104,7 @@ $ npm start
|
|
|
104
104
|
To view the examples, clone the Express repo and install the dependencies:
|
|
105
105
|
|
|
106
106
|
```console
|
|
107
|
-
$ git clone
|
|
107
|
+
$ git clone https://github.com/expressjs/express.git --depth 1
|
|
108
108
|
$ cd express
|
|
109
109
|
$ npm install
|
|
110
110
|
```
|
|
@@ -60,7 +60,10 @@ Route.prototype._handles_method = function _handles_method(method) {
|
|
|
60
60
|
return true;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
// normalize name
|
|
64
|
+
var name = typeof method === 'string'
|
|
65
|
+
? method.toLowerCase()
|
|
66
|
+
: method
|
|
64
67
|
|
|
65
68
|
if (name === 'head' && !this.methods['head']) {
|
|
66
69
|
name = 'get';
|
|
@@ -103,8 +106,10 @@ Route.prototype.dispatch = function dispatch(req, res, done) {
|
|
|
103
106
|
if (stack.length === 0) {
|
|
104
107
|
return done();
|
|
105
108
|
}
|
|
109
|
+
var method = typeof req.method === 'string'
|
|
110
|
+
? req.method.toLowerCase()
|
|
111
|
+
: req.method
|
|
106
112
|
|
|
107
|
-
var method = req.method.toLowerCase();
|
|
108
113
|
if (method === 'head' && !this.methods['head']) {
|
|
109
114
|
method = 'get';
|
|
110
115
|
}
|
|
@@ -117,17 +117,15 @@ exports.contentDisposition = deprecate.function(contentDisposition,
|
|
|
117
117
|
/**
|
|
118
118
|
* Parse accept params `str` returning an
|
|
119
119
|
* object with `.value`, `.quality` and `.params`.
|
|
120
|
-
* also includes `.originalIndex` for stable sorting
|
|
121
120
|
*
|
|
122
121
|
* @param {String} str
|
|
123
|
-
* @param {Number} index
|
|
124
122
|
* @return {Object}
|
|
125
123
|
* @api private
|
|
126
124
|
*/
|
|
127
125
|
|
|
128
|
-
function acceptParams(str
|
|
126
|
+
function acceptParams (str) {
|
|
129
127
|
var parts = str.split(/ *; */);
|
|
130
|
-
var ret = { value: parts[0], quality: 1, params: {}
|
|
128
|
+
var ret = { value: parts[0], quality: 1, params: {} }
|
|
131
129
|
|
|
132
130
|
for (var i = 1; i < parts.length; ++i) {
|
|
133
131
|
var pms = parts[i].split(/ *= */);
|
|
@@ -282,6 +280,7 @@ function createETagGenerator (options) {
|
|
|
282
280
|
/**
|
|
283
281
|
* Parse an extended query string with qs.
|
|
284
282
|
*
|
|
283
|
+
* @param {String} str
|
|
285
284
|
* @return {Object}
|
|
286
285
|
* @private
|
|
287
286
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express",
|
|
3
3
|
"description": "Fast, unopinionated, minimalist web framework",
|
|
4
|
-
"version": "4.18.
|
|
4
|
+
"version": "4.18.3",
|
|
5
5
|
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Aaron Heckmann <aaron.heckmann+github@gmail.com>",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"accepts": "~1.3.8",
|
|
32
32
|
"array-flatten": "1.1.1",
|
|
33
|
-
"body-parser": "1.20.
|
|
33
|
+
"body-parser": "1.20.2",
|
|
34
34
|
"content-disposition": "0.5.4",
|
|
35
35
|
"content-type": "~1.0.4",
|
|
36
36
|
"cookie": "0.5.0",
|
|
@@ -65,15 +65,14 @@
|
|
|
65
65
|
"connect-redis": "3.4.2",
|
|
66
66
|
"cookie-parser": "1.4.6",
|
|
67
67
|
"cookie-session": "2.0.0",
|
|
68
|
-
"ejs": "3.1.
|
|
69
|
-
"eslint": "8.
|
|
68
|
+
"ejs": "3.1.9",
|
|
69
|
+
"eslint": "8.47.0",
|
|
70
70
|
"express-session": "1.17.2",
|
|
71
71
|
"hbs": "4.2.0",
|
|
72
72
|
"marked": "0.7.0",
|
|
73
73
|
"method-override": "3.0.0",
|
|
74
|
-
"mocha": "10.
|
|
74
|
+
"mocha": "10.2.0",
|
|
75
75
|
"morgan": "1.10.0",
|
|
76
|
-
"multiparty": "4.2.3",
|
|
77
76
|
"nyc": "15.1.0",
|
|
78
77
|
"pbkdf2-password": "1.2.1",
|
|
79
78
|
"supertest": "6.3.0",
|
|
@@ -5,6 +5,18 @@ 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.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [types] use shared config [`68e9d4d`](https://github.com/inspect-js/hasOwn/commit/68e9d4dab6facb4f05f02c6baea94a3f2a4e44b2)
|
|
13
|
+
- [actions] remove redundant finisher; use reusable workflow [`241a68e`](https://github.com/inspect-js/hasOwn/commit/241a68e13ea1fe52bec5ba7f74144befc31fae7b)
|
|
14
|
+
- [Tests] increase coverage [`4125c0d`](https://github.com/inspect-js/hasOwn/commit/4125c0d6121db56ae30e38346dfb0c000b04f0a7)
|
|
15
|
+
- [Tests] skip `npm ls` in old node due to TS [`01b9282`](https://github.com/inspect-js/hasOwn/commit/01b92822f9971dea031eafdd14767df41d61c202)
|
|
16
|
+
- [types] improve predicate type [`d340f85`](https://github.com/inspect-js/hasOwn/commit/d340f85ce02e286ef61096cbbb6697081d40a12b)
|
|
17
|
+
- [Dev Deps] update `tape` [`70089fc`](https://github.com/inspect-js/hasOwn/commit/70089fcf544e64acc024cbe60f5a9b00acad86de)
|
|
18
|
+
- [Tests] use `@arethetypeswrong/cli` [`50b272c`](https://github.com/inspect-js/hasOwn/commit/50b272c829f40d053a3dd91c9796e0ac0b2af084)
|
|
19
|
+
|
|
8
20
|
## [v2.0.1](https://github.com/inspect-js/hasOwn/compare/v2.0.0...v2.0.1) - 2024-02-10
|
|
9
21
|
|
|
10
22
|
### Commits
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare function hasOwn<
|
|
1
|
+
declare function hasOwn<O, K extends PropertyKey, V = unknown>(o: O, p: K): o is O & Record<K, V>;
|
|
2
2
|
|
|
3
|
-
export = hasOwn;
|
|
3
|
+
export = hasOwn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hasown",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "A robust, ES3 compatible, \"has own property\" predicate.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"postlint": "npm run tsc",
|
|
19
19
|
"pretest": "npm run lint",
|
|
20
20
|
"tsc": "tsc -p .",
|
|
21
|
+
"posttsc": "attw -P",
|
|
21
22
|
"tests-only": "nyc tape 'test/**/*.js'",
|
|
22
23
|
"test": "npm run tests-only",
|
|
23
24
|
"posttest": "aud --production",
|
|
@@ -50,7 +51,9 @@
|
|
|
50
51
|
"function-bind": "^1.1.2"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
54
|
+
"@arethetypeswrong/cli": "^0.15.1",
|
|
53
55
|
"@ljharb/eslint-config": "^21.1.0",
|
|
56
|
+
"@ljharb/tsconfig": "^0.2.0",
|
|
54
57
|
"@types/function-bind": "^1.1.10",
|
|
55
58
|
"@types/mock-property": "^1.0.2",
|
|
56
59
|
"@types/tape": "^5.6.4",
|
|
@@ -63,7 +66,7 @@
|
|
|
63
66
|
"npmignore": "^0.3.1",
|
|
64
67
|
"nyc": "^10.3.2",
|
|
65
68
|
"safe-publish-latest": "^2.0.0",
|
|
66
|
-
"tape": "^5.7.
|
|
69
|
+
"tape": "^5.7.5",
|
|
67
70
|
"typescript": "next"
|
|
68
71
|
},
|
|
69
72
|
"engines": {
|
|
@@ -1,49 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
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
|
-
},
|
|
2
|
+
"extends": "@ljharb/tsconfig",
|
|
46
3
|
"exclude": [
|
|
47
|
-
"coverage"
|
|
48
|
-
]
|
|
4
|
+
"coverage",
|
|
5
|
+
],
|
|
49
6
|
}
|
|
@@ -5,6 +5,17 @@ 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.2](https://github.com/ljharb/set-function-length/compare/v1.2.1...v1.2.2) - 2024-03-09
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [types] use shared config [`027032f`](https://github.com/ljharb/set-function-length/commit/027032fe9cc439644a07248ea6a8d813fcc767cb)
|
|
13
|
+
- [actions] remove redundant finisher; use reusable workflow [`1fd4fb1`](https://github.com/ljharb/set-function-length/commit/1fd4fb1c58bd5170f0dcff7e320077c0aa2ffdeb)
|
|
14
|
+
- [types] use a handwritten d.ts file instead of emit [`01b9761`](https://github.com/ljharb/set-function-length/commit/01b9761742c95e1118e8c2d153ce2ae43d9731aa)
|
|
15
|
+
- [Deps] update `define-data-property`, `get-intrinsic`, `has-property-descriptors` [`bee8eaf`](https://github.com/ljharb/set-function-length/commit/bee8eaf7749f325357ade85cffeaeef679e513d4)
|
|
16
|
+
- [Dev Deps] update `call-bind`, `tape` [`5dae579`](https://github.com/ljharb/set-function-length/commit/5dae579fdc3aab91b14ebb58f9c19ee3f509d434)
|
|
17
|
+
- [Tests] use `@arethetypeswrong/cli` [`7e22425`](https://github.com/ljharb/set-function-length/commit/7e22425d15957fd3d6da0b6bca4afc0c8d255d2d)
|
|
18
|
+
|
|
8
19
|
## [v1.2.1](https://github.com/ljharb/set-function-length/compare/v1.2.0...v1.2.1) - 2024-02-06
|
|
9
20
|
|
|
10
21
|
### Commits
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
declare const env: {
|
|
2
|
+
__proto__: null,
|
|
3
|
+
boundFnsHaveConfigurableLengths: boolean;
|
|
4
|
+
boundFnsHaveWritableLengths: boolean;
|
|
5
|
+
functionsHaveConfigurableLengths: boolean;
|
|
6
|
+
functionsHaveWritableLengths: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export = env;
|
|
@@ -15,6 +15,7 @@ var boundFnsHaveConfigurableLengths = !!(bound && bound.configurable);
|
|
|
15
15
|
|
|
16
16
|
var boundFnsHaveWritableLengths = !!(bound && bound.writable);
|
|
17
17
|
|
|
18
|
+
/** @type {import('./env')} */
|
|
18
19
|
module.exports = {
|
|
19
20
|
__proto__: null,
|
|
20
21
|
boundFnsHaveConfigurableLengths: boundFnsHaveConfigurableLengths,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare namespace
|
|
2
|
-
|
|
1
|
+
declare namespace setFunctionLength {
|
|
2
|
+
type Func = (...args: unknown[]) => unknown;
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
|
|
5
|
+
declare function setFunctionLength<T extends setFunctionLength.Func = setFunctionLength.Func>(fn: T, length: number, loose?: boolean): T;
|
|
6
|
+
|
|
7
|
+
export = setFunctionLength;
|
|
@@ -8,9 +8,7 @@ var gOPD = require('gopd');
|
|
|
8
8
|
var $TypeError = require('es-errors/type');
|
|
9
9
|
var $floor = GetIntrinsic('%Math.floor%');
|
|
10
10
|
|
|
11
|
-
/** @
|
|
12
|
-
|
|
13
|
-
/** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */
|
|
11
|
+
/** @type {import('.')} */
|
|
14
12
|
module.exports = function setFunctionLength(fn, length) {
|
|
15
13
|
if (typeof fn !== 'function') {
|
|
16
14
|
throw new $TypeError('`fn` is not a function');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "set-function-length",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Set a function's length property",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -13,13 +13,11 @@
|
|
|
13
13
|
"test": "test"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"prepack": "npmignore --auto --commentLines=autogenerated
|
|
16
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
17
17
|
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
18
18
|
"prepublishOnly": "safe-publish-latest",
|
|
19
19
|
"tsc": "tsc -p .",
|
|
20
|
-
"
|
|
21
|
-
"emit": "npm run tsc -- --noEmit false --emitDeclarationOnly",
|
|
22
|
-
"postemit": "rm test/*.ts test/*.ts.map",
|
|
20
|
+
"posttsc": "attw -P",
|
|
23
21
|
"prelint": "evalmd README.md",
|
|
24
22
|
"lint": "eslint --ext=js,mjs .",
|
|
25
23
|
"postlint": "npm run tsc",
|
|
@@ -49,15 +47,17 @@
|
|
|
49
47
|
},
|
|
50
48
|
"homepage": "https://github.com/ljharb/set-function-length#readme",
|
|
51
49
|
"dependencies": {
|
|
52
|
-
"define-data-property": "^1.1.
|
|
50
|
+
"define-data-property": "^1.1.4",
|
|
53
51
|
"es-errors": "^1.3.0",
|
|
54
52
|
"function-bind": "^1.1.2",
|
|
55
|
-
"get-intrinsic": "^1.2.
|
|
53
|
+
"get-intrinsic": "^1.2.4",
|
|
56
54
|
"gopd": "^1.0.1",
|
|
57
|
-
"has-property-descriptors": "^1.0.
|
|
55
|
+
"has-property-descriptors": "^1.0.2"
|
|
58
56
|
},
|
|
59
57
|
"devDependencies": {
|
|
58
|
+
"@arethetypeswrong/cli": "^0.15.1",
|
|
60
59
|
"@ljharb/eslint-config": "^21.1.0",
|
|
60
|
+
"@ljharb/tsconfig": "^0.1.1",
|
|
61
61
|
"@types/call-bind": "^1.0.5",
|
|
62
62
|
"@types/define-properties": "^1.1.5",
|
|
63
63
|
"@types/es-value-fixtures": "^1.4.4",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@types/tape": "^5.6.4",
|
|
70
70
|
"aud": "^2.0.4",
|
|
71
71
|
"auto-changelog": "^2.4.0",
|
|
72
|
-
"call-bind": "^1.0.
|
|
72
|
+
"call-bind": "^1.0.7",
|
|
73
73
|
"es-value-fixtures": "^1.4.2",
|
|
74
74
|
"eslint": "=8.8.0",
|
|
75
75
|
"evalmd": "^0.0.19",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"nyc": "^10.3.2",
|
|
80
80
|
"object-inspect": "^1.13.1",
|
|
81
81
|
"safe-publish-latest": "^2.0.0",
|
|
82
|
-
"tape": "^5.7.
|
|
82
|
+
"tape": "^5.7.5",
|
|
83
83
|
"typescript": "next"
|
|
84
84
|
},
|
|
85
85
|
"engines": {
|
|
@@ -96,9 +96,7 @@
|
|
|
96
96
|
"publishConfig": {
|
|
97
97
|
"ignore": [
|
|
98
98
|
".github/workflows",
|
|
99
|
-
"test"
|
|
100
|
-
"!*.d.ts",
|
|
101
|
-
"!*.d.ts.map"
|
|
99
|
+
"test"
|
|
102
100
|
]
|
|
103
101
|
}
|
|
104
102
|
}
|
|
@@ -1,59 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
24
|
-
/* JavaScript Support */
|
|
25
|
-
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
26
|
-
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
27
|
-
"maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
28
|
-
|
|
29
|
-
/* Emit */
|
|
30
|
-
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
31
|
-
"declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
32
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript 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
|
-
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
43
|
-
"noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
44
|
-
"useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
45
|
-
"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
46
|
-
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
47
|
-
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
48
|
-
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
49
|
-
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
|
50
|
-
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
51
|
-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
52
|
-
|
|
53
|
-
/* Completeness */
|
|
54
|
-
// "skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
55
|
-
},
|
|
56
|
-
"exclude": [
|
|
57
|
-
"coverage"
|
|
58
|
-
]
|
|
2
|
+
"extends": "@ljharb/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "es2021",
|
|
5
|
+
},
|
|
6
|
+
"exclude": [
|
|
7
|
+
"coverage",
|
|
8
|
+
],
|
|
59
9
|
}
|
|
@@ -5,6 +5,15 @@ 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.0.6](https://github.com/ljharb/side-channel/compare/v1.0.5...v1.0.6) - 2024-02-29
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- add types [`9beef66`](https://github.com/ljharb/side-channel/commit/9beef6643e6d717ea57bedabf86448123a7dd9e9)
|
|
13
|
+
- [meta] simplify `exports` [`4334cf9`](https://github.com/ljharb/side-channel/commit/4334cf9df654151504c383b62a2f9ebdc8d9d5ac)
|
|
14
|
+
- [Deps] update `call-bind` [`d6043c4`](https://github.com/ljharb/side-channel/commit/d6043c4d8f4d7be9037dd0f0419c7a2e0e39ec6a)
|
|
15
|
+
- [Dev Deps] update `tape` [`6aca376`](https://github.com/ljharb/side-channel/commit/6aca3761868dc8cd5ff7fd9799bf6b95e09a6eb0)
|
|
16
|
+
|
|
8
17
|
## [v1.0.5](https://github.com/ljharb/side-channel/compare/v1.0.4...v1.0.5) - 2024-02-06
|
|
9
18
|
|
|
10
19
|
### Commits
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare namespace getSideChannel {
|
|
2
|
+
type Key = unknown;
|
|
3
|
+
type ListNode<T> = {
|
|
4
|
+
key: Key;
|
|
5
|
+
next: ListNode<T>;
|
|
6
|
+
value: T;
|
|
7
|
+
};
|
|
8
|
+
type RootNode<T> = {
|
|
9
|
+
key: object;
|
|
10
|
+
next: null | ListNode<T>;
|
|
11
|
+
};
|
|
12
|
+
function listGetNode<T>(list: RootNode<T>, key: ListNode<T>['key']): ListNode<T> | void;
|
|
13
|
+
function listGet<T>(objects: RootNode<T>, key: ListNode<T>['key']): T | void;
|
|
14
|
+
function listSet<T>(objects: RootNode<T>, key: ListNode<T>['key'], value: T): void;
|
|
15
|
+
function listHas<T>(objects: RootNode<T>, key: ListNode<T>['key']): boolean;
|
|
16
|
+
|
|
17
|
+
type Channel = {
|
|
18
|
+
assert: (key: Key) => void;
|
|
19
|
+
has: (key: Key) => boolean;
|
|
20
|
+
get: <T>(key: Key) => T;
|
|
21
|
+
set: <T>(key: Key, value: T) => void;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare function getSideChannel(): getSideChannel.Channel;
|
|
26
|
+
|
|
27
|
+
export = getSideChannel;
|
|
@@ -20,42 +20,54 @@ var $mapHas = callBound('Map.prototype.has', true);
|
|
|
20
20
|
*
|
|
21
21
|
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
|
|
22
22
|
*/
|
|
23
|
+
/** @type {import('.').listGetNode} */
|
|
23
24
|
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
|
|
24
|
-
|
|
25
|
+
/** @type {typeof list | NonNullable<(typeof list)['next']>} */
|
|
26
|
+
var prev = list;
|
|
27
|
+
/** @type {(typeof list)['next']} */
|
|
28
|
+
var curr;
|
|
29
|
+
for (; (curr = prev.next) !== null; prev = curr) {
|
|
25
30
|
if (curr.key === key) {
|
|
26
31
|
prev.next = curr.next;
|
|
27
|
-
|
|
32
|
+
// eslint-disable-next-line no-extra-parens
|
|
33
|
+
curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
|
|
28
34
|
list.next = curr; // eslint-disable-line no-param-reassign
|
|
29
35
|
return curr;
|
|
30
36
|
}
|
|
31
37
|
}
|
|
32
38
|
};
|
|
33
39
|
|
|
40
|
+
/** @type {import('.').listGet} */
|
|
34
41
|
var listGet = function (objects, key) {
|
|
35
42
|
var node = listGetNode(objects, key);
|
|
36
43
|
return node && node.value;
|
|
37
44
|
};
|
|
45
|
+
/** @type {import('.').listSet} */
|
|
38
46
|
var listSet = function (objects, key, value) {
|
|
39
47
|
var node = listGetNode(objects, key);
|
|
40
48
|
if (node) {
|
|
41
49
|
node.value = value;
|
|
42
50
|
} else {
|
|
43
51
|
// Prepend the new node to the beginning of the list
|
|
44
|
-
objects.next = { // eslint-disable-line no-param-reassign
|
|
52
|
+
objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
|
|
45
53
|
key: key,
|
|
46
54
|
next: objects.next,
|
|
47
55
|
value: value
|
|
48
|
-
};
|
|
56
|
+
});
|
|
49
57
|
}
|
|
50
58
|
};
|
|
59
|
+
/** @type {import('.').listHas} */
|
|
51
60
|
var listHas = function (objects, key) {
|
|
52
61
|
return !!listGetNode(objects, key);
|
|
53
62
|
};
|
|
54
63
|
|
|
64
|
+
/** @type {import('.')} */
|
|
55
65
|
module.exports = function getSideChannel() {
|
|
56
|
-
var $wm;
|
|
57
|
-
var $m;
|
|
58
|
-
var $o;
|
|
66
|
+
/** @type {WeakMap<object, unknown>} */ var $wm;
|
|
67
|
+
/** @type {Map<object, unknown>} */ var $m;
|
|
68
|
+
/** @type {import('.').RootNode<unknown>} */ var $o;
|
|
69
|
+
|
|
70
|
+
/** @type {import('.').Channel} */
|
|
59
71
|
var channel = {
|
|
60
72
|
assert: function (key) {
|
|
61
73
|
if (!channel.has(key)) {
|