You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0f07b2c
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(cli): pin tsx to the CLI's own tsconfig, and stop prescribing a build that was never consulted (#16643)
* fix(cli): pin tsx to the CLI's own tsconfig, and stop prescribing a build that was never consulted
`bin/run-dev.js` run from a cwd whose tsconfig maps a workspace package to
its source loaded no command set at all, and blamed a build that was present
and fresh.
tsx reads the CWD's tsconfig, not the entry's, and applies its `paths` to
every specifier it resolves -- the CLI's own included. The shim now asks its
own loader whether any of this package's workspace dependencies is being
resolved to TypeScript source, and re-execs once with `TSX_TSCONFIG_PATH`
pinned to `packages/cli/tsconfig.json` when one is.
The diagnostic keeps its value for every other cause of the same masking: it
now asks WHERE the failing specifier resolved before prescribing a rebuild,
and names the cwd tsconfig redirect when the build output was never consulted.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ
* test(cli): make the #16547 redirect fixture hermetic
The tsconfig `paths` target is now a stub this suite writes into its own temp
cwd, not a path into another package: `check:cross-package-test-inputs` refuses
inputs wider than the package (they are invisible to the affected-subset filter
and to turbo's cache), and a stub redirects exactly as well as real source.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ
* fix(cli): keep the redirect probe from ever becoming the report
`new URL()` was parsed outside the guard, so a resolution that is not a URL
would have replaced the whole run with an error about the probe -- the rule the
two reporters in this file are already written to.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ
---------
Co-authored-by: os-sales <sales@objectstack.ai>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
// ⚠️ `process.stderr.write` followed by an exit is the #6531 defect this
339
+
// file exists to avoid, and this is deliberately NOT that shape: what
340
+
// follows the write is `spawnSync`, which blocks this process for the
341
+
// whole lifetime of the child (seconds), so the write has the entire run
342
+
// to drain instead of racing a tear-down. `keepStderrNonBlocking()` above
343
+
// has already run, so the write cannot park the thread either.
344
+
process.stderr.write(
345
+
`objectstack: the current directory's tsconfig redirects '${redirected}' to TypeScript source, and tsx honours the CWD's tsconfig — re-running with tsx pinned to ${CLI_TSCONFIG}\n`,
0 commit comments