Skip to content

Commit

Permalink
refactor: drop globby and synckit (#235)
Browse files Browse the repository at this point in the history
Co-authored-by: JounQin <[email protected]>
  • Loading branch information
SukkaW and JounQin authored Aug 8, 2023
1 parent 71b23a2 commit b5ea367
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 48 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-pets-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-import-resolver-typescript": minor
---

refactor: drop `globby` and `synckit`
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@
"debug": "^4.3.4",
"enhanced-resolve": "^5.12.0",
"eslint-module-utils": "^2.7.4",
"fast-glob": "^3.3.1",
"get-tsconfig": "^4.5.0",
"globby": "^13.1.3",
"is-core-module": "^2.11.0",
"is-glob": "^4.0.3",
"synckit": "^0.8.5"
"is-glob": "^4.0.3"
},
"devDependencies": {
"@1stg/lib-config": "^11.0.1",
Expand Down
42 changes: 20 additions & 22 deletions pnpm-lock.yaml

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

12 changes: 1 addition & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

import debug from 'debug'
import type { FileSystem, ResolveOptions, Resolver } from 'enhanced-resolve'
import enhancedResolve from 'enhanced-resolve'
import { hashObject } from 'eslint-module-utils/hash.js'
import { sync as globSync } from 'fast-glob'
import { createPathsMatcher, getTsconfig } from 'get-tsconfig'
import type { TsConfigResult } from 'get-tsconfig'
import isCore from 'is-core-module'
import isGlob from 'is-glob'
import { createSyncFn } from 'synckit'

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

const log = debug(IMPORTER_NAME)

const _dirname =
typeof __dirname === 'undefined'
? path.dirname(fileURLToPath(import.meta.url))
: __dirname

export const globSync = createSyncFn<typeof import('globby').globby>(
path.resolve(_dirname, 'worker.mjs'),
)

export const defaultConditionNames = [
'types',
'import',
Expand Down
12 changes: 0 additions & 12 deletions src/worker.mts

This file was deleted.

0 comments on commit b5ea367

Please sign in to comment.