From 7f798e13a5eabe238dde63ffa718a8bc421bc667 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:02:36 +0000 Subject: [PATCH] fix(deps): update dependency eslint-plugin-import-x to v4.6.0 ##### [v4.6.0](https://github.com/un-ts/eslint-plugin-import-x/blob/HEAD/CHANGELOG.md#460) ##### Minor Changes - [#209](https://github.com/un-ts/eslint-plugin-import-x/pull/209) [`46d2360`](https://github.com/un-ts/eslint-plugin-import-x/commit/46d2360f5ebfbd79e74a0828ac7e280973510454) Thanks [@SukkaW](https://github.com/SukkaW)! - When `eslint-plugin-import-x` was forked from `eslint-plugin-import`, we copied over the default resolver (which is `eslint-import-resolver-node`) as well. However, this resolver doesn't supports `exports` in the `package.json` file, and the current maintainer of the `eslint-import-resolver-node` (ljharb) doesn't have the time implementing this feature and he locked the issue https://github.com/import-js/eslint-plugin-import/issues/1810. So we decided to implement our own resolver that "just works". The new resolver is built upon the [`enhanced-resolve`](https://www.npmjs.com/package/enhanced-resolve) that implements the full Node.js [Resolver Algorithm](https://nodejs.org/dist/v14.21.3/docs/api/esm.html#esm_resolver_algorithm). The new resolver only implements the import resolver interface v3, which means you can only use it with ESLint Flat config. For more details about the import resolver interface v3, please check out [#192](https://github.com/un-ts/eslint-plugin-import-x/pull/192). In the next major version of `eslint-plugin-import-x`, we will remove the `eslint-import-resolver-node` and use this new resolver by default. In the meantime, you can try out this new resolver by setting the `import-x/resolver-next` option in your `eslint.config.js` file: ```js // eslint.config.js const eslintPluginImportX = require('eslint-plugin-import-x'); const { createNodeResolver } = eslintPluginImportX; module.exports = { plugins: { 'import-x': eslintPluginImportX, }, settings: { 'import-x/resolver-next': [ // This is the new resolver we are introducing createNodeResolver({ /** * The allowed extensions the resolver will attempt to find when resolving a module * By default it uses a relaxed extension list to search for both ESM and CJS modules * You can customize this list to fit your needs * * @default ['.mjs', '.cjs', '.js', '.json', '.node'] */ extensions?: string[]; /** * Optional, the import conditions the resolver will used when reading the exports map from "package.json" * By default it uses a relaxed condition list to search for both ESM and CJS modules * You can customize this list to fit your needs * * @default ['default', 'module', 'import', 'require'] */ conditions: ['default', 'module', 'import', 'require'], // You can pass more options here, see the enhanced-resolve documentation for more details // https://github.com/webpack/enhanced-resolve/tree/v5.17.1?tab=readme-ov-file#resolver-options }), // you can add more resolvers down below require('eslint-import-resolver-typescript').createTypeScriptImportResolver( /** options of eslint-import-resolver-typescript */ ) ], }, }; ``` We do not plan to implement reading `baseUrl` and `paths` from the `tsconfig.json` file in this resolver. If you need this feature, please checkout [eslint-import-resolver-typescript](https://www.npmjs.com/package/eslint-import-resolver-typescript) (also powered by `enhanced-resolve`), [eslint-import-resolver-oxc](https://www.npmjs.com/package/eslint-import-resolver-oxc) (powered by `oxc-resolver`), [eslint-import-resolver-next](https://www.npmjs.com/package/eslint-import-resolver-next) (also powered by `oxc-resolver`), or other similar resolvers. ##### Patch Changes - [#206](https://github.com/un-ts/eslint-plugin-import-x/pull/206) [`449738f`](https://github.com/un-ts/eslint-plugin-import-x/commit/449738f4f4b84ff24c2748cdc86185cff5840442) Thanks [@privatenumber](https://github.com/privatenumber)! - insert type prefix without new line --- pnpm-lock.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6b9456b..08e45a6a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -55,7 +55,7 @@ importers: version: 7.2.0(eslint@8.57.1)(typescript@5.7.2) eslint-plugin-import-x: specifier: ^4.0.0 - version: 4.5.1(eslint@8.57.1)(typescript@5.7.2) + version: 4.6.0(eslint@8.57.1)(typescript@5.7.2) eslint-plugin-jsx-a11y: specifier: ^6.8.0 version: 6.10.2(eslint@8.57.1) @@ -2010,8 +2010,8 @@ packages: typescript: optional: true - eslint-plugin-import-x@4.5.1: - resolution: {integrity: sha512-Wyut9jDeHdfZSebiWRmmOYDBov33M0ZZ3x9J/lD1v4M3nBgMNC02XH6Kq271pMxJWqctVRCjA+X5AQJZ2FezoQ==} + eslint-plugin-import-x@4.6.0: + resolution: {integrity: sha512-hDdeNZWnu5Kv/AUk0rf12Ub1yjLQTPvj38Ar4oipYuPo5gy2gonLcF0mCuOMlMgjT8+8A1KYug/IsxuMi8tSMQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -6121,7 +6121,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import-x@4.5.1(eslint@8.57.1)(typescript@5.7.2): + eslint-plugin-import-x@4.6.0(eslint@8.57.1)(typescript@5.7.2): dependencies: '@types/doctrine': 0.0.9 '@typescript-eslint/scope-manager': 8.18.1