fix(create-rslib): add pnpm config to Svelte templates - #1856
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a pnpm workspace policy file to the Svelte create-rslib templates so pnpm has an explicit build-script policy for svelte-preprocess, and updates the create-rslib template test helper to validate that the generated project includes the expected policy file.
Changes:
- Add
pnpm-workspace.yamlto the Svelte TS and JS templates with anallowBuildsentry forsvelte-preprocess. - Update the template generation validation helper to assert the
pnpm-workspace.yamlcontent for Svelte templates.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/create-rslib/test/helper.ts | Verifies generated Svelte projects include the expected pnpm-workspace.yaml policy content. |
| packages/create-rslib/template-svelte-ts/pnpm-workspace.yaml | Introduces pnpm allowBuilds policy for svelte-preprocess in the TS Svelte template. |
| packages/create-rslib/template-svelte-js/pnpm-workspace.yaml | Introduces pnpm allowBuilds policy for svelte-preprocess in the JS Svelte template. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7370cb9a96
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Generated Svelte library projects need an explicit build-script policy for
svelte-preprocesswhen using pnpm. This PR adds pnpm-only workspace configuration to both JavaScript and TypeScript Svelte templates and verifies the generated policy; npm and other package managers remain unaffected.Related Links
Checklist