You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Smoke-test the examples against a packed v7 tarball
The examples pin `"@tanem/react-nprogress": "latest"` and nothing in CI
touches them, so v7's packaging would first meet them the moment 7.0.0
publishes. Ran `npm run build && npm pack`, clean-installed the tarball into
all eight examples in place of the registry pin, and drove each progress bar
in a headless browser. Both Next examples were additionally checked under
`next build && next start`. Every example starts, advances and completes with
no console errors, and the CJS entry plus the `"use client"` directive hold
up on the Next server. The `"latest"` pins are restored: CodeSandbox resolves
the registry, not the tarball.
Three things needed fixing along the way.
The react-router example passed one `nodeRef`, held by `Home`, to every
CSSTransition, and it was never attached to a DOM node, since `<Routes>`
cannot take a ref. react-transition-group ends the transition on the next
tick when the ref does not resolve, so the fade classes never applied and
`onEntered` fired straight after `onEnter`: the bar completed 323ms after a
click instead of running for the 1200ms the example configures. A `Fade`
wrapper now owns a ref per `key` and renders the element it points at.
Reproduced against the published 6.0.4 too, so it predates v7.
Next rewrites `next-env.d.ts` on every run, with different contents for
`next dev` and `next build`, and in a format prettier rejects. It is now
gitignored and prettier-ignored in both Next examples, as create-next-app
has it.
`next build` also reconfigures `jsx` to `react-jsx`, which Next 16 requires,
so both example tsconfigs now carry that instead of `preserve`.
AGENTS.md records the tarball smoke-test procedure.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments