Skip to content

chore: bump dependencies and fix security vulnerabilities - #331

Merged
maximizeIT merged 2 commits into
mainfrom
chore/dependency-bumps-and-security-fixes
Sep 10, 2026
Merged

chore: bump dependencies and fix security vulnerabilities#331
maximizeIT merged 2 commits into
mainfrom
chore/dependency-bumps-and-security-fixes

Conversation

@maximizeIT

@maximizeIT maximizeIT commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Consolidates all currently open Dependabot PRs and security alerts into one branch.

GitHub Actions

  • actions/checkout v6→v7
  • actions/setup-node v4→v7
  • actions/create-github-app-token v1.10.3→v2.0.6
  • cycjimmy/semantic-release-action v4→v6
  • Simek/yarn-lock-changes v0.12.0→v0.14.1
  • Staffbase/gha-workflows techdocs template v11.1.0→v16.0.0

npm/yarn dependencies

  • eslint ^8.35.0→^9.39.2 (major - migrated .eslintrceslint.config.js flat config via @eslint/eslintrc FlatCompat)
  • eslint-plugin-prettier ^4.2.1→^5.5.6 (required for Prettier 3 compatibility - v4 used Prettier's removed sync API)
  • prettier ^2.8.4→^3.7.4 (major - verified no formatting drift via prettier --check)
  • jest-environment-jsdom ^29.5.0→^30.2.0 (major)
  • @rollup/plugin-commonjs 24.0.1→29.0.0 (major)
  • @commitlint/config-conventional 17.4.4→20.2.0 (major)
  • jsdoc-to-markdown ^8.0.0→^9.1.3 (major)
  • rollup-plugin-license 3.6.0→3.7.1
  • compare-versions ^5.0.3→^6.1.1

Security fixes (yarn resolutions)

Original Dependabot alerts:

  • lodash → ^4.18.1
  • js-yaml → ^4.3.1 (and ^3.15.1 via @istanbuljs/load-nyc-config)
  • browserslist → ^4.28.7
  • baseline-browser-mapping → ^2.11.0

Additional transitive vulnerabilities found via yarn audit after the bumps above (pre-existing on main, not introduced by this PR, but fixed here):

  • ajv (via @commitlint/config-validator) → ^8.18.0 (moderate, ReDoS)
  • underscore (via jsdoc) → ^1.13.8 (high, DoS)
  • brace-expansion (via glob/minimatch) → ^2.1.4 (high, 2 DoS CVEs)

CI regression found & fixed

Validated this PR end-to-end via a throwaway beta prerelease branch (#332, now closed without merging, branch deleted) that published real x.y.z-beta.N versions to npm to confirm nothing broke. This caught a genuine regression: bumping actions/setup-node v4→v7 in the release job causes yarn classic to hard-fail (Failed to replace env in config: ${NODE_AUTH_TOKEN}) on yarn install/yarn build, because setup-node@v7 writes an .npmrc referencing NODE_AUTH_TOKEN before that var was set in the job. Fixed here by hoisting NODE_AUTH_TOKEN to the release job's top-level env, so it's available to every step, not just the Release step.

(The beta branch also needed a second, unrelated fix — passing --tag to npm publish for prerelease channels — but that only matters when publishing a non-latest dist-tag, which main never does, so it's not part of this PR.)

Confirmed via the beta pipeline: yarn installyarn build → semantic-release → npm publish all succeeded on a real CI run, npm view @staffbase/plugins-client-sdk dist-tags showed the new beta version published, and it was installed/built/type-checked successfully in a downstream consumer app (cc-plugins-client-sdk-showcase#1115, also a throwaway test PR).

Verification

All run clean locally:

  • yarn lint (ESLint 9 flat config + Prettier 3)
  • yarn test-unit (6 suites, 52 tests, 13 snapshots, all pass)
  • npx prettier --check (no formatting drift)
  • yarn build (rollup build succeeds)
  • yarn audit0 vulnerabilities across 848 dependencies

🤖 Generated with assistance from GitHub Copilot.

- bump GitHub Actions workflow versions (checkout, setup-node,
  create-github-app-token, semantic-release-action, yarn-lock-changes,
  gha-workflows techdocs template)
- bump npm/yarn dependencies incl. major versions (eslint 8->9,
  prettier 2->3, jest-environment-jsdom 29->30, @rollup/plugin-commonjs
  24->29, @commitlint/config-conventional 17->20, jsdoc-to-markdown 8->9,
  rollup-plugin-license, compare-versions)
- migrate ESLint config from .eslintrc to flat config (eslint.config.js)
  via @eslint/eslintrc FlatCompat, required by ESLint 9
- bump eslint-plugin-prettier 4->5 for Prettier 3 compatibility
- fix no-unused-vars error on unused catch binding, remove stale
  eslint-disable/eslint-env directives in test files
- add yarn resolutions to patch Dependabot-flagged vulnerabilities:
  lodash, js-yaml (two branches), browserslist, baseline-browser-mapping
- add yarn resolutions to patch additional transitive vulnerabilities
  surfaced by yarn audit: ajv, underscore, brace-expansion

Verified locally: yarn lint, yarn test-unit, yarn build, prettier --check,
and yarn audit (0 vulnerabilities) all pass.

Co-authored-by: GitHub Copilot <copilot@noreply.github.com>
@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
src/main.js 5.76 KB (-0.7% 🔽)

actions/setup-node@v7 writes an .npmrc auth line referencing the
NODE_AUTH_TOKEN env var for the scoped GitHub Packages registry.
Unlike v4, yarn classic now fails to parse .npmrc during
`yarn install --frozen-lockfile` if that env var isn't defined at all
(not just empty), since the token was only set later for the actual
Release step. Set it for the install step too so it's available when
.npmrc is parsed.

Co-authored-by: GitHub Copilot <copilot@noreply.github.com>
@maximizeIT
maximizeIT force-pushed the chore/dependency-bumps-and-security-fixes branch from b2960bf to 1ad4f89 Compare September 10, 2026 01:04

@ingvaar ingvaar left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a ton Max! 🙏

@maximizeIT
maximizeIT merged commit 5cc0d01 into main Sep 10, 2026
10 checks passed
@maximizeIT
maximizeIT deleted the chore/dependency-bumps-and-security-fixes branch September 10, 2026 08:37
@staffbase-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants