Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/demo-const-tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'sv': patch
---

chore(sv): demo template uses the new `{const ...}` declaration tags ([sveltejs/svelte#18282](https://github.com/sveltejs/svelte/pull/18282))
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
"@typescript/native-preview": "7.0.0-dev.20251212.1",
"@vitest/ui": "4.1.1",
"eslint": "^10.4.0",
"eslint-plugin-svelte": "^3.17.0",
"eslint-plugin-svelte": "^3.19.0",
"magic-string": "^0.30.21",
"prettier": "^3.8.1",
"prettier-plugin-packagejson": "^2.5.22",
"prettier-plugin-svelte": "^3.4.1",
"prettier-plugin-svelte": "^4.1.0",
"sv": "workspace:*",
"svelte": "^5.53.0",
"svelte": "^5.56.1",
"tsdown": "^0.21.7",
"typescript": "^6.0.0",
"typescript-eslint": "^8.58.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/node": "^20.14.8",
"@types/prompts": "^2.4.9",
"@types/semver": "^7.7.1",
"svelte": "^5.53.0"
"svelte": "^5.56.1"
},
"keywords": [
"migration",
Expand Down
2 changes: 1 addition & 1 deletion packages/sv-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"semver": "^7.7.4",
"silver-fleece": "^1.2.1",
"smol-toml": "^1.5.2",
"svelte": "^5.53.0",
"svelte": "^5.56.1",
"yaml": "^2.8.2",
"zimmerframe": "^1.1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/sv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"gitignore-parser": "^0.0.2",
"ps-tree": "^1.2.0",
"sucrase": "^3.35.1",
"svelte": "^5.53.0",
"svelte": "^5.56.1",
"tar-fs": "^3.1.1",
"tiny-glob": "^0.2.9",
"tinyexec": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/sv/src/addons/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineAddon({
const prettierInstalled = Boolean(dependencyVersion('prettier'));

sv.devDependency('eslint', ESLINT_VERSION);
sv.devDependency('eslint-plugin-svelte', '^3.17.0');
sv.devDependency('eslint-plugin-svelte', '^3.19.0');
sv.devDependency('globals', '^17.4.0');
sv.devDependency('@eslint/js', '^10.0.1');
sv.devDependency('@types/node', getNodeTypesVersion());
Expand Down
2 changes: 1 addition & 1 deletion packages/sv/src/addons/prettier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineAddon({
if (tailwindcssInstalled) sv.devDependency('prettier-plugin-tailwindcss', '^0.7.2');

sv.devDependency('prettier', '^3.8.1');
sv.devDependency('prettier-plugin-svelte', '^3.5.1');
sv.devDependency('prettier-plugin-svelte', '^4.1.0');

sv.file(
'.prettierignore',
Expand Down
2 changes: 1 addition & 1 deletion packages/sv/src/addons/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineProject({
include: ['tests/**/test.{js,ts}'],
globalSetup: ['tests/_setup/global.ts'],
testTimeout: ONE_MINUTE * (isWindows ? 5 : 3),
hookTimeout: ONE_MINUTE * (isWindows ? 5 : 3),
hookTimeout: ONE_MINUTE * 6,
retry: env.CI ? 3 : 0,
maxConcurrency: 4,
expect: {
Expand Down
6 changes: 5 additions & 1 deletion packages/sv/src/cli/tests/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,13 @@ describe('cli', () => {
}

if (projectName === 'create-with-all-addons' && process.platform !== 'win32') {
await exec('pnpm', ['install', '--no-frozen-lockfile'], {
const installResult = await exec('pnpm', ['install', '--no-frozen-lockfile'], {
nodeOptions: { stdio: 'pipe', cwd: testOutputPath }
});
expect(
installResult.exitCode,
`pnpm install failed:\n stdout: ${installResult.stdout}\n stderr: ${installResult.stderr}`
).toBe(0);
await exec('pnpm', ['build'], {
nodeOptions: { stdio: 'pipe', cwd: testOutputPath }
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@sveltejs/adapter-auto": "^7.0.1",
"@sveltejs/kit": "^2.57.0",
"@sveltejs/vite-plugin-svelte": "^7.0.0",
"svelte": "^5.55.2",
"svelte": "^5.56.1",
"svelte-check": "^4.4.6",
"typescript": "^6.0.2",
"vite": "^8.0.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
"drizzle-orm": "^0.45.2",
"eslint": "^10.4.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^3.17.0",
"eslint-plugin-svelte": "^3.19.0",
"globals": "^17.4.0",
"mdsvex": "^0.12.7",
"playwright": "^1.60.0",
"prettier": "^3.8.1",
"prettier-plugin-svelte": "^3.5.1",
"prettier-plugin-svelte": "^4.1.0",
"prettier-plugin-tailwindcss": "^0.7.2",
"svelte": "^5.55.2",
"svelte": "^5.56.1",
"svelte-check": "^4.4.6",
"tailwindcss": "^4.2.2",
"typescript": "^6.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@sveltejs/adapter-auto": "^7.0.1",
"@sveltejs/kit": "^2.57.0",
"@sveltejs/vite-plugin-svelte": "^7.0.0",
"svelte": "^5.55.2",
"svelte": "^5.56.1",
"vite": "^8.0.7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,19 @@

<div class="grid" class:playing={!won} class:shake onanimationend={() => (shake = false)}>
{#each Array.from(Array(6).keys()) as row (row)}
{@const current = row === i}
{const current = $derived(row === i)}

<h2 class="visually-hidden">Row {row + 1}</h2>
<div class="row" class:current>
{#each Array.from(Array(5).keys()) as column (column)}
{@const guess = current ? currentGuess : data.guesses[row]}
{@const answer = data.answers[row]?.[column]}
{@const value = guess?.[column] ?? ''}
{@const selected = current && column === guess.length}
{@const exact = answer === 'x'}
{@const close = answer === 'c'}
{@const missing = answer === '_'}
{const guess = $derived(current ? currentGuess : data.guesses[row])}
{const answer = $derived(data.answers[row]?.[column])}
{const value = $derived(guess?.[column] ?? '')}
{const selected = $derived(current && column === guess.length)}
{const exact = $derived(answer === 'x')}
{const close = $derived(answer === 'c')}
{const missing = $derived(answer === '_')}

<div class="letter" class:exact class:close class:missing class:selected>
{value}
<span class="visually-hidden">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@sveltejs/package": "^2.5.7",
"@sveltejs/vite-plugin-svelte": "^7.0.0",
"publint": "^0.3.18",
"svelte": "^5.55.2",
"svelte": "^5.56.1",
"typescript": "^6.0.2",
"vite": "^8.0.7"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@sveltejs/adapter-auto": "^7.0.1",
"@sveltejs/kit": "^2.57.0",
"@sveltejs/vite-plugin-svelte": "^7.0.0",
"svelte": "^5.55.2",
"svelte": "^5.56.1",
"vite": "^8.0.7"
}
}
14 changes: 10 additions & 4 deletions packages/sv/src/create/tests/check.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { type PromiseWithChild, exec } from 'node:child_process';
import { type PromiseWithChild, exec as nodeExec } from 'node:child_process';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { promisify } from 'node:util';
import { exec } from 'tinyexec';
import { beforeAll, describe, expect, test } from 'vitest';
import { add, officialAddons } from '../../../../sv/src/index.ts';
import { type LanguageType, type TemplateType, create } from '../index.ts';
Expand All @@ -19,12 +20,17 @@ fs.mkdirSync(test_workspace_dir, { recursive: true });

fs.writeFileSync(path.join(test_workspace_dir, 'pnpm-workspace.yaml'), 'packages:\n - ./*\n');

const exec_async = promisify(exec);
const exec_async = promisify(nodeExec);

beforeAll(async () => {
await exec_async('pnpm install --no-frozen-lockfile', {
cwd: test_workspace_dir
const install = await exec('pnpm', ['install', '--no-frozen-lockfile'], {
nodeOptions: { cwd: test_workspace_dir, stdio: 'pipe' }
});
if (install.exitCode !== 0) {
throw new Error(
`pnpm install failed in ${test_workspace_dir}\n stdout: ${install.stdout}\n stderr: ${install.stderr}`
);
}
}, 60000);

/**
Expand Down
10 changes: 9 additions & 1 deletion packages/sv/src/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,15 @@ export function createSetupTest(
addPnpmAllowBuilds(cwd, 'pnpm', 'esbuild');
}

execSync('pnpm install', { cwd: path.resolve(cwd, testName), stdio: 'pipe' });
const installDir = path.resolve(cwd, testName);
const install = await exec('pnpm', ['install'], {
nodeOptions: { cwd: installDir, stdio: 'pipe' }
});
if (install.exitCode !== 0) {
throw new Error(
`pnpm install failed in ${installDir}\n stdout: ${install.stdout}\n stderr: ${install.stderr}`
);
}
});

beforeEach<Fixtures>(async (ctx) => {
Expand Down
Loading
Loading