fix: update User test mocks for @workos-inc/node 10.4.0 (unblock publish)#110
Merged
Conversation
The @workos-inc/node 10.4.0 bump (#107) made `User.name` a required field, but the User mocks in AuthKitProvider.spec.tsx and useAccessToken.spec.tsx were not updated. The publish job runs prepublishOnly -> typecheck (root tsconfig, which includes spec files), so it failed and 0.10.0 was tagged but never published to npm. PR CI only runs build via tsconfig.build.json (which excludes specs), so it never caught this. Add the missing name field to both mocks to restore a publishable build. Follow-up: add a `pnpm run typecheck` step to ci.yml so spec-only type errors are caught in PR CI instead of at publish time (parity with authkit-nextjs).
Contributor
Greptile SummaryThis PR updates test user mocks to match the current WorkOS user type. The main changes are:
Confidence Score: 5/5Safe to merge; the changes are limited to test mocks and align them with the required WorkOS user shape. The diff only updates spec fixtures by adding the missing required field, with no runtime source changes.
What T-Rex did
Reviews (1): Last reviewed commit: "fix: update User test mocks for @workos-..." | Re-trigger Greptile |
gjtorikian
approved these changes
Jun 24, 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.
Summary
0.10.0was tagged by release-please but failed to publish to npm (failed run). ThePublishjob runsprepublishOnly, which includestypecheck(tsc --noEmit, roottsconfig.json— includes spec files), and it errored on two staleUsermocks.Root cause
#107(fix!: require @workos-inc/node >=10.4.0) pulled in a node SDK whereUser.name(string | null) is required. Two test mocks predate that and omitname:src/client/AuthKitProvider.spec.tsxsrc/client/useAccessToken.spec.tsxPR CI only runs
build(tsc -p tsconfig.build.json, which excludes specs), so the error never surfaced on any PR — it only fired at publish time, leaving0.10.0tagged in git but absent from npm.Fix
Add the required
namefield to bothUsermocks. No runtime/source change.Verification
pnpm run typecheck(root — the exact gate publish runs): clean ✅pnpm run test: 236 passing ·format:checkclean ·lintcleanRecommended follow-up (separate)
Add a
Typecheckstep toci.ymlso spec-only type errors are caught in PR CI rather than at publish (parity withauthkit-nextjs, whoseci.ymlalready runstypecheck):I left this out of this PR (the workflow edit tripped a security guard, and it's cleanly separable from the release-unblock fix). Worth adding so this class of failure can't reach publish again.
Re-publishing
A re-run of the failed job won't republish
0.10.0(release-please won't re-tag it). Merging thisfix:will have release-please cut0.10.1, and that release's publish job will run with the fix included.