Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts fxa-auth-server’s TypeScript configuration to type-check test/spec files in editors (surfacing real test type errors and enabling Jest globals), while keeping build/CI emit and compile checks focused on shippable code only.
Changes:
- Update
tsconfig.json(IDE default) to includetest/**/*and force module detection to avoid global-scope collisions among legacyrequire()-style specs. - Add
tsconfig.build.jsonto exclude tests/specs for emit and CI--noEmittype-checks. - Point
build-tsandcompilescripts attsconfig.build.json.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/fxa-auth-server/tsconfig.json | Includes test/**/* for IDE type-checking and sets moduleDetection: "force" to prevent spec-file global redeclare errors. |
| packages/fxa-auth-server/tsconfig.build.json | New build/CI config extending IDE config but excluding tests/specs and restoring prior module detection behavior. |
| packages/fxa-auth-server/package.json | Routes build/type-check scripts through tsconfig.build.json and aligns tsc-alias invocation accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Because: - fxa-auth-server's tsconfig orphaned spec files (specs excluded, test/ never included), so editors showed spurious "Cannot find name 'describe'" and real spec type errors were silenced (FXA-13782). This commit: - tsconfig.json (IDE) includes test/ + moduleDetection:force so legacy require()-style specs get jest types without colliding. - Adds tsconfig.build.json (excludes specs/test) for emit + CI type-check, keeping dist test-free and compile green; points build-ts/compile at it. fxa-shared and gating the surfaced spec errors in CI are separate follow-ups.
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.
Because:
This commit:
Closes: FXA-13782
Checklist
Put an
xin the boxes that applyHow to review (Optional)
Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Any other information that is important to this pull request.