Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"prettier-plugin-svelte": "^3.4.1",
"sv": "workspace:*",
"svelte": "^5.49.1",
"tsdown": "^0.18.4",
"tsdown": "^0.20.3",
"typescript": "^5.9.3",
"typescript-eslint": "^8.54.0",
"vitest": "4.0.15"
Expand Down
3 changes: 1 addition & 2 deletions packages/sv/lib/addons/_engine/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ async function runAddon({ addon, loaded, multiple, workspace, workspaceOptions }
fileContent = content(fileContent);
if (!fileContent) return fileContent;

// FIXME: https://github.com/rolldown/tsdown/issues/575 to remove the `replaceAll`
writeFile(workspace, path, fileContent.replaceAll('<\\/script>', '</script>'));
writeFile(workspace, path, fileContent);
files.add(path);
} catch (e) {
if (e instanceof Error) {
Expand Down
11 changes: 7 additions & 4 deletions packages/sv/lib/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import pstree, { type PS } from 'ps-tree';
import { exec, x } from 'tinyexec';

import { create } from './create/index.ts';
import type { TestProject } from 'vitest/node';
import type { AddonMap, OptionMap } from './addons/_engine/add.ts';
import type { Page } from '@playwright/test';

// With tsdown@0.20, this cause the pull of postcss to be included in the bundle.
// import type { TestProject } from 'vitest/node';
type TestProject = { provide: (key: string, value: any) => void };

export { addPnpmBuildDependencies } from './cli/utils/package-manager.ts';
export type ProjectVariant = 'kit-js' | 'kit-ts' | 'vite-js' | 'vite-ts';
Expand Down Expand Up @@ -182,8 +184,9 @@ export function setupGlobal({
};
}

type PageLike = any;
export type Fixtures = {
page: Page;
page: PageLike;
cwd(addonTestCase: AddonTestCase<any>): string;
};

Expand All @@ -201,7 +204,7 @@ export type SetupTestOptions<Addons extends AddonMap> = {

export type PrepareServerOptions = {
cwd: string;
page: Page;
page: PageLike;
buildCommand?: string;
previewCommand?: string;
};
Expand Down
5 changes: 4 additions & 1 deletion packages/sv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
"default": "./dist/lib/core.mjs"
}
},
"dependencies": {
"@types/estree": "^1.0.8",
"svelte": "^5.47.1"
},
"devDependencies": {
"@clack/prompts": "1.0.0",
"@types/estree": "^1.0.8",
Expand All @@ -52,7 +56,6 @@
"silver-fleece": "^1.2.1",
"smol-toml": "^1.5.2",
"sucrase": "^3.35.1",
"svelte": "^5.47.1",
"tar-fs": "^3.1.1",
"tiny-glob": "^0.2.9",
"tinyexec": "^1.0.2",
Expand Down
Loading
Loading