Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nuxi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"magicast": "^0.5.3",
"nitro": "^3.0.1-alpha.2",
"nitropack": "^2.13.4",
"nypm": "^0.6.7",
"nypm": "^0.6.8",
"ofetch": "^1.5.1",
"ohash": "^2.0.11",
"pathe": "^2.0.3",
Expand Down
1 change: 1 addition & 0 deletions packages/nuxi/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const pms: Record<PackageManagerName, undefined> = {
bun: undefined,
deno: undefined,
aube: undefined,
nub: undefined,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect nypm's installed type declarations for the exact package manager literal
fd -HI 'nypm' -t d node_modules | head -5
fd -HI '.d.ts' node_modules/nypm 2>/dev/null | xargs -I{} grep -n "PackageManagerName\|nub\|aube" {} 2>/dev/null

Repository: nuxt/cli

Length of output: 226


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate nypm declaration files and inspect the relevant type definitions.
NPM_ROOT="node_modules/.pnpm/nypm@0.6.7/node_modules/nypm"

echo "== files =="
fd -H -t f . "$NPM_ROOT" | sed -n '1,120p'

echo
echo "== package-manager references =="
rg -n "PackageManagerName|nub|aube|PackageManager" "$NPM_ROOT" || true

echo
echo "== likely type declaration slices =="
for f in $(fd -H -t f '\.d\.ts$' "$NPM_ROOT"); do
  if rg -n "PackageManagerName|nub|aube" "$f" >/dev/null; then
    echo "--- $f ---"
    sed -n '1,220p' "$f"
  fi
done

Repository: nuxt/cli

Length of output: 827


🏁 Script executed:

#!/bin/bash
set -euo pipefail

PKG="node_modules/.pnpm/nypm@0.6.7/node_modules/nypm"

echo "== package.json =="
cat "$PKG/package.json"

echo
echo "== nearby nypm files =="
fd -H -t f 'nypm' node_modules/.pnpm | sed -n '1,200p'

echo
echo "== aube/nub references in the pnpm store =="
rg -n "PackageManagerName|nub|aube" node_modules/.pnpm/nypm@0.6.7 node_modules/.pnpm -g '!**/README.md' -g '!**/LICENSE' || true

Repository: nuxt/cli

Length of output: 1654


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== target file =="
cat -n packages/nuxi/src/commands/init.ts | sed -n '1,140p'

echo
echo "== package manager name definitions/usages =="
rg -n "type PackageManagerName|PackageManagerName|packageManagerOptions|nub: undefined|aube: undefined|packageManager" packages -g '!**/dist/**' || true

echo
echo "== nypm references =="
rg -n "\bnypm\b|\baube\b|\bnub\b" packages -g '!**/dist/**' || true

Repository: nuxt/cli

Length of output: 17743


Use aube here, not nub
nypm 0.6.7 lists the new package manager as aube; packageManagerOptions is derived from these keys, so nub will make --packageManager=nub invalid and can break the Record<PackageManagerName, undefined> check.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/nuxi/src/commands/init.ts` at line 45, The package manager option
key is still using the old name, which will make init generate an invalid
package manager value. Update the `packageManagerOptions` entry in `init.ts`
from `nub` to `aube`, and ensure the `Record<PackageManagerName, undefined>`
keys and any related `PackageManagerName` usage stay aligned with the new
package manager name.

}

// this is for type safety to prompt updating code in nuxi when nypm adds a new package manager
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"giget": "^3.3.0",
"jiti": "^2.7.0",
"listhen": "^1.10.0",
"nypm": "^0.6.7",
"nypm": "^0.6.8",
"ofetch": "^1.5.1",
"ohash": "^2.0.11",
"pathe": "^2.0.3",
Expand Down
Loading
Loading