Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: antfu-collective/importx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.4
Choose a base ref
...
head repository: antfu-collective/importx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.5.0
Choose a head ref
  • 2 commits
  • 13 files changed
  • 1 contributor

Commits on Sep 27, 2024

  1. Copy the full SHA
    6c0fe78 View commit details
  2. chore: release v0.5.0

    antfu committed Sep 27, 2024
    Copy the full SHA
    7fa167f View commit details
Showing with 959 additions and 616 deletions.
  1. +7 −4 README.md
  2. +6 −0 eslint.config.js
  3. +15 −16 package.json
  4. +919 −500 pnpm-lock.yaml
  5. +3 −8 src/import.ts
  6. +2 −2 src/index.ts
  7. +0 −21 src/loaders/jiti-v1.ts
  8. +1 −1 src/loaders/jiti.ts
  9. +1 −1 src/loaders/tsx.ts
  10. +1 −7 src/types.ts
  11. +1 −1 test/fixtures/matrix.mjs
  12. +0 −52 test/matrix-output.txt
  13. +3 −3 test/run-matrix.mjs
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -243,11 +243,14 @@ Importing a TypeScript module with `importx`:

<!-- TABLE_START -->

> Generated with version `v0.4.2` at 2024-07-30T10:38:06.719Z
> Generated with version `v0.4.4` at 2024-09-27T00:27:46.691Z
| | jiti-v1 |
| ------- | --- |
| node | Import: ❌<br>Cache: ❌<br>No cache: ❌<br>Deps: ❌<br>CTS Import: ✅<br>ESM/CJS Mixed: ❌<br>Const Enum: ❌<br>Import ESM Dep: ❌ |
| | native | tsx | jiti | bundle-require |
| ------- | --- | --- | --- | --- |
| 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: ✅ |
| 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: ✅ |
| 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: ✅ |
| 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: ✅ |

<!-- TABLE_END -->

6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -2,3 +2,9 @@
import antfu from '@antfu/eslint-config'

export default antfu()
.append({
files: ['test/**/*.ts', 'test/**/*.mjs'],
rules: {
'antfu/no-top-level-await': 'off',
},
})
31 changes: 15 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "importx",
"type": "module",
"version": "0.4.4",
"packageManager": "pnpm@9.9.0",
"version": "0.5.0",
"packageManager": "pnpm@9.11.0",
"description": "Unified tool for importing TypeScript modules at runtime",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
@@ -51,34 +51,33 @@
},
"dependencies": {
"bundle-require": "^5.0.0",
"debug": "^4.3.6",
"debug": "^4.3.7",
"esbuild": "^0.20.2 || ^0.21.0 || ^0.22.0 || ^0.23.0",
"jiti": "2.0.0-beta.3",
"jiti-v1": "npm:jiti@^1.21.6",
"jiti": "^2.0.0",
"pathe": "^1.1.2",
"tsx": "^4.19.0"
"tsx": "^4.19.1"
},
"devDependencies": {
"@antfu/eslint-config": "^3.0.0",
"@antfu/eslint-config": "^3.7.3",
"@antfu/ni": "^0.23.0",
"@antfu/utils": "^0.7.10",
"@types/debug": "^4.1.12",
"@types/node": "^22.5.1",
"@types/node": "^22.7.2",
"bumpp": "^9.5.2",
"eslint": "^9.9.1",
"eslint": "^9.11.1",
"esno": "^4.7.0",
"execa": "^9.3.1",
"execa": "^9.4.0",
"find-up": "^7.0.0",
"lint-staged": "^15.2.9",
"picocolors": "^1.0.1",
"pnpm": "^9.9.0",
"lint-staged": "^15.2.10",
"picocolors": "^1.1.0",
"pnpm": "^9.11.0",
"simple-git-hooks": "^2.11.1",
"strip-ansi": "^7.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.5.4",
"typescript": "^5.6.2",
"unbuild": "^2.0.0",
"vite": "^5.4.2",
"vitest": "^2.0.5"
"vite": "^5.4.8",
"vitest": "^2.1.1"
},
"resolutions": {
"jiti": "2.0.0-beta.3"
Loading