Draft
Conversation
|
commit: |
Singular form is more consistent — `file.viteConfig` reads better than `files.viteConfig` since each property refers to a single file. Prep for community add-on improvements.
Moves the setupTest boilerplate into `sv/testing` as a reusable `createSetupTest(vitest)` factory. Internal tests now consume it the same way community add-ons will. Prep for community add-on improvements.
Typed, parser-aware `string -> string` functions that wrap parse -> callback(ast/data) -> generateCode(). Includes transforms for script, svelte, css, json, yaml, toml, html, and text. The engine detects transforms via `isTransform()` and injects workspace context (language) automatically.
Mechanical migration: every `sv.file()` callback that followed the parse -> mutate -> generateCode pattern now uses the typed transform. `parse` is retained only where transforms don't fit: - prettier.ts: try/catch around JSON parsing - sveltekit-adapter.ts: conditional parser (json vs toml) and standalone parse outside sv.file
Move `commonFilePaths`, `getPackageJson`, `readFile`, `fileExists` and `Package` type from `sv/core/files` to `@sveltejs/sv-utils` so they are available to community add-on authors. The symbols are re-exported from `sv/core/files` for backwards compat.
…pace Move `writeFile`, `installPackages` alongside the previously moved helpers. Refactor signatures to take `cwd: string` instead of `Workspace` since only `workspace.cwd` was ever used. `formatFiles` stays in `sv` as it depends on `@clack/prompts`.
…ectly Remove re-exports — all callers now import file helpers from `@sveltejs/sv-utils` directly. Rename the remaining file to match its only export.
# Conflicts: # packages/sv/src/addons/better-auth.ts # packages/sv/src/addons/devtools-json.ts # packages/sv/src/addons/drizzle.ts # packages/sv/src/addons/eslint.ts # packages/sv/src/addons/mdsvex.ts # packages/sv/src/addons/paraglide.ts # packages/sv/src/addons/playwright.ts # packages/sv/src/addons/prettier.ts # packages/sv/src/addons/sveltekit-adapter.ts # packages/sv/src/addons/tailwindcss.ts # packages/sv/src/addons/vitest-addon.ts
…dd-rebuild # Conflicts: # packages/sv/src/addons/drizzle.ts # packages/sv/src/addons/sveltekit-adapter.ts # packages/sv/src/core/engine.ts
docs, templates, dependency setup, scoped package validation, bundling, and test updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I created multiple PRs to ease the diff. once merged, I'll rebase this one.
Main topic
Detail
createSetupTestfor reusable test setup #1000filestofilein run phase rename tofile,isKit,directory#999transformsAPI and migrate all addons #1001my-cool-stuff-for-svto be used (in step 1)sv, it should bepeerDepsv-utilsis adevDepsv-addkeyword of@sveltejs/sv-utils