Conversation
|
| 📦 Package | 📏 Base Size | 📏 Source Size | 📈 Size Change |
|---|---|---|---|
| npmx-language-server | 238.1 kB | 238.1 kB | +1 B |
| npmx-language-service | 9.2 kB | 9.2 kB | +1 B |
📝 WalkthroughWalkthroughThe change replaces direct Merge Risk: 🟡 Moderate · up to The PR adds a Node-specific file-system dependency to browser-compatible source, which can break supported builds or runtimes; merge should wait until file-system access is routed through a host-specific adapter. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0262f249-b944-465f-9805-601b558bdd12
📒 Files selected for processing (8)
packages/language-server/src/workspace.tspackages/language-service/src/plugins/catalog.tspackages/language-service/src/plugins/diagnostics/rules/__tests__/utils.tspackages/language-service/src/plugins/diagnostics/rules/engine-mismatch.test.tspackages/language-service/src/plugins/diagnostics/rules/engine-mismatch.tspackages/language-service/src/plugins/installed-package-definition.test.tspackages/language-service/src/plugins/installed-package-definition.tspackages/language-service/src/types.ts
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
| import type { CatalogsInfo, Engines } from 'npmx-language-core/types' | ||
| import type { DependencyInfo, PackageManager, WorkspaceAdapter } from 'npmx-language-core/workspace' | ||
| import type { ClientFeatures, IWorkspaceState } from 'npmx-language-service/types' | ||
| import { access, realpath as fsRealpath, readFile } from 'node:fs/promises' |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect browser-related package configuration and Node built-in imports in source.
fd -a -t f 'package.json' . -x sh -c '
printf "\n== %s ==\n" "$1"
rg -n "\"browser\"|\"exports\"|\"main\"|\"module\"|\"types\"" "$1" || true
' sh {} \;
rg -n --glob '*.{ts,tsx}' "from 'node:|from \"node:" packages/language-server/srcRepository: npmx-dev/vscode-npmx
Length of output: 1543
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '== repository guidance =='
find /tmp/coderabbit-repo-knowledge/npmx-dev-vscode-npmx-74af7664 -type f -name '*.md' -print \
| sort
printf '%s\n' '== package and source context =='
cat -n packages/language-server/package.json
sed -n '1,35p' packages/language-server/src/workspace.ts
printf '%s\n' '== matching source imports =='
rg -n --glob '*.{ts,tsx}' "from ['\"]node:" packages/language-server/srcRepository: npmx-dev/vscode-npmx
Length of output: 4070
Remove the Node built-in import from src/.
packages/language-server/src/workspace.ts imports node:fs/promises, which violates the repository’s browser-compatibility boundary for **/src/**/*.{ts,tsx}. Move file-system access behind a host-specific adapter.
Source: Coding guidelines
No description provided.