Skip to content

Choose npm or pnpm when creating a project - #56

Merged
flowtricks merged 4 commits into
flowtricks:mainfrom
SylvainDruaux:create-package-manager
Oct 25, 2026
Merged

flowtricks merged 4 commits into
flowtricks:mainfrom
SylvainDruaux:create-package-manager

Conversation

@SylvainDruaux

Copy link
Copy Markdown
Contributor

Both wizards ("Start from Lumos" and "Start from Astro") now ask which package manager installs the new site: npm (default) or pnpm.

Commits:

  • Remove the unused project:scaffold channel and electron/project/scaffold.ts. The renderer never called it. The handler count in mainBoundaries.test.ts goes from 134 to 133.
  • Share one create flow for both wizards: create the files, install, then make the first commit. The Astro wizard reuses the Lumos runner instead of its own copy, and create-astro now runs with --no-install --no-git. The first commit therefore includes the lockfile, and a new site opens with a clean working tree. A stalled scaffolder is stopped after five minutes instead of leaving the wizard stuck on "Creating…".
  • While the wizard runs, dots animate after the log's last line, since installs can print nothing for a long time.
  • Add a "Package manager" list to both wizards (npm or pnpm). Stacki checks the chosen manager is installed before creating anything, removes the starter's package-lock.json when pnpm is chosen, and installs with it. The Lumos note says which manager installs the site.

Yarn and Bun are not offered yet because they haven't been tested. Modern Yarn skips node_modules by default (Plug'n'Play), which the preview hasn't been checked against. Adding either one later is one entry in CREATE_PACKAGE_MANAGERS plus a test.

viteModules.test.ts: the contract graph cap goes from 48 to 49, because ipcPayloads.ts now imports shared/properties/packageManager.ts to validate the choice.

Tested: the full gate passes. On macOS, both wizards were tested with npm and pnpm: the only lockfile is the chosen manager's, it's in the first commit, and git status is clean.

The renderer never calls project:scaffold, so the channel and the minimal starter it generated are removed.
The Astro wizard reuses the Lumos runner instead of its own copy, and a stalled scaffolder is stopped after five minutes instead of leaving the wizard stuck on "Creating…".

Both wizards now create the files, install, then make the first commit, so the lockfile is part of it and a new site opens with a clean working tree. create-astro runs with --no-install --no-git, and the site keeps its history even when the install fails.
Installs and downloads can print nothing for a long time, so while the wizard runs, dots animate after the log's last line, as a terminal shows work in progress.
Both wizards ask which package manager installs the new site, npm by default. Stacki checks it is installed before creating anything, removes the starter's npm lockfile when pnpm is chosen, and installs with it before the first commit. Yarn and Bun can follow once they have been tested.
@flowtricks
flowtricks merged commit 97a401a into flowtricks:main Oct 25, 2026
4 checks passed
@SylvainDruaux
SylvainDruaux deleted the create-package-manager branch October 25, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants