-
Notifications
You must be signed in to change notification settings - Fork 625
Use TypeScript 7 for direct tsc checks #13523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
fc3a945
68c2c9f
f1761a4
134e27c
96ec732
1b0d458
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,14 +11,15 @@ | |
| }, | ||
| "scripts": { | ||
| "test": "vitest run --config ./vitest.config.ts", | ||
| "typecheck": "tsc --noEmit" | ||
| "typecheck": "node ./node_modules/typescript-7/bin/tsc --noEmit" | ||
| }, | ||
| "dependencies": { | ||
| "zod": "catalog:", | ||
| "zod-validation-error": "catalog:" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "catalog:", | ||
| "typescript-7": "catalog:", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Check what binaries each typescript package exposes in the lockfile
echo "== typescript and typescript-7 in lockfile =="
rg -n -A10 'typescript-7:' pnpm-lock.yaml | head -30
echo "---"
rg -n -A10 "^\s+typescript:" pnpm-lock.yaml | head -30
# Check if TS 6.x provides a differently-named bin (e.g. tsc6) or standard tsc
echo
echo "== Check bin field in installed typescript packages =="
for pkg in typescript typescript-7; do
if [ -f "node_modules/$pkg/package.json" ]; then
echo "--- $pkg bin ---"
jq '.bin' "node_modules/$pkg/package.json" 2>/dev/null || echo "no package.json"
fi
done
# Check .bin directory for tsc symlinks
echo
echo "== .bin/tsc resolution =="
ls -la node_modules/.bin/tsc* 2>/dev/null || echo "no .bin/tsc found"
readlink -f node_modules/.bin/tsc 2>/dev/null || trueRepository: Comfy-Org/ComfyUI_frontend Length of output: 2377 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== relevant package manifests =="
for f in \
packages/object-info-parser/package.json \
packages/design-system/package.json \
packages/shared-frontend-utils/package.json \
packages/tailwind-utils/package.json \
package.json
do
if [ -f "$f" ]; then
echo "--- $f ---"
cat -n "$f" | sed -n '1,220p'
echo
fi
done
echo "== workspace references to tsc/typecheck =="
rg -n '"typecheck"|\\btsc --noEmit\\b|typescript-7|typescript": "catalog:|typescript-7": "catalog:' packages package.json pnpm-workspace.yaml pnpm-lock.yaml -g '!**/dist/**' -g '!**/build/**'
echo
echo "== installed package bin metadata, if present =="
for pkg in typescript typescript-7; do
if [ -f "node_modules/$pkg/package.json" ]; then
echo "--- node_modules/$pkg/package.json ---"
jq '{name, version, bin}' "node_modules/$pkg/package.json"
fi
done
echo
echo "== .bin entries related to tsc, if present =="
ls -la node_modules/.bin/tsc* 2>/dev/null || true
readlink -f node_modules/.bin/tsc 2>/dev/null || trueRepository: Comfy-Org/ComfyUI_frontend Length of output: 15684 🌐 Web query:
💡 Result: When two dependencies expose a binary with the same name, pnpm may encounter a conflict in the node_modules/.bin directory [1][2]. Because pnpm does not currently enforce strict conflict prevention for non-global installs, one of the binaries will generally overwrite or take precedence over the other, often depending on the order of operations or package name [1][2]. For scenarios involving TypeScript (tsc) or other tools where bin conflicts arise (e.g., when using multiple versions of a package via aliases), you can manage these conflicts using the following strategies: 1. Use pnpm exec: Instead of relying on the binaries linked in node_modules/.bin, use pnpm exec . This command automatically resolves the binary to the correct package based on your project's dependency graph, effectively bypassing path-based resolution conflicts [3]. 2. Avoid reliance on.bin resolution: If you are encountering issues where tools like tsc call the wrong binary, ensure your scripts are explicitly running via pnpm run or pnpm exec, which set up the environment to correctly prioritize the locally installed versions of your direct dependencies. 3. Monitor Issue Tracker: pnpm development is ongoing regarding bin conflict resolution, with efforts to improve consistency, particularly by applying bin ownership overrides [4]. If you are using package aliases (e.g., installing a package under a different name to avoid version conflicts), note that pnpm treats these as separate packages [5]. If those separate packages still expose the same bin name, the conflict will persist because the binary filename remains the same [1]. There is currently no native feature to automatically rename binaries via package aliases in the dependencies section of package.json [1]. You may need to use tools or scripts to manually manage or symlink the desired binary if pnpm's default conflict resolution does not select the one you require [2]. Top results: [1][4][2][3][5] Citations:
Invoke TypeScript 7 explicitly in these 🤖 Prompt for AI Agents |
||
| "vitest": "catalog:" | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.