Skip to content

Commit e6106c4

Browse files
committed
Merge branch 'master' into barrel-files
2 parents e908191 + a3aae61 commit e6106c4

File tree

8 files changed

+28
-15
lines changed

8 files changed

+28
-15
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"eslint-plugin-import-x": patch
3+
---
4+
5+
fix(deps): replace type-fest with @package-json/types
6+
7+
PackageJson types are imported in published declaration files (lib/rules/no-extraneous-dependencies.d.ts and lib/utils/read-pkg-up.d.ts), which causes TypeScript compilation errors for consumers who don't have skipLibCheck enabled. Replacing type-fest with the smaller @package-json/types package ensures the types are available to all consumers while reducing bundle size.

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
- 18
2222
- 20
2323
- 22
24-
- 24
24+
# https://github.com/nodejs/node/issues/59480
25+
- 24.5
2526
eslint:
2627
- 8.56
2728
- 8

.github/workflows/release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ jobs:
3030
with:
3131
node-version: lts/*
3232
cache: yarn
33-
env:
34-
# https://github.com/actions/setup-node/issues/531#issuecomment-1819151412
35-
SKIP_YARN_COREPACK_CHECK: 1
33+
34+
- name: Upgrade npm
35+
run: npm install -g npm@latest
3636

3737
- name: Install Dependencies
3838
run: yarn --immutable
@@ -50,5 +50,3 @@ jobs:
5050
publish: yarn release
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
NPM_CONFIG_PROVENANCE: true
54-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
}
7676
},
7777
"dependencies": {
78+
"@package-json/types": "^0.0.12",
7879
"@typescript-eslint/types": "^8.35.0",
7980
"comment-parser": "^1.4.1",
8081
"debug": "^4.4.1",
@@ -161,7 +162,6 @@
161162
"tmp": "^0.2.3",
162163
"ts-node": "^10.9.2",
163164
"tsdown": "^0.12.9",
164-
"type-fest": "^4.41.0",
165165
"typescript": "^5.8.3",
166166
"typescript-eslint": "^8.35.0",
167167
"yarn-berry-deduplicate": "^6.1.3"

src/rules/no-duplicates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { PackageJson } from '@package-json/types'
12
import type { TSESLint, TSESTree } from '@typescript-eslint/utils'
23
import * as semver from 'semver'
3-
import type { PackageJson } from 'type-fest'
44

55
import { cjsRequire } from '../require.js'
66
import type { RuleContext } from '../types.js'

src/rules/no-extraneous-dependencies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import fs from 'node:fs'
22
import path from 'node:path'
33

4+
import type { PackageJson } from '@package-json/types'
45
import type { TSESTree } from '@typescript-eslint/utils'
56
import { minimatch } from 'minimatch'
6-
import type { PackageJson } from 'type-fest'
77

88
import type { RuleContext } from '../types.js'
99
import {

src/utils/read-pkg-up.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from 'node:fs'
22

3-
import type { PackageJson } from 'type-fest'
3+
import type { PackageJson } from '@package-json/types'
44

55
import { pkgUp } from './pkg-up.js'
66

yarn.lock

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3142,6 +3142,13 @@ __metadata:
31423142
languageName: node
31433143
linkType: hard
31443144

3145+
"@package-json/types@npm:^0.0.12":
3146+
version: 0.0.12
3147+
resolution: "@package-json/types@npm:0.0.12"
3148+
checksum: 10c0/d9bba086efe7b9901f02f1cff7a68ab23269aeddfb7ee92a16930e219f705bfc188b9fec2dd47265033dbda45ed1514d8a46f46363f38f1ad56bc993754126da
3149+
languageName: node
3150+
linkType: hard
3151+
31453152
"@pkgjs/parseargs@npm:^0.11.0":
31463153
version: 0.11.0
31473154
resolution: "@pkgjs/parseargs@npm:0.11.0"
@@ -6102,6 +6109,7 @@ __metadata:
61026109
"@commitlint/cli": "npm:^19.8.1"
61036110
"@eslint/import-test-order-redirect-scoped": "link:./test/fixtures/order-redirect-scoped"
61046111
"@eslint/js": "npm:^9.29.0"
6112+
"@package-json/types": "npm:^0.0.12"
61056113
"@swc-node/jest": "npm:^1.8.13"
61066114
"@swc/core": "npm:^1.12.7"
61076115
"@swc/helpers": "npm:^0.5.17"
@@ -6164,7 +6172,6 @@ __metadata:
61646172
tmp: "npm:^0.2.3"
61656173
ts-node: "npm:^10.9.2"
61666174
tsdown: "npm:^0.12.9"
6167-
type-fest: "npm:^4.41.0"
61686175
typescript: "npm:^5.8.3"
61696176
typescript-eslint: "npm:^8.35.0"
61706177
unrs-resolver: "npm:^1.9.2"
@@ -12469,9 +12476,9 @@ __metadata:
1246912476
linkType: hard
1247012477

1247112478
"tmp@npm:^0.2.3":
12472-
version: 0.2.3
12473-
resolution: "tmp@npm:0.2.3"
12474-
checksum: 10c0/3e809d9c2f46817475b452725c2aaa5d11985cf18d32a7a970ff25b568438e2c076c2e8609224feef3b7923fa9749b74428e3e634f6b8e520c534eef2fd24125
12479+
version: 0.2.5
12480+
resolution: "tmp@npm:0.2.5"
12481+
checksum: 10c0/cee5bb7d674bb4ba3ab3f3841c2ca7e46daeb2109eec395c1ec7329a91d52fcb21032b79ac25161a37b2565c4858fefab927af9735926a113ef7bac9091a6e0e
1247512482
languageName: node
1247612483
linkType: hard
1247712484

@@ -12684,7 +12691,7 @@ __metadata:
1268412691
languageName: node
1268512692
linkType: hard
1268612693

12687-
"type-fest@npm:^4.0.0, type-fest@npm:^4.18.2, type-fest@npm:^4.41.0":
12694+
"type-fest@npm:^4.0.0, type-fest@npm:^4.18.2":
1268812695
version: 4.41.0
1268912696
resolution: "type-fest@npm:4.41.0"
1269012697
checksum: 10c0/f5ca697797ed5e88d33ac8f1fec21921839871f808dc59345c9cf67345bfb958ce41bd821165dbf3ae591cedec2bf6fe8882098dfdd8dc54320b859711a2c1e4

0 commit comments

Comments
 (0)