step-node-agent 3.24.2 → 3.24.3

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.
Files changed (31) hide show
  1. package/node_modules/express/History.md +14 -5
  2. package/node_modules/express/Readme.md +1 -1
  3. package/node_modules/express/lib/router/index.js +1 -1
  4. package/node_modules/express/lib/router/route.js +7 -2
  5. package/node_modules/express/lib/utils.js +3 -4
  6. package/node_modules/express/package.json +5 -6
  7. package/node_modules/side-channel/CHANGELOG.md +9 -0
  8. package/node_modules/side-channel/index.d.ts +27 -0
  9. package/node_modules/side-channel/index.js +19 -7
  10. package/node_modules/side-channel/package.json +11 -9
  11. package/node_modules/side-channel/test/index.js +1 -1
  12. package/node_modules/side-channel/tsconfig.json +50 -0
  13. package/package.json +1 -1
  14. package/node_modules/express/node_modules/body-parser/HISTORY.md +0 -657
  15. package/node_modules/express/node_modules/body-parser/LICENSE +0 -23
  16. package/node_modules/express/node_modules/body-parser/README.md +0 -464
  17. package/node_modules/express/node_modules/body-parser/SECURITY.md +0 -25
  18. package/node_modules/express/node_modules/body-parser/index.js +0 -156
  19. package/node_modules/express/node_modules/body-parser/lib/read.js +0 -205
  20. package/node_modules/express/node_modules/body-parser/lib/types/json.js +0 -236
  21. package/node_modules/express/node_modules/body-parser/lib/types/raw.js +0 -101
  22. package/node_modules/express/node_modules/body-parser/lib/types/text.js +0 -121
  23. package/node_modules/express/node_modules/body-parser/lib/types/urlencoded.js +0 -284
  24. package/node_modules/express/node_modules/body-parser/package.json +0 -56
  25. package/node_modules/express/node_modules/raw-body/HISTORY.md +0 -303
  26. package/node_modules/express/node_modules/raw-body/LICENSE +0 -22
  27. package/node_modules/express/node_modules/raw-body/README.md +0 -223
  28. package/node_modules/express/node_modules/raw-body/SECURITY.md +0 -24
  29. package/node_modules/express/node_modules/raw-body/index.d.ts +0 -87
  30. package/node_modules/express/node_modules/raw-body/index.js +0 -329
  31. package/node_modules/express/node_modules/raw-body/package.json +0 -49
@@ -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 with get -> append -> set pattern
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 using charset utf-8
3326
- * Fixed show-exceptions page, now using using charset utf-8
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 git://github.com/expressjs/express.git --depth 1
107
+ $ git clone https://github.com/expressjs/express.git --depth 1
108
108
  $ cd express
109
109
  $ npm install
110
110
  ```
@@ -36,7 +36,7 @@ var toString = Object.prototype.toString;
36
36
  * Initialize a new `Router` with the given `options`.
37
37
  *
38
38
  * @param {Object} [options]
39
- * @return {Router} which is an callable function
39
+ * @return {Router} which is a callable function
40
40
  * @public
41
41
  */
42
42
 
@@ -60,7 +60,10 @@ Route.prototype._handles_method = function _handles_method(method) {
60
60
  return true;
61
61
  }
62
62
 
63
- var name = method.toLowerCase();
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, index) {
126
+ function acceptParams (str) {
129
127
  var parts = str.split(/ *; */);
130
- var ret = { value: parts[0], quality: 1, params: {}, originalIndex: index };
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.2",
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.1",
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.8",
69
- "eslint": "8.24.0",
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.0.0",
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,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
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
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
- curr.next = list.next;
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)) {
@@ -1,23 +1,20 @@
1
1
  {
2
2
  "name": "side-channel",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Store information about any JS value in a side channel. Uses WeakMap if available.",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  "./package.json": "./package.json",
8
- ".": [
9
- {
10
- "default": "./index.js"
11
- },
12
- "./index.js"
13
- ]
8
+ ".": "./index.js"
14
9
  },
10
+ "types": "./index.d.ts",
15
11
  "scripts": {
16
12
  "prepack": "npmignore --auto --commentLines=autogenerated",
17
13
  "prepublishOnly": "safe-publish-latest",
18
14
  "prepublish": "not-in-publish || npm run prepublishOnly",
19
15
  "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
20
16
  "lint": "eslint --ext=js,mjs .",
17
+ "postlint": "tsc -p .",
21
18
  "pretest": "npm run lint",
22
19
  "tests-only": "nyc tape 'test/**/*.js'",
23
20
  "test": "npm run tests-only",
@@ -47,6 +44,10 @@
47
44
  "homepage": "https://github.com/ljharb/side-channel#readme",
48
45
  "devDependencies": {
49
46
  "@ljharb/eslint-config": "^21.1.0",
47
+ "@types/call-bind": "^1.0.5",
48
+ "@types/get-intrinsic": "^1.2.2",
49
+ "@types/object-inspect": "^1.8.4",
50
+ "@types/tape": "^5.6.4",
50
51
  "aud": "^2.0.4",
51
52
  "auto-changelog": "^2.4.0",
52
53
  "eclint": "^2.8.1",
@@ -55,10 +56,11 @@
55
56
  "npmignore": "^0.3.1",
56
57
  "nyc": "^10.3.2",
57
58
  "safe-publish-latest": "^2.0.0",
58
- "tape": "^5.7.4"
59
+ "tape": "^5.7.5",
60
+ "typescript": "next"
59
61
  },
60
62
  "dependencies": {
61
- "call-bind": "^1.0.6",
63
+ "call-bind": "^1.0.7",
62
64
  "es-errors": "^1.3.0",
63
65
  "get-intrinsic": "^1.2.4",
64
66
  "object-inspect": "^1.13.1"
@@ -32,7 +32,7 @@ test('assert', function (t) {
32
32
 
33
33
  test('has', function (t) {
34
34
  var channel = getSideChannel();
35
- var o = [];
35
+ /** @type {unknown[]} */ var o = [];
36
36
 
37
37
  t.equal(channel.has(o), false, 'nonexistent value yields false');
38
38
 
@@ -0,0 +1,50 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
+
5
+ /* Projects */
6
+
7
+ /* Language and Environment */
8
+ "target": "es2022", /* 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": "node", /* 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
+ "test/list-exports"
49
+ ],
50
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "step-node-agent",
3
- "version": "3.24.2",
3
+ "version": "3.24.3",
4
4
  "description": "The official STEP Agent implementation for Node.js",
5
5
  "main": "index.js",
6
6
  "scripts": {