Skip to content

Commit 6c0fe78

Browse files
committedSep 27, 2024
feat!: use Jiti v2, drop v1 support
1 parent 08d68f3 commit 6c0fe78

13 files changed

+958
-615
lines changed
 

‎README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,14 @@ Importing a TypeScript module with `importx`:
243243

244244
<!-- TABLE_START -->
245245

246-
> Generated with version `v0.4.2` at 2024-07-30T10:38:06.719Z
246+
> Generated with version `v0.4.4` at 2024-09-27T00:27:46.691Z
247247
248-
| | jiti-v1 |
249-
| ------- | --- |
250-
| node | Import: ❌<br>Cache: ❌<br>No cache: ❌<br>Deps: ❌<br>CTS Import: ✅<br>ESM/CJS Mixed: ❌<br>Const Enum: ❌<br>Import ESM Dep: ❌ |
248+
| | native | tsx | jiti | bundle-require |
249+
| ------- | --- | --- | --- | --- |
250+
| node | Import: ❌<br>Cache: ❌<br>No cache: ❌<br>Deps: ❌<br>CTS Import: ❌<br>ESM/CJS Mixed: ❌<br>Const Enum: ❌<br>Import ESM Dep: ❌ | Import: ✅<br>Cache: ✅<br>No cache: ✅<br>Deps: ✅<br>CTS Import: ✅<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ | Import: ✅<br>Cache: ✅<br>No cache: ✅<br>Deps: ✅<br>CTS Import: ✅<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ | Import: ✅<br>Cache: ❌<br>No cache: ✅<br>Deps: ✅<br>CTS Import: ❌<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ |
251+
| tsx | Import: ✅<br>Cache: ✅<br>No cache: ❌<br>Deps: ❌<br>CTS Import: ✅<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ | Import: ✅<br>Cache: ✅<br>No cache: ✅<br>Deps: ✅<br>CTS Import: ✅<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ | Import: ✅<br>Cache: ✅<br>No cache: ✅<br>Deps: ✅<br>CTS Import: ✅<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ | Import: ✅<br>Cache: ❌<br>No cache: ✅<br>Deps: ✅<br>CTS Import: ❌<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ |
252+
| deno | Import: ✅<br>Cache: ✅<br>No cache: ❌<br>Deps: ❌<br>CTS Import: ❌<br>ESM/CJS Mixed: ❌<br>Const Enum: ❌<br>Import ESM Dep: ✅ | Import: ❌<br>Cache: ❌<br>No cache: ❌<br>Deps: ❌<br>CTS Import: ❌<br>ESM/CJS Mixed: ❌<br>Const Enum: ❌<br>Import ESM Dep: ❌ | Import: ❌<br>Cache: ❌<br>No cache: ❌<br>Deps: ❌<br>CTS Import: ❌<br>ESM/CJS Mixed: ❌<br>Const Enum: ❌<br>Import ESM Dep: ❌ | Import: ✅<br>Cache: ❌<br>No cache: ✅<br>Deps: ✅<br>CTS Import: ❌<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ |
253+
| bun | Import: ✅<br>Cache: ✅<br>No cache: ❌<br>Deps: ❌<br>CTS Import: ✅<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ | Import: ❌<br>Cache: ❌<br>No cache: ❌<br>Deps: ❌<br>CTS Import: ❌<br>ESM/CJS Mixed: ❌<br>Const Enum: ❌<br>Import ESM Dep: ❌ | Import: ✅<br>Cache: ❌<br>No cache: ❌<br>Deps: ✅<br>CTS Import: ✅<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ | Import: ✅<br>Cache: ❌<br>No cache: ✅<br>Deps: ✅<br>CTS Import: ❌<br>ESM/CJS Mixed: ✅<br>Const Enum: ✅<br>Import ESM Dep: ✅ |
251254

252255
<!-- TABLE_END -->
253256

‎eslint.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@
22
import antfu from '@antfu/eslint-config'
33

44
export default antfu()
5+
.append({
6+
files: ['test/**/*.ts', 'test/**/*.mjs'],
7+
rules: {
8+
'antfu/no-top-level-await': 'off',
9+
},
10+
})

‎package.json

+14-15
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "importx",
33
"type": "module",
44
"version": "0.4.4",
5-
"packageManager": "pnpm@9.9.0",
5+
"packageManager": "pnpm@9.11.0",
66
"description": "Unified tool for importing TypeScript modules at runtime",
77
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
88
"license": "MIT",
@@ -51,34 +51,33 @@
5151
},
5252
"dependencies": {
5353
"bundle-require": "^5.0.0",
54-
"debug": "^4.3.6",
54+
"debug": "^4.3.7",
5555
"esbuild": "^0.20.2 || ^0.21.0 || ^0.22.0 || ^0.23.0",
56-
"jiti": "2.0.0-beta.3",
57-
"jiti-v1": "npm:jiti@^1.21.6",
56+
"jiti": "^2.0.0",
5857
"pathe": "^1.1.2",
59-
"tsx": "^4.19.0"
58+
"tsx": "^4.19.1"
6059
},
6160
"devDependencies": {
62-
"@antfu/eslint-config": "^3.0.0",
61+
"@antfu/eslint-config": "^3.7.3",
6362
"@antfu/ni": "^0.23.0",
6463
"@antfu/utils": "^0.7.10",
6564
"@types/debug": "^4.1.12",
66-
"@types/node": "^22.5.1",
65+
"@types/node": "^22.7.2",
6766
"bumpp": "^9.5.2",
68-
"eslint": "^9.9.1",
67+
"eslint": "^9.11.1",
6968
"esno": "^4.7.0",
70-
"execa": "^9.3.1",
69+
"execa": "^9.4.0",
7170
"find-up": "^7.0.0",
72-
"lint-staged": "^15.2.9",
73-
"picocolors": "^1.0.1",
74-
"pnpm": "^9.9.0",
71+
"lint-staged": "^15.2.10",
72+
"picocolors": "^1.1.0",
73+
"pnpm": "^9.11.0",
7574
"simple-git-hooks": "^2.11.1",
7675
"strip-ansi": "^7.1.0",
7776
"ts-node": "^10.9.2",
78-
"typescript": "^5.5.4",
77+
"typescript": "^5.6.2",
7978
"unbuild": "^2.0.0",
80-
"vite": "^5.4.2",
81-
"vitest": "^2.0.5"
79+
"vite": "^5.4.8",
80+
"vitest": "^2.1.1"
8281
},
8382
"resolutions": {
8483
"jiti": "2.0.0-beta.3"

0 commit comments

Comments
 (0)
Please sign in to comment.