diff --git a/README.md b/README.md index 2e19c75..6f232c1 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ Importing a TypeScript module with `importx`: -> Generated with version `v0.1.2` at 2024-05-11T19:12:27.740Z +> Generated with version `v0.2.0` at 2024-05-11T19:23:36.035Z | | native | tsx | jiti | bundle-require | | ------- | --- | --- | --- | --- | diff --git a/package.json b/package.json index 9dde381..a9274a5 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,11 @@ "vite": "^5.2.11", "vitest": "^1.6.0" }, + "pnpm": { + "patchedDependencies": { + "tsx@4.10.0": "patches/tsx@4.10.0.patch" + } + }, "simple-git-hooks": { "pre-commit": "pnpm lint-staged" }, diff --git a/patches/tsx@4.10.0.patch b/patches/tsx@4.10.0.patch new file mode 100644 index 0000000..9a4ac2a --- /dev/null +++ b/patches/tsx@4.10.0.patch @@ -0,0 +1,22 @@ +diff --git a/dist/esm/api/index.d.mts b/dist/esm/api/index.d.mts +index 410548c286aeacaa2f2abe8f57dfd8893bf86e9c..eb82b64ea5b9ee23a478791084a4149841723ee5 100644 +--- a/dist/esm/api/index.d.mts ++++ b/dist/esm/api/index.d.mts +@@ -1,9 +1,5 @@ + type ScopedImport = (specifier: string, parentURL: string) => Promise; + +-type Options$1 = { +- namespace?: string; +- onImport?: (url: string) => void; +-}; + type Unregister = () => Promise; + type Register = { + (options: { +@@ -13,7 +9,6 @@ type Register = { + import: ScopedImport; + unregister: Unregister; + }; +- (options?: Options$1): Unregister; + }; + declare const register: Register; + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cccaaa7..c7d3a24 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,11 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +patchedDependencies: + tsx@4.10.0: + hash: dimd3e7tpfifemgyogvrzm47xy + path: patches/tsx@4.10.0.patch + importers: .: @@ -22,7 +27,7 @@ importers: version: 1.21.0 tsx: specifier: ^4.10.0 - version: 4.10.0 + version: 4.10.0(patch_hash=dimd3e7tpfifemgyogvrzm47xy) devDependencies: '@antfu/eslint-config': specifier: ^2.17.0 @@ -4427,7 +4432,7 @@ snapshots: esno@4.7.0: dependencies: - tsx: 4.10.0 + tsx: 4.10.0(patch_hash=dimd3e7tpfifemgyogvrzm47xy) espree@10.0.1: dependencies: @@ -5447,7 +5452,7 @@ snapshots: tslib@2.6.2: {} - tsx@4.10.0: + tsx@4.10.0(patch_hash=dimd3e7tpfifemgyogvrzm47xy): dependencies: esbuild: 0.20.2 get-tsconfig: 4.7.3 diff --git a/test/run-matrix.mjs b/test/run-matrix.mjs index ad017a1..31411f3 100644 --- a/test/run-matrix.mjs +++ b/test/run-matrix.mjs @@ -2,7 +2,6 @@ import { fileURLToPath } from 'node:url' import fs from 'node:fs/promises' import process from 'node:process' -import os from 'node:os' import { execaCommand } from 'execa' import c from 'picocolors' import pkg from '../package.json' with { type: 'json' }