Use one recommended JavaScript package manager in generated projects

Open
#705 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
78/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, python
Domain
tooling

Research direction

Start with nexy/helpers/common/package_manager.py and nexy/helpers/common/vite_launch.py, then review the pnpm setup in CONTRIBUTING.md and CI. Locate the fresh-project generation path, generated README, and relevant tests; done means fresh projects name and use one preferred manager, while existing projects with committed lockfiles retain their current manager.

Written by the indexing model from the issue text.

Description

area:frontend difficulty:intermediate enhancement javascript

Problem

Generated projects pick a JavaScript package manager by lockfile, then bun, pnpm, npm in that order. A bootstrap cannot install one manager when Nexy may use three, and the docs offer three install commands for the same action.

What we know

  • nexy/helpers/common/package_manager.py lines 42 to 56: committed lockfile wins, then bun, pnpm, npm; yarn only from yarn.lock.
  • nexy/helpers/common/vite_launch.py lines 92 to 138 runs Vite with Node, then bun, then manager runners.
  • The framework repository itself uses pnpm in CONTRIBUTING.md lines 74 to 87 and in CI lines 88 to 99.
  • docs/reference/security.md lines 23 to 28 uses generic npm commands.

Proposal

Choose one recommended manager for projects Nexy creates. Proposal: pnpm, because the framework repository already pins it and commits two pnpm lockfiles. Generated projects get a pnpm lockfile and docs use pnpm commands. For an existing project that gets nexy init, keep honoring a committed lockfile so Nexy does not rewrite a user's toolchain; that case is separate from a generated project.

Acceptance

  • One preferred manager is named in the code and in the generated README.
  • Tests cover a fresh project and an existing project with a committed lockfile.
  • The bootstrap script installs only that manager (issue 2).
  • No claim that another manager is unsupported is written unless it is true.
Dominant language
Python
Stars
11
Forks
6
Avg merge
2h 14m
Merged PRs (30d)
265

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NexyPy/nexy

All issues in NexyPy/nexy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.