@nxtedition/lib 23.17.16 → 23.17.18

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 (3) hide show
  1. package/couch.js +7 -0
  2. package/package.json +17 -17
  3. package/yield.js +15 -10
package/couch.js CHANGED
@@ -1100,6 +1100,13 @@ export function request(url, opts) {
1100
1100
 
1101
1101
  const ureq = {
1102
1102
  ...opts,
1103
+ dns:
1104
+ opts.dns !== false && opts.dns !== null
1105
+ ? {
1106
+ balance: 'hash',
1107
+ ...opts.dns,
1108
+ }
1109
+ : opts.dns,
1103
1110
  origin,
1104
1111
  path,
1105
1112
  method: opts.method ?? (opts.body ? 'POST' : 'GET'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "23.17.16",
3
+ "version": "23.17.18",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
@@ -65,12 +65,12 @@
65
65
  "singleQuote": true
66
66
  },
67
67
  "dependencies": {
68
- "@aws-sdk/client-s3": "3.670.0",
68
+ "@aws-sdk/client-s3": "3.873.0",
69
69
  "@elastic/elasticsearch": "^8.17.1",
70
70
  "@elastic/transport": "^8.9.3",
71
- "@nxtedition/nxt-undici": "^6.3.4",
72
- "@smithy/node-http-handler": "^4.0.4",
73
- "@swc/wasm-web": "^1.11.22",
71
+ "@nxtedition/nxt-undici": "^6.4.0",
72
+ "@smithy/node-http-handler": "^4.1.1",
73
+ "@swc/wasm-web": "^1.13.5",
74
74
  "date-fns": "^4.1.0",
75
75
  "diff": "5.2.0",
76
76
  "fast-querystring": "^1.1.2",
@@ -83,11 +83,11 @@
83
83
  "mime": "^4.0.7",
84
84
  "mitata": "^1.0.34",
85
85
  "moment-timezone": "^0.5.48",
86
- "nconf": "^0.12.1",
86
+ "nconf": "^0.13.0",
87
87
  "nested-error-stacks": "^2.1.1",
88
88
  "object-hash": "^3.0.0",
89
89
  "p-queue": "^8.0.1",
90
- "pino": "^9.6.0",
90
+ "pino": "^9.9.0",
91
91
  "qs": "^6.14.0",
92
92
  "request-target": "^1.0.2",
93
93
  "smpte-timecode": "^1.3.6",
@@ -97,25 +97,25 @@
97
97
  "yocto-queue": "^1.2.1"
98
98
  },
99
99
  "devDependencies": {
100
- "@nxtedition/deepstream.io-client-js": ">=28.1.15",
101
- "@types/lodash": "^4.17.16",
102
- "@types/node": "^22.15.1",
100
+ "@nxtedition/deepstream.io-client-js": ">=31.0.14",
101
+ "@types/lodash": "^4.17.20",
102
+ "@types/node": "^24.3.0",
103
103
  "canvas": "^3.1.0",
104
- "eslint": "^9.25.1",
105
- "eslint-config-prettier": "^10.1.2",
104
+ "eslint": "^9.34.0",
105
+ "eslint-config-prettier": "^10.1.8",
106
106
  "eslint-config-standard": "^17.0.0",
107
- "eslint-plugin-import": "^2.31.0",
108
- "eslint-plugin-n": "^17.17.0",
107
+ "eslint-plugin-import": "^2.32.0",
108
+ "eslint-plugin-n": "^17.21.3",
109
109
  "eslint-plugin-node": "^11.1.0",
110
110
  "eslint-plugin-promise": "^7.2.1",
111
111
  "husky": "^9.1.7",
112
- "lint-staged": "^15.5.1",
112
+ "lint-staged": "^16.1.5",
113
113
  "pinst": "^3.0.0",
114
- "prettier": "^3.5.3",
114
+ "prettier": "^3.6.2",
115
115
  "rxjs": "^7.8.2",
116
116
  "send": "^1.1.0",
117
117
  "tap": "^21.1.0",
118
- "typescript-eslint": "^8.31.0"
118
+ "typescript-eslint": "^8.40.0"
119
119
  },
120
120
  "peerDependencies": {
121
121
  "@elastic/elasticsearch": "^8.6.0",
package/yield.js CHANGED
@@ -1,8 +1,7 @@
1
- import { FixedQueue } from './fixed-queue.js'
2
-
3
1
  const yieldSchedule = globalThis.setImmediate ?? ((fn) => setTimeout(fn, 0))
2
+ const yieldQueue = []
4
3
 
5
- let yieldQueue = new FixedQueue()
4
+ let yieldIndex = 0
6
5
  let yieldTimeout = 40
7
6
  let yieldActive = false
8
7
  let yieldScheduled = false
@@ -62,23 +61,29 @@ function dispatchYield() {
62
61
  yieldTime = performance.now()
63
62
  yieldActive = false
64
63
 
65
- const queue = yieldQueue
66
- yieldQueue = new FixedQueue()
64
+ const maxIndex = yieldQueue.length
67
65
 
68
- while (!queue.isEmpty()) {
69
- const resolve = queue.shift()
66
+ while (yieldIndex < maxIndex) {
67
+ const resolve = yieldQueue[yieldIndex]
68
+ yieldQueue[yieldIndex] = null
69
+ yieldIndex += 1
70
70
 
71
71
  resolve(null)
72
72
 
73
73
  if (shouldYield()) {
74
- yieldSchedule(dispatchYield)
75
- return
74
+ break
76
75
  }
77
76
  }
78
77
 
79
- if (yieldQueue.isEmpty()) {
78
+ if (yieldIndex === yieldQueue.length) {
80
79
  yieldScheduled = false
80
+ yieldQueue.splice(0)
81
+ yieldIndex = 0
81
82
  } else {
83
+ if (yieldIndex > 4096) {
84
+ yieldQueue.splice(0, yieldIndex)
85
+ yieldIndex = 0
86
+ }
82
87
  yieldSchedule(dispatchYield)
83
88
  }
84
89
  }