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: rewrite, speed up by using rspack-resolver under the hood #368

Merged
merged 7 commits into from
Mar 16, 2025

Conversation

JounQin
Copy link
Collaborator

@JounQin JounQin commented Mar 10, 2025

Highlights:

  • drop Node 14
  • use rspack-resolver understand the hood, I think we can make it as default resolver for eslint-plugin-import-x cc @SukkaW
  • different default options with original eslint-import-resolver-oxc which prefers types over js, what means @types/* is supported, alwaysTryTypes option is also preserved

I'm thinking enable alwaysTryTypes by default or just remove this option

  • project option is deprecated, tsconfig option from oxc-resolver is the replacement, but it's still supported temporarily by auto mapping to tsconfig.configFile
  • array type of project is deprecated, use a single tsconfig.json with references instead, but it's still supported temporarily by only using the first project

Important

Dropping array type of project needs more discussions

close #94
close #165
close #176
close #179
close #208
close #262
close #282
close #335
close #349


There is only one regression: withPathsAndNestedBaseUrl, it seems oxc-resolver does not use baseUrl as default alias. See also #68

https://github.com/import-js/eslint-import-resolver-typescript/tree/feat/rework/tests/withPathsAndNestedBaseUrl

Dir tsconfig.configFile is not supported, is this intented?

cc @Boshen


Can you help to export OxcResolverOptions and ResolverFactory for resuing?

And also I think removeQuerystring function should be included in eslint-import-resolver-oxc

cc @9romise

Copy link

changeset-bot bot commented Mar 10, 2025

🦋 Changeset detected

Latest commit: 2c797a9

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 Major

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

socket-security bot commented Mar 10, 2025

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

Copy link

codesandbox-ci bot commented Mar 10, 2025

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.

Copy link
Contributor

github-actions bot commented Mar 10, 2025

size-limit report 📦

Path Size
lib/index.js 1.42 KB (-52.91% 🔽)

@JounQin JounQin changed the title feat: rewrite, speed up by using eslint-import-resolver-oxc under the hood feat: rewrite, speed up by using eslint-import-resolver-oxc under the hood Mar 10, 2025
@JounQin JounQin requested a review from SukkaW March 10, 2025 16:57
@JounQin JounQin force-pushed the feat/rework branch 3 times, most recently from f64377f to aec170e Compare March 10, 2025 19:44
@Boshen
Copy link

Boshen commented Mar 10, 2025

I'll investigate soon oxc-project/oxc-resolver#416

@SukkaW
Copy link
Collaborator

SukkaW commented Mar 11, 2025

I think we can make it as default resolver for eslint-plugin-import-x

@JounQin

IMHO the default resolver should have behaviors aligned with un-ts/eslint-plugin-import-x#208 (i.e. no tsconfig.json or jsconfig.json support).

Also, we can investigate to only implement the v3 interface (un-ts/eslint-plugin-import-x#192)

@JounQin
Copy link
Collaborator Author

JounQin commented Mar 11, 2025

IMHO the default resolver should have behaviors aligned with un-ts/eslint-plugin-import-x#208 (i.e. no tsconfig.json or jsconfig.json support).

Considering typescript adoption by the community, I think the default resolver should count tsconfig.json or jsconfig.json, or make it opt-out.

I was thinking dropping resolver concept same as @43081j at

un-ts/eslint-plugin-import-x#24 (comment)

un-ts/eslint-plugin-import-x#24 (comment)

I mean the new plugin will be a TypeScript-first plugin.

And considering the fast speed of oxc-resolver and flexibilty as enhanced-resolver, I think maybe it's a good time.

@SukkaW
Copy link
Collaborator

SukkaW commented Mar 11, 2025

Considering typescript adoption by the community, I think the default resolver should count tsconfig.json or jsconfig.json, or make it opt-out.

For the default resolver? opt-in, not opt-out. Let's do things one step at a time. At least the behavior should be aligned with eslint-import-resolver-node and eslint-plugin-import-x's built-in node resolver for now.

I was thinking dropping resolver concept

It is impossible IMHO. Many import resolver like the Vite resolver still has a very wide range of adoption.

I mean the new plugin will be a TypeScript-first plugin.

That's a way huge step forward. Let's do things one at a time, otherwise we will lose adoptors since everyone will be scared of the breaking changes and will simply not upgrade or even go back to eslint-plugin-import.

@JounQin
Copy link
Collaborator Author

JounQin commented Mar 11, 2025

After thinking, maybe depending on eslint-import-resolver-oxc is just over-engineering, oxc-resolver itself is already simple enough after working on un-ts/eslint-plugin-import-x#237.

So may plan would be:

  1. rework based on oxc-resolver for next major of eslint-plugin-import-x and eslint-import-resolver-typescript so that eslint-import-resolver-typescript can still be used with eslint-plugin-import
  2. add typescript opt-in built-in support in eslint-plugin-import-x so eslint-import-resolver-typescript would be unnecessary anymore for import-x projects
  3. implement bundler resolving features like eslint-import-resolver-oxc or just leave it as-is

cc @SukkaW

@JounQin JounQin changed the title feat: rewrite, speed up by using eslint-import-resolver-oxc under the hood feat: rewrite, speed up by using oxc-resolver under the hood Mar 11, 2025
@SukkaW
Copy link
Collaborator

SukkaW commented Mar 11, 2025

After thinking, maybe depending on eslint-import-resolver-oxc is just over-engineering, oxc-resolver itself is already simple enough after working on un-ts/eslint-plugin-import-x#237.

So may plain would be:

  1. rework based on oxc-resolver for next major of eslint-plugin-import-x and eslint-import-resolver-typescript so that eslint-import-resolver-typescript can still be used with eslint-plugin-import
  2. add typescript opt-in built-in support in eslint-plugin-import-x so eslint-import-resolver-typescript would be unnecessary anymore for import-x projects
  3. implement bundler resolving features like eslint-import-resolver-oxc or just leave it as-is

cc @SukkaW

Works for me, let's do this!

@JounQin
Copy link
Collaborator Author

JounQin commented Mar 12, 2025

@Boshen Hi, after adding project: string[] support back, I found more regressions

/Users/runner/work/eslint-import-resolver-typescript/eslint-import-resolver-typescript/tests/withPathsAndNestedBaseUrl/other/bar.ts
Error:   2:8  error  Unable to resolve path to module 'foo'  import/no-unresolved

✖ 1 problem (1 error, 0 warnings)


/Users/runner/work/eslint-import-resolver-typescript/eslint-import-resolver-typescript/tests/multipleTsconfigs/packages/module-b/index.ts
Error:    8:8  error  Unable to resolve path to module 'folder/tsImportee'             import/no-unresolved
Error:    9:8  error  Unable to resolve path to module 'folder/tsxImportee'            import/no-unresolved
Error:   10:8  error  Unable to resolve path to module 'folder/subfolder/tsImportee'   import/no-unresolved
Error:   11:8  error  Unable to resolve path to module 'folder/subfolder/tsxImportee'  import/no-unresolved

✖ 4 problems (4 errors, 0 warnings)


/Users/runner/work/eslint-import-resolver-typescript/eslint-import-resolver-typescript/tests/dotProject/packages/module-b/index.ts
Error:    8:8  error  Unable to resolve path to module 'folder/tsImportee'             import/no-unresolved
Error:    9:8  error  Unable to resolve path to module 'folder/tsxImportee'            import/no-unresolved
Error:   10:8  error  Unable to resolve path to module 'folder/subfolder/tsImportee'   import/no-unresolved
Error:   11:8  error  Unable to resolve path to module 'folder/subfolder/tsxImportee'  import/no-unresolved

✖ 4 problems (4 errors, 0 warnings)

Do I need to create a separate issue for you?

Copy link

socket-security bot commented Mar 12, 2025

Updated and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@ampproject/[email protected]2.2.1 None 0 76 kB jridgewell
npm/@unrs/[email protected]1.1.2 None 0 2.11 MB jounqin
npm/@unrs/[email protected]1.1.2 None 0 2.4 MB jounqin
npm/@unrs/[email protected]1.1.2 None 0 2.72 MB jounqin
npm/@unrs/[email protected]1.1.2 None 0 2.27 MB jounqin
npm/@unrs/[email protected]1.1.2 None 0 2.35 MB jounqin
npm/@unrs/[email protected]1.1.2 None 0 2.37 MB jounqin
npm/@unrs/[email protected]1.1.2 None 0 2.75 MB jounqin
npm/@unrs/[email protected]1.1.2 None 0 0 B
npm/@unrs/[email protected]1.1.2 None 0 2.02 MB jounqin
npm/@unrs/[email protected]1.1.2 None 0 2 MB jounqin
npm/@unrs/[email protected]1.1.2 None 0 2.32 MB jounqin
npm/[email protected]1.1.2 None 0 20.2 kB jounqin

🚮 Removed packages: npm/@nolyfill/[email protected]

View full report↗︎

@JounQin JounQin force-pushed the feat/rework branch 11 times, most recently from 4f54f95 to c9f4e30 Compare March 16, 2025 23:20
@JounQin JounQin merged commit 2fd7c2e into master Mar 16, 2025
30 checks passed
@JounQin JounQin deleted the feat/rework branch March 16, 2025 23:30
@eaibmz
Copy link

eaibmz commented Mar 18, 2025

no s390x support :/
this breaks linting for us.

@JounQin
Copy link
Collaborator Author

JounQin commented Mar 18, 2025

no s390x support :/ this breaks linting for us.

Oh, unfortunately, we may need to provide a fallback mode.

@SukkaW
Copy link
Collaborator

SukkaW commented Mar 18, 2025

no s390x support :/ this breaks linting for us.

Oh, unfortunately, we may need to provide a fallback mode.

It should be very easy to provide s390x support through NAPI-RS IIUC?

@JounQin
Copy link
Collaborator Author

JounQin commented Mar 18, 2025

It should be very easy to provide s390x support through NAPI-RS IIUC?

I'm working merging back upstream, let's check later.

See also unrs/rspack-resolver#15 and unrs/rspack-resolver#18

image

Performance is even better!

@SukkaW
Copy link
Collaborator

SukkaW commented Mar 18, 2025

I'm working merging back upstream, let's check later.

Also, we could provide a WASM build for any uncommon target.

@JounQin
Copy link
Collaborator Author

JounQin commented Mar 18, 2025

Also, we could provide a WASM build for any uncommon target.

There is indeed @unrs/rspack-resolver-binding-wasm32-wasi

@eaibmz Can you provide more error details?

@eaibmz
Copy link

eaibmz commented Mar 18, 2025

Also, we could provide a WASM build for any uncommon target.

There is indeed @unrs/rspack-resolver-binding-wasm32-wasi

@eaibmz Can you provide more error details?

is this enough:

> lint

> npx eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Failed to load native binding

Occurred while linting /home/jenkins/linux-ci/workspace/Linux_CI_master_2/ci/nodejs/webui/app/ciql2sql.ts:1

Rule: "import/namespace"

    at Object.<anonymous> (/home/jenkins/linux-ci/workspace/Linux_CI_master_2/ci/nodejs/webui/node_modules/rspack-resolver/index.js:368:11)

    at Module._compile (node:internal/modules/cjs/loader:1546:14)

    at Module._extensions..js (node:internal/modules/cjs/loader:1689:10)

    at Module.load (node:internal/modules/cjs/loader:1318:32)

    at Module._load (node:internal/modules/cjs/loader:1128:12)

    at TracingChannel.traceSync (node:diagnostics_channel:315:14)

    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)

    at Module.require (node:internal/modules/cjs/loader:1340:12)

    at require (node:internal/modules/helpers:141:16)

    at Object.<anonymous> (/home/jenkins/linux-ci/workspace/Linux_CI_master_2/ci/nodejs/webui/node_modules/eslint-import-resolver-typescript/lib/index.cjs:10:22)

script returned exit code 2

@JounQin
Copy link
Collaborator Author

JounQin commented Mar 18, 2025

@eaibmz Would you like to help trying out:

# yarn 1
yarn add https://pkg.csb.dev/import-js/eslint-import-resolver-typescript/commit/6a368d69/eslint-import-resolver-typescript
# yarn 2, 3
yarn add eslint-import-resolver-typescript@https://pkg.csb.dev/import-js/eslint-import-resolver-typescript/commit/6a368d69/eslint-import-resolver-typescript/_pkg.tgz
# npm
npm i https://pkg.csb.dev/import-js/eslint-import-resolver-typescript/commit/6a368d69/eslint-import-resolver-typescript

@eaibmz
Copy link

eaibmz commented Mar 18, 2025

npm i https://pkg.csb.dev/import-js/eslint-import-resolver-typescript/commit/6a368d69/eslint-import-resolver-typescript

hmm, didn't help, same error

# grep 'eslint-import-resolver-typescript' package.json
    "eslint-import-resolver-typescript": "https://pkg.csb.dev/import-js/eslint-import-resolver-typescript/commit/6a368d69/eslint-import-resolver-typescript",

# grep 'eslint-import-resolver-typescript' package-lock.json
        "eslint-import-resolver-typescript": "https://pkg.csb.dev/import-js/eslint-import-resolver-typescript/commit/6a368d69/eslint-import-resolver-typescript",
    "node_modules/eslint-import-resolver-typescript": {
      "resolved": "https://pkg.csb.dev/import-js/eslint-import-resolver-typescript/commit/6a368d69/eslint-import-resolver-typescript",

renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 18, 2025
| datasource | package                           | from  | to    |
| ---------- | --------------------------------- | ----- | ----- |
| npm        | eslint-import-resolver-typescript | 3.9.1 | 4.2.1 |


## [v4.2.1](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#421)

##### Patch Changes

-   [#394](import-js/eslint-import-resolver-typescript#394) [`9f11f6b`](import-js/eslint-import-resolver-typescript@9f11f6b) Thanks [@JounQin](https://github.com/JounQin)! - fix: don't set empty `configFile` when no `tsconfig` found

-   [#394](import-js/eslint-import-resolver-typescript#394) [`9f11f6b`](import-js/eslint-import-resolver-typescript@9f11f6b) Thanks [@JounQin](https://github.com/JounQin)! - chore: bump `rspack-resolver` to v1.2.0


## [v4.2.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#420)

##### Minor Changes

-   [#391](import-js/eslint-import-resolver-typescript#391) [`c8121e5`](import-js/eslint-import-resolver-typescript@c8121e5) Thanks [@JounQin](https://github.com/JounQin)! - feat: make `is-bun-module` as optional peer dependency

    Technically this is a BREAKING CHANGE, but considering we just raise out v4 recently and this only affects `bun` users, `bun --bun eslint` even works without this dependency, so I'd consider this as a minor change.

    So for `bun` users, there are three options:

    1.  install `is-bun-module` dependency manually and use `bun: true` option
    2.  run `eslint` with `bun --bun eslint` w/o `bun: true` option
    3.  enable `run#bun` in [`bunfig.toml`](https://bun.sh/docs/runtime/bunfig#run-bun-auto-alias-node-to-bun) w/o `bun: true` option


## [v4.1.1](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#411)

##### Patch Changes

-   [#389](import-js/eslint-import-resolver-typescript#389) [`1b97d8a`](import-js/eslint-import-resolver-typescript@1b97d8a) Thanks [@JounQin](https://github.com/JounQin)! - fix: should prefer `module.isBuiltin` when `process.versions.bun` available


## [v4.1.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#410)

##### Minor Changes

-   [#387](import-js/eslint-import-resolver-typescript#387) [`ef5cd10`](import-js/eslint-import-resolver-typescript@ef5cd10) Thanks [@JounQin](https://github.com/JounQin)! - feat: add a new `bun?: boolean` option for `bun` users - close [#386](import-js/eslint-import-resolver-typescript#386)

    `process.versions.bun` is unavailable even with `bun eslint` due to its own design,
    but checking `bun` modules for non-bun users is incorrect behavior and just wasting time,
    so a new option is added for such case, you can still run with `bun --bun eslint` without this option enabled


## [v4.0.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#400)

##### Major Changes

-   [#368](import-js/eslint-import-resolver-typescript#368) [`2fd7c2e`](import-js/eslint-import-resolver-typescript@2fd7c2e) Thanks [@JounQin](https://github.com/JounQin)! - feat!: rewrite, speed up by using [`rspack-resolver`](https://github.com/unrs/rspack-resolver) which supports `references` natively under the hood

    BREAKING CHANGES:

    -   drop Node 14 support, Node `^16.17.0 || >=18.6` is now required
    -   `alwaysTryTypes` is enabled by default, you can set it as `false` to opt-out
    -   array type of `project` is discouraged but still supported, single `project` with `references` are encouraged for better performance, you can enable `noWarnOnMultipleProjects` option to supress the warning message
    -   root `tsconfig.json` or `jsconfig.json` will be used automatically if no `project` provided
@JounQin
Copy link
Collaborator Author

JounQin commented Mar 21, 2025

@eaibmz Can you open a new issue for this?

And help us to debug what error exactly thrown with.

https://app.unpkg.com/[email protected]/files/index.js

For example: process.platform, process.arch, loadErrors.

renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 21, 2025
| datasource | package                           | from  | to    |
| ---------- | --------------------------------- | ----- | ----- |
| npm        | eslint-import-resolver-typescript | 3.9.1 | 4.2.2 |


## [v4.2.2](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#422)

##### Patch Changes

-   [#397](import-js/eslint-import-resolver-typescript#397) [`14a7688`](import-js/eslint-import-resolver-typescript@14a7688) Thanks [@JounQin](https://github.com/JounQin)! - chore: bump `rspack-resolver` for better P'n'P support

    Now `rspack-resolver` resolves `pnpapi` natively.


## [v4.2.1](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#421)

##### Patch Changes

-   [#394](import-js/eslint-import-resolver-typescript#394) [`9f11f6b`](import-js/eslint-import-resolver-typescript@9f11f6b) Thanks [@JounQin](https://github.com/JounQin)! - fix: don't set empty `configFile` when no `tsconfig` found

-   [#394](import-js/eslint-import-resolver-typescript#394) [`9f11f6b`](import-js/eslint-import-resolver-typescript@9f11f6b) Thanks [@JounQin](https://github.com/JounQin)! - chore: bump `rspack-resolver` to v1.2.0


## [v4.2.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#420)

##### Minor Changes

-   [#391](import-js/eslint-import-resolver-typescript#391) [`c8121e5`](import-js/eslint-import-resolver-typescript@c8121e5) Thanks [@JounQin](https://github.com/JounQin)! - feat: make `is-bun-module` as optional peer dependency

    Technically this is a BREAKING CHANGE, but considering we just raise out v4 recently and this only affects `bun` users, `bun --bun eslint` even works without this dependency, so I'd consider this as a minor change.

    So for `bun` users, there are three options:

    1.  install `is-bun-module` dependency manually and use `bun: true` option
    2.  run `eslint` with `bun --bun eslint` w/o `bun: true` option
    3.  enable `run#bun` in [`bunfig.toml`](https://bun.sh/docs/runtime/bunfig#run-bun-auto-alias-node-to-bun) w/o `bun: true` option


## [v4.1.1](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#411)

##### Patch Changes

-   [#389](import-js/eslint-import-resolver-typescript#389) [`1b97d8a`](import-js/eslint-import-resolver-typescript@1b97d8a) Thanks [@JounQin](https://github.com/JounQin)! - fix: should prefer `module.isBuiltin` when `process.versions.bun` available


## [v4.1.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#410)

##### Minor Changes

-   [#387](import-js/eslint-import-resolver-typescript#387) [`ef5cd10`](import-js/eslint-import-resolver-typescript@ef5cd10) Thanks [@JounQin](https://github.com/JounQin)! - feat: add a new `bun?: boolean` option for `bun` users - close [#386](import-js/eslint-import-resolver-typescript#386)

    `process.versions.bun` is unavailable even with `bun eslint` due to its own design,
    but checking `bun` modules for non-bun users is incorrect behavior and just wasting time,
    so a new option is added for such case, you can still run with `bun --bun eslint` without this option enabled


## [v4.0.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#400)

##### Major Changes

-   [#368](import-js/eslint-import-resolver-typescript#368) [`2fd7c2e`](import-js/eslint-import-resolver-typescript@2fd7c2e) Thanks [@JounQin](https://github.com/JounQin)! - feat!: rewrite, speed up by using [`rspack-resolver`](https://github.com/unrs/rspack-resolver) which supports `references` natively under the hood

    BREAKING CHANGES:

    -   drop Node 14 support, Node `^16.17.0 || >=18.6` is now required
    -   `alwaysTryTypes` is enabled by default, you can set it as `false` to opt-out
    -   array type of `project` is discouraged but still supported, single `project` with `references` are encouraged for better performance, you can enable `noWarnOnMultipleProjects` option to supress the warning message
    -   root `tsconfig.json` or `jsconfig.json` will be used automatically if no `project` provided
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 21, 2025
| datasource | package                           | from  | to    |
| ---------- | --------------------------------- | ----- | ----- |
| npm        | eslint-import-resolver-typescript | 3.9.1 | 4.2.2 |


## [v4.2.2](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#422)

##### Patch Changes

-   [#397](import-js/eslint-import-resolver-typescript#397) [`14a7688`](import-js/eslint-import-resolver-typescript@14a7688) Thanks [@JounQin](https://github.com/JounQin)! - chore: bump `rspack-resolver` for better P'n'P support

    Now `rspack-resolver` resolves `pnpapi` natively.


## [v4.2.1](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#421)

##### Patch Changes

-   [#394](import-js/eslint-import-resolver-typescript#394) [`9f11f6b`](import-js/eslint-import-resolver-typescript@9f11f6b) Thanks [@JounQin](https://github.com/JounQin)! - fix: don't set empty `configFile` when no `tsconfig` found

-   [#394](import-js/eslint-import-resolver-typescript#394) [`9f11f6b`](import-js/eslint-import-resolver-typescript@9f11f6b) Thanks [@JounQin](https://github.com/JounQin)! - chore: bump `rspack-resolver` to v1.2.0


## [v4.2.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#420)

##### Minor Changes

-   [#391](import-js/eslint-import-resolver-typescript#391) [`c8121e5`](import-js/eslint-import-resolver-typescript@c8121e5) Thanks [@JounQin](https://github.com/JounQin)! - feat: make `is-bun-module` as optional peer dependency

    Technically this is a BREAKING CHANGE, but considering we just raise out v4 recently and this only affects `bun` users, `bun --bun eslint` even works without this dependency, so I'd consider this as a minor change.

    So for `bun` users, there are three options:

    1.  install `is-bun-module` dependency manually and use `bun: true` option
    2.  run `eslint` with `bun --bun eslint` w/o `bun: true` option
    3.  enable `run#bun` in [`bunfig.toml`](https://bun.sh/docs/runtime/bunfig#run-bun-auto-alias-node-to-bun) w/o `bun: true` option


## [v4.1.1](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#411)

##### Patch Changes

-   [#389](import-js/eslint-import-resolver-typescript#389) [`1b97d8a`](import-js/eslint-import-resolver-typescript@1b97d8a) Thanks [@JounQin](https://github.com/JounQin)! - fix: should prefer `module.isBuiltin` when `process.versions.bun` available


## [v4.1.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#410)

##### Minor Changes

-   [#387](import-js/eslint-import-resolver-typescript#387) [`ef5cd10`](import-js/eslint-import-resolver-typescript@ef5cd10) Thanks [@JounQin](https://github.com/JounQin)! - feat: add a new `bun?: boolean` option for `bun` users - close [#386](import-js/eslint-import-resolver-typescript#386)

    `process.versions.bun` is unavailable even with `bun eslint` due to its own design,
    but checking `bun` modules for non-bun users is incorrect behavior and just wasting time,
    so a new option is added for such case, you can still run with `bun --bun eslint` without this option enabled


## [v4.0.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#400)

##### Major Changes

-   [#368](import-js/eslint-import-resolver-typescript#368) [`2fd7c2e`](import-js/eslint-import-resolver-typescript@2fd7c2e) Thanks [@JounQin](https://github.com/JounQin)! - feat!: rewrite, speed up by using [`rspack-resolver`](https://github.com/unrs/rspack-resolver) which supports `references` natively under the hood

    BREAKING CHANGES:

    -   drop Node 14 support, Node `^16.17.0 || >=18.6` is now required
    -   `alwaysTryTypes` is enabled by default, you can set it as `false` to opt-out
    -   array type of `project` is discouraged but still supported, single `project` with `references` are encouraged for better performance, you can enable `noWarnOnMultipleProjects` option to supress the warning message
    -   root `tsconfig.json` or `jsconfig.json` will be used automatically if no `project` provided
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 22, 2025
| datasource | package                           | from  | to    |
| ---------- | --------------------------------- | ----- | ----- |
| npm        | eslint-import-resolver-typescript | 3.9.1 | 4.2.2 |


## [v4.2.2](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#422)

##### Patch Changes

-   [#397](import-js/eslint-import-resolver-typescript#397) [`14a7688`](import-js/eslint-import-resolver-typescript@14a7688) Thanks [@JounQin](https://github.com/JounQin)! - chore: bump `rspack-resolver` for better P'n'P support

    Now `rspack-resolver` resolves `pnpapi` natively.


## [v4.2.1](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#421)

##### Patch Changes

-   [#394](import-js/eslint-import-resolver-typescript#394) [`9f11f6b`](import-js/eslint-import-resolver-typescript@9f11f6b) Thanks [@JounQin](https://github.com/JounQin)! - fix: don't set empty `configFile` when no `tsconfig` found

-   [#394](import-js/eslint-import-resolver-typescript#394) [`9f11f6b`](import-js/eslint-import-resolver-typescript@9f11f6b) Thanks [@JounQin](https://github.com/JounQin)! - chore: bump `rspack-resolver` to v1.2.0


## [v4.2.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#420)

##### Minor Changes

-   [#391](import-js/eslint-import-resolver-typescript#391) [`c8121e5`](import-js/eslint-import-resolver-typescript@c8121e5) Thanks [@JounQin](https://github.com/JounQin)! - feat: make `is-bun-module` as optional peer dependency

    Technically this is a BREAKING CHANGE, but considering we just raise out v4 recently and this only affects `bun` users, `bun --bun eslint` even works without this dependency, so I'd consider this as a minor change.

    So for `bun` users, there are three options:

    1.  install `is-bun-module` dependency manually and use `bun: true` option
    2.  run `eslint` with `bun --bun eslint` w/o `bun: true` option
    3.  enable `run#bun` in [`bunfig.toml`](https://bun.sh/docs/runtime/bunfig#run-bun-auto-alias-node-to-bun) w/o `bun: true` option


## [v4.1.1](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#411)

##### Patch Changes

-   [#389](import-js/eslint-import-resolver-typescript#389) [`1b97d8a`](import-js/eslint-import-resolver-typescript@1b97d8a) Thanks [@JounQin](https://github.com/JounQin)! - fix: should prefer `module.isBuiltin` when `process.versions.bun` available


## [v4.1.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#410)

##### Minor Changes

-   [#387](import-js/eslint-import-resolver-typescript#387) [`ef5cd10`](import-js/eslint-import-resolver-typescript@ef5cd10) Thanks [@JounQin](https://github.com/JounQin)! - feat: add a new `bun?: boolean` option for `bun` users - close [#386](import-js/eslint-import-resolver-typescript#386)

    `process.versions.bun` is unavailable even with `bun eslint` due to its own design,
    but checking `bun` modules for non-bun users is incorrect behavior and just wasting time,
    so a new option is added for such case, you can still run with `bun --bun eslint` without this option enabled


## [v4.0.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#400)

##### Major Changes

-   [#368](import-js/eslint-import-resolver-typescript#368) [`2fd7c2e`](import-js/eslint-import-resolver-typescript@2fd7c2e) Thanks [@JounQin](https://github.com/JounQin)! - feat!: rewrite, speed up by using [`rspack-resolver`](https://github.com/unrs/rspack-resolver) which supports `references` natively under the hood

    BREAKING CHANGES:

    -   drop Node 14 support, Node `^16.17.0 || >=18.6` is now required
    -   `alwaysTryTypes` is enabled by default, you can set it as `false` to opt-out
    -   array type of `project` is discouraged but still supported, single `project` with `references` are encouraged for better performance, you can enable `noWarnOnMultipleProjects` option to supress the warning message
    -   root `tsconfig.json` or `jsconfig.json` will be used automatically if no `project` provided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment