Conversation
dafd006 to
992eec4
Compare
zyzyzyryxy
approved these changes
Mar 5, 2026
5 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 1, 2026
…bundle (#1189) ## Summary - Adds a custom ESLint rule `@local/no-direct-third-party-imports` that flags value imports of bundled third-party packages (`@modelcontextprotocol/sdk`, `puppeteer-core`, `@puppeteer/browsers`, `yargs`, `debug`, `zod`, `core-js`) when used outside of `src/third_party/` - Type-only imports (`import type`) are allowed since they are erased at compile time and don't affect the bundle - The rule is scoped to `src/**/*.ts` so development scripts and tests are unaffected This prevents the class of bugs where a direct npm import works during development (devDependencies installed) but breaks in the published package (only bundled code ships). PR #1111 was an example of this exact issue caught through manual `npm pack` testing. Closes #1123 ## Test plan - [x] Verified `npx eslint --no-cache src/` passes with no violations on the current codebase - [x] Verified the rule correctly catches a test file with `import {Client} from '@modelcontextprotocol/sdk/client/index.js'` - [x] Verified the rule allows `import type {Flags} from 'lighthouse'` (type-only import) - [x] Verified the rule does not fire inside `src/third_party/index.ts` (the barrel itself) - [x] Verified scripts/ and tests/ are unaffected (rule scoped to `src/**/*.ts`) --------- Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
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.
extracts non-launch related fixes from #1100