Steps to Reproduce
- Check for global package updates:
npm-check-updates outputs a command similar to:
ncu itself cannot upgrade global packages. Run the following to upgrade all global packages:
npm -g install @anthropic-ai/claude-agent-sdk@0.3.170 @bomb.sh/tab@0.0.16 @github/copilot@1.0.61 @google/gemini-cli@0.45.3 @openai/codex@0.139.0 @typescript/native-preview@7.0.0-dev.20260609.1 electron@42.4.0 prettier@3.8.4
-
Copy and paste the generated command directly into PowerShell.
-
PowerShell throws a parser error:
ParserError:
Line |
1 | npm -g install @anthropic-ai/claude-agent-sdk@0.3.170 @bomb.sh/tab@0. …
| ~~~~~
| The splatting operator '@' cannot be used to reference variables in an expression. '@bomb' can be used only as
| an argument to a command. To reference variables in an expression use '$bomb'.
Working Command
Quoting the package containing a scoped name with a period in the scope allows the command to run successfully:
npm -g install @anthropic-ai/claude-agent-sdk@0.3.170 "@bomb.sh/tab@0.0.16" @github/copilot@1.0.61 @google/gemini-cli@0.45.3 @openai/codex@0.139.0 @typescript/native-preview@7.0.0-dev.20260609.1 electron@42.4.0 prettier@3.8.4
Current Behavior
When ncu -g generates an upgrade command containing a package whose scope includes a period (for example, @bomb.sh/tab), the suggested command cannot be pasted directly into PowerShell because PowerShell interprets the scope name as an invalid splatting expression and throws a parser error.
Expected Behavior
The generated command should be directly executable in supported shells, including PowerShell.
One possible fix would be to automatically quote package names whose scope contains characters that require quoting in PowerShell, e.g.:
npm -g install @anthropic-ai/claude-agent-sdk@0.3.170 "@bomb.sh/tab@0.0.16" @github/copilot@1.0.61 @google/gemini-cli@0.45.3 @openai/codex@0.139.0 @typescript/native-preview@7.0.0-dev.20260609.1 electron@42.4.0 prettier@3.8.4
Environment
- npm-check-updates: latest
- Node.js: compatible supported version
- Shell: PowerShell (Windows)
.ncurc: none (global update check with ncu -g)
Steps to Reproduce
ncu -gnpm-check-updatesoutputs a command similar to:Copy and paste the generated command directly into PowerShell.
PowerShell throws a parser error:
Working Command
Quoting the package containing a scoped name with a period in the scope allows the command to run successfully:
Current Behavior
When
ncu -ggenerates an upgrade command containing a package whose scope includes a period (for example,@bomb.sh/tab), the suggested command cannot be pasted directly into PowerShell because PowerShell interprets the scope name as an invalid splatting expression and throws a parser error.Expected Behavior
The generated command should be directly executable in supported shells, including PowerShell.
One possible fix would be to automatically quote package names whose scope contains characters that require quoting in PowerShell, e.g.:
Environment
.ncurc: none (global update check withncu -g)