Skip to content

Commit cf5d67f

Browse files
authored
Fix CJS import to make it compatible with ESM projects (#241)
Fix CJS import to make it compatible with ESM projects
1 parent 7b6bfc3 commit cf5d67f

File tree

4 files changed

+30
-83
lines changed

4 files changed

+30
-83
lines changed

.changeset/curly-scissors-build.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'eslint-import-resolver-typescript': patch
3+
---
4+
5+
Fix CJS import to make it compatible with ESM projects

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"funding": "https://opencollective.com/unts/projects/eslint-import-resolver-ts",
1212
"license": "ISC",
13-
"packageManager": "pnpm@8.0.0",
13+
"packageManager": "pnpm@8.7.6",
1414
"engines": {
1515
"node": "^14.18.0 || >=16.0.0"
1616
},

pnpm-lock.yaml

+21-81
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import debug from 'debug'
55
import type { FileSystem, ResolveOptions, Resolver } from 'enhanced-resolve'
66
import enhancedResolve from 'enhanced-resolve'
77
import { hashObject } from 'eslint-module-utils/hash.js'
8-
import { sync as globSync } from 'fast-glob'
8+
import fg from 'fast-glob'
99
import { createPathsMatcher, getTsconfig } from 'get-tsconfig'
1010
import type { TsConfigResult } from 'get-tsconfig'
1111
import isCore from 'is-core-module'
1212
import isGlob from 'is-glob'
1313

14+
const { globSync } = fg
15+
1416
const IMPORTER_NAME = 'eslint-import-resolver-typescript'
1517

1618
const log = debug(IMPORTER_NAME)

0 commit comments

Comments
 (0)