Skip to content

fix(account-sdk): remove broken require export conditions#340

Open
mehmetkr-31 wants to merge 1 commit into
base:masterfrom
mehmetkr-31:fix/commonjs-require-exports
Open

fix(account-sdk): remove broken require export conditions#340
mehmetkr-31 wants to merge 1 commit into
base:masterfrom
mehmetkr-31:fix/commonjs-require-exports

Conversation

@mehmetkr-31

Copy link
Copy Markdown

Summary

Removes broken and misleading require condition keys from package.json exports.

Problem

The @base-org/account package declares "type": "module" (ESM-only), but its package.json exports field advertised require keys resolving to ESM .js files (like ./dist/index.js and ./dist/index.node.js).

Because the package is ESM, Node.js parses these resolved files as ES modules even when resolved via require(). This causes CommonJS consumers attempting to import the SDK to hit ERR_REQUIRE_ESM at runtime.

Solution

Remove the unsupported require conditions from the exports mappings. This aligns the exports field with the ESM-only nature of the package and prevents misleading auto-resolution errors for CommonJS consumers.

Fixes #315

@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

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.

CommonJS require export targets point to ESM .js files

2 participants