Skip to content

Commit

Permalink
update runner to not rely on TLA
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Feb 10, 2025
1 parent ccfea67 commit f38b2fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"string-length": "^6.0.0",
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
"sync-content": "^2.0.1",
"tap": "^18.0.0-0",
"tap": "^21.0.0-0",
"trivial-deferred": "^2.0.0",
"tshy": "^3.0.2",
"tsx": "^4.16.2",
Expand Down
14 changes: 5 additions & 9 deletions src/tap/src/run.mts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ import { pathToFileURL } from 'node:url'

import { resolveImport } from 'resolve-import'
// import('@tapjs/run')
await import(
String(
await resolveImport(
'@tapjs/run',
await resolveImport('tap', pathToFileURL(resolve('x'))).catch(
() => import.meta.url,
),
),
// this is nicer with TLA, but that has some unfortunate side effects
resolveImport('tap', pathToFileURL(resolve('x')))
.then(tap =>
resolveImport('@tapjs/run', tap).catch(() => import.meta.url),
)
)
.then(i => import(String(i)))

0 comments on commit f38b2fa

Please sign in to comment.