Conversation
📝 WalkthroughWalkthroughThis pull request moves metadata, types and constants into a new shared directory and updates import paths to the new aliases (for example Possibly related PRs
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can generate a title for your PR based on the changes with custom instructions.Set the |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b0ca6a64-aec6-4e56-b862-af24aaf8a55d
📒 Files selected for processing (45)
.gitignorepackage.jsonshared/constants.tsshared/types.tssrc/api/package.tssrc/api/replacement.tssrc/api/vulnerability.tssrc/commands/add-to-ignore.tssrc/commands/open-file-in-npmx.tssrc/commands/open-in-browser.tssrc/composables/workspace-context.tssrc/core/workspace.tssrc/index.tssrc/providers/code-actions/index.tssrc/providers/code-actions/quick-fix.test.tssrc/providers/code-actions/quick-fix.tssrc/providers/completion-item/index.tssrc/providers/completion-item/version.tssrc/providers/definition/index.tssrc/providers/diagnostics/index.tssrc/providers/diagnostics/rules/deprecation.test.tssrc/providers/diagnostics/rules/dist-tag.test.tssrc/providers/diagnostics/rules/engine-mismatch.test.tssrc/providers/diagnostics/rules/replacement.test.tssrc/providers/diagnostics/rules/upgrade.test.tssrc/providers/diagnostics/rules/vulnerability.test.tssrc/providers/document-link/index.tssrc/providers/hover/index.tssrc/providers/hover/npmx.tssrc/state.tssrc/types/context.tssrc/utils/batch.test.tssrc/utils/dependency.test.tssrc/utils/file.tssrc/utils/ignore.test.tssrc/utils/links.tssrc/utils/package.test.tssrc/utils/package.tssrc/utils/version.test.tstests/__setup__/msw.tstests/utils/diagnostics.tstsconfig.app.jsontsconfig.base.jsontsconfig.jsonvitest.config.ts
💤 Files with no reviewable changes (1)
- src/types/context.ts
| "target": "ESNext", | ||
| "lib": ["ESNext"], | ||
| "module": "ESNext", | ||
| "moduleResolution": "Bundler", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Locate relevant config files
TS_APP="$(fd -HI '^tsconfig\.app\.json$' | head -n1 || true)"
TS_DOWN="$(fd -HI '^tsdown\.config\.ts$' | head -n1 || true)"
VITEST="$(fd -HI '^vitest\.config\.ts$' | head -n1 || true)"
echo "tsconfig.app.json: ${TS_APP:-NOT FOUND}"
echo "tsdown.config.ts: ${TS_DOWN:-NOT FOUND}"
echo "vitest.config.ts: ${VITEST:-NOT FOUND}"
echo
# Show TS path aliases
if [[ -n "${TS_APP}" ]]; then
echo "=== paths in tsconfig.app.json ==="
rg -n -C2 '"paths"|#shared|#api|#types|#utils|#core|#composables|#test-utils' "$TS_APP"
echo
fi
# Show bundler resolver/alias settings
if [[ -n "${TS_DOWN}" ]]; then
echo "=== resolver settings in tsdown.config.ts ==="
rg -n -C3 'alias|resolve|tsconfig|paths|plugin' "$TS_DOWN"
echo
fi
# Confirm test-only alias support exists
if [[ -n "${VITEST}" ]]; then
echo "=== alias support in vitest.config.ts ==="
rg -n -C2 'vite-tsconfig-paths|plugins' "$VITEST"
fiRepository: npmx-dev/vscode-npmx
Length of output: 1363
Add path alias mappings to tsdown.config.ts to match tsconfig.app.json
Line 6 ("moduleResolution": "Bundler") is correct, but tsdown.config.ts is missing the path alias mappings defined in tsconfig.app.json. Vitest will resolve aliases like #shared/* and #api/* via vite-tsconfig-paths, but the production bundler will fail at runtime unless tsdown is configured with equivalent aliases. Add the following to tsdown.config.ts alias object:
'#shared/*': resolve('./shared/*'),
'#state': resolve('./src/state.ts'),
'#api/*': resolve('./src/api/*'),
'#types/*': resolve('./src/types/*'),
'#utils/*': resolve('./src/utils/*'),
'#core/*': resolve('./src/core/*'),
'#composables/*': resolve('./src/composables/*'),
'#test-utils/*': resolve('./tests/utils/*'),
Prepare for lsp