Repository navigation
feat(TD-9488): EOL deps — Node 22, js-yaml 4, bunyan→pino (Phases 0 + 1b) - #169
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
- Add .nvmrc (22) and package.json engines ">=22" to pin the runtime (CI was on EOL Node 18; local was EOL Node 20). - Bump js-yaml ^3.13.1 -> ^4.3.2 (resolves a known high advisory). Migrate the single call site j1cli.ts: yaml.safeLoad -> yaml.load (js-yaml 4 renamed safeLoad to load; load is safe by default). Public API contract unchanged (diff vs PUBLIC-API.baseline.d.ts clean), 72 tests green, tsc build clean under TS 3.8. Transitive-vuln overrides intentionally deferred to Phase 1a: npm audit fix overreaches into the dev tree and pulls a modern @types/babel__traverse that TS 3.8 cannot parse. The residual prod vulns (0 critical) are resolved by the later phases (apollo removal, bunyan optional-dep drop, inquirer patch). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Removes the inflight memory-leak chain from the consumer dependency tree: bunyan-category -> bunyan -> mv -> rimraf@2.4.5 -> glob@6.0.4 -> inflight. (npm `overrides` cannot fix this for a published library, so the logger itself had to change.) - Replace `bunyan-category` with `pino ^8.21.0` (pino 8 types parse under the current TS 3.8). inflight / mv / rimraf@2 / glob@6 gone from the prod tree. - Export a minimal structural `Logger` interface + `LogFn` from the package. `JupiterOneClientOptions.logger` now types against it. Any bunyan/pino-style logger still satisfies it, so most consumers are unaffected. - Drop `@types/bunyan`; remove `.npmrc` legacy-peer-deps=true (it only existed for bunyan-category's exact @types/bunyan@1.8.6 peer, now gone — npm installs cleanly under strict peer resolution again). BREAKING CHANGE: `Logger` is now an exported structural interface rather than bunyan's type. Consumers who imported bunyan's `Logger` or relied on bunyan-only methods must adjust; runtime log output no longer includes the `category` field. Public contract baseline updated (PUBLIC-API.baseline.d.ts, PUBLIC-API.md §6b). Prod audit 7 -> 4 vulns. 72 tests green, tsc build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…yaml pin - HIGH: declare the exported `Logger` members as methods instead of `name: LogFn` properties. Property-typed function members are checked contravariantly under `strictFunctionTypes`, which rejects bunyan/pino loggers and would turn the documented no-op upgrade into a compile error for any consumer on `strict: true`. Method signatures are bivariant, so overloaded loggers satisfy the interface again (verified under --strict with TS 5.9). `LogFn` is still exported for standalone use. - Move the 3.0.0 version bump to this PR (the first branch that introduces a breaking change: Node 22 engines + the Logger type change), so the release workflow can never publish those as a patch if the stack lands out of order. - Add src/yaml-parsing.test.ts pinning the js-yaml 4 (YAML 1.2 core schema) scalar behavior the CLI relies on (0777 -> 777 decimal, 12:30 -> string), guarding the silent 1.1->1.2 parsing change. (MIGRATING note added in the Phase 2 PR.) - Drop the remaining internal deadline reference from DEPENDENCY-AUDIT.md. 75 tests green (72 + 3 yaml), tsc build clean under TS 3.8, contract baseline updated for the Logger method shape. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
VDubber
force-pushed
the
td-9488/eol-upgrades
branch
from
October 21, 2026 15:01
7e09fb2 to
1f605a2
Compare
tom-foley-j1
previously approved these changes
Oct 21, 2026
Keep the feature stack at 2.1.2 so merging #168-#171 to main does not trigger the version-gated auto-publish mid-stack. The 3.0.0 bump + npm publish happen in a dedicated release PR merged last, matching this repo's release-X.Y.Z convention (cf. #165 release-2.1.2, #161 release-2.0.1). CHANGELOG 3.0.0 notes and MIGRATING-v3.md remain in the feature PRs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tom-foley-j1
approved these changes
Oct 21, 2026
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.
Stacked on #168 (yarn→npm migration). EOL dependency upgrades for TD-9488.
Phase 0 — runtime + js-yaml
.nvmrc(22) +engines: ">=22"— pin off EOL Node 18/20js-yaml 3.13.1 → 4.3.2(clears a high advisory);safeLoad → loadatj1cli.ts:207Phase 1b — kill the inflight chain (bunyan → pino)
bunyan-categorywithpino ^8.21.0inflight / mv / rimraf@2 / glob@6gone from the production tree — the chain TD-9488 called outLoggeris now an exported structural interface ({trace,debug,info,warn,error,fatal}); any bunyan/pino-style logger still satisfies it@types/bunyan; removed the.npmrc legacy-peer-depsshim (no longer needed)Loggertype changed from bunyan's to the exported structural interface; runtime logs drop thecategoryfield. SeePUBLIC-API.md§6b.Status
npm audit: 322 → 4 across the stack (0 critical). Remaining 4 (lodash, brace-expansion, minimatch, tmp/inquirer) resolve in Phase 2 (apollo) + the TS/jest toolchain bumpdiff PUBLIC-API.baseline.d.ts dist/index.d.ts; only the approved Logger changeNOT in this PR — Phase 2 (Apollo + graphql) needs a decision
graphql@14.7.0(named in TD-9488) + the 5apollo-*packages are the remaining EOL core.Blocked on: (a) a TypeScript upgrade first (Apollo 3/4 types won't parse under TS 3.8), and
(b) choosing the Apollo target. Tracked for the next PR.
🤖 Generated with Claude Code