step-node-agent 3.24.3 → 3.24.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/cookie/HISTORY.md +10 -5
- package/node_modules/cookie/README.md +63 -48
- package/node_modules/cookie/index.js +5 -1
- package/node_modules/cookie/package.json +5 -5
- package/node_modules/express/History.md +19 -1
- package/node_modules/express/lib/response.js +12 -3
- package/node_modules/express/package.json +2 -2
- 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/package.json +1 -1
- 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,16 +1,21 @@
|
|
|
1
|
+
0.6.0 / 2023-11-06
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
* Add `partitioned` option
|
|
5
|
+
|
|
1
6
|
0.5.0 / 2022-04-11
|
|
2
7
|
==================
|
|
3
8
|
|
|
4
9
|
* Add `priority` option
|
|
5
10
|
* Fix `expires` option to reject invalid dates
|
|
6
|
-
*
|
|
7
|
-
*
|
|
11
|
+
* perf: improve default decode speed
|
|
12
|
+
* perf: remove slow string split in parse
|
|
8
13
|
|
|
9
14
|
0.4.2 / 2022-02-02
|
|
10
15
|
==================
|
|
11
16
|
|
|
12
|
-
*
|
|
13
|
-
*
|
|
17
|
+
* perf: read value only when assigning in parse
|
|
18
|
+
* perf: remove unnecessary regexp in parse
|
|
14
19
|
|
|
15
20
|
0.4.1 / 2020-04-21
|
|
16
21
|
==================
|
|
@@ -41,7 +46,7 @@
|
|
|
41
46
|
|
|
42
47
|
* perf: enable strict mode
|
|
43
48
|
* perf: use for loop in parse
|
|
44
|
-
* perf: use string
|
|
49
|
+
* perf: use string concatenation for serialization
|
|
45
50
|
|
|
46
51
|
0.2.3 / 2015-10-25
|
|
47
52
|
==================
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[![NPM Version][npm-version-image]][npm-url]
|
|
4
4
|
[![NPM Downloads][npm-downloads-image]][npm-url]
|
|
5
|
-
[![Node.js Version][node-
|
|
6
|
-
[![Build Status][
|
|
7
|
-
[![
|
|
5
|
+
[![Node.js Version][node-image]][node-url]
|
|
6
|
+
[![Build Status][ci-image]][ci-url]
|
|
7
|
+
[![Coverage Status][coveralls-image]][coveralls-url]
|
|
8
8
|
|
|
9
9
|
Basic HTTP cookie parser and serializer for HTTP servers.
|
|
10
10
|
|
|
@@ -107,6 +107,17 @@ The given number will be converted to an integer by rounding down. By default, n
|
|
|
107
107
|
`maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
|
|
108
108
|
so if both are set, they should point to the same date and time.
|
|
109
109
|
|
|
110
|
+
##### partitioned
|
|
111
|
+
|
|
112
|
+
Specifies the `boolean` value for the [`Partitioned` `Set-Cookie`](rfc-cutler-httpbis-partitioned-cookies)
|
|
113
|
+
attribute. When truthy, the `Partitioned` attribute is set, otherwise it is not. By default, the
|
|
114
|
+
`Partitioned` attribute is not set.
|
|
115
|
+
|
|
116
|
+
**note** This is an attribute that has not yet been fully standardized, and may change in the future.
|
|
117
|
+
This also means many clients may ignore this attribute until they understand it.
|
|
118
|
+
|
|
119
|
+
More information about can be found in [the proposal](https://github.com/privacycg/CHIPS).
|
|
120
|
+
|
|
110
121
|
##### path
|
|
111
122
|
|
|
112
123
|
Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path
|
|
@@ -212,49 +223,52 @@ $ npm test
|
|
|
212
223
|
```
|
|
213
224
|
$ npm run bench
|
|
214
225
|
|
|
215
|
-
> cookie@0.
|
|
226
|
+
> cookie@0.5.0 bench
|
|
216
227
|
> node benchmark/index.js
|
|
217
228
|
|
|
218
|
-
node@
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
229
|
+
node@18.18.2
|
|
230
|
+
acorn@8.10.0
|
|
231
|
+
ada@2.6.0
|
|
232
|
+
ares@1.19.1
|
|
222
233
|
brotli@1.0.9
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
cldr@43.1
|
|
235
|
+
icu@73.2
|
|
236
|
+
llhttp@6.0.11
|
|
237
|
+
modules@108
|
|
238
|
+
napi@9
|
|
239
|
+
nghttp2@1.57.0
|
|
240
|
+
nghttp3@0.7.0
|
|
241
|
+
ngtcp2@0.8.1
|
|
242
|
+
openssl@3.0.10+quic
|
|
243
|
+
simdutf@3.2.14
|
|
244
|
+
tz@2023c
|
|
245
|
+
undici@5.26.3
|
|
246
|
+
unicode@15.0
|
|
247
|
+
uv@1.44.2
|
|
248
|
+
uvwasi@0.0.18
|
|
249
|
+
v8@10.2.154.26-node.26
|
|
250
|
+
zlib@1.2.13.1-motley
|
|
235
251
|
|
|
236
252
|
> node benchmark/parse-top.js
|
|
237
253
|
|
|
238
254
|
cookie.parse - top sites
|
|
239
255
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
parse accounts.google.com x 2,
|
|
243
|
-
parse apple.com x 2,
|
|
244
|
-
parse cloudflare.com x 2,
|
|
245
|
-
parse docs.google.com x 2,
|
|
246
|
-
parse drive.google.com x 2,
|
|
247
|
-
parse en.wikipedia.org x
|
|
248
|
-
parse linkedin.com x
|
|
249
|
-
parse maps.google.com x 1,
|
|
250
|
-
parse microsoft.com x
|
|
251
|
-
parse play.google.com x 2,
|
|
252
|
-
parse
|
|
253
|
-
parse
|
|
254
|
-
parse
|
|
255
|
-
parse
|
|
256
|
-
parse youtu.be x 937,428 ops/sec ±1.47% (190 runs sampled)
|
|
257
|
-
parse youtube.com x 963,878 ops/sec ±0.59% (190 runs sampled)
|
|
256
|
+
14 tests completed.
|
|
257
|
+
|
|
258
|
+
parse accounts.google.com x 2,588,913 ops/sec ±0.74% (186 runs sampled)
|
|
259
|
+
parse apple.com x 2,370,002 ops/sec ±0.69% (186 runs sampled)
|
|
260
|
+
parse cloudflare.com x 2,213,102 ops/sec ±0.88% (188 runs sampled)
|
|
261
|
+
parse docs.google.com x 2,194,157 ops/sec ±1.03% (184 runs sampled)
|
|
262
|
+
parse drive.google.com x 2,265,084 ops/sec ±0.79% (187 runs sampled)
|
|
263
|
+
parse en.wikipedia.org x 457,099 ops/sec ±0.81% (186 runs sampled)
|
|
264
|
+
parse linkedin.com x 504,407 ops/sec ±0.89% (186 runs sampled)
|
|
265
|
+
parse maps.google.com x 1,230,959 ops/sec ±0.98% (186 runs sampled)
|
|
266
|
+
parse microsoft.com x 926,294 ops/sec ±0.88% (184 runs sampled)
|
|
267
|
+
parse play.google.com x 2,311,338 ops/sec ±0.83% (185 runs sampled)
|
|
268
|
+
parse support.google.com x 1,508,850 ops/sec ±0.86% (186 runs sampled)
|
|
269
|
+
parse www.google.com x 1,022,582 ops/sec ±1.32% (182 runs sampled)
|
|
270
|
+
parse youtu.be x 332,136 ops/sec ±1.02% (185 runs sampled)
|
|
271
|
+
parse youtube.com x 323,833 ops/sec ±0.77% (183 runs sampled)
|
|
258
272
|
|
|
259
273
|
> node benchmark/parse.js
|
|
260
274
|
|
|
@@ -262,12 +276,12 @@ $ npm run bench
|
|
|
262
276
|
|
|
263
277
|
6 tests completed.
|
|
264
278
|
|
|
265
|
-
simple x
|
|
266
|
-
decode x
|
|
267
|
-
unquote x 2,
|
|
268
|
-
duplicates x
|
|
269
|
-
10 cookies x
|
|
270
|
-
100 cookies x 22,
|
|
279
|
+
simple x 3,214,032 ops/sec ±1.61% (183 runs sampled)
|
|
280
|
+
decode x 587,237 ops/sec ±1.16% (187 runs sampled)
|
|
281
|
+
unquote x 2,954,618 ops/sec ±1.35% (183 runs sampled)
|
|
282
|
+
duplicates x 857,008 ops/sec ±0.89% (187 runs sampled)
|
|
283
|
+
10 cookies x 292,133 ops/sec ±0.89% (187 runs sampled)
|
|
284
|
+
100 cookies x 22,610 ops/sec ±0.68% (187 runs sampled)
|
|
271
285
|
```
|
|
272
286
|
|
|
273
287
|
## References
|
|
@@ -275,6 +289,7 @@ $ npm run bench
|
|
|
275
289
|
- [RFC 6265: HTTP State Management Mechanism][rfc-6265]
|
|
276
290
|
- [Same-site Cookies][rfc-6265bis-09-5.4.7]
|
|
277
291
|
|
|
292
|
+
[rfc-cutler-httpbis-partitioned-cookies]: https://tools.ietf.org/html/draft-cutler-httpbis-partitioned-cookies/
|
|
278
293
|
[rfc-west-cookie-priority-00-4.1]: https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1
|
|
279
294
|
[rfc-6265bis-09-5.4.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7
|
|
280
295
|
[rfc-6265]: https://tools.ietf.org/html/rfc6265
|
|
@@ -291,12 +306,12 @@ $ npm run bench
|
|
|
291
306
|
|
|
292
307
|
[MIT](LICENSE)
|
|
293
308
|
|
|
309
|
+
[ci-image]: https://badgen.net/github/checks/jshttp/cookie/master?label=ci
|
|
310
|
+
[ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml
|
|
294
311
|
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master
|
|
295
312
|
[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
|
|
296
|
-
[
|
|
297
|
-
[
|
|
298
|
-
[node-version-image]: https://badgen.net/npm/node/cookie
|
|
299
|
-
[node-version-url]: https://nodejs.org/en/download
|
|
313
|
+
[node-image]: https://badgen.net/npm/node/cookie
|
|
314
|
+
[node-url]: https://nodejs.org/en/download
|
|
300
315
|
[npm-downloads-image]: https://badgen.net/npm/dm/cookie
|
|
301
316
|
[npm-url]: https://npmjs.org/package/cookie
|
|
302
317
|
[npm-version-image]: https://badgen.net/npm/v/cookie
|
|
@@ -172,6 +172,10 @@ function serialize(name, val, options) {
|
|
|
172
172
|
str += '; Secure';
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
if (opt.partitioned) {
|
|
176
|
+
str += '; Partitioned'
|
|
177
|
+
}
|
|
178
|
+
|
|
175
179
|
if (opt.priority) {
|
|
176
180
|
var priority = typeof opt.priority === 'string'
|
|
177
181
|
? opt.priority.toLowerCase()
|
|
@@ -233,7 +237,7 @@ function decode (str) {
|
|
|
233
237
|
/**
|
|
234
238
|
* URL-encode value.
|
|
235
239
|
*
|
|
236
|
-
* @param {string}
|
|
240
|
+
* @param {string} val
|
|
237
241
|
* @returns {string}
|
|
238
242
|
*/
|
|
239
243
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cookie",
|
|
3
3
|
"description": "HTTP server cookie parsing and serialization",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"author": "Roman Shtylman <shtylman@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Douglas Christopher Wilson <doug@somethingdoug.com>"
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"beautify-benchmark": "0.2.4",
|
|
17
17
|
"benchmark": "2.1.4",
|
|
18
|
-
"eslint": "
|
|
19
|
-
"eslint-plugin-markdown": "
|
|
20
|
-
"mocha": "
|
|
18
|
+
"eslint": "8.53.0",
|
|
19
|
+
"eslint-plugin-markdown": "3.0.1",
|
|
20
|
+
"mocha": "10.2.0",
|
|
21
21
|
"nyc": "15.1.0",
|
|
22
22
|
"safe-buffer": "5.2.1",
|
|
23
|
-
"top-sites": "1.1.
|
|
23
|
+
"top-sites": "1.1.194"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"HISTORY.md",
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.19.2 / 2024-03-25
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
* Improved fix for open redirect allow list bypass
|
|
5
|
+
|
|
6
|
+
4.19.1 / 2024-03-20
|
|
7
|
+
==========
|
|
8
|
+
|
|
9
|
+
* Allow passing non-strings to res.location with new encoding handling checks
|
|
10
|
+
|
|
11
|
+
4.19.0 / 2024-03-20
|
|
12
|
+
==========
|
|
13
|
+
|
|
14
|
+
* Prevent open redirect allow list bypass due to encodeurl
|
|
15
|
+
* deps: cookie@0.6.0
|
|
16
|
+
|
|
17
|
+
4.18.3 / 2024-02-29
|
|
2
18
|
==========
|
|
3
19
|
|
|
4
20
|
* Fix routing requests without method
|
|
@@ -6,6 +22,8 @@
|
|
|
6
22
|
- Fix strict json error message on Node.js 19+
|
|
7
23
|
- deps: content-type@~1.0.5
|
|
8
24
|
- deps: raw-body@2.5.2
|
|
25
|
+
* deps: cookie@0.6.0
|
|
26
|
+
- Add `partitioned` option
|
|
9
27
|
|
|
10
28
|
4.18.2 / 2022-10-08
|
|
11
29
|
===================
|
|
@@ -55,6 +55,7 @@ module.exports = res
|
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
57
|
var charsetRegExp = /;\s*charset\s*=/;
|
|
58
|
+
var schemaAndHostRegExp = /^(?:[a-zA-Z][a-zA-Z0-9+.-]*:)?\/\/[^\\\/\?]+/;
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
61
|
* Set status `code`.
|
|
@@ -904,15 +905,23 @@ res.cookie = function (name, value, options) {
|
|
|
904
905
|
*/
|
|
905
906
|
|
|
906
907
|
res.location = function location(url) {
|
|
907
|
-
var loc
|
|
908
|
+
var loc;
|
|
908
909
|
|
|
909
910
|
// "back" is an alias for the referrer
|
|
910
911
|
if (url === 'back') {
|
|
911
912
|
loc = this.req.get('Referrer') || '/';
|
|
913
|
+
} else {
|
|
914
|
+
loc = String(url);
|
|
912
915
|
}
|
|
913
916
|
|
|
914
|
-
|
|
915
|
-
|
|
917
|
+
var m = schemaAndHostRegExp.exec(loc);
|
|
918
|
+
var pos = m ? m[0].length + 1 : 0;
|
|
919
|
+
|
|
920
|
+
// Only encode after host to avoid invalid encoding which can introduce
|
|
921
|
+
// vulnerabilities (e.g. `\\` to `%5C`).
|
|
922
|
+
loc = loc.slice(0, pos) + encodeUrl(loc.slice(pos));
|
|
923
|
+
|
|
924
|
+
return this.set('Location', loc);
|
|
916
925
|
};
|
|
917
926
|
|
|
918
927
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express",
|
|
3
3
|
"description": "Fast, unopinionated, minimalist web framework",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.19.2",
|
|
5
5
|
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Aaron Heckmann <aaron.heckmann+github@gmail.com>",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"body-parser": "1.20.2",
|
|
34
34
|
"content-disposition": "0.5.4",
|
|
35
35
|
"content-type": "~1.0.4",
|
|
36
|
-
"cookie": "0.
|
|
36
|
+
"cookie": "0.6.0",
|
|
37
37
|
"cookie-signature": "1.0.6",
|
|
38
38
|
"debug": "2.6.9",
|
|
39
39
|
"depd": "2.0.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
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["env.js"],"names":[],"mappings":"AAaA,oDAAsE;AAEtE,gDAA8D;AAN9D,qDAA2E;AAE3E,iDAAmE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;+DAYkD,MAAM,UAAU,OAAO;;sBAFjD,OAAO,EAAE,KAAK,OAAO"}
|