Skip to content

fix: require entry types, add module-sync entry #417

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

Merged
merged 5 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gold-rabbits-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-import-resolver-typescript": patch
---

fix: `require` entry types, add `module-sync` entry
5 changes: 1 addition & 4 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"node": "18",
"sandboxes": [],
"packages": [
"."
]
"sandboxes": []
}
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
id-token: write
pull-requests: write

jobs:
release:
name: Release
Expand Down
3 changes: 3 additions & 0 deletions index.d.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import * as eslintImportResolverTypeScript from './lib/index.js'

export = eslintImportResolverTypeScript
25 changes: 17 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
],
"funding": "https://opencollective.com/eslint-import-resolver-typescript",
"license": "ISC",
"workspaces": [
".",
"tests/nestedPackageJson"
],
"packageManager": "[email protected]",
"engines": {
"node": "^16.17.0 || >=18.6.0"
Expand All @@ -22,9 +18,22 @@
"module": "lib/index.js",
"exports": {
".": {
"types": "./lib/index.d.ts",
"require": "./lib/index.cjs",
"default": "./lib/index.js"
"import": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"module-sync": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"require": {
"types": "./index.d.cts",
"default": "./lib/index.cjs"
},
"default": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
}
},
"./package.json": "./package.json"
},
Expand All @@ -48,7 +57,7 @@
"lint": "run-p 'lint:*'",
"lint:es": "eslint . --cache",
"lint:tsc": "tsc -b --noEmit",
"prepare": "simple-git-hooks && yarn-berry-deduplicate || exit 0",
"prepare": "simple-git-hooks && yarn-berry-deduplicate && cd tests/nestedPackageJson && yarn || exit 0",
"release": "clean-pkg-json && changeset publish",
"test": "run-p 'test:*'",
"test:absoluteAlias": "yarn eslint --ext ts,tsx tests/absoluteAlias",
Expand Down
1 change: 0 additions & 1 deletion tests/importXResolverV3/eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const absoluteGlobPath = path.join(__dirname, globPattern)
const base = require('../base.eslintrc.cjs')()

module.exports =
// eslint-disable-next-line no-magic-numbers -- don't run on node 16 because lacking of `structuredClone`
+process.versions.node.split('.')[0] <= 16
? {}
: {
Expand Down
55 changes: 55 additions & 0 deletions tests/nestedPackageJson/yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution!

__metadata:
version: 8
cacheKey: 10

"@atlaskit/pragmatic-drag-and-drop@npm:^1.5.2":
version: 1.5.2
resolution: "@atlaskit/pragmatic-drag-and-drop@npm:1.5.2"
dependencies:
"@babel/runtime": "npm:^7.0.0"
bind-event-listener: "npm:^3.0.0"
raf-schd: "npm:^4.0.3"
checksum: 10/85009e9f819e8a6431632f4eff83b5f5928c708f51730d22590585600e000d26686cb03bb7a8e89a4f838e8d631786d81d82c71620f5c6d5d33ca51a205010c8
languageName: node
linkType: hard

"@babel/runtime@npm:^7.0.0":
version: 7.27.0
resolution: "@babel/runtime@npm:7.27.0"
dependencies:
regenerator-runtime: "npm:^0.14.0"
checksum: 10/e6966e03b695feb4c0ac0856a4355231c2580bf9ebd0298f47739f85c0ea658679dd84409daf26378d42c86c1cbe7e33feab709b14e784254b6c441d91606465
languageName: node
linkType: hard

"bind-event-listener@npm:^3.0.0":
version: 3.0.0
resolution: "bind-event-listener@npm:3.0.0"
checksum: 10/3d442307ee906b79f041433b065e7b259bd1e5231a74519271cc5beb485f7c469609da9c7f20fdd0b3ab340e4691fee826b76d003c71cf5ad955186aba5c256e
languageName: node
linkType: hard

"nested-package-json@workspace:.":
version: 0.0.0-use.local
resolution: "nested-package-json@workspace:."
dependencies:
"@atlaskit/pragmatic-drag-and-drop": "npm:^1.5.2"
languageName: unknown
linkType: soft

"raf-schd@npm:^4.0.3":
version: 4.0.3
resolution: "raf-schd@npm:4.0.3"
checksum: 10/45514041c5ad31fa96aef3bb3c572a843b92da2f2cd1cb4a47c9ad58e48761d3a4126e18daa32b2bfa0bc2551a42d8f324a0e40e536cb656969929602b4e8b58
languageName: node
linkType: hard

"regenerator-runtime@npm:^0.14.0":
version: 0.14.1
resolution: "regenerator-runtime@npm:0.14.1"
checksum: 10/5db3161abb311eef8c45bcf6565f4f378f785900ed3945acf740a9888c792f75b98ecb77f0775f3bf95502ff423529d23e94f41d80c8256e8fa05ed4b07cf471
languageName: node
linkType: hard
21 changes: 11 additions & 10 deletions tests/pnp/.pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/pnp/.pnp.loader.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading