Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add bun built-in modules support #266

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented Jan 25, 2024

Add bun support (so import { Database } from 'bun:sqlite') won't trigger import/no-unresolved.

There are no existing is-bun-modules, so a naive solution is to locate bun-types and find all declare module.

The PR is still in draft, as the test requires bun-types to be installed, which will pollute the globals.

Copy link

changeset-bot bot commented Jan 25, 2024

🦋 Changeset detected

Latest commit: f834843

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-import-resolver-typescript Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codesandbox-ci bot commented Jan 25, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@@ -117,6 +117,29 @@ let resolver: Resolver | undefined
const digestHashObject = (value: object | null | undefined) =>
hashObject(value ?? {}).digest('hex')

let bunCoreModules: Set<string> | undefined
const getBunCoreModules = (): Set<string> => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It really seems hacking, can we ask @Jarred-Sumner for helping here.

Secondly, we can add a new module similar like https://www.npmjs.com/package/is-core-module.

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

Successfully merging this pull request may close these issues.

None yet

2 participants