Skip to content

Exclude test folder from @metamask/gator-permissions-controller build artifact#7925

Open
jeffsmale90 wants to merge 1 commit intomainfrom
chore/exclude_test_from_build
Open

Exclude test folder from @metamask/gator-permissions-controller build artifact#7925
jeffsmale90 wants to merge 1 commit intomainfrom
chore/exclude_test_from_build

Conversation

@jeffsmale90
Copy link
Contributor

@jeffsmale90 jeffsmale90 commented Feb 12, 2026

Explanation

Explicitly exclude /src/test from build by adding 'exclude' to tsconfig.build.json and tsconfig.json

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Build-config-only change scoped to one package; risk is limited to potentially missing a non-test file that was incorrectly placed under src/test.

Overview
Updates @metamask/gator-permissions-controller tsconfig.json and tsconfig.build.json to explicitly exclude ./src/test, preventing test sources from being picked up during local compilation and build artifact generation.

Written by Cursor Bugbot for commit 59285bc. This will update automatically on new commits. Configure here.

@jeffsmale90 jeffsmale90 requested a review from a team as a code owner February 12, 2026 23:33
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

],
"include": ["../../types", "./src"]
"include": ["../../types", "./src"],
"exclude": ["./src/test"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test files lose type-checking in development tsconfig

Medium Severity

The "exclude": ["./src/test"] was added to tsconfig.json, but this file is used for editor type-checking and linting — not for builds. Every other package in this repo (assets-controller, assets-controllers, eth-json-rpc-middleware) only excludes test paths from tsconfig.build.json, never from tsconfig.json. This causes standalone test files like errors.test.ts inside ./src/test/ to silently lose type-checking in the IDE and during lint, which contradicts the PR's stated goal of only excluding the test folder from the build artifact.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant