Repository navigation
Resolve security advisories - #30
Merged
Merged
Conversation
- form-data 4.0.0 -> 4.0.6 (transitive via jest-environment-jsdom/jsdom; critical advisory, < 4.0.4) - Require Node >= 22 (engines), CI tests on Node 22 and 24, publish on Node 24 (breaking) - Replace tsup 6 with tsdown 0.23 (tsdown.config.mts); output names unchanged, adds dist/index.d.mts - typescript 4.7 -> 5.9 (needed by tsdown dts generation) - @types/node (transitive) 18.7 -> 26.6 so tsc works with TypeScript 5.9
These checks now run via the org-wide required workflows in labd/.github-workflows.
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.
Resolve security advisories, require Node 22, switch to tsdown
Security fix
form-data4.0.0 -> 4.0.6. It is a transitive dev dependency (jest-environment-jsdom->jsdom@19). This resolves the critical Dependabot alert (vulnerable>= 4.0.0, < 4.0.4). It was fixed with an in-range lockfile update, so no override was needed.Breaking: Node.js >= 22
engines.node:>=16.0.0->>=22.0.0(Node 20 is EOL).main.yml): Node 20 -> matrix of Node 22 and 24.publish.yml): Node 20 -> 24.Build: tsup -> tsdown
tsup@6withtsdown@^0.23.1. Config is intsdown.config.mts(esm + cjs, dts, sourcemaps,fixedExtension: false, targetes2020).typescript4.7 -> 5.9, because tsdown's dts generation requires TS >= 5.@types/node(transitive) 18.7 -> 26.6. The old version does not typecheck under TS 5.9.index.js,index.js.map,index.mjs,index.mjs.map,index.d.tsindex.d.mtsmain,moduleandtypingsin package.json still point to existing files.react,react-dom/clientandtiny-current-scriptremain external. Bothrequire('./dist/index.js')andimport('./dist/index.mjs')expose the same 6 exports..d.tshas a trailingsourceMappingURLcomment with no.d.ts.mapfile. This is harmless.Actions pinning
pinact run: no changes. All actions were already pinned to SHAs.Verification (local, Node 24)
pnpm install --frozen-lockfile --ignore-scripts: OK. Scripts are skipped because the rootpreinstallrunsnpx only-allow pnpm.pnpm lint: 0 errors, 9 warnings (same as master).pnpm exec tsc --noEmit -p .: OK.pnpm build(tsdown): OK.dist/index.d.tsunder--strict: OK.pnpm test: fails withTypeError: Cannot read properties of null (reading 'querySelectorAll')in a MutationObserver callback. This is pre-existing: master fails the same way, and CI runs tests withcontinue-on-error: true.Alerts not resolved
Notes
preinstallscript still usesnpx only-allow pnpm. Consider replacing it, e.g. withpackageManager+ corepack, or by dropping it.packageManageris stillpnpm@9.7.0.@typescript-eslint5.33 officially supports TS < 4.8. Lint runs fine with TS 5.9, but it may print a version-support warning.Vitest
jest,ts-jest,jest-environment-jsdomand@types/jestwithvitest5.0.5 andjsdom30.1.3.jest.config.tsis gone;vitest.config.mtssets thejsdomenvironment.test/test:watchnow runvitest run/vitest. Tests importdescribe/it/expect/vifromvitest, andjest.spyOnbecamevi.spyOn.it.skip). I removedcontinue-on-error: truefrom the CI test step, so test failures now fail CI again.uses JSON.parse as a custom prop parsertest. It calledpopulate()100 times without awaiting it and checked the result in a.then()after the test had already finished, so it never asserted anything. Even with a wrong expected value it passed. Those leftover callbacks also caused the jest crash on master (Cannot read properties of null (reading 'querySelectorAll')): aMutationObserverfired after the jsdom environment was torn down. The test now usesfc.asyncPropertyand awaits each step. It passes, and it fails if the expected value is wrong.populate()call adds a newMutationObserverondocument.bodyand never disconnects it, so callingpopulate()more than once leaves extra observers behind and repeats work on every DOM change.pnpm
packageManagerfrompnpm@9.7.0topnpm@12.15.0and setengines.pnpmto>=12.preinstall: npx only-allow pnpmscript. pnpm is now enforced bypackageManager,engines.pnpmandengineStrict: true..npmrcorresolutionsfrompackage.json. I movedautoInstallPeersand theserialize-javascriptoverride to a newpnpm-workspace.yamland deleted.npmrc.lockfileVersion: '9.0'and every package version is the same. pnpm 12 added a document at the top that pins pnpm itself, plussupports-colorpeer suffixes ondebug/eslintentries.Org-enforced workflows
labd/.github-workflows, so keeping copies in this repo would only run them twice.Node 26
Adds Node 26 to the CI test matrix: 22, 24 → 22, 24, 26. Publish/release jobs are unchanged and stay on a single LTS. Verified locally on Node 26.3.0 (install + CI test steps pass).
npm trusted publishing
The org-level
NPM_TOKENsecret is gone, sopublish.ymlnow publishes through npm trusted publishing (OIDC), followinglabd/commercetools-node-mock.publish.yml: workflow defaultcontents: read; the job usesenvironment: releaseandid-token: write, and checkout usespersist-credentials: falseregistry-urlandNODE_AUTH_TOKEN; upgrades npm to^11.6.4(trusted publishing needs npm >= 11.5.1) and publishes withNPM_CONFIG_PROVENANCE: truepackage.json:repository.urlis nowgit+https://github.com/labd/react-abode.git; addspublishConfig(access: public,provenance: true)Before the next release, add a trusted publisher on npmjs.com for
react-abode. Use repositorylabd/react-abode, workflowpublish.ymland environmentrelease.pnpm 12
pnpm-workspace.yamlnow setsminimumReleaseAge: 20160(14 days, verified withpnpm config get minimumReleaseAge).minimumReleaseAgeto its own version as well, sopackageManagermoves frompnpm@12.15.0(4 days old) topnpm@12.12.0, the newest 12.x that is older than 14 days.--frozen-lockfileinstalls. 31 locked versions from the recent security updates are younger than 14 days. Instead of downgrading them, they're listed by exactname@versioninminimumReleaseAgeExclude. Those entries can be removed after 2026-11-04.packageManagerDependenciesblock changes (pnpm 12.15.0 → 12.12.0). No dependency versions changed.