Skip to content

fix: correct test fixtures for @octokit/rest and @octokit/core - #206

Merged
antfu merged 1 commit into
antfu:mainfrom
clanzhang:fix/octokit-esm-detection
Sep 11, 2026
Merged

antfu merged 1 commit into
antfu:mainfrom
clanzhang:fix/octokit-esm-detection

Conversation

@clanzhang

Copy link
Copy Markdown
Contributor

Remove incorrect main and module fields from test fixtures that don't exist in the actual npm packages. Both packages are ESM-only with only type: "module" and exports fields.

Fixes #128

🔗 Linked issue

Resolves #128

🧭 Context

The test fixtures for @octokit/rest@22.0.1 and @octokit/core@7.0.5 contained main and module fields that do not exist in the real npm packages. These are pure ESM packages that declare their module type solely via type: "module" and the exports field.

📚 Description

  • Remove main field from @octokit/core@7.0.5 fixture — the real package has no main
  • Remove main and module fields from @octokit/rest@22.0.1 fixture — the real package has neither
  • Verified that analyzePackageModuleType correctly returns 'esm' for both packages using the actual package.json data from npm
  • Detection logic in analyze-esm.ts does not need changes

Remove incorrect `main` and `module` fields from test fixtures that
don't exist in the actual npm packages. Both packages are ESM-only
with only `type: "module"` and `exports` fields.

Fixes antfu#128
@pkg-pr-new

pkg-pr-new Bot commented Sep 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/node-modules-inspector@206
npm i https://pkg.pr.new/node-modules-tools@206

commit: 2bfa23a

@antfu
antfu merged commit 8e913a4 into antfu:main Sep 11, 2026
11 checks passed
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.

@octokit/rest is ESM only

2 participants