chore: make overrideAccess explicit in tests - #17859
Open
nathanlentz wants to merge 1 commit into
Open
Conversation
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖 |
nathanlentz
force-pushed
the
override-access/tests
branch
2 times, most recently
from
August 20, 2026 02:41
3903c69 to
3f55ee9
Compare
nathanlentz
marked this pull request as ready for review
August 20, 2026 13:10
nathanlentz
force-pushed
the
override-access/tests
branch
2 times, most recently
from
August 20, 2026 15:31
167b40d to
2d2fd3f
Compare
Adds an explicit `overrideAccess: true` to every Local API call in test/
that previously relied on the default.
The Local API currently defaults `overrideAccess` to `true`, so writing
the value explicitly produces exactly what the default already produced.
No behaviour changes.
Four kinds of call site are invisible to both the codemod and a typecheck,
and were found by running the suites instead:
- `(payload as any).create({ ... })` — the receiver is cast, so there is no
typed parameter to be missing (plugin-mcp, pg-replica)
- `payload2.create({ ... } as any)` — the cast is on the argument, so the
object literal is `any` (config)
- `payload.create(createDirector)` — the arguments are hoisted into a
variable, so there is no object literal at the call (relationships)
- Calls added to `main` after this sweep first ran, which arrive whenever
the branch is rebased (queues, versions)
`test/__helpers/shared/sdk/types.ts` makes `overrideAccess` required on the
PayloadTestSDK argument types, so writing an e2e test asks the same question
as writing product code. Every existing call site already passes a value.
Preparation for making `overrideAccess` a required property.
nathanlentz
force-pushed
the
override-access/tests
branch
from
August 20, 2026 16:42
2d2fd3f to
e384d86
Compare
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.
Adds an explicit
overrideAccess: trueto every Local API call intest/thatpreviously relied on the default.
This is preparation for making
overrideAccessa required property, which landslater in this stack. It is split out so that the breaking change itself stays small
enough to read.
This changes no behaviour
The Local API currently defaults
overrideAccesstotrue— all 21 local operationsdestructure
overrideAccess = true. Writing the value explicitly produces exactly whatthe default already produced, so every one of these tests asserts the same thing it did
before.
A note on verification
tsconfig.base.jsonexcludes**/*.spec.ts, so a typecheck cannot see most of thisdirectory — and
test/carries thousands of pre-existing type errors regardless. Relying on all tests to pass to confirm correct changes.