@nxtedition/nxt-undici 7.2.1 → 7.2.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.
package/lib/index.js CHANGED
@@ -124,6 +124,16 @@ function wrapDispatch(dispatcher) {
124
124
  throw new TypeError('invalid opts.priority')
125
125
  }
126
126
 
127
+ if (priority == null && headers['nxt-priority']) {
128
+ if (headers['nxt-priority'] === 'low' || headers['nxt-priority'] === '0') {
129
+ priority = 0
130
+ } else if (headers['nxt-priority'] === 'normal' || headers['nxt-priority'] === '1') {
131
+ priority = 1
132
+ } else if (headers['nxt-priority'] === 'high' || headers['nxt-priority'] === '2') {
133
+ priority = 2
134
+ }
135
+ }
136
+
127
137
  if (globalThis.__nxt_undici_global_headers) {
128
138
  Object.assign(headers, globalThis.__nxt_undici_global_headers)
129
139
  }
@@ -26,8 +26,9 @@ class Handler extends DecoratorHandler {
26
26
 
27
27
  #release() {
28
28
  if (this.#next) {
29
- this.#next()
29
+ const next = this.#next
30
30
  this.#next = null
31
+ next()
31
32
  }
32
33
  }
33
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "7.2.1",
3
+ "version": "7.2.3",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",
@@ -9,7 +9,7 @@
9
9
  "lib/*"
10
10
  ],
11
11
  "dependencies": {
12
- "@nxtedition/scheduler": "^1.0.1",
12
+ "@nxtedition/scheduler": "^1.0.5",
13
13
  "@nxtedition/undici": "^11.1.1",
14
14
  "cache-control-parser": "^2.0.6",
15
15
  "fast-querystring": "^1.1.2",
@@ -17,16 +17,16 @@
17
17
  "xxhash-wasm": "^1.1.0"
18
18
  },
19
19
  "devDependencies": {
20
- "@types/node": "^25.0.0",
21
- "eslint": "^9.39.1",
22
- "eslint-plugin-n": "^17.21.3",
20
+ "@types/node": "^25.0.10",
21
+ "eslint": "^9.39.2",
22
+ "eslint-plugin-n": "^17.23.2",
23
23
  "husky": "^9.1.7",
24
24
  "lint-staged": "^16.2.7",
25
25
  "pinst": "^3.0.0",
26
- "prettier": "^3.7.4",
27
- "send": "^1.2.0",
26
+ "prettier": "^3.8.1",
27
+ "send": "^1.2.1",
28
28
  "tap": "^21.5.0",
29
- "undici-types": "^7.15.0"
29
+ "undici-types": "^7.19.1"
30
30
  },
31
31
  "scripts": {
32
32
  "prepare": "husky",