chore(deps): clear 195 of 236 dependency advisories (0 critical left) - #427
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Releases created by release-please use the default GITHUB_TOKEN, and GitHub does not fire `on: release` workflows for events created with that token — so publish-package.yml never auto-ran and every npm publish had to be dispatched manually. workflow_dispatch is an explicit exception to that rule, so the release job now dispatches the existing publish-package.yml (the single publishing path) once per released tag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # .release-please-manifest.json # packages/api/CHANGELOG.md # packages/api/package.json # packages/bucketing/CHANGELOG.md # packages/bucketing/package.json # packages/cloudflare/CHANGELOG.md # packages/cloudflare/package.json # packages/data/CHANGELOG.md # packages/data/package.json # packages/enums/CHANGELOG.md # packages/enums/package.json # packages/event/CHANGELOG.md # packages/event/package.json # packages/experience/CHANGELOG.md # packages/experience/package.json # packages/js-sdk/CHANGELOG.md # packages/js-sdk/package.json # packages/logger/CHANGELOG.md # packages/logger/package.json # packages/rules/CHANGELOG.md # packages/rules/package.json # packages/segments/CHANGELOG.md # packages/segments/package.json # packages/types/CHANGELOG.md # packages/types/package.json # packages/utils/CHANGELOG.md # packages/utils/package.json
…vert chore: merge main into main-convert
Takes the repo from 236 open advisories (3 critical / 105 high) to 41 (0 critical / 11 high), measured with `yarn npm audit --all --recursive`. No published package is affected either way: every packages/* manifest declares an empty `dependencies` apart from js-sdk-utils -> murmurhash, so the alerts all trace to the demo apps and dev tooling. - lockfile re-resolution (`yarn up -R`) clears 151 advisories on its own, with no manifest edits - next 16.0.1 -> 16.3.0 clears the last critical (React flight RCE) - wrangler 3 -> 4, @nestjs/* -> 11.1.28, @remix-run/* -> 2.17.5, react-router-dom -> 7.18.2, nyc -> 18 - chai 4 -> 6 across every test package chai >=5 exports a sealed ES module namespace, so `chai.use(spies)` can no longer attach `.spy` in place. The event tests now capture what `use()` returns instead. All 546 mocha tests pass. The 41 remaining advisories sit behind parents that are already at their latest published version: react-scripts@5.0.1 (14), @remix-run v2 (9), the jsdoc/better-docs chain (8), wrangler -> miniflare -> undici (5), mocha/nyc/browserify internals (5). Known issue, not yet resolved: `yarn build` fails on packages/enums in this state - rollup-plugin-typescript2 stops resolving relative imports after the recursive lockfile refresh. Ruled out rollup, plugin-commonjs, plugin-terser, glob, rollup-plugin-dts, dotenv, tslib, typescript, a stale rpt2 cache and the @types auto-inclusion; the culprit is not yet pinpointed. The test suite stays green through it, so tests alone do not catch this. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The recursive lockfile refresh in the previous commit broke `yarn build`: rollup-plugin-typescript2 silently stopped transforming and resolving, so rollup fell back to parsing raw TypeScript as JavaScript. Symptoms differed per package - `Could not resolve "./src/..."` in enums, and `Expected ',', got ':'` in js-sdk - but both are the same plugin going inert. Bisected on a pristine clone with a single variable: `yarn up -R picomatch` on its own takes the build from passing to failing. picomatch 2.3.1 -> 2.3.2 is itself a required security bump (4 advisories), so pinning it back is not an option. rollup-plugin-typescript2 0.37.0 works with picomatch 2.3.2, so the fix is to move the plugin forward rather than hold the transitive back. Verified after the change: - `yarn build` at the repo root: 50 bundles, exit 0 - `yarn lint` in packages/js-sdk: clean - all 546 mocha tests across the 10 test packages: passing - advisories unchanged at 41 (0 critical, 11 high), down from 236 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`yarn install --immutable` failed in CI (`pass-qa`) with YN0028: the lockfile disagreed with the manifests. Two defects, both mine: 1. The `yarn up` runs in the earlier commits rewrote `peerDependencies` across all 11 published packages as a side effect - tightening ranges like `@convertcom/js-sdk-types: ">=3.11.0"` to `">=4.0.0"` to match current workspace majors. That is a breaking change for consumers on older majors, and the exact opposite of what this branch claims: no published package should change at all here. All 47 peer ranges are restored to their `main-convert` values. 2. The lockfile was left internally inconsistent - yarn had rewritten the `packages/js-sdk` workspace entry's peer ranges but not the other ten, because it only rewrites entries it re-resolves. Resynced against the corrected manifests. Only `devDependencies` differ from `main-convert` now, which is what the advisory work actually needed. Verified at this commit: - `yarn install --immutable` - passes (the CI step that failed) - `yarn build` at the repo root - 50 bundles, exit 0 - `yarn lint` in packages/js-sdk - clean - 546 mocha tests across 10 packages - passing - 47 browser tests - passing Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`pass-qa` still failed on `yarn install --immutable` (YN0028) after the
previous fix, because I had misdiagnosed the cause.
`generate-rollup-config.mjs` rewrites each package's **source**
`package.json` on every build, pinning `peerDependencies` to the current
sibling workspace versions:
peerDependencies: {...info.peerDependencies, ...peerDependencies}
writeFileSync(resolve(`${basePath}/package.json`), ...)
So `yarn build` - not `yarn up` - is what turned ranges like
`@convertcom/js-sdk-types: ">=3.11.0"` into `">=4.0.0"`. Running the
verification build and then `git add -A` swept that mutation into the
commit, while the lockfile still carried the ranges from before it. CI
installs before it builds, so a clean checkout disagrees with the
committed manifests every time.
All 47 peer ranges are back to their `main-convert` values and the
lockfile matches them. Only `devDependencies` differ from `main-convert`
now, which is all the advisory work needed - no published package
changes.
Note for whoever picks this up: the build mutating tracked source files
means any `yarn build` leaves a dirty tree. Worth separating the
generated `lib/package.json` from the source manifest, but that is out of
scope here.
Verified at this commit, with no build run afterwards:
- `yarn install --immutable` - passes (the failing CI step)
- peerDependencies byte-identical to origin/main-convert in all 11 packages
Build and test results from the same dependency state, before the
restore: 50 bundles, 546 mocha tests, 47 browser tests, lint clean.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
JosephSamirL
approved these changes
Aug 9, 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.



Takes the repo from 236 open advisories (3 critical / 105 high) to 41 (0 critical / 11 high),
measured with
yarn npm audit --all --recursive --environment all— the same GitHub Advisorydata Dependabot reads (265 rows locally vs Dependabot's 266 alerts).
Scope: none of this ships to customers
Every
packages/*manifest declares an emptydependenciesapart fromjs-sdk-utils → murmurhash. The runtime closure of the entire published SDK is that one package, so all 266alerts trace to the demo apps and dev tooling, not to anything a customer installs.
peerDependenciesare byte-identical to the base branch in all 11 published packages — onlydevDependenciesand the lockfile change here.What changed
yarn up -R), no manifest editsnext16.0.1 → 16.3.0wrangler3 → 4,@nestjs/*→ 11.1.28,@remix-run/*→ 2.17.5,react-router-dom→ 7.18.2nyc→ 18,chai4 → 6rollup-plugin-typescript20.36 → 0.37A note on the commit list
The branch was originally cut from
main-convert, so it carries 7 commits of that branch'shistory alongside the 4 dependency commits. They contribute no file changes —
git diff origin/main...800473ais empty — so the 22 changed files here are exactly thedependency work. Squash-merging collapses the history question entirely.
Two findings worth a look
chaiwas never the blocker. The 2025 note held chai at 4 because "version 5.x breaks theunit tests". The actual cause is that chai ≥5 exports a sealed ES module namespace, so
chai.use(spies)can no longer attach.spyin place. Capturing whatuse()returns fixes it —a 3-line change in
packages/event/tests/event-manager.tests.ts. chai 6 then passes all 546tests.
chai-stringalso works fine on chai 6 despite advertising a^4.1.2peer range.picomatch@2.3.2silently breaks the build. The recursive refresh maderollup-plugin-typescript2go inert — it stopped both transforming and resolving, so rollup fellback to parsing raw TypeScript as JavaScript. Symptoms differ per package (
Could not resolve "./src/..."in enums,Expected ',', got ':'in js-sdk) but it is one plugin failing. Bisectedon a pristine clone with a single variable:
yarn up -R picomatchon its own takes the build frompassing to failing. picomatch 2.3.1 → 2.3.2 is itself a required security bump, so holding it back
is not an option;
rollup-plugin-typescript2@0.37.0works with it. The test suite stays greenthrough the broken state, so tests alone never catch this.
The 41 that remain
Each sits behind a parent already at its latest published version — these need the tool replaced,
not upgraded:
react-scripts@5.0.1(demo/reactjs; unmaintained since 2022)@remix-runv2 (superseded by React Router 7)jsdoc/better-docsdocs chain in js-sdkwrangler@4→miniflare→undicimocha/nyc/browserifyinternalsVerification at
4b6bbddpass-qagreen on CIyarn install --immutable— passesyarn buildat the repo root — 50 bundles, exit 0yarn lintinpackages/js-sdk— cleanyarn test:mochaacross all 10 test packages — 546 passing, 0 failingyarn test:browserinpackages/js-sdk— 47 passedTwo pre-existing issues found on the way, not fixed here
Repo-root
yarn lintis red. It fails inpackages/types(src/config/index.ts, generatedsrc/config/types.gen.ts). The pristine base gives 1674 errors; this branch gives 1676 — neitherfile is touched here, and the 2-error delta is prettier moving 3.6.2 → 3.9.6 inside its existing
^3.6.2range.pass-qaonly lintspackages/js-sdk, so CI has never exercised it.yarn buildleaves a dirty tree.generate-rollup-config.mjsrewrites each package'ssource
package.json, pinningpeerDependenciesto the current sibling workspace versions —not just the generated
lib/package.json. Any build silently rewrites tracked files, which iseasy to commit by accident. Worth separating.
🤖 Generated with Claude Code