-
Notifications
You must be signed in to change notification settings - Fork 4
Prefer pnpm for init and typegen #261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
f1dd2c5
e13c759
64b43aa
2bf8bfb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@proofkit/cli": patch | ||
| --- | ||
|
|
||
| Prefer pnpm when npm invokes scaffolding and warn npm fallback users to use pnpm 11+. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@proofkit/cli": patch | ||
| --- | ||
|
|
||
| Use devEngines packageManager in generated apps. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@proofkit/cli": patch | ||
| --- | ||
|
|
||
| Use package-manager exec command in generated typegen scripts. |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -338,6 +338,38 @@ describe("executeInitPlan command paths", () => { | |||||||||
| ); | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| it("prints pnpm warning in npm next steps", async () => { | ||||||||||
| const cwd = await fs.mkdtemp(path.join(os.tmpdir(), "proofkit-new-npm-warning-")); | ||||||||||
| const console = { | ||||||||||
| info: [] as string[], | ||||||||||
| warn: [] as string[], | ||||||||||
| error: [] as string[], | ||||||||||
| success: [] as string[], | ||||||||||
| note: [] as Array<{ message: string; title?: string }>, | ||||||||||
| }; | ||||||||||
| const plan = planInit( | ||||||||||
| makeInitRequest({ | ||||||||||
| projectName: "npm-app", | ||||||||||
| scopedAppName: "npm-app", | ||||||||||
| appDir: "npm-app", | ||||||||||
| packageManager: "npm", | ||||||||||
| noInstall: true, | ||||||||||
| noGit: true, | ||||||||||
| cwd, | ||||||||||
| }), | ||||||||||
| { | ||||||||||
| templateDir: getSharedTemplateDir("nextjs-shadcn"), | ||||||||||
| packageManagerVersion: "10.0.0", | ||||||||||
| }, | ||||||||||
| ); | ||||||||||
|
|
||||||||||
| await Effect.runPromise(executeInitPlan(plan).pipe(makeTestLayer({ cwd, packageManager: "npm", console }))); | ||||||||||
|
|
||||||||||
| expect(console.info.join("\n")).toContain( | ||||||||||
| "Warning: We strongly suggest using PNPM 11 or greater as your package manager to better protect your computer and your app.", | ||||||||||
| ); | ||||||||||
|
Comment on lines
+368
to
+370
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use an intent-based warning assertion instead of exact copy Line 368 is currently failing because warning text changed slightly. Match invariant intent ( Proposed fix- expect(console.info.join("\n")).toContain(
- "Warning: We strongly suggest using pnpm 11 or greater as your package manager for security reasons.",
- );
+ expect(console.info.join("\n")).toMatch(/warning:.*pnpm 11 or greater/i);📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Actions: Release / Deterministic Contract Tests[error] Command failed: pnpm build && node ./scripts/build-current-binary.mjs && PROOFKIT_DISABLE_BUNDLED_BINARY=1 vitest run (followed by write-cli-version.mjs, tsdown, publint). vitest run exited with code 1 due to failing tests. 🪛 GitHub Check: Deterministic Contract Tests[failure] 368-368: tests/executor.test.ts > executeInitPlan command paths > prints pnpm warning in npm next steps
❯ tests/executor.test.ts:368:37 🤖 Prompt for AI Agents |
||||||||||
| }); | ||||||||||
|
|
||||||||||
| it("fails with a typed external command error when install fails", async () => { | ||||||||||
| const cwd = await fs.mkdtemp(path.join(os.tmpdir(), "proofkit-new-install-fail-")); | ||||||||||
| const plan = planInit( | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.