@nxtedition/lib 26.0.33 → 26.0.35

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 (2) hide show
  1. package/app.js +8 -5
  2. package/package.json +7 -8
package/app.js CHANGED
@@ -37,9 +37,8 @@ import { isTimeBetween } from './time.js'
37
37
  import makeUnderPressure from './under-pressure.js'
38
38
  import undici from '@nxtedition/undici'
39
39
  import { isPrimary } from 'node:cluster'
40
- import { nice } from '@napi-rs/nice'
41
40
  import path from 'node:path'
42
- import { sched_getaffinity, sched_setaffinity } from '@nxtedition/sched'
41
+ import { nice, sched_getaffinity, sched_setaffinity } from '@nxtedition/sched'
43
42
 
44
43
  export function makeApp(appConfig, onTerminate) {
45
44
  let ds
@@ -353,9 +352,11 @@ export function makeApp(appConfig, onTerminate) {
353
352
  numa === 'hash' ||
354
353
  numa === 'default'
355
354
  ) {
356
- indices = [hashString(serviceName) % allNodes.length]
355
+ indices = [hashString(JSON.stringify({ serviceName, serviceModule })) % allNodes.length]
357
356
  } else {
358
- throw new Error('invalid numa configuration: ' + numa)
357
+ throw Object.assign(new Error('invalid numa configuration: ' + numa), {
358
+ data: { numa, allNodes },
359
+ })
359
360
  }
360
361
 
361
362
  affinity = indices.flatMap((i) => allNodes[i] ?? [])
@@ -367,7 +368,9 @@ export function makeApp(appConfig, onTerminate) {
367
368
  affinity.length === 0 ||
368
369
  affinity.some((x) => !Number.isInteger(x) || x < 0)
369
370
  ) {
370
- throw new Error('invalid numa configuration: ' + numa)
371
+ throw Object.assign(new Error('invalid numa configuration:' + numa), {
372
+ data: { numa, allNodes, affinity },
373
+ })
371
374
  }
372
375
 
373
376
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "26.0.33",
3
+ "version": "26.0.35",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
@@ -66,9 +66,8 @@
66
66
  "@aws-sdk/client-s3": "3.873.0",
67
67
  "@elastic/elasticsearch": "^8.17.1",
68
68
  "@elastic/transport": "^8.9.3",
69
- "@napi-rs/nice": "^1.1.1",
70
69
  "@nxtedition/nxt-undici": "^6.4.0",
71
- "@nxtedition/sched": "^1.0.1",
70
+ "@nxtedition/sched": "^1.0.2",
72
71
  "@smithy/node-http-handler": "^4.1.1",
73
72
  "acorn": "^8.15.0",
74
73
  "astring": "^1.9.0",
@@ -86,7 +85,7 @@
86
85
  "nconf": "^0.13.0",
87
86
  "object-hash": "^3.0.0",
88
87
  "p-queue": "^8.0.1",
89
- "pino": "^9.9.0",
88
+ "pino": "^9.11.0",
90
89
  "qs": "^6.14.0",
91
90
  "request-target": "^1.0.2",
92
91
  "smpte-timecode": "^1.3.6",
@@ -100,19 +99,19 @@
100
99
  "@types/lodash": "^4.17.20",
101
100
  "@types/node": "^24.3.0",
102
101
  "canvas": "^3.1.0",
103
- "eslint": "^9.34.0",
102
+ "eslint": "^9.36.0",
104
103
  "eslint-config-prettier": "^10.1.8",
105
104
  "eslint-config-standard": "^17.0.0",
106
105
  "eslint-plugin-import": "^2.32.0",
107
- "eslint-plugin-n": "^17.21.3",
106
+ "eslint-plugin-n": "^17.23.1",
108
107
  "eslint-plugin-node": "^11.1.0",
109
108
  "eslint-plugin-promise": "^7.2.1",
110
109
  "husky": "^9.1.7",
111
- "lint-staged": "^16.1.5",
110
+ "lint-staged": "^16.2.0",
112
111
  "prettier": "^3.6.2",
113
112
  "rxjs": "^7.8.2",
114
113
  "typescript": "^5.9.2",
115
- "typescript-eslint": "^8.40.0"
114
+ "typescript-eslint": "^8.44.1"
116
115
  },
117
116
  "peerDependencies": {
118
117
  "@elastic/elasticsearch": "^8.6.0",