Fix wrangler types --check ignoring --env-interface and secondary--config entries#13572
Fix wrangler types --check ignoring --env-interface and secondary--config entries#13572dario-piotrowicz merged 3 commits intomainfrom
wrangler types --check ignoring --env-interface and secondary--config entries#13572Conversation
… `--config` entries
🦋 Changeset detectedLatest commit: 26ac991 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 |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
|
I've now reviewed all the relevant code. Let me analyze the changes: Summary of changes:
Analysis: The logic is sound. The One thing I want to verify: when Looking at the call site in const outOfDate = await checkTypesUpToDate(
config,
outputPath,
envInterface, // always a string ("Env" by default from yargs)
secondaryEntries
);And in envInterface: envInterface ?? ((rawArgs.envInterface ?? "Env") as string),Since However, the other caller The tests are thorough and cover the key scenarios. The changeset is appropriate. LGTM |
|
✅ All changesets look good Reviewed: Validation Results:
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Fixes #13508
Previously,
wrangler types --checkran its staleness check before resolving the--env-interfaceflag and before collecting secondary worker entry points from additional--configarguments. This meant it could incorrectly report types as up to date when they were actually stale due to a different env interface name or changes in secondary worker configs. The check now runs after all options are fully resolved, so it correctly detects mismatches.A picture of a cute animal (not mandatory, but encouraged)