Skip to content

Commit

Permalink
explicitly depend on ts-node temp fork
Browse files Browse the repository at this point in the history
Fix: #959
  • Loading branch information
isaacs committed Oct 15, 2023
1 parent 264f9cf commit 7e12f1e
Show file tree
Hide file tree
Showing 27 changed files with 99 additions and 104 deletions.
123 changes: 61 additions & 62 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
"sync-content": "^1.0.2",
"tap": "^18.0.0-0",
"trivial-deferred": "^2.0.0",
"ts-node": "npm:@isaacs/ts-node-temp-fork-for-pr-2009@^10.9.1",
"tshy": "^1.2.2",
"typedoc": "^0.25.1",
"typescript": "5.2",
Expand Down Expand Up @@ -115,6 +114,7 @@
"repository": "https://github.com/tapjs/tapjs",
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/ts-node-temp-fork-for-pr-2009": "^10.9.1",
"glob": "^10.3.10",
"semver": "^7.5.4",
"signal-exit": "4.1"
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ nx run-many --target=prepare --exclude tap,@tapjs/run
nx run-many --target=prepare -p @tapjs/run
nx run-many --target=prepare -p tap
node \
--loader=ts-node/esm \
--loader=@isaacs/ts-node-temp-fork-for-pr-2009/esm \
--no-warnings \
scripts/default-build.mts
# lastly, run the actual install to do all the linking
Expand Down
2 changes: 1 addition & 1 deletion scripts/default-build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { fileURLToPath } from 'node:url'
const res = spawnSync(
process.execPath,
[
'--loader=ts-node/esm',
'--loader=@isaacs/ts-node-temp-fork-for-pr-2009/esm',
'--no-warnings',
resolve(dirname(fileURLToPath(import.meta.url)), './default-build.mts'),
],
Expand Down
7 changes: 6 additions & 1 deletion scripts/default-build.mts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ prepare('src/core', ...builtins)

spawnSync(
process.execPath,
['--loader=ts-node/esm', '--no-warnings', build, ...builtins],
[
'--loader=@isaacs/ts-node-temp-fork-for-pr-2009/esm',
'--no-warnings',
build,
...builtins,
],
{
stdio: 'inherit',
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { fileURLToPath } from 'node:url'
const res = spawnSync(
process.execPath,
[
'--loader=ts-node/esm',
'--loader=@isaacs/ts-node-temp-fork-for-pr-2009/esm',
'--no-warnings',
resolve(dirname(fileURLToPath(import.meta.url)), './version.mts'),
...process.argv.slice(2)
Expand Down
2 changes: 1 addition & 1 deletion src/parser/test/cmd-flush-before-exit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const args = [
'--no-warnings',
'--enable-source-maps',
'--loader',
'ts-node/esm',
'@isaacs/ts-node-temp-fork-for-pr-2009/esm',
__filename,
]

Expand Down
4 changes: 2 additions & 2 deletions src/reporter/tap-snapshots/test/json.ts.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports[`test/json.ts > TAP > json 1`] = `
"command": "/usr/local/bin/node",
"args": [
"--import=file:///cwd/node_modules/@tapjs/mock/dist/esm/import.mjs",
"--loader=file:///cwd/node_modules/ts-node/esm.mjs",
"--loader=file:///cwd/node_modules/@isaacs/ts-node-temp-fork-for-pr-2009/esm.mjs",
"--no-warnings",
"--enable-source-maps",
"--import=file:///cwd/node_modules/@tapjs/processinfo/dist/mjs/import.mjs",
Expand Down Expand Up @@ -472,7 +472,7 @@ exports[`test/json.ts > TAP > jsonstream 1`] = `
["start",{"name":"unfinished test","level":2}]
["pass",{"ok":true,"name":"going to fail","id":1,"fullname":"test/fixtures/example-tap.ts > unfinished test > going to fail"}]
["end",{"name":"unfinished test","level":2,"ok":false,"id":13,"diag":{"at":{"fileName":"test/fixtures/example-tap.ts","lineNumber":62,"columnNumber":3,"isToplevel":true},"source":"})\\n\\nt.test('unfinished test', t => {\\n--^\\n t.plan(3)\\n t.pass('going to fail')\\n"},"time":0.197,"fullname":"test/fixtures/example-tap.ts > unfinished test","closingTestPoint":true,"plan":{"start":1,"end":3},"tests":1,"failures":0,"assertions":1,"skipped":0}]
["end",{"name":"test/fixtures/example-tap.ts","level":1,"ok":false,"id":1,"diag":{"stdio":"inherit","cwd":"/cwd/src/reporter","externalID":"test/fixtures/example-tap.ts","command":"/usr/local/bin/node","args":["--import=file:///cwd/node_modules/@tapjs/mock/dist/esm/import.mjs","--loader=file:///cwd/node_modules/ts-node/esm.mjs","--no-warnings","--enable-source-maps","--import=file:///cwd/node_modules/@tapjs/processinfo/dist/mjs/import.mjs","/cwd/src/reporter/test/fixtures/example-tap.ts"],"exitCode":1},"time":484.581,"fullname":"test/fixtures/example-tap.ts","closingTestPoint":true,"plan":{"start":1,"end":13},"tests":30,"failures":15,"assertions":21,"skipped":15}]
["end",{"name":"test/fixtures/example-tap.ts","level":1,"ok":false,"id":1,"diag":{"stdio":"inherit","cwd":"/cwd/src/reporter","externalID":"test/fixtures/example-tap.ts","command":"/usr/local/bin/node","args":["--import=file:///cwd/node_modules/@tapjs/mock/dist/esm/import.mjs","--loader=file:///cwd/node_modules/@isaacs/ts-node-temp-fork-for-pr-2009/esm.mjs","--no-warnings","--enable-source-maps","--import=file:///cwd/node_modules/@tapjs/processinfo/dist/mjs/import.mjs","/cwd/src/reporter/test/fixtures/example-tap.ts"],"exitCode":1},"time":484.581,"fullname":"test/fixtures/example-tap.ts","closingTestPoint":true,"plan":{"start":1,"end":13},"tests":30,"failures":15,"assertions":21,"skipped":15}]
["end",{"name":"TAP Tests","level":0,"plan":{"start":1,"end":1},"tests":31,"failures":15,"assertions":21,"skipped":15}]
`
2 changes: 1 addition & 1 deletion src/reporter/tap-snapshots/test/markdown.ts.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ diag:
command: /usr/local/bin/node
args:
- --import=file:///cwd/node_modules/@tapjs/mock/dist/esm/import.mjs
- --loader=file:///cwd/node_modules/ts-node/esm.mjs
- --loader=file:///cwd/node_modules/@isaacs/ts-node-temp-fork-for-pr-2009/esm.mjs
- --no-warnings
- --enable-source-maps
- --import=file:///cwd/node_modules/@tapjs/processinfo/dist/mjs/import.mjs
Expand Down
2 changes: 1 addition & 1 deletion src/reporter/test/fixtures/example-tap.tap
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ not ok 1 - test/fixtures/example-tap.ts # time=484.581ms
command: /usr/local/bin/node
args:
- --import=file:///cwd/node_modules/@tapjs/mock/dist/esm/import.mjs
- --loader=file:///cwd/node_modules/ts-node/esm.mjs
- --loader=file:///cwd/node_modules/@isaacs/ts-node-temp-fork-for-pr-2009/esm.mjs
- --no-warnings
- --enable-source-maps
- --import=file:///cwd/node_modules/@tapjs/processinfo/dist/mjs/import.mjs
Expand Down
3 changes: 1 addition & 2 deletions src/run/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { mainCommand } from './main-config.js'
const tmbin = fileURLToPath(
await resolveImport('@tapjs/test/generate-tap-test-class')
)
const execArgs = ['--loader=ts-node/esm', '--no-warnings']
const node = process.execPath

export const build = async (args: string[], config: LoadedConfig) => {
Expand All @@ -16,7 +15,7 @@ export const build = async (args: string[], config: LoadedConfig) => {
)
}

const argv = [...execArgs, tmbin, ...config.pluginList]
const argv = [tmbin, ...config.pluginList]
return new Promise<void>((res, rej) => {
foregroundChild(node, argv, {}, (code, signal) => {
// if this is the main command, just terminate in the same way
Expand Down
8 changes: 0 additions & 8 deletions src/run/test/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ t.test('build success, main command, allow fg exit', async t => {
t.equal(cmd, process.execPath)
t.strictSame(options, {})
t.strictSame(args, [
'--loader=ts-node/esm',
'--no-warnings',
tmbin,
'a',
'b',
Expand Down Expand Up @@ -81,8 +79,6 @@ t.test('build failure, main command, allow fg exit', async t => {
t.equal(cmd, process.execPath)
t.strictSame(options, {})
t.strictSame(args, [
'--loader=ts-node/esm',
'--no-warnings',
tmbin,
'a',
'b',
Expand Down Expand Up @@ -117,8 +113,6 @@ t.test('build success, subcommand, cancel exit', async t => {
t.equal(cmd, process.execPath)
t.strictSame(options, {})
t.strictSame(args, [
'--loader=ts-node/esm',
'--no-warnings',
tmbin,
'a',
'b',
Expand Down Expand Up @@ -153,8 +147,6 @@ t.test('build fail, subcommand, fail with status', async t => {
t.equal(cmd, process.execPath)
t.strictSame(options, {})
t.strictSame(args, [
'--loader=ts-node/esm',
'--no-warnings',
tmbin,
'a',
'b',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"execArgv": [
"--no-warnings",
"--loader=ts-node/esm",
"--loader=@isaacs/ts-node-temp-fork-for-pr-2009/esm",
"--loader=@tapjs/mock/loader",
"--enable-source-maps",
"--loader=file:///Users/isaacs/dev/tapjs/tapjs/node_modules/@tapjs/processinfo/dist/esm/esm.mjs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"execArgv": [
"--no-warnings",
"--loader=ts-node/esm",
"--loader=@isaacs/ts-node-temp-fork-for-pr-2009/esm",
"--loader=@tapjs/mock/loader",
"--enable-source-maps",
"--loader=file:///Users/isaacs/dev/tapjs/tapjs/node_modules/@tapjs/processinfo/dist/esm/esm.mjs"
Expand Down
2 changes: 1 addition & 1 deletion src/stack/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const setFilterNodeInternals = (s: boolean) =>
// from node_modules.
const ignoredPackages: string[] = [
'@tapjs',
'ts-node',
'@isaacs/ts-node-temp-fork-for-pr-2009',
'pirates',
'function-loop',
'@cspotcode/source-map-support',
Expand Down
2 changes: 1 addition & 1 deletion src/stack/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ for (const [dialect, mod] of Object.entries({ cjs, mjs })) {
t.equal(getFilterIgnoredPackages(), true, 'filter by default')
const defaultIgnored = [
'@tapjs',
'ts-node',
'@isaacs/ts-node-temp-fork-for-pr-2009',
'pirates',
'function-loop',
'@cspotcode/source-map-support',
Expand Down
2 changes: 1 addition & 1 deletion src/tap/test/run.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const bin = fileURLToPath(
)
t.test('runner just loads runner', t => {
const proc = spawn(process.execPath, [
'--loader=ts-node/esm',
'--loader=@isaacs/ts-node-temp-fork-for-pr-2009/esm',
'--no-warnings',
bin,
'-h',
Expand Down
2 changes: 1 addition & 1 deletion src/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)",
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/ts-node-temp-fork-for-pr-2009": "^10.9.1",
"@tapjs/after": "1.1.11",
"@tapjs/after-each": "1.1.11",
"@tapjs/asserts": "1.1.11",
Expand All @@ -109,7 +110,6 @@
"rimraf": "^5.0.5",
"sync-content": "^1.0.1",
"tap-parser": "15.3.0",
"ts-node": "npm:@isaacs/ts-node-temp-fork-for-pr-2009@^10.9.1",
"tshy": "^1.2.2",
"typescript": "5.2"
},
Expand Down
2 changes: 1 addition & 1 deletion src/test/scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ process.env.TS_NODE_PROJECT = tsconfig
const res = spawnSync(
process.execPath,
[
'--loader=ts-node/esm',
'--loader=@isaacs/ts-node-temp-fork-for-pr-2009/esm',
'--no-warnings',
resolve(__dirname, './build.mts'),
...process.argv.slice(2),
Expand Down
Loading

0 comments on commit 7e12f1e

Please sign in to comment.