chore(deps): refresh dependencies, base image and drop dead packages - #111
Merged
Conversation
Security - base image node:24.11.1-alpine3.22 -> node:24.20.0-alpine3.23 plus `apk upgrade --no-cache`, which clears the whole alpine layer (api 2 CRITICAL / 19 HIGH -> 0, worker 15 CRITICAL / 80 HIGH -> 0) and ships npm 11.19.0 instead of 11.6.2 - `npm update` across the workspaces clears every app-level finding (tar, nanoid, axios, multer, nodemailer, fast-uri, minimatch...) Dead dependencies - worker: tar, never imported (lib-node-registry uses tar-stream) - worker: @types/tar and @types/tar-stream, superseded by the types tar-stream ships since 3.2.1 — the upgrade script now derives the entry header type from them Undeclared dependencies — imported but resolving only through hoisting, declared the way the sister repos declare them - api: debug, already declared by worker - ui: ofetch, as in data-fair and events - worker: mongodb, an optional peer of lib-node that worker/src/mongo.ts needs at runtime, as catalogs/worker declares it - shared: fs-extra, and mongodb as a devDependency since shared only imports its types (a runtime dep there would reach the ui, which depends on shared) Majors, each verified against real behaviour - config 4 -> 5: resolved config is byte-identical on our .mjs config files, verified inside the alpine image for both api and worker - nanoid 5 -> 6: same exports, same alphabet, same length - crypto-random-string 5 -> 6: url-safe alphabet now also uses . and ~, both unreserved in the query string the webhook key lands in - @vueuse/core 13 -> 14, unplugin-auto-import 19 -> 21, unplugin-vue-components 28 -> 32: ui builds and vue-tsc passes - @types/multer 1 -> 2 (multer is already 2.x), @types/nodemailer 6 -> 8 Declined - croner 9 -> 10: it rejects the `N/step` cron syntax that shared/runs.ts toCRON() emits for every stepped scheduling. Migrating means rewriting toCRON to `min-59/step` (not `*/step`, which shifts the offset) and re-checking stored schedulings — its own PR. - mongodb 6 -> 7: staying on 6 to match data-fair, catalogs and events. Aligns config, nanoid, @vueuse/core, unplugin-* and @types/multer with data-fair master.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependency refresh pass: measure, security, free wins, proven majors, and documented refusals for the rest.
Security.
npm auditwas already at 0 on both trees, but the trivy scan of the published images showed everything was hiding elsewhere: the alpine layer and the base image's npm.node:24.11.1-alpine3.22→node:24.20.0-alpine3.23withapk upgrade --no-cache(as on data-fair master), plusnpm update, which clears every application-level finding. The 4 remaining HIGH are in the bundled npm: the worker needs it fornpm rebuildon plugins with native modules, the api fornpm config set https-proxy.Dead dependencies.
tarin the worker, never imported — lib-node-registry usestar-stream.@types/tarand@types/tar-streamgo too:tar-streamhas shipped its own types since 3.2.1. The only consequence in code, in the 5.2.0 upgrade script: the entry header type is now derived from those types, andpack.entry().end()takes the explicitundefinedthat the streamx types require.Majors adopted, each verified against real behaviour rather than its changelog:
config4 → 5: resolved config identical on our.mjsfiles, re-checked inside the alpine image for both api and workernanoid5 → 6: same exports, same alphabet, same lengthcrypto-random-string5 → 6: theurl-safealphabet gains.and~, both unreserved in the query string where thewebhookKeylands — only newly generated keys change shape, existing ones stay valid@vueuse/core13 → 14,unplugin-auto-import19 → 21,unplugin-vue-components28 → 32: UI build andvue-tscgreen@types/multer1 → 2 (multer is already on 2.x),@types/nodemailer6 → 8This aligns
config,nanoid,@vueuse/core,unplugin-*and@types/multerwith data-fair master.Declined, with the precise blocker:
croner9 → 10 rejects theN/stepsyntax thattoCRON()(shared/runs.ts) emits for every stepped field. Compared over 60,000 cases: 47,040 diffs are that error, only 5 are a real divergence (resolution of the ambiguous hour on the DST fall-back). Migrating means rewritingtoCRON()tomin-59/step— not*/step, which shifts the offset:15/20is 15,35,55 whereas*/20is 0,20,40. That changes already-stored schedulings → dedicated PR.mongodb6 → 7: staying on 6 to remain aligned with data-fair, catalogs and events.Undeclared dependencies. Five dependencies that were imported but only resolved through hoisting are now declared the way the sister repos declare them:
debuginapi(the worker already declared it),ofetchinui(as in data-fair and events),fs-extrainshared,mongodbinworker— an optional peer of lib-node thatworker/src/mongo.tsneeds at runtime, declared the same way by catalogs/worker — andmongodbas a devDependency ofshared, which only imports its types (a runtime dep there would reach up to the ui, which depends onshared).Two others are deliberately left undeclared:
@data-fair/lib-expressinui/vite.config.ts(data-fair, catalogs, agents and portals all import it there without declaring it) andfast-deep-equalinui(same situation in data-fair, catalogs and portals). Fixing them here only would break the uniformity — it is a cross-repo chore.Heads-up.
lint,check-typesand the unit tests (163 passed) are green. Theapi/e2etests did not run — dev environment down. CI must run them with a fresh Vite cache, sinceunplugin-*changes the module graph.apk upgrade --no-cachemakes the build non-deterministic over time: two builds of the same Dockerfile will not necessarily produce the same alpine layer. That is the accepted trade-off, aligned with data-fair master.chokidar4→3.6.0 is a hoisting inversion, not a downgrade (consumers move to a nested 5.0.0).