Skip to content

build: upgrade minor dependencies - #1366

Merged
ilteoood merged 7 commits into
mainfrom
feature/upgrade-minor-deps
Sep 24, 2026
Merged

ilteoood merged 7 commits into
mainfrom
feature/upgrade-minor-deps

Conversation

@ilteoood

Copy link
Copy Markdown
Contributor

Description

Run npm-check-updates across all workspaces with --target minor to bump every package to its latest minor (and patch) release.

Notable upgrades:

  • React 18.2 → 18.3, @types/react 18.2 → 18.3
  • TypeScript 4.8 → 4.9 (root), 5.2 → 5.9 (website)
  • eslint 8.24 → 8.57, eslint-plugin-react 7.31 → 7.37
  • @docusaurus/* 3.3 → 3.10
  • webpack 5.76 → 5.111, webpack-dev-server 4.11 → 4.15
  • prettier 2.4 → 2.8
  • jest / ts-jest 29.1 → 29.7
  • react-spring 9.5 → 9.7, broadcast-channel 4.17 → 4.20
  • formidable-oss-badges 1.4 → 1.7
  • and ~70 more entries across the root, packages, examples, and the website.

Changes

Code changes required to keep CI green after the bump:

  • use-full-screen.ts — TS 4.9 narrows the post-in operand type more strictly, so type the webkit-prefixed element explicitly instead of relying on a non-null assertion.
  • slide.tsx + print-mode/index.tsx — TS 4.9 blocks emitting .d.ts that reference private @react-spring/web paths (TS2742). Annotate AnimatedDiv with a public React.ComponentType<AnimatedProps<any>> and cast the styled-components selector interpolation accordingly. Also drop the now-unused @ts-expect-error on the onClick handler.
  • remark-rehype-directive.ts — prettier 2.8 wraps typeof X[Y] in parentheses.
  • examples/mdx/index.js — eslint-plugin-react 7.34+ flags ReactDOM.render as deprecated; switch to createRoot from react-dom/client, matching the other examples.
  • website/tsconfig.json — TS 5.x enforces module=Node16 whenever moduleResolution=Node16 (TS5110), and the upstream @tsconfig/docusaurus still references @docusaurus/theme-classic (not a direct dep). Override module / moduleResolution and trim types to the package-types alias.
  • website/src/components/index/more-oss.tsx — formidable-oss-badges 1.5+ removed the featuredBadgeNames export; build the allow-list locally and render <FeaturedBadge name=... /> for the known featured products.
  • pnpm-workspace.yaml — pin onlyBuiltDependencies for @parcel/watcher, core-js, and esbuild so pnpm ≥10 stops complaining about ignored postinstall scripts.

Why

Keep dependencies current for security patches, performance improvements, and compatibility. Several of the upgrades (eslint-plugin-react's deprecation rule, prettier 2.8's formatting change, TS 4.9's stricter in-narrowing and declaration-portability rules) would otherwise surface as test/lint/type errors on main.

Test Plan

  • pnpm run check:ci — passes (lint, prettier, types:check, test across all workspaces).
  • pnpm run build — passes; examples/one-page/index.html is regenerated and included.
  • Local install verified with PUPPETEER_SKIP_DOWNLOAD=true pnpm install. CI uses pnpm 7 where pnpm.neverBuiltDependencies in package.json is still respected, so the new onlyBuiltDependencies block is additive and won't affect CI.

Linked Issues

None.

Run npm-check-updates across all workspaces with --target minor to
bump every package to its latest minor (and patch) release. Notable
upgrades:

- React 18.2 -> 18.3, @types/react 18.2 -> 18.3
- TypeScript 4.8 -> 4.9 (root), 5.2 -> 5.9 (website)
- eslint 8.24 -> 8.57, eslint-plugin-react 7.31 -> 7.37
- @docusaurus/* 3.3 -> 3.10
- webpack 5.76 -> 5.111, webpack-dev-server 4.11 -> 4.15
- prettier 2.4 -> 2.8
- jest/ts-jest 29.1 -> 29.7
- react-spring 9.5 -> 9.7, broadcast-channel 4.17 -> 4.20
- formidable-oss-badges 1.4 -> 1.7

Code changes required to keep CI green after the bump:

- use-full-screen.ts: TS 4.9 narrows the post-`in` operand type more
  strictly, so type the webkit-prefixed element explicitly instead of
  relying on a non-null assertion.
- slide.tsx + print-mode/index.tsx: TS 4.9 blocks emitting .d.ts that
  reference private @react-spring/web paths (TS2742). Annotate
  AnimatedDiv with a public React.ComponentType<AnimatedProps<any>>
  and cast the styled-components selector interpolation accordingly.
  Also drop the now-unused @ts-expect-error on the onClick handler.
- remark-rehype-directive.ts: prettier 2.8 wraps `typeof X[Y]` in
  parentheses; auto-fixed.
- examples/mdx/index.js: eslint-plugin-react 7.34+ flags
  ReactDOM.render as deprecated; switch to createRoot from
  react-dom/client, matching the other examples.
- website/tsconfig.json: TS 5.x enforces module=Node16 whenever
  moduleResolution=Node16 (TS5110), and the upstream @tsconfig/docusaurus
  still references @docusaurus/theme-classic (not a direct dep). Override
  module/moduleResolution and trim types to the package-types alias.
- website/src/components/index/more-oss.tsx: formidable-oss-badges 1.5+
  removed the `featuredBadgeNames` export; build the allow-list locally
  and render <FeaturedBadge name=... /> for the known featured products.
- pnpm-workspace.yaml: pin onlyBuiltDependencies for @parcel/watcher,
  core-js, and esbuild so pnpm >=10 stops complaining about ignored
  postinstall scripts.

Verified locally with `pnpm run check:ci` and `pnpm run build`.
@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
spectacle-docs-website Ready Ready Preview Sep 23, 2026 8:12pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 345a7b9

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread pnpm-workspace.yaml Outdated
Add the missing changeset for the minor dependency upgrade.

The wireit config for examples/one-page was missing the build inputs
that affect the generated index.html (packages/spectacle/package.json,
package-scripts.js, webpack.config.base.js). Without them, wireit
restored a stale cached output built before the dep bump, which made
the post-build `git diff` check fail on CI even though the local build
matched HEAD.
The minor dep upgrade also moved the lockfile to lockfileVersion 9.0
(pnpm 9+ format). Pnpm 7 (used by all three workflows) prints
"Ignoring not compatible lockfile" and re-resolves from scratch,
which mutates the lockfile on disk and makes the post-build
`git diff` check fail.

Switch the pnpm action to v10 so CI installs the lockfile the
project ships instead of regenerating one it can't parse.
Pnpm 10+ reads neverBuiltDependencies / onlyBuiltDependencies from
pnpm-workspace.yaml only. The package.json entry now conflicts with
the onlyBuiltDependencies whitelist (pnpm 10 errors with
ERR_PNPM_CONFIG_CONFLICT_BUILT_DEPENDENCIES) and is also redundant:
onlyBuiltDependencies effectively excludes puppeteer, since puppeteer
isn't on the whitelist.
Pnpm 10 errors out with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH when
.auto-install-peers doesn't match settings.autoInstallPeers baked
into pnpm-lock.yaml. The lockfile was rewritten to autoInstallPeers:
true during the minor upgrade, so flip .npmrc to match.
pnpm 12's first install in this workspace injected an allowBuilds block
with literal "set this to true or false" placeholders that aren't valid
YAML booleans. The block is redundant alongside onlyBuiltDependencies
(which already gates which postinstall scripts may run) and is silently
ignored by pnpm 10 (the CI version), so just drop it.

@ryan-roemer ryan-roemer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I had to add some pnpm config stuff in a commit, but otherwise everything looks good! I tried out all the examples and one-page.

For the future, there's a lot of cruft we'll eventually want to tackle like:

  • The whole frontend infra. Get off webpack? (but what does that mean for mdx plugin)
  • Get off wireit?

... but for another day. For now, let's just :shipit:

@ilteoood
ilteoood merged commit e9dde74 into main Sep 24, 2026
5 checks passed
@ilteoood
ilteoood deleted the feature/upgrade-minor-deps branch September 24, 2026 05:39

This branch was successfully deployed

1 active deployment
Preview — 345a7b9b Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants