Skip to content

Commit b5ea367

Browse files
SukkaWJounQin
andauthored
refactor: drop globby and synckit (#235)
Co-authored-by: JounQin <admin@1stg.me>
1 parent 71b23a2 commit b5ea367

File tree

5 files changed

+28
-48
lines changed

5 files changed

+28
-48
lines changed

.changeset/witty-pets-study.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-import-resolver-typescript": minor
3+
---
4+
5+
refactor: drop `globby` and `synckit`

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@
6969
"debug": "^4.3.4",
7070
"enhanced-resolve": "^5.12.0",
7171
"eslint-module-utils": "^2.7.4",
72+
"fast-glob": "^3.3.1",
7273
"get-tsconfig": "^4.5.0",
73-
"globby": "^13.1.3",
7474
"is-core-module": "^2.11.0",
75-
"is-glob": "^4.0.3",
76-
"synckit": "^0.8.5"
75+
"is-glob": "^4.0.3"
7776
},
7877
"devDependencies": {
7978
"@1stg/lib-config": "^11.0.1",

pnpm-lock.yaml

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

src/index.ts

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
11
import fs from 'node:fs'
22
import path from 'node:path'
3-
import { fileURLToPath } from 'node:url'
43

54
import debug from 'debug'
65
import type { FileSystem, ResolveOptions, Resolver } from 'enhanced-resolve'
76
import enhancedResolve from 'enhanced-resolve'
87
import { hashObject } from 'eslint-module-utils/hash.js'
8+
import { sync as globSync } 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'
13-
import { createSyncFn } from 'synckit'
1413

1514
const IMPORTER_NAME = 'eslint-import-resolver-typescript'
1615

1716
const log = debug(IMPORTER_NAME)
1817

19-
const _dirname =
20-
typeof __dirname === 'undefined'
21-
? path.dirname(fileURLToPath(import.meta.url))
22-
: __dirname
23-
24-
export const globSync = createSyncFn<typeof import('globby').globby>(
25-
path.resolve(_dirname, 'worker.mjs'),
26-
)
27-
2818
export const defaultConditionNames = [
2919
'types',
3020
'import',

src/worker.mts

-12
This file was deleted.

0 commit comments

Comments
 (0)