From 259d87eb90c2d324fc87ea377cedac10884d8e58 Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Fri, 5 Jul 2024 18:07:25 +0200 Subject: [PATCH 01/12] chore: switch to vitest --- .changeset/gold-houses-grow.md | 5 + CONTRIBUTING.md | 4 +- package.json | 3 +- packages/testing-library/package.json | 5 +- packages/testing-library/utils/test-cases.ts | 106 +---- packages/testing-library/utils/workspace.ts | 12 +- packages/tests/index.ts | 48 +- packages/tests/package.json | 6 +- packages/tests/vitest.config.ts | 10 + pnpm-lock.yaml | 455 ++++++++++++++++++- rollup.config.js | 1 - 11 files changed, 513 insertions(+), 142 deletions(-) create mode 100644 .changeset/gold-houses-grow.md create mode 100644 packages/tests/vitest.config.ts diff --git a/.changeset/gold-houses-grow.md b/.changeset/gold-houses-grow.md new file mode 100644 index 00000000..1ea68f02 --- /dev/null +++ b/.changeset/gold-houses-grow.md @@ -0,0 +1,5 @@ +--- +"@svelte-add/testing-library": minor +--- + +feat: allow more flexible testing diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae0b2f0c..2f6f19b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,13 +49,13 @@ pnpm changeset The easiest way to test a adder is to run it's cli directly. ```sh -npx ./adders/bulma +node ./packages/cli/build/index.js tailwindcss ``` Alternatively you can also run the testsuite of a adder with this command: ```sh -pnpm test bulma mdsvex +pnpm test -t tailwindcss ``` And if you have made changes to the core packages, you should probably run the full test suite for all adders. But keep in mind, this takes time! diff --git a/package.json b/package.json index 2e4a7b24..9738854f 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,11 @@ "website:dev": "pnpm -C ./packages/website dev", "website:build": "pnpm -C ./packages/website build", "website:preview": "pnpm -C ./packages/website preview", - "test": "node ./packages/tests/build/index.js", "types:check": "tsc --project tsconfig.json --noEmit", "utils:dependencies": "node ./packages/dev-utils/build/index.js dependencies && pnpm prettier:fix", "check": "pnpm eslint:check && pnpm prettier:check && pnpm types:check", + "test": "pnpm -F @svelte-add/tests exec vitest", + "test:ui": "pnpm -F @svelte-add/tests exec vitest --ui", "postinstall": "pnpm -F @svelte-add/testing-library exec playwright install chromium" }, "keywords": [], diff --git a/packages/testing-library/package.json b/packages/testing-library/package.json index f5650887..efcab3b4 100644 --- a/packages/testing-library/package.json +++ b/packages/testing-library/package.json @@ -14,11 +14,10 @@ ], "dependencies": { "@svelte-add/core": "workspace:^", - "playwright": "^1.44.1", - "create-svelte": "^6.3.0" + "create-svelte": "^6.3.0", + "playwright": "^1.44.1" }, "devDependencies": { - "promise-parallel-throttle": "^3.5.0", "terminate": "^2.6.1", "uid": "^2.0.2" }, diff --git a/packages/testing-library/utils/test-cases.ts b/packages/testing-library/utils/test-cases.ts index d3de6b29..0ff34a7c 100644 --- a/packages/testing-library/utils/test-cases.ts +++ b/packages/testing-library/utils/test-cases.ts @@ -7,8 +7,7 @@ import { startDevServer, stopDevServer } from "./dev-server"; import { startBrowser, stopBrowser } from "./browser-control"; import { getTemplatesDirectory, installDependencies, prepareWorkspaceWithTemplate, saveOptionsFile } from "./workspace"; import { runAdder } from "./adder"; -import { prompts } from "@svelte-add/core/internal"; -import * as Throttle from "promise-parallel-throttle"; +import { prompts, remoteControl } from "@svelte-add/core/internal"; import type { AdderWithoutExplicitArgs } from "@svelte-add/core/adder/config"; import type { TestOptions } from ".."; import type { OptionValues, Question } from "@svelte-add/core/adder/options"; @@ -61,6 +60,8 @@ export async function runAdderTests( "The adder is not exporting any tests. Please make sure to properly define your tests while calling `defineAdder`", ); + remoteControl.enable(); + const output = join(testOptions.outputDirectory, adder.config.metadata.id, template, uid()); await mkdir(output, { recursive: true }); @@ -86,6 +87,7 @@ export async function runAdderTests( } finally { await stopBrowser(browser, page); await stopDevServer(devServer); + remoteControl.disable(); } } @@ -94,103 +96,3 @@ export type AdderError = { template: string; message: string; } & Error; - -export async function runTestCases(testCases: Map, testOptions: TestOptions) { - const asyncTasks: Array<() => Promise> = []; - const syncTasks: Array<() => Promise> = []; - const asyncTestCaseInputs: TestCase[] = []; - const syncTestCaseInputs: TestCase[] = []; - for (const values of testCases.values()) { - for (const testCase of values) { - const taskExecutor = async () => { - try { - await runAdderTests(testCase.template, testCase.adder, testCase.options, testOptions); - } catch (e) { - const error = e as Error; - const adderError: AdderError = { - name: "AdderError", - adder: testCase.adder.config.metadata.id, - template: testCase.template, - message: error.message, - }; - throw adderError; - } - }; - - if (testCase.runSynchronously) { - syncTasks.push(taskExecutor); - syncTestCaseInputs.push(testCase); - } else { - asyncTasks.push(taskExecutor); - asyncTestCaseInputs.push(testCase); - } - } - } - - let testProgressCount = 0; - const overallTaskCount = asyncTasks.length + syncTasks.length; - const parallelTasks = testOptions.pauseExecutionAfterBrowser ? 1 : ProjectTypesList.length; - - const allAsyncResults = await Throttle.raw(asyncTasks, { - failFast: false, - maxInProgress: parallelTasks, - progressCallback: (result) => { - testProgressCount++; - logTestProgress( - testProgressCount, - overallTaskCount, - result.amountResolved, - result.amountRejected, - asyncTestCaseInputs[result.lastCompletedIndex], - ); - }, - }); - - const allSyncResults = await Throttle.raw(syncTasks, { - failFast: false, - maxInProgress: 1, - progressCallback: (result) => { - testProgressCount++; - logTestProgress( - testProgressCount, - overallTaskCount, - allAsyncResults.amountResolved + result.amountResolved, - allAsyncResults.amountRejected + result.amountRejected, - syncTestCaseInputs[result.lastCompletedIndex], - ); - }, - }); - - const rejectedAsyncPromisesResult = allAsyncResults.rejectedIndexes.map( - (x) => allAsyncResults.taskResults[x] as unknown as AdderError, - ); - const rejectedSyncPromisesResult = allSyncResults.rejectedIndexes.map( - (x) => allSyncResults.taskResults[x] as unknown as AdderError, - ); - - const rejectedPromisesResult = [...rejectedAsyncPromisesResult, ...rejectedSyncPromisesResult]; - for (const error of rejectedPromisesResult) { - console.log(`${error.adder} (${error.template}): ${error.message}`); - } - - if (rejectedPromisesResult.length > 0) { - console.log("At least one test failed. Exiting."); - process.exit(1); - } - - if (testProgressCount != overallTaskCount) { - console.log( - `Number of executed tests (${testProgressCount.toString()}) does not match number of expected tests (${overallTaskCount.toString()}). Tests failed!`, - ); - process.exit(1); - } -} - -function logTestProgress(current: number, total: number, success: number, failed: number, testCaseInput: TestCase) { - const length = total.toString().length; - const zeroPad = (num: number) => String(num).padStart(length, "0"); - - console.log( - `Total: ${zeroPad(current)} / ${total.toString()} Success: ${zeroPad(success)} Failed: ${zeroPad(failed)} (${testCaseInput.adder.config.metadata.id} / ${testCaseInput.template})`, - ); -} diff --git a/packages/testing-library/utils/workspace.ts b/packages/testing-library/utils/workspace.ts index 7b95df94..f3a755b5 100644 --- a/packages/testing-library/utils/workspace.ts +++ b/packages/testing-library/utils/workspace.ts @@ -1,8 +1,9 @@ import { join } from "node:path"; -import { cp, mkdir, writeFile } from "node:fs/promises"; +import { cp, mkdir, rm, writeFile } from "node:fs/promises"; import { executeCli } from "@svelte-add/core"; import type { TestOptions } from ".."; import type { OptionValues, Question } from "@svelte-add/core/adder/options"; +import { downloadProjectTemplates } from "./create-project"; const templatesDirectory = "templates"; @@ -33,3 +34,12 @@ export async function saveOptionsFile(workingDirectory: string, options: OptionV const json = JSON.stringify(options); await writeFile(join(workingDirectory, "options.json"), json); } + +export async function prepareTests(options: TestOptions) { + console.log("deleting old files"); + await rm(options.outputDirectory, { recursive: true, force: true }); + + console.log("downloading project templates"); + const templatesOutputDirectory = getTemplatesDirectory(options); + await downloadProjectTemplates(templatesOutputDirectory); +} diff --git a/packages/tests/index.ts b/packages/tests/index.ts index 6c9a595f..e7edebbc 100644 --- a/packages/tests/index.ts +++ b/packages/tests/index.ts @@ -1,13 +1,12 @@ -#!/usr/bin/env node - import * as path from "node:path"; import { execSync } from "node:child_process"; import { fileURLToPath } from "node:url"; -import { testAdders } from "@svelte-add/testing-library"; +import { generateTestCases, prepareTests, runAdderTests } from "@svelte-add/testing-library"; import { adderIds } from "@svelte-add/config"; import { remoteControl } from "@svelte-add/core/internal"; import type { AdderWithoutExplicitArgs } from "@svelte-add/core/adder/config"; import { getAdderDetails } from "@svelte-add/adders"; +import { test, describe, beforeAll } from "vitest"; let usingDocker = false; @@ -15,37 +14,40 @@ let usingDocker = false; const testOptions = { headless: true, pauseExecutionAfterBrowser: false, - outputDirectory: path.join(process.cwd(), "packages", "tests", ".outputs"), + outputDirectory: path.join(process.cwd(), ".outputs"), }; -void test(); - -async function test() { - const addersToTest = process.argv.slice(2); - if (addersToTest.length > 0) console.log("Only testing the following adders", addersToTest); - - await executeTests(addersToTest); -} - -/** - * Executes the tests - * @param {string[]} addersToTest - */ -async function executeTests(addersToTest: string[]) { - const filterAdders = addersToTest.length > 0; +beforeAll(async () => { + await prepareTests(testOptions); +}); +async function executeTests() { const adders: AdderWithoutExplicitArgs[] = []; for (const adderName of adderIds) { - if (filterAdders && !addersToTest.includes(adderName)) continue; - adders.push(await getAdder(adderName)); } usingDocker = !!adders.find((adder) => adder.config.metadata.id === "drizzle"); if (usingDocker) startDocker(); - await testAdders(adders, testOptions); + const adderTestCases = generateTestCases(adders); + for (const [adderId, testCases] of adderTestCases) { + describe(adderId, () => { + for (const testCase of testCases) { + let testName = `${adderId} / ${testCase.template}`; + + // only add options to name, if the test case has options + if (testCase.options && Object.keys(testCase.options).length > 0) + testName = `${testName} / ${JSON.stringify(testCase.options)}`; + + const testMethod = testCase.runSynchronously ? test : test.concurrent; + testMethod(testName, async () => { + await runAdderTests(testCase.template, testCase.adder, testCase.options, testOptions); + }); + } + }); + } } async function getAdder(adderName: string) { @@ -75,3 +77,5 @@ function stopDocker() { process.on("exit", stopDocker); process.on("SIGINT", stopDocker); + +await executeTests(); diff --git a/packages/tests/package.json b/packages/tests/package.json index 9cc08faf..bd30fb7e 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -6,9 +6,11 @@ "license": "MIT", "bin": "./build/index.js", "devDependencies": { - "@svelte-add/testing-library": "workspace:^", "@svelte-add/adders": "workspace:^", + "@svelte-add/config": "workspace:^", "@svelte-add/core": "workspace:^", - "@svelte-add/config": "workspace:^" + "@svelte-add/testing-library": "workspace:^", + "@vitest/ui": "^1.6.0", + "vitest": "^1.6.0" } } diff --git a/packages/tests/vitest.config.ts b/packages/tests/vitest.config.ts new file mode 100644 index 00000000..c74b03c5 --- /dev/null +++ b/packages/tests/vitest.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["./*.ts"], + testTimeout: 1000 * 60 * 2, // 2 minutes + hookTimeout: 1000 * 60, // 1 minute + pool: "threads", + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 74ae34d2..30e07b35 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -216,9 +216,6 @@ importers: specifier: ^1.44.1 version: 1.45.0 devDependencies: - promise-parallel-throttle: - specifier: ^3.5.0 - version: 3.5.0 terminate: specifier: ^2.6.1 version: 2.6.1 @@ -240,6 +237,12 @@ importers: '@svelte-add/testing-library': specifier: workspace:^ version: link:../testing-library + '@vitest/ui': + specifier: ^1.6.0 + version: 1.6.0(vitest@1.6.0) + vitest: + specifier: ^1.6.0 + version: 1.6.0(@types/node@20.14.9)(@vitest/ui@1.6.0) packages/website: dependencies: @@ -575,6 +578,10 @@ packages: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} + '@jest/schemas@29.6.3': + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -813,6 +820,9 @@ packages: resolution: {integrity: sha512-2bRovzs0nJZFlCN3rXirE4gwxCn97JNjMmwpecqlbgV9WcxX7WRuIrgzx/X7Ib7MYRbyUTpBYE0s2x6AmZXnlg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + '@sinclair/typebox@0.27.8': + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@sindresorhus/is@5.6.0': resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==} engines: {node: '>=14.16'} @@ -959,6 +969,26 @@ packages: resolution: {integrity: sha512-FNUujN2K/FhzLnZ0PaM95eCWKEXqzYgRzz4BAczyraX/zPCWIk4/lZ0GGr3sXIi1N0rfEuvklEZvkUBd/V6szQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@vitest/expect@1.6.0': + resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} + + '@vitest/runner@1.6.0': + resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==} + + '@vitest/snapshot@1.6.0': + resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==} + + '@vitest/spy@1.6.0': + resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==} + + '@vitest/ui@1.6.0': + resolution: {integrity: sha512-k3Lyo+ONLOgylctiGovRKy7V4+dIN2yxstX3eY5cWFXH6WP+ooVX79YSyi0GagdTQzLmT43BF27T0s6dOIPBXA==} + peerDependencies: + vitest: 1.6.0 + + '@vitest/utils@1.6.0': + resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==} + abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} @@ -967,6 +997,10 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn-walk@8.3.3: + resolution: {integrity: sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==} + engines: {node: '>=0.4.0'} + acorn@8.12.0: resolution: {integrity: sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==} engines: {node: '>=0.4.0'} @@ -1010,6 +1044,10 @@ packages: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + ansi-styles@6.2.1: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} @@ -1045,6 +1083,9 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} + assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + ast-types@0.14.2: resolution: {integrity: sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==} engines: {node: '>=4'} @@ -1108,6 +1149,10 @@ packages: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + cacache@16.1.3: resolution: {integrity: sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -1139,6 +1184,10 @@ packages: caniuse-lite@1.0.30001636: resolution: {integrity: sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==} + chai@4.4.1: + resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} + engines: {node: '>=4'} + chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -1154,6 +1203,9 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} @@ -1216,6 +1268,9 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + confbox@0.1.7: + resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} @@ -1278,6 +1333,10 @@ packages: babel-plugin-macros: optional: true + deep-eql@4.1.4: + resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} + engines: {node: '>=6'} + deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} @@ -1310,6 +1369,10 @@ packages: didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1472,6 +1535,10 @@ packages: event-stream@3.3.4: resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==} + execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + exponential-backoff@3.1.1: resolution: {integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==} @@ -1504,6 +1571,9 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fflate@0.8.2: + resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -1585,6 +1655,9 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} deprecated: This package is no longer supported. + get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + get-stdin@8.0.0: resolution: {integrity: sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==} engines: {node: '>=10'} @@ -1593,6 +1666,10 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + get-tsconfig@4.7.5: resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} @@ -1701,6 +1778,10 @@ packages: human-id@1.0.2: resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} + human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} @@ -1823,6 +1904,10 @@ packages: is-reference@3.0.2: resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-subdir@1.2.0: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} @@ -1859,6 +1944,9 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-tokens@9.0.0: + resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==} + js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -1931,6 +2019,10 @@ packages: resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} engines: {node: '>=6'} + local-pkg@0.5.0: + resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} + engines: {node: '>=14'} + locate-character@3.0.0: resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} @@ -1951,6 +2043,9 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + lowercase-keys@3.0.0: resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -1986,6 +2081,9 @@ packages: mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -1994,6 +2092,10 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} @@ -2072,6 +2174,9 @@ packages: engines: {node: '>=10'} hasBin: true + mlly@1.7.1: + resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -2169,6 +2274,10 @@ packages: resolution: {integrity: sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + npmlog@6.0.2: resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -2185,6 +2294,10 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -2212,6 +2325,10 @@ packages: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-limit@5.0.0: + resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} + engines: {node: '>=18'} + p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -2262,6 +2379,10 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} @@ -2273,6 +2394,12 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + + pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + pause-stream@0.0.11: resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} @@ -2302,6 +2429,9 @@ packages: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} + pkg-types@1.1.3: + resolution: {integrity: sha512-+JrgthZG6m3ckicaOB74TwQ+tBWsFl3qVQg7mN8ulwSOElJ7gBhKzj2VkCPnZ4NlF6kEquYU+RIYNVAvzd54UA==} + playwright-core@1.45.0: resolution: {integrity: sha512-lZmHlFQ0VYSpAs43dRq1/nJ9G/6SiTI7VPqidld9TDefL9tX87bTKExWZZUF5PeRyqtXqd8fQi2qmfIedkwsNQ==} engines: {node: '>=18'} @@ -2375,6 +2505,10 @@ packages: engines: {node: '>=14'} hasBin: true + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + proc-log@3.0.0: resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -2391,9 +2525,6 @@ packages: bluebird: optional: true - promise-parallel-throttle@3.5.0: - resolution: {integrity: sha512-PXqj8TEaYMV6pQd6IVPoMjRrOHh2o/vxbWbt5eUxPuuAplrLgcdzo3KGqh2aT0A4Se6JSQxoGnB8CSIXeAOLvQ==} - promise-retry@2.0.1: resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} engines: {node: '>=10'} @@ -2435,6 +2566,9 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} @@ -2601,6 +2735,9 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -2694,6 +2831,12 @@ packages: resolution: {integrity: sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@3.7.0: + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + stream-combiner@0.0.4: resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==} @@ -2720,6 +2863,10 @@ packages: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + strip-indent@3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -2736,6 +2883,9 @@ packages: resolution: {integrity: sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==} engines: {node: '>=14.16'} + strip-literal@2.1.0: + resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} + sucrase@3.35.0: resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} engines: {node: '>=16 || 14 >=14.17'} @@ -2846,6 +2996,17 @@ packages: tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tinybench@2.8.0: + resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} + + tinypool@0.8.4: + resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} + engines: {node: '>=14.0.0'} + + tinyspy@2.2.1: + resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + engines: {node: '>=14.0.0'} + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -2885,6 +3046,10 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + type-fest@1.4.0: resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} engines: {node: '>=10'} @@ -2910,6 +3075,9 @@ packages: engines: {node: '>=14.17'} hasBin: true + ufo@1.5.3: + resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} + uid@2.0.2: resolution: {integrity: sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==} engines: {node: '>=8'} @@ -2968,6 +3136,11 @@ packages: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + vite-node@1.6.0: + resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + vite@5.3.1: resolution: {integrity: sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -3004,6 +3177,31 @@ packages: vite: optional: true + vitest@1.6.0: + resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 1.6.0 + '@vitest/ui': 1.6.0 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -3028,6 +3226,11 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true + why-is-node-running@2.2.2: + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} + hasBin: true + wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} @@ -3072,6 +3275,10 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + yocto-queue@1.1.1: + resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} + engines: {node: '>=12.20'} + zimmerframe@1.1.2: resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} @@ -3410,6 +3617,10 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 + '@jest/schemas@29.6.3': + dependencies: + '@sinclair/typebox': 0.27.8 + '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 @@ -3640,6 +3851,8 @@ snapshots: transitivePeerDependencies: - supports-color + '@sinclair/typebox@0.27.8': {} + '@sindresorhus/is@5.6.0': {} '@sveltejs/adapter-static@3.0.2(@sveltejs/kit@2.5.17(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.9)))(svelte@4.2.18)(vite@5.3.1(@types/node@20.14.9)))': @@ -3819,12 +4032,56 @@ snapshots: '@typescript-eslint/types': 8.0.0-alpha.37 eslint-visitor-keys: 3.4.3 + '@vitest/expect@1.6.0': + dependencies: + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 + chai: 4.4.1 + + '@vitest/runner@1.6.0': + dependencies: + '@vitest/utils': 1.6.0 + p-limit: 5.0.0 + pathe: 1.1.2 + + '@vitest/snapshot@1.6.0': + dependencies: + magic-string: 0.30.10 + pathe: 1.1.2 + pretty-format: 29.7.0 + + '@vitest/spy@1.6.0': + dependencies: + tinyspy: 2.2.1 + + '@vitest/ui@1.6.0(vitest@1.6.0)': + dependencies: + '@vitest/utils': 1.6.0 + fast-glob: 3.3.2 + fflate: 0.8.2 + flatted: 3.3.1 + pathe: 1.1.2 + picocolors: 1.0.1 + sirv: 2.0.4 + vitest: 1.6.0(@types/node@20.14.9)(@vitest/ui@1.6.0) + + '@vitest/utils@1.6.0': + dependencies: + diff-sequences: 29.6.3 + estree-walker: 3.0.3 + loupe: 2.3.7 + pretty-format: 29.7.0 + abbrev@1.1.1: {} acorn-jsx@5.3.2(acorn@8.12.0): dependencies: acorn: 8.12.0 + acorn-walk@8.3.3: + dependencies: + acorn: 8.12.0 + acorn@8.12.0: {} agent-base@6.0.2: @@ -3867,6 +4124,8 @@ snapshots: dependencies: color-convert: 2.0.1 + ansi-styles@5.2.0: {} + ansi-styles@6.2.1: {} any-promise@1.3.0: {} @@ -3897,6 +4156,8 @@ snapshots: array-union@2.1.0: {} + assertion-error@1.1.0: {} + ast-types@0.14.2: dependencies: tslib: 2.6.3 @@ -3966,6 +4227,8 @@ snapshots: builtin-modules@3.3.0: {} + cac@6.7.14: {} + cacache@16.1.3: dependencies: '@npmcli/fs': 2.1.2 @@ -4024,6 +4287,16 @@ snapshots: caniuse-lite@1.0.30001636: {} + chai@4.4.1: + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.4 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.0.8 + chalk@2.4.2: dependencies: ansi-styles: 3.2.1 @@ -4039,6 +4312,10 @@ snapshots: chardet@0.7.0: {} + check-error@1.0.3: + dependencies: + get-func-name: 2.0.2 + chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -4097,6 +4374,8 @@ snapshots: concat-map@0.0.1: {} + confbox@0.1.7: {} + config-chain@1.1.13: dependencies: ini: 1.3.8 @@ -4154,6 +4433,10 @@ snapshots: dedent@1.5.3: {} + deep-eql@4.1.4: + dependencies: + type-detect: 4.0.8 + deep-extend@0.6.0: {} deep-is@0.1.4: {} @@ -4172,6 +4455,8 @@ snapshots: didyoumean@1.2.2: {} + diff-sequences@29.6.3: {} + dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -4366,6 +4651,18 @@ snapshots: stream-combiner: 0.0.4 through: 2.3.8 + execa@8.0.1: + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + exponential-backoff@3.1.1: {} extendable-error@0.1.7: {} @@ -4398,6 +4695,8 @@ snapshots: dependencies: reusify: 1.0.4 + fflate@0.8.2: {} + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -4482,10 +4781,14 @@ snapshots: strip-ansi: 6.0.1 wide-align: 1.1.5 + get-func-name@2.0.2: {} + get-stdin@8.0.0: {} get-stream@6.0.1: {} + get-stream@8.0.1: {} + get-tsconfig@4.7.5: dependencies: resolve-pkg-maps: 1.0.0 @@ -4615,6 +4918,8 @@ snapshots: human-id@1.0.2: {} + human-signals@5.0.0: {} + humanize-ms@1.2.1: dependencies: ms: 2.1.2 @@ -4716,6 +5021,8 @@ snapshots: dependencies: '@types/estree': 1.0.5 + is-stream@3.0.0: {} + is-subdir@1.2.0: dependencies: better-path-resolve: 1.0.0 @@ -4743,6 +5050,8 @@ snapshots: js-tokens@4.0.0: optional: true + js-tokens@9.0.0: {} + js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -4804,6 +5113,11 @@ snapshots: pify: 4.0.1 strip-bom: 3.0.0 + local-pkg@0.5.0: + dependencies: + mlly: 1.7.1 + pkg-types: 1.1.3 + locate-character@3.0.0: {} locate-path@5.0.0: @@ -4820,6 +5134,10 @@ snapshots: lodash@4.17.21: {} + loupe@2.3.7: + dependencies: + get-func-name: 2.0.2 + lowercase-keys@3.0.0: {} lru-cache@10.2.2: {} @@ -4885,6 +5203,8 @@ snapshots: mdn-data@2.0.30: {} + merge-stream@2.0.0: {} + merge2@1.4.1: {} micromatch@4.0.5: @@ -4892,6 +5212,8 @@ snapshots: braces: 3.0.2 picomatch: 2.3.1 + mimic-fn@4.0.0: {} + mimic-response@3.1.0: {} mimic-response@4.0.0: {} @@ -4968,6 +5290,13 @@ snapshots: mkdirp@1.0.4: {} + mlly@1.7.1: + dependencies: + acorn: 8.12.0 + pathe: 1.1.2 + pkg-types: 1.1.3 + ufo: 1.5.3 + mri@1.2.0: {} mrmime@2.0.0: {} @@ -5107,6 +5436,10 @@ snapshots: transitivePeerDependencies: - supports-color + npm-run-path@5.3.0: + dependencies: + path-key: 4.0.0 + npmlog@6.0.2: dependencies: are-we-there-yet: 3.0.1 @@ -5122,6 +5455,10 @@ snapshots: dependencies: wrappy: 1.0.2 + onetime@6.0.0: + dependencies: + mimic-fn: 4.0.0 + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -5149,6 +5486,10 @@ snapshots: dependencies: yocto-queue: 0.1.0 + p-limit@5.0.0: + dependencies: + yocto-queue: 1.1.1 + p-locate@4.1.0: dependencies: p-limit: 2.3.0 @@ -5208,6 +5549,8 @@ snapshots: path-key@3.1.1: {} + path-key@4.0.0: {} + path-parse@1.0.7: {} path-scurry@1.11.1: @@ -5217,6 +5560,10 @@ snapshots: path-type@4.0.0: {} + pathe@1.1.2: {} + + pathval@1.1.1: {} + pause-stream@0.0.11: dependencies: through: 2.3.8 @@ -5241,6 +5588,12 @@ snapshots: dependencies: find-up: 4.1.0 + pkg-types@1.1.3: + dependencies: + confbox: 0.1.7 + mlly: 1.7.1 + pathe: 1.1.2 + playwright-core@1.45.0: {} playwright@1.45.0: @@ -5303,14 +5656,18 @@ snapshots: prettier@3.3.2: {} + pretty-format@29.7.0: + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.3.1 + proc-log@3.0.0: {} progress@2.0.3: {} promise-inflight@1.0.1: {} - promise-parallel-throttle@3.5.0: {} - promise-retry@2.0.1: dependencies: err-code: 2.0.3 @@ -5355,6 +5712,8 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 + react-is@18.3.1: {} + read-cache@1.0.0: dependencies: pify: 2.3.0 @@ -5533,6 +5892,8 @@ snapshots: shebang-regex@3.0.0: {} + siginfo@2.0.0: {} + signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -5631,6 +5992,10 @@ snapshots: dependencies: minipass: 3.3.6 + stackback@0.0.2: {} + + std-env@3.7.0: {} + stream-combiner@0.0.4: dependencies: duplexer: 0.1.2 @@ -5661,6 +6026,8 @@ snapshots: strip-bom@3.0.0: {} + strip-final-newline@3.0.0: {} + strip-indent@3.0.0: dependencies: min-indent: 1.0.1 @@ -5671,6 +6038,10 @@ snapshots: strip-json-comments@5.0.1: {} + strip-literal@2.1.0: + dependencies: + js-tokens: 9.0.0 + sucrase@3.35.0: dependencies: '@jridgewell/gen-mapping': 0.3.5 @@ -5811,6 +6182,12 @@ snapshots: tiny-invariant@1.3.3: {} + tinybench@2.8.0: {} + + tinypool@0.8.4: {} + + tinyspy@2.2.1: {} + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 @@ -5845,6 +6222,8 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-detect@4.0.8: {} + type-fest@1.4.0: {} type-fest@2.19.0: {} @@ -5866,6 +6245,8 @@ snapshots: typescript@5.5.2: {} + ufo@1.5.3: {} + uid@2.0.2: dependencies: '@lukeed/csprng': 1.1.0 @@ -5932,6 +6313,23 @@ snapshots: validate-npm-package-name@5.0.1: {} + vite-node@1.6.0(@types/node@20.14.9): + dependencies: + cac: 6.7.14 + debug: 4.3.5 + pathe: 1.1.2 + picocolors: 1.0.1 + vite: 5.3.1(@types/node@20.14.9) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + vite@5.3.1(@types/node@20.14.9): dependencies: esbuild: 0.21.5 @@ -5945,6 +6343,40 @@ snapshots: optionalDependencies: vite: 5.3.1(@types/node@20.14.9) + vitest@1.6.0(@types/node@20.14.9)(@vitest/ui@1.6.0): + dependencies: + '@vitest/expect': 1.6.0 + '@vitest/runner': 1.6.0 + '@vitest/snapshot': 1.6.0 + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 + acorn-walk: 8.3.3 + chai: 4.4.1 + debug: 4.3.5 + execa: 8.0.1 + local-pkg: 0.5.0 + magic-string: 0.30.10 + pathe: 1.1.2 + picocolors: 1.0.1 + std-env: 3.7.0 + strip-literal: 2.1.0 + tinybench: 2.8.0 + tinypool: 0.8.4 + vite: 5.3.1(@types/node@20.14.9) + vite-node: 1.6.0(@types/node@20.14.9) + why-is-node-running: 2.2.2 + optionalDependencies: + '@types/node': 20.14.9 + '@vitest/ui': 1.6.0(vitest@1.6.0) + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + webidl-conversions@3.0.1: {} whatwg-url@5.0.0: @@ -5969,6 +6401,11 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@2.2.2: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + wide-align@1.1.5: dependencies: string-width: 4.2.3 @@ -6010,4 +6447,6 @@ snapshots: yocto-queue@0.1.0: {} + yocto-queue@1.1.1: {} + zimmerframe@1.1.2: {} diff --git a/rollup.config.js b/rollup.config.js index a72982c2..73162c9e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -83,7 +83,6 @@ export default [ getConfig("core"), getConfig("cli"), getConfig("testing-library"), - getConfig("tests"), getConfig("dev-utils"), ...dtsConfigs, ]; From 0bd41a87989daa52e7123ee0cca46de1928d7631 Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Fri, 5 Jul 2024 18:07:41 +0200 Subject: [PATCH 02/12] chore: switch to vitest --- packages/testing-library/index.ts | 37 +++---------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/packages/testing-library/index.ts b/packages/testing-library/index.ts index ef682871..38b2c6b9 100644 --- a/packages/testing-library/index.ts +++ b/packages/testing-library/index.ts @@ -1,9 +1,5 @@ -import { rm } from "node:fs/promises"; -import { generateTestCases, runTestCases } from "./utils/test-cases"; -import { getTemplatesDirectory } from "./utils/workspace"; -import { downloadProjectTemplates } from "./utils/create-project"; -import { remoteControl } from "@svelte-add/core/internal"; -import type { AdderWithoutExplicitArgs } from "@svelte-add/core/adder/config"; +import { generateTestCases, runAdderTests } from "./utils/test-cases"; +import { prepareTests } from "./utils/workspace"; export type TestOptions = { headless: boolean; @@ -11,31 +7,4 @@ export type TestOptions = { outputDirectory: string; }; -export async function testAdder(adder: AdderWithoutExplicitArgs, options: TestOptions) { - await testAdders([adder], options); -} - -export async function testAdders(adders: AdderWithoutExplicitArgs[], options: TestOptions) { - await prepareTests(options); - - remoteControl.enable(); - await executeTests(adders, options); - remoteControl.disable(); -} - -export async function executeTests(adders: AdderWithoutExplicitArgs[], options: TestOptions) { - console.log("generating test cases"); - const testCases = generateTestCases(adders); - - console.log("start testing"); - await runTestCases(testCases, options); -} - -async function prepareTests(options: TestOptions) { - console.log("deleting old files"); - await rm(options.outputDirectory, { recursive: true, force: true }); - - console.log("downloading project templates"); - const templatesOutputDirectory = getTemplatesDirectory(options); - await downloadProjectTemplates(templatesOutputDirectory); -} +export { generateTestCases, runAdderTests, prepareTests }; From 60c3e6161ce48692f6233344f5159d3e0693e65d Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 28 Jul 2024 11:53:05 +0200 Subject: [PATCH 03/12] format --- package.json | 90 ++++++++++++++++----------------- packages/tests/package.json | 28 +++++----- packages/tests/vitest.config.ts | 14 ++--- pnpm-lock.yaml | 8 +++ 4 files changed, 74 insertions(+), 66 deletions(-) diff --git a/package.json b/package.json index 6357caeb..2386ed66 100644 --- a/package.json +++ b/package.json @@ -1,47 +1,47 @@ { - "name": "@svelte-add/repo-root", - "private": true, - "version": "2.0.0", - "description": "", - "scripts": { - "ci:publish": "changeset publish", - "format": "prettier . --write && eslint --fix .", - "lint": "prettier . --check && eslint .", - "dev": "rollup --config --watch", - "build": "rollup -c", - "website:dev": "pnpm -C ./packages/website dev", - "website:build": "pnpm -C ./packages/website build", - "website:preview": "pnpm -C ./packages/website preview", - "test": "node ./packages/tests/build/index.js", - "check": "tsc --project tsconfig.json --noEmit", - "utils:dependencies": "node ./packages/dev-utils/build/index.js dependencies && pnpm prettier:fix", - "postinstall": "pnpm -F @svelte-add/testing-library exec playwright install chromium" - }, - "keywords": [], - "author": "", - "license": "MIT", - "type": "module", - "devDependencies": { - "@changesets/cli": "^2.27.6", - "@eslint/js": "^9.6.0", - "@rollup/plugin-commonjs": "^26.0.1", - "@rollup/plugin-dynamic-import-vars": "^2.1.2", - "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^15.2.3", - "@svitejs/changesets-changelog-github-compact": "^1.1.0", - "@types/eslint__js": "^8.42.3", - "@types/node": "^20.14.9", - "eslint": "^9.6.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.1.3", - "globals": "^15.7.0", - "prettier": "^3.3.2", - "rollup": "^4.18.0", - "rollup-plugin-dts": "^6.1.1", - "rollup-plugin-esbuild": "^6.1.1", - "rollup-plugin-preserve-shebangs": "^0.2.0", - "typescript": "^5.5.2", - "typescript-eslint": "8.0.0-alpha.37" - }, - "packageManager": "pnpm@9.3.0" + "name": "@svelte-add/repo-root", + "private": true, + "version": "2.0.0", + "description": "", + "scripts": { + "ci:publish": "changeset publish", + "format": "prettier . --write && eslint --fix .", + "lint": "prettier . --check && eslint .", + "dev": "rollup --config --watch", + "build": "rollup -c", + "website:dev": "pnpm -C ./packages/website dev", + "website:build": "pnpm -C ./packages/website build", + "website:preview": "pnpm -C ./packages/website preview", + "test": "node ./packages/tests/build/index.js", + "check": "tsc --project tsconfig.json --noEmit", + "utils:dependencies": "node ./packages/dev-utils/build/index.js dependencies && pnpm prettier:fix", + "postinstall": "pnpm -F @svelte-add/testing-library exec playwright install chromium" + }, + "keywords": [], + "author": "", + "license": "MIT", + "type": "module", + "devDependencies": { + "@changesets/cli": "^2.27.6", + "@eslint/js": "^9.6.0", + "@rollup/plugin-commonjs": "^26.0.1", + "@rollup/plugin-dynamic-import-vars": "^2.1.2", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.2.3", + "@svitejs/changesets-changelog-github-compact": "^1.1.0", + "@types/eslint__js": "^8.42.3", + "@types/node": "^20.14.9", + "eslint": "^9.6.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "globals": "^15.7.0", + "prettier": "^3.3.2", + "rollup": "^4.18.0", + "rollup-plugin-dts": "^6.1.1", + "rollup-plugin-esbuild": "^6.1.1", + "rollup-plugin-preserve-shebangs": "^0.2.0", + "typescript": "^5.5.2", + "typescript-eslint": "8.0.0-alpha.37" + }, + "packageManager": "pnpm@9.3.0" } diff --git a/packages/tests/package.json b/packages/tests/package.json index 59449788..dc50de7d 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -1,16 +1,16 @@ { - "name": "@svelte-add/tests", - "private": true, - "version": "2.0.0", - "type": "module", - "license": "MIT", - "bin": "./build/index.js", - "devDependencies": { - "@svelte-add/adders": "workspace:*", - "@svelte-add/config": "workspace:*", - "@svelte-add/core": "workspace:*", - "@svelte-add/testing-library": "workspace:*", - "@vitest/ui": "^1.6.0", - "vitest": "^1.6.0" - } + "name": "@svelte-add/tests", + "private": true, + "version": "2.0.0", + "type": "module", + "license": "MIT", + "bin": "./build/index.js", + "devDependencies": { + "@svelte-add/adders": "workspace:*", + "@svelte-add/config": "workspace:*", + "@svelte-add/core": "workspace:*", + "@svelte-add/testing-library": "workspace:*", + "@vitest/ui": "^1.6.0", + "vitest": "^1.6.0" + } } diff --git a/packages/tests/vitest.config.ts b/packages/tests/vitest.config.ts index c74b03c5..ded81f1a 100644 --- a/packages/tests/vitest.config.ts +++ b/packages/tests/vitest.config.ts @@ -1,10 +1,10 @@ -import { defineConfig } from "vitest/config"; +import { defineConfig } from 'vitest/config'; export default defineConfig({ - test: { - include: ["./*.ts"], - testTimeout: 1000 * 60 * 2, // 2 minutes - hookTimeout: 1000 * 60, // 1 minute - pool: "threads", - }, + test: { + include: ['./*.ts'], + testTimeout: 1000 * 60 * 2, // 2 minutes + hookTimeout: 1000 * 60, // 1 minute + pool: 'threads', + }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aaccce57..691e9113 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -219,6 +219,9 @@ importers: specifier: ^1.44.1 version: 1.45.0 devDependencies: + promise-parallel-throttle: + specifier: ^3.5.0 + version: 3.5.0 terminate: specifier: ^2.6.1 version: 2.6.1 @@ -2532,6 +2535,9 @@ packages: bluebird: optional: true + promise-parallel-throttle@3.5.0: + resolution: {integrity: sha512-PXqj8TEaYMV6pQd6IVPoMjRrOHh2o/vxbWbt5eUxPuuAplrLgcdzo3KGqh2aT0A4Se6JSQxoGnB8CSIXeAOLvQ==} + promise-retry@2.0.1: resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} engines: {node: '>=10'} @@ -5677,6 +5683,8 @@ snapshots: promise-inflight@1.0.1: {} + promise-parallel-throttle@3.5.0: {} + promise-retry@2.0.1: dependencies: err-code: 2.0.3 From 77b10f260a3d29e4c7c796c9d75c9fe3d082c1aa Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 28 Jul 2024 12:06:10 +0200 Subject: [PATCH 04/12] fix merge conflicts --- package.json | 3 ++- packages/testing-library/package.json | 8 +++++--- packages/testing-library/utils/test-cases.ts | 4 +++- pnpm-lock.yaml | 6 ++++++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2386ed66..942d21ad 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "website:dev": "pnpm -C ./packages/website dev", "website:build": "pnpm -C ./packages/website build", "website:preview": "pnpm -C ./packages/website preview", - "test": "node ./packages/tests/build/index.js", + "test": "pnpm -F @svelte-add/tests exec vitest", + "test:ui": "pnpm -F @svelte-add/tests exec vitest --ui", "check": "tsc --project tsconfig.json --noEmit", "utils:dependencies": "node ./packages/dev-utils/build/index.js dependencies && pnpm prettier:fix", "postinstall": "pnpm -F @svelte-add/testing-library exec playwright install chromium" diff --git a/packages/testing-library/package.json b/packages/testing-library/package.json index b6cadaba..cbe4552a 100644 --- a/packages/testing-library/package.json +++ b/packages/testing-library/package.json @@ -14,13 +14,15 @@ ], "dependencies": { "@svelte-add/core": "workspace:^", - "playwright": "^1.44.1", - "create-svelte": "^6.3.4" + "create-svelte": "^6.3.4", + "playwright": "^1.44.1" }, "devDependencies": { + "@vitest/ui": "^1.6.0", "promise-parallel-throttle": "^3.5.0", "terminate": "^2.6.1", - "uid": "^2.0.2" + "uid": "^2.0.2", + "vitest": "^1.6.0" }, "bugs": "https://github.com/svelte-add/svelte-add/issues", "repository": { diff --git a/packages/testing-library/utils/test-cases.ts b/packages/testing-library/utils/test-cases.ts index dae30a34..4b1073b9 100644 --- a/packages/testing-library/utils/test-cases.ts +++ b/packages/testing-library/utils/test-cases.ts @@ -12,7 +12,7 @@ import { saveOptionsFile, } from './workspace'; import { runAdder } from './adder'; -import { prompts } from '@svelte-add/core/internal'; +import { prompts, remoteControl } from '@svelte-add/core/internal'; import * as Throttle from 'promise-parallel-throttle'; import type { AdderWithoutExplicitArgs } from '@svelte-add/core/adder/config'; import type { TestOptions } from '..'; @@ -100,6 +100,8 @@ export async function runAdderTests( } finally { await stopBrowser(browser, page); await stopDevServer(devServer); + + remoteControl.disable(); } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 691e9113..6a8ad5e9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -219,6 +219,9 @@ importers: specifier: ^1.44.1 version: 1.45.0 devDependencies: + '@vitest/ui': + specifier: ^1.6.0 + version: 1.6.0(vitest@1.6.0) promise-parallel-throttle: specifier: ^3.5.0 version: 3.5.0 @@ -228,6 +231,9 @@ importers: uid: specifier: ^2.0.2 version: 2.0.2 + vitest: + specifier: ^1.6.0 + version: 1.6.0(@types/node@20.14.9)(@vitest/ui@1.6.0) packages/tests: devDependencies: From b05854ae7f6cb8c36ad050835087ca32c04cfad3 Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 28 Jul 2024 13:44:35 +0200 Subject: [PATCH 05/12] use npm again --- packages/testing-library/utils/workspace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/testing-library/utils/workspace.ts b/packages/testing-library/utils/workspace.ts index 259f76b6..e0ba9d10 100644 --- a/packages/testing-library/utils/workspace.ts +++ b/packages/testing-library/utils/workspace.ts @@ -15,7 +15,7 @@ export async function installDependencies(output: string) { try { // Since tests are executed and installed within this repo (packages/tests/.outputs), // we need to add the `--ignore-workspace` flag so that our root lockfile isn't modified - await executeCli('pnpm', ['install', '--ignore-workspace'], output, { stdio: 'pipe' }); + await executeCli('npm', ['install', '--ignore-workspace'], output, { stdio: 'pipe' }); } catch (error) { const typedError = error as Error; throw new Error('unable to install dependencies: ' + typedError.message); From 21aa2523fec444412b2fee544b638cf8e7ef0af6 Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 28 Jul 2024 13:45:02 +0200 Subject: [PATCH 06/12] generate descriptive unique folder names for option tests --- packages/testing-library/package.json | 1 - packages/testing-library/utils/test-cases.ts | 16 ++++++++++++---- packages/testing-library/utils/workspace.ts | 11 +---------- pnpm-lock.yaml | 17 ----------------- rollup.config.js | 1 - 5 files changed, 13 insertions(+), 33 deletions(-) diff --git a/packages/testing-library/package.json b/packages/testing-library/package.json index cbe4552a..f4427f5f 100644 --- a/packages/testing-library/package.json +++ b/packages/testing-library/package.json @@ -21,7 +21,6 @@ "@vitest/ui": "^1.6.0", "promise-parallel-throttle": "^3.5.0", "terminate": "^2.6.1", - "uid": "^2.0.2", "vitest": "^1.6.0" }, "bugs": "https://github.com/svelte-add/svelte-add/issues", diff --git a/packages/testing-library/utils/test-cases.ts b/packages/testing-library/utils/test-cases.ts index 4b1073b9..cb33e267 100644 --- a/packages/testing-library/utils/test-cases.ts +++ b/packages/testing-library/utils/test-cases.ts @@ -2,14 +2,12 @@ import { join } from 'node:path'; import { mkdir } from 'node:fs/promises'; import { ProjectTypesList } from './create-project'; import { runTests } from './test'; -import { uid } from 'uid'; import { startDevServer, stopDevServer } from './dev-server'; import { startBrowser, stopBrowser } from './browser-control'; import { getTemplatesDirectory, installDependencies, prepareWorkspaceWithTemplate, - saveOptionsFile, } from './workspace'; import { runAdder } from './adder'; import { prompts, remoteControl } from '@svelte-add/core/internal'; @@ -71,7 +69,18 @@ export async function runAdderTests( remoteControl.enable(); - const output = join(testOptions.outputDirectory, adder.config.metadata.id, template, uid()); + // generate a unique descriptive folder name if options are present + const optionsString = Object.entries(options) + .filter((data) => data[1]) // ensure value it not undefined + .map(([key, value]) => `${key}=${value as string}`) + .join('+'); + + const output = join( + testOptions.outputDirectory, + adder.config.metadata.id, + template, + optionsString, + ); await mkdir(output, { recursive: true }); const workingDirectory = await prepareWorkspaceWithTemplate( @@ -79,7 +88,6 @@ export async function runAdderTests( template, getTemplatesDirectory(testOptions), ); - await saveOptionsFile(workingDirectory, options); await runAdder(adder, workingDirectory, options); diff --git a/packages/testing-library/utils/workspace.ts b/packages/testing-library/utils/workspace.ts index e0ba9d10..8ef8174c 100644 --- a/packages/testing-library/utils/workspace.ts +++ b/packages/testing-library/utils/workspace.ts @@ -1,8 +1,7 @@ import { join } from 'node:path'; -import { cp, mkdir, rm, writeFile } from 'node:fs/promises'; +import { cp, mkdir, rm } from 'node:fs/promises'; import { executeCli } from '@svelte-add/core'; import type { TestOptions } from '..'; -import type { OptionValues, Question } from '@svelte-add/core/adder/options'; import { downloadProjectTemplates } from './create-project'; const templatesDirectory = 'templates'; @@ -34,14 +33,6 @@ export async function prepareWorkspaceWithTemplate( return output; } -export async function saveOptionsFile( - workingDirectory: string, - options: OptionValues>, -) { - const json = JSON.stringify(options); - await writeFile(join(workingDirectory, 'options.json'), json); -} - export async function prepareTests(options: TestOptions) { console.log('deleting old files'); await rm(options.outputDirectory, { recursive: true, force: true }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a8ad5e9..cbfd24ef 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,9 +228,6 @@ importers: terminate: specifier: ^2.6.1 version: 2.6.1 - uid: - specifier: ^2.0.2 - version: 2.0.2 vitest: specifier: ^1.6.0 version: 1.6.0(@types/node@20.14.9)(@vitest/ui@1.6.0) @@ -612,10 +609,6 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@lukeed/csprng@1.1.0': - resolution: {integrity: sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==} - engines: {node: '>=8'} - '@manypkg/find-root@1.1.0': resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} @@ -3097,10 +3090,6 @@ packages: ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} - uid@2.0.2: - resolution: {integrity: sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==} - engines: {node: '>=8'} - undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -3657,8 +3646,6 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@lukeed/csprng@1.1.0': {} - '@manypkg/find-root@1.1.0': dependencies: '@babel/runtime': 7.24.5 @@ -6270,10 +6257,6 @@ snapshots: ufo@1.5.3: {} - uid@2.0.2: - dependencies: - '@lukeed/csprng': 1.1.0 - undici-types@5.26.5: {} unique-filename@2.0.1: diff --git a/rollup.config.js b/rollup.config.js index b6398829..e5536da8 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -83,7 +83,6 @@ export default [ getConfig('core'), getConfig('cli'), getConfig('testing-library'), - getConfig('tests'), getConfig('dev-utils'), ...dtsConfigs, ]; From b14b427e06c04cec5159df3a8e4c20ec6c6626f8 Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 28 Jul 2024 18:11:33 +0200 Subject: [PATCH 07/12] rename file --- packages/tests/{index.ts => end2end.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/tests/{index.ts => end2end.ts} (100%) diff --git a/packages/tests/index.ts b/packages/tests/end2end.ts similarity index 100% rename from packages/tests/index.ts rename to packages/tests/end2end.ts From 500bcd7f35373fe844087a21390e6c35c130694d Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 28 Jul 2024 19:50:06 +0200 Subject: [PATCH 08/12] feat: add integration testing against snapshots --- packages/core/adder/execute.ts | 17 +- packages/testing-library/index.ts | 8 +- packages/testing-library/utils/adder.ts | 10 +- packages/testing-library/utils/test-cases.ts | 61 +++-- packages/testing-library/utils/workspace.ts | 11 +- .../addJavaScript=true/package.json | 24 ++ .../src/routes/+layout.svelte | 16 ++ .../package.json | 25 ++ .../src/app.scss | 21 ++ .../src/routes/+layout.svelte | 16 ++ .../src/variables.scss | 2 + .../vite.config.ts | 9 + .../kit-js/addJavaScript=true/package.json | 20 ++ .../src/routes/+layout.svelte | 16 ++ .../package.json | 21 ++ .../src/app.scss | 21 ++ .../src/routes/+layout.svelte | 16 ++ .../src/variables.scss | 2 + .../vite.config.ts | 9 + .../kit-ts/addJavaScript=true/package.json | 24 ++ .../src/routes/+layout.svelte | 16 ++ .../package.json | 25 ++ .../src/app.scss | 21 ++ .../src/routes/+layout.svelte | 16 ++ .../src/variables.scss | 2 + .../vite.config.ts | 14 ++ .../svelte-js/addJavaScript=true/package.json | 18 ++ .../addJavaScript=true/src/App.svelte | 58 +++++ .../package.json | 19 ++ .../src/App.svelte | 58 +++++ .../src/app.scss | 21 ++ .../src/variables.scss | 2 + .../vite.config.ts | 9 + .../svelte-ts/addJavaScript=true/package.json | 23 ++ .../addJavaScript=true/src/App.svelte | 58 +++++ .../package.json | 24 ++ .../src/App.svelte | 58 +++++ .../src/app.scss | 21 ++ .../src/variables.scss | 2 + .../vite.config.ts | 15 ++ .../bulma/kit-js-comments/package.json | 23 ++ .../kit-js-comments/src/routes/+layout.svelte | 1 + .../kit-js-comments/useSass=true/package.json | 24 ++ .../kit-js-comments/useSass=true/src/app.scss | 15 ++ .../useSass=true/src/routes/+layout.svelte | 1 + .../useSass=true/src/variables.scss | 2 + .../useSass=true/vite.config.ts | 9 + .../integration/bulma/kit-js/package.json | 19 ++ .../bulma/kit-js/src/routes/+layout.svelte | 1 + .../bulma/kit-js/useSass=true/package.json | 20 ++ .../bulma/kit-js/useSass=true/src/app.scss | 15 ++ .../useSass=true/src/routes/+layout.svelte | 1 + .../kit-js/useSass=true/src/variables.scss | 2 + .../bulma/kit-js/useSass=true/vite.config.ts | 9 + .../integration/bulma/kit-ts/package.json | 23 ++ .../bulma/kit-ts/src/routes/+layout.svelte | 1 + .../bulma/kit-ts/useSass=true/package.json | 24 ++ .../bulma/kit-ts/useSass=true/src/app.scss | 15 ++ .../useSass=true/src/routes/+layout.svelte | 1 + .../kit-ts/useSass=true/src/variables.scss | 2 + .../bulma/kit-ts/useSass=true/vite.config.ts | 14 ++ .../integration/bulma/svelte-js/package.json | 17 ++ .../bulma/svelte-js/src/App.svelte | 47 ++++ .../bulma/svelte-js/useSass=true/package.json | 18 ++ .../svelte-js/useSass=true/src/App.svelte | 47 ++++ .../bulma/svelte-js/useSass=true/src/app.scss | 15 ++ .../svelte-js/useSass=true/src/variables.scss | 2 + .../svelte-js/useSass=true/vite.config.ts | 9 + .../integration/bulma/svelte-ts/package.json | 22 ++ .../bulma/svelte-ts/src/App.svelte | 47 ++++ .../bulma/svelte-ts/useSass=true/package.json | 23 ++ .../svelte-ts/useSass=true/src/App.svelte | 47 ++++ .../bulma/svelte-ts/useSass=true/src/app.scss | 15 ++ .../svelte-ts/useSass=true/src/variables.scss | 2 + .../svelte-ts/useSass=true/vite.config.ts | 15 ++ .../.env | 1 + .../docker-compose.yml | 9 + .../drizzle.config.ts | 14 ++ .../package.json | 31 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../.env | 1 + .../docker-compose.yml | 10 + .../drizzle.config.ts | 14 ++ .../package.json | 31 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../.gitignore | 22 ++ .../drizzle.config.ts | 14 ++ .../package.json | 31 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../sqlite=libsql+database=sqlite/.gitignore | 22 ++ .../drizzle.config.ts | 14 ++ .../package.json | 30 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../.env | 1 + .../docker-compose.yml | 9 + .../drizzle.config.ts | 14 ++ .../package.json | 27 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../.env | 1 + .../docker-compose.yml | 10 + .../drizzle.config.ts | 14 ++ .../package.json | 27 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../.gitignore | 22 ++ .../drizzle.config.ts | 14 ++ .../package.json | 27 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../sqlite=libsql+database=sqlite/.gitignore | 22 ++ .../drizzle.config.ts | 14 ++ .../package.json | 26 ++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../.env | 1 + .../docker-compose.yml | 9 + .../drizzle.config.ts | 14 ++ .../package.json | 31 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../.env | 1 + .../docker-compose.yml | 10 + .../drizzle.config.ts | 14 ++ .../package.json | 31 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../.gitignore | 22 ++ .../drizzle.config.ts | 14 ++ .../package.json | 31 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../sqlite=libsql+database=sqlite/.gitignore | 22 ++ .../drizzle.config.ts | 14 ++ .../package.json | 30 +++ .../src/lib/server/db/index.ts | 6 + .../src/lib/server/db/schema.ts | 7 + .../eslint/kit-js-comments/eslint.config.js | 31 +++ .../eslint/kit-js-comments/package.json | 28 +++ .../eslint/kit-js/eslint.config.js | 31 +++ .../integration/eslint/kit-js/package.json | 24 ++ .../eslint/kit-ts/eslint.config.js | 31 +++ .../integration/eslint/kit-ts/package.json | 28 +++ .../eslint/svelte-js/eslint.config.js | 31 +++ .../integration/eslint/svelte-js/package.json | 22 ++ .../eslint/svelte-ts/eslint.config.js | 31 +++ .../integration/eslint/svelte-ts/package.json | 27 +++ .../mdsvex/kit-js-comments/package.json | 23 ++ .../mdsvex/kit-js-comments/svelte.config.js | 17 ++ .../integration/mdsvex/kit-js/package.json | 19 ++ .../mdsvex/kit-js/svelte.config.js | 17 ++ .../integration/mdsvex/kit-ts/package.json | 23 ++ .../mdsvex/kit-ts/svelte.config.js | 21 ++ .../integration/mdsvex/svelte-js/package.json | 17 ++ .../mdsvex/svelte-js/svelte.config.js | 10 + .../integration/mdsvex/svelte-ts/package.json | 22 ++ .../mdsvex/svelte-ts/svelte.config.js | 10 + .../prettier/kit-js-comments/.prettierignore | 4 + .../prettier/kit-js-comments/.prettierrc | 21 ++ .../prettier/kit-js-comments/package.json | 26 ++ .../prettier/kit-js/.prettierignore | 4 + .../integration/prettier/kit-js/.prettierrc | 21 ++ .../integration/prettier/kit-js/package.json | 22 ++ .../prettier/kit-ts/.prettierignore | 4 + .../integration/prettier/kit-ts/.prettierrc | 21 ++ .../integration/prettier/kit-ts/package.json | 26 ++ .../prettier/svelte-js/.prettierignore | 4 + .../prettier/svelte-js/.prettierrc | 21 ++ .../prettier/svelte-js/package.json | 20 ++ .../prettier/svelte-ts/.prettierignore | 4 + .../prettier/svelte-ts/.prettierrc | 21 ++ .../prettier/svelte-ts/package.json | 25 ++ .../routify/svelte-js/package.json | 17 ++ .../routify/svelte-js/src/App.svelte | 52 ++++ .../routify/svelte-js/src/routes/demo.svelte | 6 + .../routify/svelte-js/src/routes/index.svelte | 6 + .../routify/svelte-js/vite.config.ts | 5 + .../routify/svelte-ts/package.json | 22 ++ .../routify/svelte-ts/src/App.svelte | 52 ++++ .../routify/svelte-ts/src/routes/demo.svelte | 6 + .../routify/svelte-ts/src/routes/index.svelte | 6 + .../routify/svelte-ts/vite.config.ts | 8 + .../tailwindcss/kit-js-comments/package.json | 25 ++ .../kit-js-comments/postcss.config.js | 6 + .../tailwindcss/kit-js-comments/src/app.css | 3 + .../kit-js-comments/src/routes/+layout.svelte | 1 + .../kit-js-comments/tailwind.config.ts | 11 + .../typography=true/package.json | 26 ++ .../typography=true/postcss.config.js | 6 + .../typography=true/src/app.css | 3 + .../typography=true/src/routes/+layout.svelte | 1 + .../typography=true/tailwind.config.ts | 11 + .../tailwindcss/kit-js/package.json | 21 ++ .../tailwindcss/kit-js/postcss.config.js | 6 + .../tailwindcss/kit-js/src/app.css | 3 + .../kit-js/src/routes/+layout.svelte | 1 + .../tailwindcss/kit-js/tailwind.config.ts | 11 + .../kit-js/typography=true/package.json | 22 ++ .../kit-js/typography=true/postcss.config.js | 6 + .../kit-js/typography=true/src/app.css | 3 + .../typography=true/src/routes/+layout.svelte | 1 + .../kit-js/typography=true/tailwind.config.ts | 11 + .../tailwindcss/kit-ts/package.json | 25 ++ .../tailwindcss/kit-ts/postcss.config.js | 6 + .../tailwindcss/kit-ts/src/app.css | 3 + .../kit-ts/src/routes/+layout.svelte | 1 + .../tailwindcss/kit-ts/tailwind.config.ts | 11 + .../kit-ts/typography=true/package.json | 26 ++ .../kit-ts/typography=true/postcss.config.js | 6 + .../kit-ts/typography=true/src/app.css | 3 + .../typography=true/src/routes/+layout.svelte | 1 + .../kit-ts/typography=true/tailwind.config.ts | 11 + .../tailwindcss/svelte-js/package.json | 19 ++ .../tailwindcss/svelte-js/postcss.config.js | 6 + .../tailwindcss/svelte-js/src/App.svelte | 47 ++++ .../tailwindcss/svelte-js/src/app.css | 83 +++++++ .../tailwindcss/svelte-js/tailwind.config.ts | 11 + .../svelte-js/typography=true/package.json | 20 ++ .../typography=true/postcss.config.js | 6 + .../svelte-js/typography=true/src/App.svelte | 47 ++++ .../svelte-js/typography=true/src/app.css | 83 +++++++ .../typography=true/tailwind.config.ts | 11 + .../tailwindcss/svelte-ts/package.json | 24 ++ .../tailwindcss/svelte-ts/postcss.config.js | 6 + .../tailwindcss/svelte-ts/src/App.svelte | 47 ++++ .../tailwindcss/svelte-ts/src/app.css | 83 +++++++ .../tailwindcss/svelte-ts/tailwind.config.ts | 11 + .../svelte-ts/typography=true/package.json | 25 ++ .../typography=true/postcss.config.js | 6 + .../svelte-ts/typography=true/src/App.svelte | 47 ++++ .../svelte-ts/typography=true/src/app.css | 83 +++++++ .../typography=true/tailwind.config.ts | 11 + packages/tests/common/adders.ts | 24 ++ packages/tests/end2end.ts | 40 ++-- packages/tests/integration.ts | 67 ++++++ packages/tests/package.json | 4 +- pnpm-lock.yaml | 226 +++++++++++++++++- 241 files changed, 4388 insertions(+), 56 deletions(-) create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js-comments/addJavaScript=true/package.json create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js-comments/addJavaScript=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/package.json create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/app.scss create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/variables.scss create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js/addJavaScript=true/package.json create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js/addJavaScript=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/package.json create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/app.scss create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/variables.scss create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-ts/addJavaScript=true/package.json create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-ts/addJavaScript=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/package.json create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/app.scss create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/variables.scss create mode 100644 packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-js/addJavaScript=true/package.json create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-js/addJavaScript=true/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/package.json create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/app.scss create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/variables.scss create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-ts/addJavaScript=true/package.json create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-ts/addJavaScript=true/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/package.json create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/app.scss create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/variables.scss create mode 100644 packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js-comments/package.json create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js-comments/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/package.json create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/app.scss create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/variables.scss create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js/package.json create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/package.json create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/app.scss create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/variables.scss create mode 100644 packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/bulma/kit-ts/package.json create mode 100644 packages/tests/.snapshots/integration/bulma/kit-ts/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/package.json create mode 100644 packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/app.scss create mode 100644 packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/variables.scss create mode 100644 packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-js/package.json create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-js/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/package.json create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/app.scss create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/variables.scss create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-ts/package.json create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-ts/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/package.json create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/app.scss create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/variables.scss create mode 100644 packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/.env create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/docker-compose.yml create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/.env create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/.gitignore create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/.gitignore create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/.env create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/docker-compose.yml create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/.env create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/.gitignore create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/.gitignore create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/.env create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/docker-compose.yml create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/.env create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/.gitignore create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/.gitignore create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/drizzle.config.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/package.json create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts create mode 100644 packages/tests/.snapshots/integration/eslint/kit-js-comments/eslint.config.js create mode 100644 packages/tests/.snapshots/integration/eslint/kit-js-comments/package.json create mode 100644 packages/tests/.snapshots/integration/eslint/kit-js/eslint.config.js create mode 100644 packages/tests/.snapshots/integration/eslint/kit-js/package.json create mode 100644 packages/tests/.snapshots/integration/eslint/kit-ts/eslint.config.js create mode 100644 packages/tests/.snapshots/integration/eslint/kit-ts/package.json create mode 100644 packages/tests/.snapshots/integration/eslint/svelte-js/eslint.config.js create mode 100644 packages/tests/.snapshots/integration/eslint/svelte-js/package.json create mode 100644 packages/tests/.snapshots/integration/eslint/svelte-ts/eslint.config.js create mode 100644 packages/tests/.snapshots/integration/eslint/svelte-ts/package.json create mode 100644 packages/tests/.snapshots/integration/mdsvex/kit-js-comments/package.json create mode 100644 packages/tests/.snapshots/integration/mdsvex/kit-js-comments/svelte.config.js create mode 100644 packages/tests/.snapshots/integration/mdsvex/kit-js/package.json create mode 100644 packages/tests/.snapshots/integration/mdsvex/kit-js/svelte.config.js create mode 100644 packages/tests/.snapshots/integration/mdsvex/kit-ts/package.json create mode 100644 packages/tests/.snapshots/integration/mdsvex/kit-ts/svelte.config.js create mode 100644 packages/tests/.snapshots/integration/mdsvex/svelte-js/package.json create mode 100644 packages/tests/.snapshots/integration/mdsvex/svelte-js/svelte.config.js create mode 100644 packages/tests/.snapshots/integration/mdsvex/svelte-ts/package.json create mode 100644 packages/tests/.snapshots/integration/mdsvex/svelte-ts/svelte.config.js create mode 100644 packages/tests/.snapshots/integration/prettier/kit-js-comments/.prettierignore create mode 100644 packages/tests/.snapshots/integration/prettier/kit-js-comments/.prettierrc create mode 100644 packages/tests/.snapshots/integration/prettier/kit-js-comments/package.json create mode 100644 packages/tests/.snapshots/integration/prettier/kit-js/.prettierignore create mode 100644 packages/tests/.snapshots/integration/prettier/kit-js/.prettierrc create mode 100644 packages/tests/.snapshots/integration/prettier/kit-js/package.json create mode 100644 packages/tests/.snapshots/integration/prettier/kit-ts/.prettierignore create mode 100644 packages/tests/.snapshots/integration/prettier/kit-ts/.prettierrc create mode 100644 packages/tests/.snapshots/integration/prettier/kit-ts/package.json create mode 100644 packages/tests/.snapshots/integration/prettier/svelte-js/.prettierignore create mode 100644 packages/tests/.snapshots/integration/prettier/svelte-js/.prettierrc create mode 100644 packages/tests/.snapshots/integration/prettier/svelte-js/package.json create mode 100644 packages/tests/.snapshots/integration/prettier/svelte-ts/.prettierignore create mode 100644 packages/tests/.snapshots/integration/prettier/svelte-ts/.prettierrc create mode 100644 packages/tests/.snapshots/integration/prettier/svelte-ts/package.json create mode 100644 packages/tests/.snapshots/integration/routify/svelte-js/package.json create mode 100644 packages/tests/.snapshots/integration/routify/svelte-js/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/routify/svelte-js/src/routes/demo.svelte create mode 100644 packages/tests/.snapshots/integration/routify/svelte-js/src/routes/index.svelte create mode 100644 packages/tests/.snapshots/integration/routify/svelte-js/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/routify/svelte-ts/package.json create mode 100644 packages/tests/.snapshots/integration/routify/svelte-ts/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/routify/svelte-ts/src/routes/demo.svelte create mode 100644 packages/tests/.snapshots/integration/routify/svelte-ts/src/routes/index.svelte create mode 100644 packages/tests/.snapshots/integration/routify/svelte-ts/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/package.json create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/postcss.config.js create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/src/app.css create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/tailwind.config.ts create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/package.json create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/postcss.config.js create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/src/app.css create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/tailwind.config.ts create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js/package.json create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js/postcss.config.js create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js/src/app.css create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js/tailwind.config.ts create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/package.json create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/postcss.config.js create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/src/app.css create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/tailwind.config.ts create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-ts/package.json create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-ts/postcss.config.js create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-ts/src/app.css create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-ts/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-ts/tailwind.config.ts create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/package.json create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/postcss.config.js create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/src/app.css create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/src/routes/+layout.svelte create mode 100644 packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/tailwind.config.ts create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-js/package.json create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-js/postcss.config.js create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-js/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-js/src/app.css create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-js/tailwind.config.ts create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/package.json create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/postcss.config.js create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/src/app.css create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/tailwind.config.ts create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-ts/package.json create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-ts/postcss.config.js create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-ts/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-ts/src/app.css create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-ts/tailwind.config.ts create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/package.json create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/postcss.config.js create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/src/App.svelte create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/src/app.css create mode 100644 packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/tailwind.config.ts create mode 100644 packages/tests/common/adders.ts create mode 100644 packages/tests/integration.ts diff --git a/packages/core/adder/execute.ts b/packages/core/adder/execute.ts index 36935329..1651505b 100644 --- a/packages/core/adder/execute.ts +++ b/packages/core/adder/execute.ts @@ -60,12 +60,18 @@ export type AddersExecutionPlan = { selectAddersToApply?: AddersToApplySelector; }; +export type AddersExecutionResult = { + success: boolean; + outputDirectory: string; + changedFiles?: Set; +}; + export async function executeAdder( adderDetails: AdderDetails, executingAdderInfo: ExecutingAdderInfo, remoteControlOptions: RemoteControlOptions | undefined = undefined, ) { - await executeAdders([adderDetails], executingAdderInfo, remoteControlOptions); + return await executeAdders([adderDetails], executingAdderInfo, remoteControlOptions); } export async function executeAdders( @@ -104,7 +110,7 @@ export async function executeAdders( selectAddersToApply, }; - await executePlan(executionPlan, executingAdder, adderDetails, remoteControlOptions); + return await executePlan(executionPlan, executingAdder, adderDetails, remoteControlOptions); } catch (e) { if (e instanceof Error) cancel(e.message); else cancel('Something went wrong.'); @@ -273,6 +279,13 @@ async function executePlan( displayNextSteps(adderDetails, isApplyingMultipleAdders, executionPlan); endPrompts("You're all set!"); } + + const executionResult: AddersExecutionResult = { + success: true, + changedFiles: filesToFormat, + outputDirectory: executionPlan.workingDirectory, + }; + return executionResult; } async function processInlineAdder( diff --git a/packages/testing-library/index.ts b/packages/testing-library/index.ts index 5676ba90..b003c780 100644 --- a/packages/testing-library/index.ts +++ b/packages/testing-library/index.ts @@ -1,4 +1,8 @@ -import { generateTestCases, runAdderTests } from './utils/test-cases'; +import { + generateTestCases, + runAdderEndToEndTests, + runAdderIntegrationTests, +} from './utils/test-cases'; import { prepareTests } from './utils/workspace'; export type TestOptions = { @@ -7,4 +11,4 @@ export type TestOptions = { outputDirectory: string; }; -export { generateTestCases, runAdderTests, prepareTests }; +export { generateTestCases, runAdderEndToEndTests, runAdderIntegrationTests, prepareTests }; diff --git a/packages/testing-library/utils/adder.ts b/packages/testing-library/utils/adder.ts index b38b448a..7e8ab02c 100644 --- a/packages/testing-library/utils/adder.ts +++ b/packages/testing-library/utils/adder.ts @@ -21,11 +21,19 @@ export async function runAdder( adderOptions, }; - await executeAdder( + return await executeAdder( { config: adder.config, checks: adder.checks }, { name: '@svelte-add/testing-library', version: 'latest' }, remoteControlOptions, ); +} + +export async function runAdderAndPrepareTests( + adder: AdderWithoutExplicitArgs, + workingDirectory: string, + optionValues: OptionValues>, +) { + await runAdder(adder, workingDirectory, optionValues); const workspace = createEmptyWorkspace(); workspace.cwd = workingDirectory; diff --git a/packages/testing-library/utils/test-cases.ts b/packages/testing-library/utils/test-cases.ts index cb33e267..5676be17 100644 --- a/packages/testing-library/utils/test-cases.ts +++ b/packages/testing-library/utils/test-cases.ts @@ -56,7 +56,7 @@ export function generateTestCases(adders: AdderWithoutExplicitArgs[]) { return testCases; } -export async function runAdderTests( +export async function runAdderEndToEndTests( template: string, adder: AdderWithoutExplicitArgs, options: OptionValues>, @@ -69,24 +69,13 @@ export async function runAdderTests( remoteControl.enable(); - // generate a unique descriptive folder name if options are present - const optionsString = Object.entries(options) - .filter((data) => data[1]) // ensure value it not undefined - .map(([key, value]) => `${key}=${value as string}`) - .join('+'); - - const output = join( - testOptions.outputDirectory, - adder.config.metadata.id, - template, - optionsString, - ); + const output = generateOutputDirectory(options, testOptions.outputDirectory, adder, template); await mkdir(output, { recursive: true }); const workingDirectory = await prepareWorkspaceWithTemplate( output, template, - getTemplatesDirectory(testOptions), + getTemplatesDirectory(testOptions.outputDirectory), ); await runAdder(adder, workingDirectory, options); @@ -113,12 +102,49 @@ export async function runAdderTests( } } +export async function runAdderIntegrationTests( + testCase: TestCase, + outputDirectory: string, + adder: AdderWithoutExplicitArgs, +) { + const adderOutputDirectory = generateOutputDirectory( + testCase.options, + outputDirectory, + adder, + testCase.template, + ); + + const workingDirectory = await prepareWorkspaceWithTemplate( + adderOutputDirectory, + testCase.template, + getTemplatesDirectory(outputDirectory), + ); + + return await runAdder(adder, workingDirectory, testCase.options); +} + export type AdderError = { adder: string; template: string; message: string; } & Error; +export function generateOutputDirectory( + options: OptionValues>, + outputDirectory: string, + adder: AdderWithoutExplicitArgs, + template: string, +) { + // generate a unique descriptive folder name if options are present + const optionsString = Object.entries(options) + .filter((data) => data[1]) // ensure value it not undefined + .map(([key, value]) => `${key}=${value as string}`) + .join('+'); + + const output = join(outputDirectory, adder.config.metadata.id, template, optionsString); + return output; +} + export async function runTestCases(testCases: Map, testOptions: TestOptions) { const asyncTasks: Array<() => Promise> = []; const syncTasks: Array<() => Promise> = []; @@ -128,7 +154,12 @@ export async function runTestCases(testCases: Map, testOptio for (const testCase of values) { const taskExecutor = async () => { try { - await runAdderTests(testCase.template, testCase.adder, testCase.options, testOptions); + await runAdderEndToEndTests( + testCase.template, + testCase.adder, + testCase.options, + testOptions, + ); } catch (e) { const error = e as Error; const adderError: AdderError = { diff --git a/packages/testing-library/utils/workspace.ts b/packages/testing-library/utils/workspace.ts index 8ef8174c..f23b2100 100644 --- a/packages/testing-library/utils/workspace.ts +++ b/packages/testing-library/utils/workspace.ts @@ -1,13 +1,12 @@ import { join } from 'node:path'; import { cp, mkdir, rm } from 'node:fs/promises'; import { executeCli } from '@svelte-add/core'; -import type { TestOptions } from '..'; import { downloadProjectTemplates } from './create-project'; const templatesDirectory = 'templates'; -export function getTemplatesDirectory(options: TestOptions) { - return join(options.outputDirectory, templatesDirectory); +export function getTemplatesDirectory(outputDirectory: string) { + return join(outputDirectory, templatesDirectory); } export async function installDependencies(output: string) { @@ -33,11 +32,11 @@ export async function prepareWorkspaceWithTemplate( return output; } -export async function prepareTests(options: TestOptions) { +export async function prepareTests(outputDirectory: string) { console.log('deleting old files'); - await rm(options.outputDirectory, { recursive: true, force: true }); + await rm(outputDirectory, { recursive: true, force: true }); console.log('downloading project templates'); - const templatesOutputDirectory = getTemplatesDirectory(options); + const templatesOutputDirectory = getTemplatesDirectory(outputDirectory); await downloadProjectTemplates(templatesOutputDirectory); } diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/addJavaScript=true/package.json b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/addJavaScript=true/package.json new file mode 100644 index 00000000..cb793eaa --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/addJavaScript=true/package.json @@ -0,0 +1,24 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" + }, + "devDependencies": { + "@popperjs/core": "^2.11.8", + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bootstrap": "^5.3.3", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/addJavaScript=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/addJavaScript=true/src/routes/+layout.svelte new file mode 100644 index 00000000..3dadbd72 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/addJavaScript=true/src/routes/+layout.svelte @@ -0,0 +1,16 @@ + + diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/package.json b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/package.json new file mode 100644 index 00000000..80946844 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/package.json @@ -0,0 +1,25 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" + }, + "devDependencies": { + "@popperjs/core": "^2.11.8", + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bootstrap": "^5.3.3", + "sass": "^1.77.5", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/app.scss b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/app.scss new file mode 100644 index 00000000..28983377 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/app.scss @@ -0,0 +1,21 @@ +/* 1. Include functions first (so you can manipulate colors, SVGs, calc, etc) */ +@import "bootstrap/scss/functions"; +/* 2. Include any default variable overrides here */ +$body-bg: $background; +/* 3. Include remainder of required Bootstrap stylesheets (including any separate color mode stylesheets) */ +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/variables-dark"; +/* 4. Include any default map overrides here */ +/* 5. Include remainder of required parts */ +@import "bootstrap/scss/maps"; +@import "bootstrap/scss/mixins"; +@import "bootstrap/scss/root"; +/* 6. Optionally include any other parts as needed */ +@import "bootstrap/scss/utilities"; +@import "bootstrap/scss/reboot"; +@import "bootstrap/scss/type"; +@import "bootstrap/scss/helpers"; +@import "bootstrap/scss/buttons"; +/* 7. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss` */ +@import "bootstrap/scss/utilities/api"; +/* Add additional custom code here */ diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/routes/+layout.svelte new file mode 100644 index 00000000..1e761b76 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/routes/+layout.svelte @@ -0,0 +1,16 @@ + + diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/variables.scss b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/variables.scss new file mode 100644 index 00000000..a5ad26fe --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/src/variables.scss @@ -0,0 +1,2 @@ +/* Set your brand colors */ +$background: lightgrey; diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/vite.config.ts b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/vite.config.ts new file mode 100644 index 00000000..d9f7cb49 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js-comments/useSass=true+addJavaScript=true/vite.config.ts @@ -0,0 +1,9 @@ +export default defineConfig({ + css: { + preprocessorOptions: { + scss: { + additionalData: "@use \"src/variables.scss\" as *;" + } + } + } +}); diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js/addJavaScript=true/package.json b/packages/tests/.snapshots/integration/bootstrap/kit-js/addJavaScript=true/package.json new file mode 100644 index 00000000..39e1588b --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js/addJavaScript=true/package.json @@ -0,0 +1,20 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@popperjs/core": "^2.11.8", + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bootstrap": "^5.3.3", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js/addJavaScript=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bootstrap/kit-js/addJavaScript=true/src/routes/+layout.svelte new file mode 100644 index 00000000..3dadbd72 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js/addJavaScript=true/src/routes/+layout.svelte @@ -0,0 +1,16 @@ + + diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/package.json b/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/package.json new file mode 100644 index 00000000..e24cd419 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/package.json @@ -0,0 +1,21 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@popperjs/core": "^2.11.8", + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bootstrap": "^5.3.3", + "sass": "^1.77.5", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/app.scss b/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/app.scss new file mode 100644 index 00000000..28983377 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/app.scss @@ -0,0 +1,21 @@ +/* 1. Include functions first (so you can manipulate colors, SVGs, calc, etc) */ +@import "bootstrap/scss/functions"; +/* 2. Include any default variable overrides here */ +$body-bg: $background; +/* 3. Include remainder of required Bootstrap stylesheets (including any separate color mode stylesheets) */ +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/variables-dark"; +/* 4. Include any default map overrides here */ +/* 5. Include remainder of required parts */ +@import "bootstrap/scss/maps"; +@import "bootstrap/scss/mixins"; +@import "bootstrap/scss/root"; +/* 6. Optionally include any other parts as needed */ +@import "bootstrap/scss/utilities"; +@import "bootstrap/scss/reboot"; +@import "bootstrap/scss/type"; +@import "bootstrap/scss/helpers"; +@import "bootstrap/scss/buttons"; +/* 7. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss` */ +@import "bootstrap/scss/utilities/api"; +/* Add additional custom code here */ diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/routes/+layout.svelte new file mode 100644 index 00000000..1e761b76 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/routes/+layout.svelte @@ -0,0 +1,16 @@ + + diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/variables.scss b/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/variables.scss new file mode 100644 index 00000000..a5ad26fe --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/src/variables.scss @@ -0,0 +1,2 @@ +/* Set your brand colors */ +$background: lightgrey; diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/vite.config.ts b/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/vite.config.ts new file mode 100644 index 00000000..d9f7cb49 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-js/useSass=true+addJavaScript=true/vite.config.ts @@ -0,0 +1,9 @@ +export default defineConfig({ + css: { + preprocessorOptions: { + scss: { + additionalData: "@use \"src/variables.scss\" as *;" + } + } + } +}); diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-ts/addJavaScript=true/package.json b/packages/tests/.snapshots/integration/bootstrap/kit-ts/addJavaScript=true/package.json new file mode 100644 index 00000000..58473af5 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-ts/addJavaScript=true/package.json @@ -0,0 +1,24 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@popperjs/core": "^2.11.8", + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bootstrap": "^5.3.3", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-ts/addJavaScript=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bootstrap/kit-ts/addJavaScript=true/src/routes/+layout.svelte new file mode 100644 index 00000000..3dadbd72 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-ts/addJavaScript=true/src/routes/+layout.svelte @@ -0,0 +1,16 @@ + + diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/package.json b/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/package.json new file mode 100644 index 00000000..9a24dce8 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/package.json @@ -0,0 +1,25 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@popperjs/core": "^2.11.8", + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bootstrap": "^5.3.3", + "sass": "^1.77.5", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/app.scss b/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/app.scss new file mode 100644 index 00000000..28983377 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/app.scss @@ -0,0 +1,21 @@ +/* 1. Include functions first (so you can manipulate colors, SVGs, calc, etc) */ +@import "bootstrap/scss/functions"; +/* 2. Include any default variable overrides here */ +$body-bg: $background; +/* 3. Include remainder of required Bootstrap stylesheets (including any separate color mode stylesheets) */ +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/variables-dark"; +/* 4. Include any default map overrides here */ +/* 5. Include remainder of required parts */ +@import "bootstrap/scss/maps"; +@import "bootstrap/scss/mixins"; +@import "bootstrap/scss/root"; +/* 6. Optionally include any other parts as needed */ +@import "bootstrap/scss/utilities"; +@import "bootstrap/scss/reboot"; +@import "bootstrap/scss/type"; +@import "bootstrap/scss/helpers"; +@import "bootstrap/scss/buttons"; +/* 7. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss` */ +@import "bootstrap/scss/utilities/api"; +/* Add additional custom code here */ diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/routes/+layout.svelte new file mode 100644 index 00000000..1e761b76 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/routes/+layout.svelte @@ -0,0 +1,16 @@ + + diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/variables.scss b/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/variables.scss new file mode 100644 index 00000000..a5ad26fe --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/src/variables.scss @@ -0,0 +1,2 @@ +/* Set your brand colors */ +$background: lightgrey; diff --git a/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/vite.config.ts b/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/vite.config.ts new file mode 100644 index 00000000..c5a26938 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/kit-ts/useSass=true+addJavaScript=true/vite.config.ts @@ -0,0 +1,14 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + plugins: [sveltekit()], + + css: { + preprocessorOptions: { + scss: { + additionalData: "@use \"src/variables.scss\" as *;" + } + } + } +}); diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-js/addJavaScript=true/package.json b/packages/tests/.snapshots/integration/bootstrap/svelte-js/addJavaScript=true/package.json new file mode 100644 index 00000000..338df713 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-js/addJavaScript=true/package.json @@ -0,0 +1,18 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@popperjs/core": "^2.11.8", + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "bootstrap": "^5.3.3", + "svelte": "^4.2.18", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-js/addJavaScript=true/src/App.svelte b/packages/tests/.snapshots/integration/bootstrap/svelte-js/addJavaScript=true/src/App.svelte new file mode 100644 index 00000000..1c6c6c3b --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-js/addJavaScript=true/src/App.svelte @@ -0,0 +1,58 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/package.json b/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/package.json new file mode 100644 index 00000000..5decf24a --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/package.json @@ -0,0 +1,19 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@popperjs/core": "^2.11.8", + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "bootstrap": "^5.3.3", + "sass": "^1.77.5", + "svelte": "^4.2.18", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/App.svelte b/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/App.svelte new file mode 100644 index 00000000..baa1b175 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/App.svelte @@ -0,0 +1,58 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/app.scss b/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/app.scss new file mode 100644 index 00000000..28983377 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/app.scss @@ -0,0 +1,21 @@ +/* 1. Include functions first (so you can manipulate colors, SVGs, calc, etc) */ +@import "bootstrap/scss/functions"; +/* 2. Include any default variable overrides here */ +$body-bg: $background; +/* 3. Include remainder of required Bootstrap stylesheets (including any separate color mode stylesheets) */ +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/variables-dark"; +/* 4. Include any default map overrides here */ +/* 5. Include remainder of required parts */ +@import "bootstrap/scss/maps"; +@import "bootstrap/scss/mixins"; +@import "bootstrap/scss/root"; +/* 6. Optionally include any other parts as needed */ +@import "bootstrap/scss/utilities"; +@import "bootstrap/scss/reboot"; +@import "bootstrap/scss/type"; +@import "bootstrap/scss/helpers"; +@import "bootstrap/scss/buttons"; +/* 7. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss` */ +@import "bootstrap/scss/utilities/api"; +/* Add additional custom code here */ diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/variables.scss b/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/variables.scss new file mode 100644 index 00000000..a5ad26fe --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/src/variables.scss @@ -0,0 +1,2 @@ +/* Set your brand colors */ +$background: lightgrey; diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/vite.config.ts b/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/vite.config.ts new file mode 100644 index 00000000..d9f7cb49 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-js/useSass=true+addJavaScript=true/vite.config.ts @@ -0,0 +1,9 @@ +export default defineConfig({ + css: { + preprocessorOptions: { + scss: { + additionalData: "@use \"src/variables.scss\" as *;" + } + } + } +}); diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-ts/addJavaScript=true/package.json b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/addJavaScript=true/package.json new file mode 100644 index 00000000..8ce31fde --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/addJavaScript=true/package.json @@ -0,0 +1,23 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json" + }, + "devDependencies": { + "@popperjs/core": "^2.11.8", + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "bootstrap": "^5.3.3", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-ts/addJavaScript=true/src/App.svelte b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/addJavaScript=true/src/App.svelte new file mode 100644 index 00000000..1c6c6c3b --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/addJavaScript=true/src/App.svelte @@ -0,0 +1,58 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/package.json b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/package.json new file mode 100644 index 00000000..c2611e3f --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/package.json @@ -0,0 +1,24 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json" + }, + "devDependencies": { + "@popperjs/core": "^2.11.8", + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "bootstrap": "^5.3.3", + "sass": "^1.77.5", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/App.svelte b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/App.svelte new file mode 100644 index 00000000..baa1b175 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/App.svelte @@ -0,0 +1,58 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/app.scss b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/app.scss new file mode 100644 index 00000000..28983377 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/app.scss @@ -0,0 +1,21 @@ +/* 1. Include functions first (so you can manipulate colors, SVGs, calc, etc) */ +@import "bootstrap/scss/functions"; +/* 2. Include any default variable overrides here */ +$body-bg: $background; +/* 3. Include remainder of required Bootstrap stylesheets (including any separate color mode stylesheets) */ +@import "bootstrap/scss/variables"; +@import "bootstrap/scss/variables-dark"; +/* 4. Include any default map overrides here */ +/* 5. Include remainder of required parts */ +@import "bootstrap/scss/maps"; +@import "bootstrap/scss/mixins"; +@import "bootstrap/scss/root"; +/* 6. Optionally include any other parts as needed */ +@import "bootstrap/scss/utilities"; +@import "bootstrap/scss/reboot"; +@import "bootstrap/scss/type"; +@import "bootstrap/scss/helpers"; +@import "bootstrap/scss/buttons"; +/* 7. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss` */ +@import "bootstrap/scss/utilities/api"; +/* Add additional custom code here */ diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/variables.scss b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/variables.scss new file mode 100644 index 00000000..a5ad26fe --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/src/variables.scss @@ -0,0 +1,2 @@ +/* Set your brand colors */ +$background: lightgrey; diff --git a/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/vite.config.ts b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/vite.config.ts new file mode 100644 index 00000000..f7aaaff5 --- /dev/null +++ b/packages/tests/.snapshots/integration/bootstrap/svelte-ts/useSass=true+addJavaScript=true/vite.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from 'vite' +import { svelte } from '@sveltejs/vite-plugin-svelte' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [svelte()], + + css: { + preprocessorOptions: { + scss: { + additionalData: "@use \"src/variables.scss\" as *;" + } + } + } +}) diff --git a/packages/tests/.snapshots/integration/bulma/kit-js-comments/package.json b/packages/tests/.snapshots/integration/bulma/kit-js-comments/package.json new file mode 100644 index 00000000..4ebe8bec --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js-comments/package.json @@ -0,0 +1,23 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bulma": "^1.0.1", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bulma/kit-js-comments/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bulma/kit-js-comments/src/routes/+layout.svelte new file mode 100644 index 00000000..f00f6dbd --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js-comments/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/package.json b/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/package.json new file mode 100644 index 00000000..4244be04 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/package.json @@ -0,0 +1,24 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bulma": "^1.0.1", + "sass": "^1.77.5", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/app.scss b/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/app.scss new file mode 100644 index 00000000..ff100013 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/app.scss @@ -0,0 +1,15 @@ +/* Override global Sass variables from the /utilities folder */ +@use "bulma/sass/utilities" with ( +$link: $pink, +);; +@use "bulma/sass/base" with ( +$body-overflow-y: auto +); +/* Import the components you need */ +@use "bulma/sass/elements"; +@use "bulma/sass/form"; +@use "bulma/sass/components"; +@use "bulma/sass/grid"; +@use "bulma/sass/helpers"; +@use "bulma/sass/layout"; +@use "bulma/sass/themes"; diff --git a/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/routes/+layout.svelte new file mode 100644 index 00000000..f9b6cae8 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/variables.scss b/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/variables.scss new file mode 100644 index 00000000..34691934 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/src/variables.scss @@ -0,0 +1,2 @@ +/* Set your brand colors */ +$pink: pink; diff --git a/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/vite.config.ts b/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/vite.config.ts new file mode 100644 index 00000000..d9f7cb49 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js-comments/useSass=true/vite.config.ts @@ -0,0 +1,9 @@ +export default defineConfig({ + css: { + preprocessorOptions: { + scss: { + additionalData: "@use \"src/variables.scss\" as *;" + } + } + } +}); diff --git a/packages/tests/.snapshots/integration/bulma/kit-js/package.json b/packages/tests/.snapshots/integration/bulma/kit-js/package.json new file mode 100644 index 00000000..f49f12b0 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js/package.json @@ -0,0 +1,19 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bulma": "^1.0.1", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bulma/kit-js/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bulma/kit-js/src/routes/+layout.svelte new file mode 100644 index 00000000..f00f6dbd --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/package.json b/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/package.json new file mode 100644 index 00000000..296a1e21 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/package.json @@ -0,0 +1,20 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bulma": "^1.0.1", + "sass": "^1.77.5", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/app.scss b/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/app.scss new file mode 100644 index 00000000..ff100013 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/app.scss @@ -0,0 +1,15 @@ +/* Override global Sass variables from the /utilities folder */ +@use "bulma/sass/utilities" with ( +$link: $pink, +);; +@use "bulma/sass/base" with ( +$body-overflow-y: auto +); +/* Import the components you need */ +@use "bulma/sass/elements"; +@use "bulma/sass/form"; +@use "bulma/sass/components"; +@use "bulma/sass/grid"; +@use "bulma/sass/helpers"; +@use "bulma/sass/layout"; +@use "bulma/sass/themes"; diff --git a/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/routes/+layout.svelte new file mode 100644 index 00000000..f9b6cae8 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/variables.scss b/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/variables.scss new file mode 100644 index 00000000..34691934 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/src/variables.scss @@ -0,0 +1,2 @@ +/* Set your brand colors */ +$pink: pink; diff --git a/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/vite.config.ts b/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/vite.config.ts new file mode 100644 index 00000000..d9f7cb49 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-js/useSass=true/vite.config.ts @@ -0,0 +1,9 @@ +export default defineConfig({ + css: { + preprocessorOptions: { + scss: { + additionalData: "@use \"src/variables.scss\" as *;" + } + } + } +}); diff --git a/packages/tests/.snapshots/integration/bulma/kit-ts/package.json b/packages/tests/.snapshots/integration/bulma/kit-ts/package.json new file mode 100644 index 00000000..242b65f4 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-ts/package.json @@ -0,0 +1,23 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bulma": "^1.0.1", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bulma/kit-ts/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bulma/kit-ts/src/routes/+layout.svelte new file mode 100644 index 00000000..f00f6dbd --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-ts/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/package.json b/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/package.json new file mode 100644 index 00000000..a133e0a0 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/package.json @@ -0,0 +1,24 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "bulma": "^1.0.1", + "sass": "^1.77.5", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/app.scss b/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/app.scss new file mode 100644 index 00000000..ff100013 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/app.scss @@ -0,0 +1,15 @@ +/* Override global Sass variables from the /utilities folder */ +@use "bulma/sass/utilities" with ( +$link: $pink, +);; +@use "bulma/sass/base" with ( +$body-overflow-y: auto +); +/* Import the components you need */ +@use "bulma/sass/elements"; +@use "bulma/sass/form"; +@use "bulma/sass/components"; +@use "bulma/sass/grid"; +@use "bulma/sass/helpers"; +@use "bulma/sass/layout"; +@use "bulma/sass/themes"; diff --git a/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/routes/+layout.svelte new file mode 100644 index 00000000..f9b6cae8 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/variables.scss b/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/variables.scss new file mode 100644 index 00000000..34691934 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/src/variables.scss @@ -0,0 +1,2 @@ +/* Set your brand colors */ +$pink: pink; diff --git a/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/vite.config.ts b/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/vite.config.ts new file mode 100644 index 00000000..c5a26938 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/kit-ts/useSass=true/vite.config.ts @@ -0,0 +1,14 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + plugins: [sveltekit()], + + css: { + preprocessorOptions: { + scss: { + additionalData: "@use \"src/variables.scss\" as *;" + } + } + } +}); diff --git a/packages/tests/.snapshots/integration/bulma/svelte-js/package.json b/packages/tests/.snapshots/integration/bulma/svelte-js/package.json new file mode 100644 index 00000000..8a76becf --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-js/package.json @@ -0,0 +1,17 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "bulma": "^1.0.1", + "svelte": "^4.2.18", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/bulma/svelte-js/src/App.svelte b/packages/tests/.snapshots/integration/bulma/svelte-js/src/App.svelte new file mode 100644 index 00000000..3e31599a --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-js/src/App.svelte @@ -0,0 +1,47 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/package.json b/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/package.json new file mode 100644 index 00000000..714030fc --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/package.json @@ -0,0 +1,18 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "bulma": "^1.0.1", + "sass": "^1.77.5", + "svelte": "^4.2.18", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/App.svelte b/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/App.svelte new file mode 100644 index 00000000..20bc0e14 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/App.svelte @@ -0,0 +1,47 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/app.scss b/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/app.scss new file mode 100644 index 00000000..ff100013 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/app.scss @@ -0,0 +1,15 @@ +/* Override global Sass variables from the /utilities folder */ +@use "bulma/sass/utilities" with ( +$link: $pink, +);; +@use "bulma/sass/base" with ( +$body-overflow-y: auto +); +/* Import the components you need */ +@use "bulma/sass/elements"; +@use "bulma/sass/form"; +@use "bulma/sass/components"; +@use "bulma/sass/grid"; +@use "bulma/sass/helpers"; +@use "bulma/sass/layout"; +@use "bulma/sass/themes"; diff --git a/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/variables.scss b/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/variables.scss new file mode 100644 index 00000000..34691934 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/src/variables.scss @@ -0,0 +1,2 @@ +/* Set your brand colors */ +$pink: pink; diff --git a/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/vite.config.ts b/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/vite.config.ts new file mode 100644 index 00000000..d9f7cb49 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-js/useSass=true/vite.config.ts @@ -0,0 +1,9 @@ +export default defineConfig({ + css: { + preprocessorOptions: { + scss: { + additionalData: "@use \"src/variables.scss\" as *;" + } + } + } +}); diff --git a/packages/tests/.snapshots/integration/bulma/svelte-ts/package.json b/packages/tests/.snapshots/integration/bulma/svelte-ts/package.json new file mode 100644 index 00000000..f456ffed --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-ts/package.json @@ -0,0 +1,22 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "bulma": "^1.0.1", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/bulma/svelte-ts/src/App.svelte b/packages/tests/.snapshots/integration/bulma/svelte-ts/src/App.svelte new file mode 100644 index 00000000..3e31599a --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-ts/src/App.svelte @@ -0,0 +1,47 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/package.json b/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/package.json new file mode 100644 index 00000000..eb00dfb6 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/package.json @@ -0,0 +1,23 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "bulma": "^1.0.1", + "sass": "^1.77.5", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/App.svelte b/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/App.svelte new file mode 100644 index 00000000..20bc0e14 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/App.svelte @@ -0,0 +1,47 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/app.scss b/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/app.scss new file mode 100644 index 00000000..ff100013 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/app.scss @@ -0,0 +1,15 @@ +/* Override global Sass variables from the /utilities folder */ +@use "bulma/sass/utilities" with ( +$link: $pink, +);; +@use "bulma/sass/base" with ( +$body-overflow-y: auto +); +/* Import the components you need */ +@use "bulma/sass/elements"; +@use "bulma/sass/form"; +@use "bulma/sass/components"; +@use "bulma/sass/grid"; +@use "bulma/sass/helpers"; +@use "bulma/sass/layout"; +@use "bulma/sass/themes"; diff --git a/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/variables.scss b/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/variables.scss new file mode 100644 index 00000000..34691934 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/src/variables.scss @@ -0,0 +1,2 @@ +/* Set your brand colors */ +$pink: pink; diff --git a/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/vite.config.ts b/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/vite.config.ts new file mode 100644 index 00000000..f7aaaff5 --- /dev/null +++ b/packages/tests/.snapshots/integration/bulma/svelte-ts/useSass=true/vite.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from 'vite' +import { svelte } from '@sveltejs/vite-plugin-svelte' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [svelte()], + + css: { + preprocessorOptions: { + scss: { + additionalData: "@use \"src/variables.scss\" as *;" + } + } + } +}) diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/.env b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/.env new file mode 100644 index 00000000..d60baea7 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/.env @@ -0,0 +1 @@ +DATABASE_URL="mysql://root:mysecretpassword@localhost:3306/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/docker-compose.yml b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/docker-compose.yml new file mode 100644 index 00000000..53da426c --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/docker-compose.yml @@ -0,0 +1,9 @@ +services: + db: + image: mysql + restart: always + ports: + - 3306:3306 + environment: + MYSQL_ROOT_PASSWORD: mysecretpassword + MYSQL_DATABASE: local diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts new file mode 100644 index 00000000..c29f1357 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "mysql" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/package.json b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/package.json new file mode 100644 index 00000000..38373bb1 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/package.json @@ -0,0 +1,31 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", + "db:start": "docker compose up", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "drizzle-orm": "^0.31.2", + "mysql2": "^3.9.8" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts new file mode 100644 index 00000000..30adea1c --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/mysql2"; +import mysql from "mysql2/promise"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = await mysql.createConnection(env.DATABASE_URL); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts new file mode 100644 index 00000000..f2e21dc8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { mysqlTable, serial, text, int } from "drizzle-orm/mysql-core"; + +export const user = mysqlTable('user', { + id: serial("id").primaryKey(), + name: text('name').notNull(), + age: int('age'), +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/.env b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/.env new file mode 100644 index 00000000..2b1531e4 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/.env @@ -0,0 +1 @@ +DATABASE_URL="postgres://root:mysecretpassword@localhost:5432/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml new file mode 100644 index 00000000..a0fe4c14 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml @@ -0,0 +1,10 @@ +services: + db: + image: postgres + restart: always + ports: + - 5432:5432 + environment: + POSTGRES_USER: root + POSTGRES_PASSWORD: mysecretpassword + POSTGRES_DB: local diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts new file mode 100644 index 00000000..df012c95 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "postgresql" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/package.json b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/package.json new file mode 100644 index 00000000..c6847a6c --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/package.json @@ -0,0 +1,31 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", + "db:start": "docker compose up", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "drizzle-orm": "^0.31.2", + "postgres": "^3.4.4" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts new file mode 100644 index 00000000..86836bb8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/postgres-js"; +import postgres from "postgres"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = postgres(env.DATABASE_URL); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts new file mode 100644 index 00000000..ce7836c1 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { pgTable, serial, text, integer } from "drizzle-orm/pg-core"; + +export const user = pgTable('user', { + id: serial('id').primaryKey(), + name: text('name').notNull(), + age: integer('age'), +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/.gitignore b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/.gitignore new file mode 100644 index 00000000..1d76fa0a --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/.gitignore @@ -0,0 +1,22 @@ +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* +*.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts new file mode 100644 index 00000000..1c582a46 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "sqlite" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/package.json b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/package.json new file mode 100644 index 00000000..4b59c4fe --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/package.json @@ -0,0 +1,31 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/better-sqlite3": "^7.6.10", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "better-sqlite3": "^10.0.0", + "drizzle-orm": "^0.31.2" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts new file mode 100644 index 00000000..8093e196 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/better-sqlite3"; +import Database from "better-sqlite3"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = new Database(env.DATABASE_URL); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts new file mode 100644 index 00000000..ee431dd8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"; + +export const user = sqliteTable('user', { + id: integer('id').primaryKey(), + name: text('name').notNull(), + age: integer('age') +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/.gitignore b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/.gitignore new file mode 100644 index 00000000..1d76fa0a --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/.gitignore @@ -0,0 +1,22 @@ +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* +*.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/drizzle.config.ts new file mode 100644 index 00000000..1c582a46 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "sqlite" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/package.json b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/package.json new file mode 100644 index 00000000..7803521b --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/package.json @@ -0,0 +1,30 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "@libsql/client": "^0.6.1", + "drizzle-orm": "^0.31.2" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts new file mode 100644 index 00000000..d5d40d03 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/libsql"; +import { createClient } from "@libsql/client"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = createClient({ url: env.DATABASE_URL }); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts new file mode 100644 index 00000000..ee431dd8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"; + +export const user = sqliteTable('user', { + id: integer('id').primaryKey(), + name: text('name').notNull(), + age: integer('age') +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/.env b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/.env new file mode 100644 index 00000000..d60baea7 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/.env @@ -0,0 +1 @@ +DATABASE_URL="mysql://root:mysecretpassword@localhost:3306/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/docker-compose.yml b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/docker-compose.yml new file mode 100644 index 00000000..53da426c --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/docker-compose.yml @@ -0,0 +1,9 @@ +services: + db: + image: mysql + restart: always + ports: + - 3306:3306 + environment: + MYSQL_ROOT_PASSWORD: mysecretpassword + MYSQL_DATABASE: local diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts new file mode 100644 index 00000000..c29f1357 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "mysql" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/package.json b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/package.json new file mode 100644 index 00000000..49e20998 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/package.json @@ -0,0 +1,27 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "db:start": "docker compose up", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "drizzle-orm": "^0.31.2", + "mysql2": "^3.9.8" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts new file mode 100644 index 00000000..30adea1c --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/mysql2"; +import mysql from "mysql2/promise"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = await mysql.createConnection(env.DATABASE_URL); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts new file mode 100644 index 00000000..f2e21dc8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { mysqlTable, serial, text, int } from "drizzle-orm/mysql-core"; + +export const user = mysqlTable('user', { + id: serial("id").primaryKey(), + name: text('name').notNull(), + age: int('age'), +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/.env b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/.env new file mode 100644 index 00000000..2b1531e4 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/.env @@ -0,0 +1 @@ +DATABASE_URL="postgres://root:mysecretpassword@localhost:5432/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml new file mode 100644 index 00000000..a0fe4c14 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml @@ -0,0 +1,10 @@ +services: + db: + image: postgres + restart: always + ports: + - 5432:5432 + environment: + POSTGRES_USER: root + POSTGRES_PASSWORD: mysecretpassword + POSTGRES_DB: local diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts new file mode 100644 index 00000000..df012c95 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "postgresql" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/package.json b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/package.json new file mode 100644 index 00000000..958e3aa7 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/package.json @@ -0,0 +1,27 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "db:start": "docker compose up", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "drizzle-orm": "^0.31.2", + "postgres": "^3.4.4" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts new file mode 100644 index 00000000..86836bb8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/postgres-js"; +import postgres from "postgres"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = postgres(env.DATABASE_URL); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts new file mode 100644 index 00000000..ce7836c1 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { pgTable, serial, text, integer } from "drizzle-orm/pg-core"; + +export const user = pgTable('user', { + id: serial('id').primaryKey(), + name: text('name').notNull(), + age: integer('age'), +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/.gitignore b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/.gitignore new file mode 100644 index 00000000..1d76fa0a --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/.gitignore @@ -0,0 +1,22 @@ +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* +*.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts new file mode 100644 index 00000000..1c582a46 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "sqlite" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/package.json b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/package.json new file mode 100644 index 00000000..c3a17b7e --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/package.json @@ -0,0 +1,27 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/better-sqlite3": "^7.6.10", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "better-sqlite3": "^10.0.0", + "drizzle-orm": "^0.31.2" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts new file mode 100644 index 00000000..8093e196 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/better-sqlite3"; +import Database from "better-sqlite3"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = new Database(env.DATABASE_URL); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts new file mode 100644 index 00000000..ee431dd8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"; + +export const user = sqliteTable('user', { + id: integer('id').primaryKey(), + name: text('name').notNull(), + age: integer('age') +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/.gitignore b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/.gitignore new file mode 100644 index 00000000..1d76fa0a --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/.gitignore @@ -0,0 +1,22 @@ +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* +*.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/drizzle.config.ts new file mode 100644 index 00000000..1c582a46 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "sqlite" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/package.json b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/package.json new file mode 100644 index 00000000..f5a26de8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/package.json @@ -0,0 +1,26 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "@libsql/client": "^0.6.1", + "drizzle-orm": "^0.31.2" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts new file mode 100644 index 00000000..d5d40d03 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/libsql"; +import { createClient } from "@libsql/client"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = createClient({ url: env.DATABASE_URL }); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts new file mode 100644 index 00000000..ee431dd8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"; + +export const user = sqliteTable('user', { + id: integer('id').primaryKey(), + name: text('name').notNull(), + age: integer('age') +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/.env b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/.env new file mode 100644 index 00000000..d60baea7 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/.env @@ -0,0 +1 @@ +DATABASE_URL="mysql://root:mysecretpassword@localhost:3306/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/docker-compose.yml b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/docker-compose.yml new file mode 100644 index 00000000..53da426c --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/docker-compose.yml @@ -0,0 +1,9 @@ +services: + db: + image: mysql + restart: always + ports: + - 3306:3306 + environment: + MYSQL_ROOT_PASSWORD: mysecretpassword + MYSQL_DATABASE: local diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts new file mode 100644 index 00000000..c29f1357 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "mysql" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/package.json b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/package.json new file mode 100644 index 00000000..2a9e6620 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/package.json @@ -0,0 +1,31 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "db:start": "docker compose up", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "drizzle-orm": "^0.31.2", + "mysql2": "^3.9.8" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts new file mode 100644 index 00000000..30adea1c --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/mysql2"; +import mysql from "mysql2/promise"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = await mysql.createConnection(env.DATABASE_URL); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts new file mode 100644 index 00000000..f2e21dc8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { mysqlTable, serial, text, int } from "drizzle-orm/mysql-core"; + +export const user = mysqlTable('user', { + id: serial("id").primaryKey(), + name: text('name').notNull(), + age: int('age'), +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/.env b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/.env new file mode 100644 index 00000000..2b1531e4 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/.env @@ -0,0 +1 @@ +DATABASE_URL="postgres://root:mysecretpassword@localhost:5432/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml new file mode 100644 index 00000000..a0fe4c14 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/docker-compose.yml @@ -0,0 +1,10 @@ +services: + db: + image: postgres + restart: always + ports: + - 5432:5432 + environment: + POSTGRES_USER: root + POSTGRES_PASSWORD: mysecretpassword + POSTGRES_DB: local diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts new file mode 100644 index 00000000..df012c95 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "postgresql" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/package.json b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/package.json new file mode 100644 index 00000000..edfbee24 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/package.json @@ -0,0 +1,31 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "db:start": "docker compose up", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "drizzle-orm": "^0.31.2", + "postgres": "^3.4.4" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts new file mode 100644 index 00000000..86836bb8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/postgres-js"; +import postgres from "postgres"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = postgres(env.DATABASE_URL); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts new file mode 100644 index 00000000..ce7836c1 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { pgTable, serial, text, integer } from "drizzle-orm/pg-core"; + +export const user = pgTable('user', { + id: serial('id').primaryKey(), + name: text('name').notNull(), + age: integer('age'), +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/.gitignore b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/.gitignore new file mode 100644 index 00000000..1d76fa0a --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/.gitignore @@ -0,0 +1,22 @@ +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* +*.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts new file mode 100644 index 00000000..1c582a46 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "sqlite" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/package.json b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/package.json new file mode 100644 index 00000000..2a9306f9 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/package.json @@ -0,0 +1,31 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/better-sqlite3": "^7.6.10", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "better-sqlite3": "^10.0.0", + "drizzle-orm": "^0.31.2" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts new file mode 100644 index 00000000..8093e196 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/better-sqlite3"; +import Database from "better-sqlite3"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = new Database(env.DATABASE_URL); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts new file mode 100644 index 00000000..ee431dd8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"; + +export const user = sqliteTable('user', { + id: integer('id').primaryKey(), + name: text('name').notNull(), + age: integer('age') +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/.gitignore b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/.gitignore new file mode 100644 index 00000000..1d76fa0a --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/.gitignore @@ -0,0 +1,22 @@ +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* +*.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/drizzle.config.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/drizzle.config.ts new file mode 100644 index 00000000..1c582a46 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/drizzle.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "drizzle-kit"; +if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set'); + +export default defineConfig({ + schema: "./src/lib/server/db/schema.ts", + + dbCredentials: { + url: process.env.DATABASE_URL + }, + + verbose: true, + strict: true, + dialect: "sqlite" +}); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/package.json b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/package.json new file mode 100644 index 00000000..cbe89bc9 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/package.json @@ -0,0 +1,30 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "db:push": "drizzle-kit push", + "db:migrate": "drizzle-kit migrate", + "db:studio": "drizzle-kit studio" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "drizzle-kit": "^0.22.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "@libsql/client": "^0.6.1", + "drizzle-orm": "^0.31.2" + } +} diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts new file mode 100644 index 00000000..d5d40d03 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/src/lib/server/db/index.ts @@ -0,0 +1,6 @@ +import { drizzle } from "drizzle-orm/libsql"; +import { createClient } from "@libsql/client"; +import { env } from "$env/dynamic/private"; +if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set"); +const client = createClient({ url: env.DATABASE_URL }); +export const db = drizzle(client); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts new file mode 100644 index 00000000..ee431dd8 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/src/lib/server/db/schema.ts @@ -0,0 +1,7 @@ +import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"; + +export const user = sqliteTable('user', { + id: integer('id').primaryKey(), + name: text('name').notNull(), + age: integer('age') +}); diff --git a/packages/tests/.snapshots/integration/eslint/kit-js-comments/eslint.config.js b/packages/tests/.snapshots/integration/eslint/kit-js-comments/eslint.config.js new file mode 100644 index 00000000..0c98c939 --- /dev/null +++ b/packages/tests/.snapshots/integration/eslint/kit-js-comments/eslint.config.js @@ -0,0 +1,31 @@ +import js from "@eslint/js"; +import svelte from "eslint-plugin-svelte"; +import globals from "globals"; +import ts from "typescript-eslint"; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs["flat/recommended"], + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node + } + } + }, + { + files: ["**/*.svelte"], + + languageOptions: { + parserOptions: { + parser: ts.parser + } + } + }, + { + ignores: ["build/", ".svelte-kit/", "dist/"] + } +]; diff --git a/packages/tests/.snapshots/integration/eslint/kit-js-comments/package.json b/packages/tests/.snapshots/integration/eslint/kit-js-comments/package.json new file mode 100644 index 00000000..060359f0 --- /dev/null +++ b/packages/tests/.snapshots/integration/eslint/kit-js-comments/package.json @@ -0,0 +1,28 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", + "lint": "eslint ." + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/eslint": "^9.6.0", + "eslint": "^9.7.0", + "eslint-plugin-svelte": "^2.36.0", + "globals": "^15.0.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "typescript-eslint": "^8.0.0-alpha.54", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/eslint/kit-js/eslint.config.js b/packages/tests/.snapshots/integration/eslint/kit-js/eslint.config.js new file mode 100644 index 00000000..0c98c939 --- /dev/null +++ b/packages/tests/.snapshots/integration/eslint/kit-js/eslint.config.js @@ -0,0 +1,31 @@ +import js from "@eslint/js"; +import svelte from "eslint-plugin-svelte"; +import globals from "globals"; +import ts from "typescript-eslint"; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs["flat/recommended"], + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node + } + } + }, + { + files: ["**/*.svelte"], + + languageOptions: { + parserOptions: { + parser: ts.parser + } + } + }, + { + ignores: ["build/", ".svelte-kit/", "dist/"] + } +]; diff --git a/packages/tests/.snapshots/integration/eslint/kit-js/package.json b/packages/tests/.snapshots/integration/eslint/kit-js/package.json new file mode 100644 index 00000000..7e4d22f4 --- /dev/null +++ b/packages/tests/.snapshots/integration/eslint/kit-js/package.json @@ -0,0 +1,24 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ." + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/eslint": "^9.6.0", + "eslint": "^9.7.0", + "eslint-plugin-svelte": "^2.36.0", + "globals": "^15.0.0", + "svelte": "^4.2.7", + "typescript-eslint": "^8.0.0-alpha.54", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/eslint/kit-ts/eslint.config.js b/packages/tests/.snapshots/integration/eslint/kit-ts/eslint.config.js new file mode 100644 index 00000000..0c98c939 --- /dev/null +++ b/packages/tests/.snapshots/integration/eslint/kit-ts/eslint.config.js @@ -0,0 +1,31 @@ +import js from "@eslint/js"; +import svelte from "eslint-plugin-svelte"; +import globals from "globals"; +import ts from "typescript-eslint"; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs["flat/recommended"], + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node + } + } + }, + { + files: ["**/*.svelte"], + + languageOptions: { + parserOptions: { + parser: ts.parser + } + } + }, + { + ignores: ["build/", ".svelte-kit/", "dist/"] + } +]; diff --git a/packages/tests/.snapshots/integration/eslint/kit-ts/package.json b/packages/tests/.snapshots/integration/eslint/kit-ts/package.json new file mode 100644 index 00000000..0de84d31 --- /dev/null +++ b/packages/tests/.snapshots/integration/eslint/kit-ts/package.json @@ -0,0 +1,28 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "eslint ." + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/eslint": "^9.6.0", + "eslint": "^9.7.0", + "eslint-plugin-svelte": "^2.36.0", + "globals": "^15.0.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "typescript-eslint": "^8.0.0-alpha.54", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/eslint/svelte-js/eslint.config.js b/packages/tests/.snapshots/integration/eslint/svelte-js/eslint.config.js new file mode 100644 index 00000000..0c98c939 --- /dev/null +++ b/packages/tests/.snapshots/integration/eslint/svelte-js/eslint.config.js @@ -0,0 +1,31 @@ +import js from "@eslint/js"; +import svelte from "eslint-plugin-svelte"; +import globals from "globals"; +import ts from "typescript-eslint"; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs["flat/recommended"], + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node + } + } + }, + { + files: ["**/*.svelte"], + + languageOptions: { + parserOptions: { + parser: ts.parser + } + } + }, + { + ignores: ["build/", ".svelte-kit/", "dist/"] + } +]; diff --git a/packages/tests/.snapshots/integration/eslint/svelte-js/package.json b/packages/tests/.snapshots/integration/eslint/svelte-js/package.json new file mode 100644 index 00000000..e19a9699 --- /dev/null +++ b/packages/tests/.snapshots/integration/eslint/svelte-js/package.json @@ -0,0 +1,22 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "lint": "eslint ." + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@types/eslint": "^9.6.0", + "eslint": "^9.7.0", + "eslint-plugin-svelte": "^2.36.0", + "globals": "^15.0.0", + "svelte": "^4.2.18", + "typescript-eslint": "^8.0.0-alpha.54", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/eslint/svelte-ts/eslint.config.js b/packages/tests/.snapshots/integration/eslint/svelte-ts/eslint.config.js new file mode 100644 index 00000000..0c98c939 --- /dev/null +++ b/packages/tests/.snapshots/integration/eslint/svelte-ts/eslint.config.js @@ -0,0 +1,31 @@ +import js from "@eslint/js"; +import svelte from "eslint-plugin-svelte"; +import globals from "globals"; +import ts from "typescript-eslint"; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs["flat/recommended"], + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node + } + } + }, + { + files: ["**/*.svelte"], + + languageOptions: { + parserOptions: { + parser: ts.parser + } + } + }, + { + ignores: ["build/", ".svelte-kit/", "dist/"] + } +]; diff --git a/packages/tests/.snapshots/integration/eslint/svelte-ts/package.json b/packages/tests/.snapshots/integration/eslint/svelte-ts/package.json new file mode 100644 index 00000000..46e20deb --- /dev/null +++ b/packages/tests/.snapshots/integration/eslint/svelte-ts/package.json @@ -0,0 +1,27 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json", + "lint": "eslint ." + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "@types/eslint": "^9.6.0", + "eslint": "^9.7.0", + "eslint-plugin-svelte": "^2.36.0", + "globals": "^15.0.0", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "typescript-eslint": "^8.0.0-alpha.54", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/mdsvex/kit-js-comments/package.json b/packages/tests/.snapshots/integration/mdsvex/kit-js-comments/package.json new file mode 100644 index 00000000..0bc5c21a --- /dev/null +++ b/packages/tests/.snapshots/integration/mdsvex/kit-js-comments/package.json @@ -0,0 +1,23 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "mdsvex": "^0.11.2", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/mdsvex/kit-js-comments/svelte.config.js b/packages/tests/.snapshots/integration/mdsvex/kit-js-comments/svelte.config.js new file mode 100644 index 00000000..aa9552b9 --- /dev/null +++ b/packages/tests/.snapshots/integration/mdsvex/kit-js-comments/svelte.config.js @@ -0,0 +1,17 @@ +import { mdsvex } from "mdsvex"; +import adapter from '@sveltejs/adapter-auto'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter() + }, + + preprocess: [mdsvex()], + extensions: [".svelte", ".svx"] +}; + +export default config; diff --git a/packages/tests/.snapshots/integration/mdsvex/kit-js/package.json b/packages/tests/.snapshots/integration/mdsvex/kit-js/package.json new file mode 100644 index 00000000..ffdf69eb --- /dev/null +++ b/packages/tests/.snapshots/integration/mdsvex/kit-js/package.json @@ -0,0 +1,19 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "mdsvex": "^0.11.2", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/mdsvex/kit-js/svelte.config.js b/packages/tests/.snapshots/integration/mdsvex/kit-js/svelte.config.js new file mode 100644 index 00000000..aa9552b9 --- /dev/null +++ b/packages/tests/.snapshots/integration/mdsvex/kit-js/svelte.config.js @@ -0,0 +1,17 @@ +import { mdsvex } from "mdsvex"; +import adapter from '@sveltejs/adapter-auto'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter() + }, + + preprocess: [mdsvex()], + extensions: [".svelte", ".svx"] +}; + +export default config; diff --git a/packages/tests/.snapshots/integration/mdsvex/kit-ts/package.json b/packages/tests/.snapshots/integration/mdsvex/kit-ts/package.json new file mode 100644 index 00000000..37776772 --- /dev/null +++ b/packages/tests/.snapshots/integration/mdsvex/kit-ts/package.json @@ -0,0 +1,23 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "mdsvex": "^0.11.2", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/mdsvex/kit-ts/svelte.config.js b/packages/tests/.snapshots/integration/mdsvex/kit-ts/svelte.config.js new file mode 100644 index 00000000..f4a0afe7 --- /dev/null +++ b/packages/tests/.snapshots/integration/mdsvex/kit-ts/svelte.config.js @@ -0,0 +1,21 @@ +import { mdsvex } from "mdsvex"; +import adapter from '@sveltejs/adapter-auto'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: [vitePreprocess(), mdsvex()], + + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter() + }, + + extensions: [".svelte", ".svx"] +}; + +export default config; diff --git a/packages/tests/.snapshots/integration/mdsvex/svelte-js/package.json b/packages/tests/.snapshots/integration/mdsvex/svelte-js/package.json new file mode 100644 index 00000000..f6c9dc7a --- /dev/null +++ b/packages/tests/.snapshots/integration/mdsvex/svelte-js/package.json @@ -0,0 +1,17 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "mdsvex": "^0.11.2", + "svelte": "^4.2.18", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/mdsvex/svelte-js/svelte.config.js b/packages/tests/.snapshots/integration/mdsvex/svelte-js/svelte.config.js new file mode 100644 index 00000000..c0b69ad9 --- /dev/null +++ b/packages/tests/.snapshots/integration/mdsvex/svelte-js/svelte.config.js @@ -0,0 +1,10 @@ +import { mdsvex } from "mdsvex"; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' + +export default { + // Consult https://svelte.dev/docs#compile-time-svelte-preprocess + // for more information about preprocessors + preprocess: [vitePreprocess(), mdsvex()], + + extensions: [".svelte", ".svx"] +}; diff --git a/packages/tests/.snapshots/integration/mdsvex/svelte-ts/package.json b/packages/tests/.snapshots/integration/mdsvex/svelte-ts/package.json new file mode 100644 index 00000000..1b61f43a --- /dev/null +++ b/packages/tests/.snapshots/integration/mdsvex/svelte-ts/package.json @@ -0,0 +1,22 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "mdsvex": "^0.11.2", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/mdsvex/svelte-ts/svelte.config.js b/packages/tests/.snapshots/integration/mdsvex/svelte-ts/svelte.config.js new file mode 100644 index 00000000..c0b69ad9 --- /dev/null +++ b/packages/tests/.snapshots/integration/mdsvex/svelte-ts/svelte.config.js @@ -0,0 +1,10 @@ +import { mdsvex } from "mdsvex"; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' + +export default { + // Consult https://svelte.dev/docs#compile-time-svelte-preprocess + // for more information about preprocessors + preprocess: [vitePreprocess(), mdsvex()], + + extensions: [".svelte", ".svx"] +}; diff --git a/packages/tests/.snapshots/integration/prettier/kit-js-comments/.prettierignore b/packages/tests/.snapshots/integration/prettier/kit-js-comments/.prettierignore new file mode 100644 index 00000000..ab78a95d --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/kit-js-comments/.prettierignore @@ -0,0 +1,4 @@ +# Package Managers +package-lock.json +pnpm-lock.yaml +yarn.lock diff --git a/packages/tests/.snapshots/integration/prettier/kit-js-comments/.prettierrc b/packages/tests/.snapshots/integration/prettier/kit-js-comments/.prettierrc new file mode 100644 index 00000000..a58195f0 --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/kit-js-comments/.prettierrc @@ -0,0 +1,21 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": [ + + "prettier-plugin-svelte" + + ], + "overrides": [ + + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + + ] +} diff --git a/packages/tests/.snapshots/integration/prettier/kit-js-comments/package.json b/packages/tests/.snapshots/integration/prettier/kit-js-comments/package.json new file mode 100644 index 00000000..9f725495 --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/kit-js-comments/package.json @@ -0,0 +1,26 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", + "format": "prettier --write .", + "lint": "prettier --check ." + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "prettier": "^3.3.2", + "prettier-plugin-svelte": "^3.2.5", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/prettier/kit-js/.prettierignore b/packages/tests/.snapshots/integration/prettier/kit-js/.prettierignore new file mode 100644 index 00000000..ab78a95d --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/kit-js/.prettierignore @@ -0,0 +1,4 @@ +# Package Managers +package-lock.json +pnpm-lock.yaml +yarn.lock diff --git a/packages/tests/.snapshots/integration/prettier/kit-js/.prettierrc b/packages/tests/.snapshots/integration/prettier/kit-js/.prettierrc new file mode 100644 index 00000000..a58195f0 --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/kit-js/.prettierrc @@ -0,0 +1,21 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": [ + + "prettier-plugin-svelte" + + ], + "overrides": [ + + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + + ] +} diff --git a/packages/tests/.snapshots/integration/prettier/kit-js/package.json b/packages/tests/.snapshots/integration/prettier/kit-js/package.json new file mode 100644 index 00000000..0d911140 --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/kit-js/package.json @@ -0,0 +1,22 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "format": "prettier --write .", + "lint": "prettier --check ." + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "prettier": "^3.3.2", + "prettier-plugin-svelte": "^3.2.5", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/prettier/kit-ts/.prettierignore b/packages/tests/.snapshots/integration/prettier/kit-ts/.prettierignore new file mode 100644 index 00000000..ab78a95d --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/kit-ts/.prettierignore @@ -0,0 +1,4 @@ +# Package Managers +package-lock.json +pnpm-lock.yaml +yarn.lock diff --git a/packages/tests/.snapshots/integration/prettier/kit-ts/.prettierrc b/packages/tests/.snapshots/integration/prettier/kit-ts/.prettierrc new file mode 100644 index 00000000..a58195f0 --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/kit-ts/.prettierrc @@ -0,0 +1,21 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": [ + + "prettier-plugin-svelte" + + ], + "overrides": [ + + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + + ] +} diff --git a/packages/tests/.snapshots/integration/prettier/kit-ts/package.json b/packages/tests/.snapshots/integration/prettier/kit-ts/package.json new file mode 100644 index 00000000..fcbabb26 --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/kit-ts/package.json @@ -0,0 +1,26 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "format": "prettier --write .", + "lint": "prettier --check ." + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "prettier": "^3.3.2", + "prettier-plugin-svelte": "^3.2.5", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/prettier/svelte-js/.prettierignore b/packages/tests/.snapshots/integration/prettier/svelte-js/.prettierignore new file mode 100644 index 00000000..ab78a95d --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/svelte-js/.prettierignore @@ -0,0 +1,4 @@ +# Package Managers +package-lock.json +pnpm-lock.yaml +yarn.lock diff --git a/packages/tests/.snapshots/integration/prettier/svelte-js/.prettierrc b/packages/tests/.snapshots/integration/prettier/svelte-js/.prettierrc new file mode 100644 index 00000000..a58195f0 --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/svelte-js/.prettierrc @@ -0,0 +1,21 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": [ + + "prettier-plugin-svelte" + + ], + "overrides": [ + + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + + ] +} diff --git a/packages/tests/.snapshots/integration/prettier/svelte-js/package.json b/packages/tests/.snapshots/integration/prettier/svelte-js/package.json new file mode 100644 index 00000000..4418f54d --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/svelte-js/package.json @@ -0,0 +1,20 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "format": "prettier --write .", + "lint": "prettier --check ." + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "prettier": "^3.3.2", + "prettier-plugin-svelte": "^3.2.5", + "svelte": "^4.2.18", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/prettier/svelte-ts/.prettierignore b/packages/tests/.snapshots/integration/prettier/svelte-ts/.prettierignore new file mode 100644 index 00000000..ab78a95d --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/svelte-ts/.prettierignore @@ -0,0 +1,4 @@ +# Package Managers +package-lock.json +pnpm-lock.yaml +yarn.lock diff --git a/packages/tests/.snapshots/integration/prettier/svelte-ts/.prettierrc b/packages/tests/.snapshots/integration/prettier/svelte-ts/.prettierrc new file mode 100644 index 00000000..a58195f0 --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/svelte-ts/.prettierrc @@ -0,0 +1,21 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": [ + + "prettier-plugin-svelte" + + ], + "overrides": [ + + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + + ] +} diff --git a/packages/tests/.snapshots/integration/prettier/svelte-ts/package.json b/packages/tests/.snapshots/integration/prettier/svelte-ts/package.json new file mode 100644 index 00000000..2b3e2040 --- /dev/null +++ b/packages/tests/.snapshots/integration/prettier/svelte-ts/package.json @@ -0,0 +1,25 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json", + "format": "prettier --write .", + "lint": "prettier --check ." + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "prettier": "^3.3.2", + "prettier-plugin-svelte": "^3.2.5", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/routify/svelte-js/package.json b/packages/tests/.snapshots/integration/routify/svelte-js/package.json new file mode 100644 index 00000000..1b001d33 --- /dev/null +++ b/packages/tests/.snapshots/integration/routify/svelte-js/package.json @@ -0,0 +1,17 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@roxi/routify": "next", + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "svelte": "^4.2.18", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/routify/svelte-js/src/App.svelte b/packages/tests/.snapshots/integration/routify/svelte-js/src/App.svelte new file mode 100644 index 00000000..9b8fad07 --- /dev/null +++ b/packages/tests/.snapshots/integration/routify/svelte-js/src/App.svelte @@ -0,0 +1,52 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/routify/svelte-js/src/routes/demo.svelte b/packages/tests/.snapshots/integration/routify/svelte-js/src/routes/demo.svelte new file mode 100644 index 00000000..215d3af5 --- /dev/null +++ b/packages/tests/.snapshots/integration/routify/svelte-js/src/routes/demo.svelte @@ -0,0 +1,6 @@ + +
+ Index + Demo +
+

On demo

diff --git a/packages/tests/.snapshots/integration/routify/svelte-js/src/routes/index.svelte b/packages/tests/.snapshots/integration/routify/svelte-js/src/routes/index.svelte new file mode 100644 index 00000000..e5909d89 --- /dev/null +++ b/packages/tests/.snapshots/integration/routify/svelte-js/src/routes/index.svelte @@ -0,0 +1,6 @@ + +
+ Index + Demo +
+

On index

diff --git a/packages/tests/.snapshots/integration/routify/svelte-js/vite.config.ts b/packages/tests/.snapshots/integration/routify/svelte-js/vite.config.ts new file mode 100644 index 00000000..efdd90c9 --- /dev/null +++ b/packages/tests/.snapshots/integration/routify/svelte-js/vite.config.ts @@ -0,0 +1,5 @@ +import routify from "@roxi/routify/vite-plugin"; + +export default defineConfig({ + plugins: [routify({})] +}); diff --git a/packages/tests/.snapshots/integration/routify/svelte-ts/package.json b/packages/tests/.snapshots/integration/routify/svelte-ts/package.json new file mode 100644 index 00000000..fac5559a --- /dev/null +++ b/packages/tests/.snapshots/integration/routify/svelte-ts/package.json @@ -0,0 +1,22 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json" + }, + "devDependencies": { + "@roxi/routify": "next", + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/routify/svelte-ts/src/App.svelte b/packages/tests/.snapshots/integration/routify/svelte-ts/src/App.svelte new file mode 100644 index 00000000..9b8fad07 --- /dev/null +++ b/packages/tests/.snapshots/integration/routify/svelte-ts/src/App.svelte @@ -0,0 +1,52 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/routify/svelte-ts/src/routes/demo.svelte b/packages/tests/.snapshots/integration/routify/svelte-ts/src/routes/demo.svelte new file mode 100644 index 00000000..215d3af5 --- /dev/null +++ b/packages/tests/.snapshots/integration/routify/svelte-ts/src/routes/demo.svelte @@ -0,0 +1,6 @@ + +
+ Index + Demo +
+

On demo

diff --git a/packages/tests/.snapshots/integration/routify/svelte-ts/src/routes/index.svelte b/packages/tests/.snapshots/integration/routify/svelte-ts/src/routes/index.svelte new file mode 100644 index 00000000..e5909d89 --- /dev/null +++ b/packages/tests/.snapshots/integration/routify/svelte-ts/src/routes/index.svelte @@ -0,0 +1,6 @@ + +
+ Index + Demo +
+

On index

diff --git a/packages/tests/.snapshots/integration/routify/svelte-ts/vite.config.ts b/packages/tests/.snapshots/integration/routify/svelte-ts/vite.config.ts new file mode 100644 index 00000000..a9760eaf --- /dev/null +++ b/packages/tests/.snapshots/integration/routify/svelte-ts/vite.config.ts @@ -0,0 +1,8 @@ +import routify from "@roxi/routify/vite-plugin"; +import { defineConfig } from 'vite' +import { svelte } from '@sveltejs/vite-plugin-svelte' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [svelte(), routify({})], +}) diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/package.json b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/package.json new file mode 100644 index 00000000..b37afd00 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/package.json @@ -0,0 +1,25 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "tailwindcss": "^3.4.4", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/postcss.config.js b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/postcss.config.js new file mode 100644 index 00000000..ba807304 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/src/app.css b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/src/app.css new file mode 100644 index 00000000..76fcadcc --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/src/app.css @@ -0,0 +1,3 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/src/routes/+layout.svelte new file mode 100644 index 00000000..eef876a7 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/tailwind.config.ts b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/tailwind.config.ts new file mode 100644 index 00000000..6bfa5284 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + + theme: { + extend: {} + }, + + plugins: [] +} as Config; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/package.json b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/package.json new file mode 100644 index 00000000..322bb407 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/package.json @@ -0,0 +1,26 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@tailwindcss/typography": "^0.5.13", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "tailwindcss": "^3.4.4", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/postcss.config.js b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/postcss.config.js new file mode 100644 index 00000000..ba807304 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/src/app.css b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/src/app.css new file mode 100644 index 00000000..76fcadcc --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/src/app.css @@ -0,0 +1,3 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/src/routes/+layout.svelte new file mode 100644 index 00000000..eef876a7 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/tailwind.config.ts b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/tailwind.config.ts new file mode 100644 index 00000000..c0a4166e --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js-comments/typography=true/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + + theme: { + extend: {} + }, + + plugins: [require("@tailwindcss/typography")] +} as Config; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js/package.json b/packages/tests/.snapshots/integration/tailwindcss/kit-js/package.json new file mode 100644 index 00000000..db316c6d --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js/package.json @@ -0,0 +1,21 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "svelte": "^4.2.7", + "tailwindcss": "^3.4.4", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js/postcss.config.js b/packages/tests/.snapshots/integration/tailwindcss/kit-js/postcss.config.js new file mode 100644 index 00000000..ba807304 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js/src/app.css b/packages/tests/.snapshots/integration/tailwindcss/kit-js/src/app.css new file mode 100644 index 00000000..76fcadcc --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js/src/app.css @@ -0,0 +1,3 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/tailwindcss/kit-js/src/routes/+layout.svelte new file mode 100644 index 00000000..eef876a7 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js/tailwind.config.ts b/packages/tests/.snapshots/integration/tailwindcss/kit-js/tailwind.config.ts new file mode 100644 index 00000000..6bfa5284 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + + theme: { + extend: {} + }, + + plugins: [] +} as Config; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/package.json b/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/package.json new file mode 100644 index 00000000..e45498d5 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/package.json @@ -0,0 +1,22 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@tailwindcss/typography": "^0.5.13", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "svelte": "^4.2.7", + "tailwindcss": "^3.4.4", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/postcss.config.js b/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/postcss.config.js new file mode 100644 index 00000000..ba807304 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/src/app.css b/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/src/app.css new file mode 100644 index 00000000..76fcadcc --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/src/app.css @@ -0,0 +1,3 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/src/routes/+layout.svelte new file mode 100644 index 00000000..eef876a7 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/tailwind.config.ts b/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/tailwind.config.ts new file mode 100644 index 00000000..c0a4166e --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-js/typography=true/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + + theme: { + extend: {} + }, + + plugins: [require("@tailwindcss/typography")] +} as Config; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-ts/package.json b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/package.json new file mode 100644 index 00000000..3dbc26af --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/package.json @@ -0,0 +1,25 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "tailwindcss": "^3.4.4", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-ts/postcss.config.js b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/postcss.config.js new file mode 100644 index 00000000..ba807304 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-ts/src/app.css b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/src/app.css new file mode 100644 index 00000000..76fcadcc --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/src/app.css @@ -0,0 +1,3 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-ts/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/src/routes/+layout.svelte new file mode 100644 index 00000000..eef876a7 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-ts/tailwind.config.ts b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/tailwind.config.ts new file mode 100644 index 00000000..6bfa5284 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + + theme: { + extend: {} + }, + + plugins: [] +} as Config; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/package.json b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/package.json new file mode 100644 index 00000000..5e462055 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/package.json @@ -0,0 +1,26 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@tailwindcss/typography": "^0.5.13", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "tailwindcss": "^3.4.4", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/postcss.config.js b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/postcss.config.js new file mode 100644 index 00000000..ba807304 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/src/app.css b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/src/app.css new file mode 100644 index 00000000..76fcadcc --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/src/app.css @@ -0,0 +1,3 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/src/routes/+layout.svelte b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/src/routes/+layout.svelte new file mode 100644 index 00000000..eef876a7 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/src/routes/+layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/tailwind.config.ts b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/tailwind.config.ts new file mode 100644 index 00000000..c0a4166e --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/kit-ts/typography=true/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + + theme: { + extend: {} + }, + + plugins: [require("@tailwindcss/typography")] +} as Config; diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-js/package.json b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/package.json new file mode 100644 index 00000000..600b81b6 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/package.json @@ -0,0 +1,19 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "svelte": "^4.2.18", + "tailwindcss": "^3.4.4", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-js/postcss.config.js b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/postcss.config.js new file mode 100644 index 00000000..ba807304 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-js/src/App.svelte b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/src/App.svelte new file mode 100644 index 00000000..bfe09ddd --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/src/App.svelte @@ -0,0 +1,47 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-js/src/app.css b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/src/app.css new file mode 100644 index 00000000..149486e2 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/src/app.css @@ -0,0 +1,83 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; + +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-js/tailwind.config.ts b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/tailwind.config.ts new file mode 100644 index 00000000..6bfa5284 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + + theme: { + extend: {} + }, + + plugins: [] +} as Config; diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/package.json b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/package.json new file mode 100644 index 00000000..1507de31 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/package.json @@ -0,0 +1,20 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tailwindcss/typography": "^0.5.13", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "svelte": "^4.2.18", + "tailwindcss": "^3.4.4", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/postcss.config.js b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/postcss.config.js new file mode 100644 index 00000000..ba807304 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/src/App.svelte b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/src/App.svelte new file mode 100644 index 00000000..bfe09ddd --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/src/App.svelte @@ -0,0 +1,47 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/src/app.css b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/src/app.css new file mode 100644 index 00000000..149486e2 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/src/app.css @@ -0,0 +1,83 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; + +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/tailwind.config.ts b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/tailwind.config.ts new file mode 100644 index 00000000..c0a4166e --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-js/typography=true/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + + theme: { + extend: {} + }, + + plugins: [require("@tailwindcss/typography")] +} as Config; diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/package.json b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/package.json new file mode 100644 index 00000000..7d55feb6 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/package.json @@ -0,0 +1,24 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tailwindcss": "^3.4.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/postcss.config.js b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/postcss.config.js new file mode 100644 index 00000000..ba807304 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/src/App.svelte b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/src/App.svelte new file mode 100644 index 00000000..bfe09ddd --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/src/App.svelte @@ -0,0 +1,47 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/src/app.css b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/src/app.css new file mode 100644 index 00000000..149486e2 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/src/app.css @@ -0,0 +1,83 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; + +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/tailwind.config.ts b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/tailwind.config.ts new file mode 100644 index 00000000..6bfa5284 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + + theme: { + extend: {} + }, + + plugins: [] +} as Config; diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/package.json b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/package.json new file mode 100644 index 00000000..42f1360d --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/package.json @@ -0,0 +1,25 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tailwindcss/typography": "^0.5.13", + "@tsconfig/svelte": "^5.0.4", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.38", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tailwindcss": "^3.4.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/postcss.config.js b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/postcss.config.js new file mode 100644 index 00000000..ba807304 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/src/App.svelte b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/src/App.svelte new file mode 100644 index 00000000..bfe09ddd --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/src/App.svelte @@ -0,0 +1,47 @@ + + +
+ +

Vite + Svelte

+ +
+ +
+ +

+ Check out SvelteKit, the official Svelte app framework powered by Vite! +

+ +

+ Click on the Vite and Svelte logos to learn more +

+
+ + + diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/src/app.css b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/src/app.css new file mode 100644 index 00000000..149486e2 --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/src/app.css @@ -0,0 +1,83 @@ +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; + +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/tailwind.config.ts b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/tailwind.config.ts new file mode 100644 index 00000000..c0a4166e --- /dev/null +++ b/packages/tests/.snapshots/integration/tailwindcss/svelte-ts/typography=true/tailwind.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "tailwindcss"; + +export default { + content: ["./src/**/*.{html,js,svelte,ts}"], + + theme: { + extend: {} + }, + + plugins: [require("@tailwindcss/typography")] +} as Config; diff --git a/packages/tests/common/adders.ts b/packages/tests/common/adders.ts new file mode 100644 index 00000000..9772fb43 --- /dev/null +++ b/packages/tests/common/adders.ts @@ -0,0 +1,24 @@ +import { getAdderDetails } from '@svelte-add/adders'; +import { adderIds } from '@svelte-add/config'; +import type { AdderWithoutExplicitArgs } from '@svelte-add/core/adder/config'; +import { remoteControl } from '@svelte-add/core/internal'; + +export async function getAdders() { + const adders: AdderWithoutExplicitArgs[] = []; + + for (const adderName of adderIds) { + adders.push(await getAdder(adderName)); + } + + return adders; +} + +async function getAdder(adderName: string) { + remoteControl.enable(); + + const adder = await getAdderDetails(adderName); + + remoteControl.disable(); + + return adder; +} diff --git a/packages/tests/end2end.ts b/packages/tests/end2end.ts index ee4a9f13..7f4acc02 100644 --- a/packages/tests/end2end.ts +++ b/packages/tests/end2end.ts @@ -1,12 +1,13 @@ import * as path from 'node:path'; import { execSync } from 'node:child_process'; import { fileURLToPath } from 'node:url'; -import { generateTestCases, prepareTests, runAdderTests } from '@svelte-add/testing-library'; -import { adderIds } from '@svelte-add/config'; -import { remoteControl } from '@svelte-add/core/internal'; -import type { AdderWithoutExplicitArgs } from '@svelte-add/core/adder/config'; -import { getAdderDetails } from '@svelte-add/adders'; +import { + generateTestCases, + prepareTests, + runAdderEndToEndTests, +} from '@svelte-add/testing-library'; import { test, describe, beforeAll } from 'vitest'; +import { getAdders } from './common/adders'; let usingDocker = false; @@ -14,19 +15,15 @@ let usingDocker = false; const testOptions = { headless: true, pauseExecutionAfterBrowser: false, - outputDirectory: path.join(process.cwd(), '.outputs'), + outputDirectory: path.join(process.cwd(), '.outputs', 'end2end'), }; beforeAll(async () => { - await prepareTests(testOptions); + await prepareTests(testOptions.outputDirectory); }); async function executeTests() { - const adders: AdderWithoutExplicitArgs[] = []; - - for (const adderName of adderIds) { - adders.push(await getAdder(adderName)); - } + const adders = await getAdders(); usingDocker = !!adders.find((adder) => adder.config.metadata.id === 'drizzle'); if (usingDocker) startDocker(); @@ -42,24 +39,19 @@ async function executeTests() { testName = `${testName} / ${JSON.stringify(testCase.options)}`; const testMethod = testCase.runSynchronously ? test : test.concurrent; - testMethod(testName, async () => { - await runAdderTests(testCase.template, testCase.adder, testCase.options, testOptions); + testMethod.skip(testName, async () => { + await runAdderEndToEndTests( + testCase.template, + testCase.adder, + testCase.options, + testOptions, + ); }); } }); } } -async function getAdder(adderName: string) { - remoteControl.enable(); - - const adder = await getAdderDetails(adderName); - - remoteControl.disable(); - - return adder; -} - const cwd = path.resolve(fileURLToPath(import.meta.url), '..'); // We're using `execSync` instead of our `executeCli` because we need the cleanup to be synchronous diff --git a/packages/tests/integration.ts b/packages/tests/integration.ts new file mode 100644 index 00000000..409433b1 --- /dev/null +++ b/packages/tests/integration.ts @@ -0,0 +1,67 @@ +import * as path from 'node:path'; +import { + generateTestCases, + prepareTests, + runAdderIntegrationTests, +} from '@svelte-add/testing-library'; +import { test, describe, beforeAll } from 'vitest'; +import { getAdders } from './common/adders'; +import { mkdir, readFile } from 'node:fs/promises'; + +const outputDirectory = path.join(process.cwd(), '.outputs', 'integration'); +const snapshotDirectory = path.join(process.cwd(), '.snapshots', 'integration'); + +beforeAll(async () => { + await prepareTests(outputDirectory); +}); + +async function executeTests() { + const adders = await getAdders(); + // we don't now which files changed for external adders, so there is no need to + // execute them at all. + const inlineAdders = adders.filter((x) => x.config.integrationType == 'inline'); + + const adderTestCases = generateTestCases(inlineAdders); + for (const [adderId, testCases] of adderTestCases) { + describe(adderId, () => { + for (const testCase of testCases) { + let testName = `${adderId} / ${testCase.template}`; + + // only add options to name, if the test case has options + if (testCase.options && Object.keys(testCase.options).length > 0) + testName = `${testName} / ${JSON.stringify(testCase.options)}`; + + const testMethod = testCase.runSynchronously ? test : test.concurrent; + testMethod(testName, async ({ expect }) => { + const adder = adders.find((x) => x.config.metadata.id == adderId); + if (!adder) throw new Error('Unable to find adder'); + + const executionResult = await runAdderIntegrationTests(testCase, outputDirectory, adder); + + if (!executionResult || !executionResult.success) + throw new Error('Adder was not applied successfully'); + + const testCaseSnapshotDirectory = executionResult.outputDirectory.replace( + outputDirectory, + snapshotDirectory, + ); + await mkdir(testCaseSnapshotDirectory, { recursive: true }); + + if (!executionResult.changedFiles) return; + + for (const filePath of executionResult.changedFiles) { + const contentBuffer = await readFile( + path.join(executionResult.outputDirectory, filePath), + ); + const content = contentBuffer.toString(); + + const snapshotFilePath = path.join(testCaseSnapshotDirectory, filePath); + await expect(content).toMatchFileSnapshot(snapshotFilePath); + } + }); + } + }); + } +} + +await executeTests(); diff --git a/packages/tests/package.json b/packages/tests/package.json index dc50de7d..c80ae153 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -10,7 +10,7 @@ "@svelte-add/config": "workspace:*", "@svelte-add/core": "workspace:*", "@svelte-add/testing-library": "workspace:*", - "@vitest/ui": "^1.6.0", - "vitest": "^1.6.0" + "@vitest/ui": "^2.0.4", + "vitest": "^2.0.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cbfd24ef..73615442 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -247,11 +247,11 @@ importers: specifier: workspace:* version: link:../testing-library '@vitest/ui': - specifier: ^1.6.0 - version: 1.6.0(vitest@1.6.0) + specifier: ^2.0.4 + version: 2.0.4(vitest@2.0.4) vitest: - specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.9)(@vitest/ui@1.6.0) + specifier: ^2.0.4 + version: 2.0.4(@types/node@20.14.9)(@vitest/ui@2.0.4) packages/website: dependencies: @@ -977,23 +977,46 @@ packages: '@vitest/expect@1.6.0': resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} + '@vitest/expect@2.0.4': + resolution: {integrity: sha512-39jr5EguIoanChvBqe34I8m1hJFI4+jxvdOpD7gslZrVQBKhh8H9eD7J/LJX4zakrw23W+dITQTDqdt43xVcJw==} + + '@vitest/pretty-format@2.0.4': + resolution: {integrity: sha512-RYZl31STbNGqf4l2eQM1nvKPXE0NhC6Eq0suTTePc4mtMQ1Fn8qZmjV4emZdEdG2NOWGKSCrHZjmTqDCDoeFBw==} + '@vitest/runner@1.6.0': resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==} + '@vitest/runner@2.0.4': + resolution: {integrity: sha512-Gk+9Su/2H2zNfNdeJR124gZckd5st4YoSuhF1Rebi37qTXKnqYyFCd9KP4vl2cQHbtuVKjfEKrNJxHHCW8thbQ==} + '@vitest/snapshot@1.6.0': resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==} + '@vitest/snapshot@2.0.4': + resolution: {integrity: sha512-or6Mzoz/pD7xTvuJMFYEtso1vJo1S5u6zBTinfl+7smGUhqybn6VjzCDMhmTyVOFWwkCMuNjmNNxnyXPgKDoPw==} + '@vitest/spy@1.6.0': resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==} + '@vitest/spy@2.0.4': + resolution: {integrity: sha512-uTXU56TNoYrTohb+6CseP8IqNwlNdtPwEO0AWl+5j7NelS6x0xZZtP0bDWaLvOfUbaYwhhWp1guzXUxkC7mW7Q==} + '@vitest/ui@1.6.0': resolution: {integrity: sha512-k3Lyo+ONLOgylctiGovRKy7V4+dIN2yxstX3eY5cWFXH6WP+ooVX79YSyi0GagdTQzLmT43BF27T0s6dOIPBXA==} peerDependencies: vitest: 1.6.0 + '@vitest/ui@2.0.4': + resolution: {integrity: sha512-9SNE9ve3kgDkVTxJsY7BjqSwyqDVRJbq/AHVHZs+V0vmr/0cCX6yGT6nOahSXEsXFtKAsvRtBXKlTgr+5njzZQ==} + peerDependencies: + vitest: 2.0.4 + '@vitest/utils@1.6.0': resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==} + '@vitest/utils@2.0.4': + resolution: {integrity: sha512-Zc75QuuoJhOBnlo99ZVUkJIuq4Oj0zAkrQ2VzCqNCx6wAwViHEh5Fnp4fiJTE9rA+sAoXRf00Z9xGgfEzV6fzQ==} + abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} @@ -1091,6 +1114,10 @@ packages: assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + ast-types@0.14.2: resolution: {integrity: sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==} engines: {node: '>=4'} @@ -1193,6 +1220,10 @@ packages: resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} engines: {node: '>=4'} + chai@5.1.1: + resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} + engines: {node: '>=12'} + chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -1211,6 +1242,10 @@ packages: check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} @@ -1346,6 +1381,10 @@ packages: resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} engines: {node: '>=6'} + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} @@ -2055,6 +2094,9 @@ packages: loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + loupe@3.1.1: + resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} + lowercase-keys@3.0.0: resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2409,6 +2451,10 @@ packages: pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + pause-stream@0.0.11: resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} @@ -3015,10 +3061,22 @@ packages: resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} engines: {node: '>=14.0.0'} + tinypool@1.0.0: + resolution: {integrity: sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} + engines: {node: '>=14.0.0'} + tinyspy@2.2.1: resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} engines: {node: '>=14.0.0'} + tinyspy@3.0.0: + resolution: {integrity: sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==} + engines: {node: '>=14.0.0'} + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -3149,6 +3207,11 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true + vite-node@2.0.4: + resolution: {integrity: sha512-ZpJVkxcakYtig5iakNeL7N3trufe3M6vGuzYAr4GsbCTwobDeyPJpE4cjDhhPluv8OvQCFzu2LWp6GkoKRITXA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + vite@5.3.1: resolution: {integrity: sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -3210,6 +3273,31 @@ packages: jsdom: optional: true + vitest@2.0.4: + resolution: {integrity: sha512-luNLDpfsnxw5QSW4bISPe6tkxVvv5wn2BBs/PuDRkhXZ319doZyLOBr1sjfB5yCEpTiU7xCAdViM8TNVGPwoog==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.0.4 + '@vitest/ui': 2.0.4 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -3239,6 +3327,11 @@ packages: engines: {node: '>=8'} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} @@ -4044,22 +4137,48 @@ snapshots: '@vitest/utils': 1.6.0 chai: 4.4.1 + '@vitest/expect@2.0.4': + dependencies: + '@vitest/spy': 2.0.4 + '@vitest/utils': 2.0.4 + chai: 5.1.1 + tinyrainbow: 1.2.0 + + '@vitest/pretty-format@2.0.4': + dependencies: + tinyrainbow: 1.2.0 + '@vitest/runner@1.6.0': dependencies: '@vitest/utils': 1.6.0 p-limit: 5.0.0 pathe: 1.1.2 + '@vitest/runner@2.0.4': + dependencies: + '@vitest/utils': 2.0.4 + pathe: 1.1.2 + '@vitest/snapshot@1.6.0': dependencies: magic-string: 0.30.10 pathe: 1.1.2 pretty-format: 29.7.0 + '@vitest/snapshot@2.0.4': + dependencies: + '@vitest/pretty-format': 2.0.4 + magic-string: 0.30.10 + pathe: 1.1.2 + '@vitest/spy@1.6.0': dependencies: tinyspy: 2.2.1 + '@vitest/spy@2.0.4': + dependencies: + tinyspy: 3.0.0 + '@vitest/ui@1.6.0(vitest@1.6.0)': dependencies: '@vitest/utils': 1.6.0 @@ -4071,6 +4190,17 @@ snapshots: sirv: 2.0.4 vitest: 1.6.0(@types/node@20.14.9)(@vitest/ui@1.6.0) + '@vitest/ui@2.0.4(vitest@2.0.4)': + dependencies: + '@vitest/utils': 2.0.4 + fast-glob: 3.3.2 + fflate: 0.8.2 + flatted: 3.3.1 + pathe: 1.1.2 + sirv: 2.0.4 + tinyrainbow: 1.2.0 + vitest: 2.0.4(@types/node@20.14.9)(@vitest/ui@2.0.4) + '@vitest/utils@1.6.0': dependencies: diff-sequences: 29.6.3 @@ -4078,6 +4208,13 @@ snapshots: loupe: 2.3.7 pretty-format: 29.7.0 + '@vitest/utils@2.0.4': + dependencies: + '@vitest/pretty-format': 2.0.4 + estree-walker: 3.0.3 + loupe: 3.1.1 + tinyrainbow: 1.2.0 + abbrev@1.1.1: {} acorn-jsx@5.3.2(acorn@8.12.0): @@ -4164,6 +4301,8 @@ snapshots: assertion-error@1.1.0: {} + assertion-error@2.0.1: {} + ast-types@0.14.2: dependencies: tslib: 2.6.3 @@ -4303,6 +4442,14 @@ snapshots: pathval: 1.1.1 type-detect: 4.0.8 + chai@5.1.1: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.1 + pathval: 2.0.0 + chalk@2.4.2: dependencies: ansi-styles: 3.2.1 @@ -4322,6 +4469,8 @@ snapshots: dependencies: get-func-name: 2.0.2 + check-error@2.1.1: {} + chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -4445,6 +4594,8 @@ snapshots: dependencies: type-detect: 4.0.8 + deep-eql@5.0.2: {} + deep-extend@0.6.0: {} deep-is@0.1.4: {} @@ -5146,6 +5297,10 @@ snapshots: dependencies: get-func-name: 2.0.2 + loupe@3.1.1: + dependencies: + get-func-name: 2.0.2 + lowercase-keys@3.0.0: {} lru-cache@10.2.2: {} @@ -5572,6 +5727,8 @@ snapshots: pathval@1.1.1: {} + pathval@2.0.0: {} + pause-stream@0.0.11: dependencies: through: 2.3.8 @@ -6196,8 +6353,14 @@ snapshots: tinypool@0.8.4: {} + tinypool@1.0.0: {} + + tinyrainbow@1.2.0: {} + tinyspy@2.2.1: {} + tinyspy@3.0.0: {} + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 @@ -6336,6 +6499,23 @@ snapshots: - supports-color - terser + vite-node@2.0.4(@types/node@20.14.9): + dependencies: + cac: 6.7.14 + debug: 4.3.5 + pathe: 1.1.2 + tinyrainbow: 1.2.0 + vite: 5.3.1(@types/node@20.14.9) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + vite@5.3.1(@types/node@20.14.9): dependencies: esbuild: 0.21.5 @@ -6383,6 +6563,39 @@ snapshots: - supports-color - terser + vitest@2.0.4(@types/node@20.14.9)(@vitest/ui@2.0.4): + dependencies: + '@ampproject/remapping': 2.3.0 + '@vitest/expect': 2.0.4 + '@vitest/pretty-format': 2.0.4 + '@vitest/runner': 2.0.4 + '@vitest/snapshot': 2.0.4 + '@vitest/spy': 2.0.4 + '@vitest/utils': 2.0.4 + chai: 5.1.1 + debug: 4.3.5 + execa: 8.0.1 + magic-string: 0.30.10 + pathe: 1.1.2 + std-env: 3.7.0 + tinybench: 2.8.0 + tinypool: 1.0.0 + tinyrainbow: 1.2.0 + vite: 5.3.1(@types/node@20.14.9) + vite-node: 2.0.4(@types/node@20.14.9) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 20.14.9 + '@vitest/ui': 2.0.4(vitest@2.0.4) + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + webidl-conversions@3.0.1: {} whatwg-url@5.0.0: @@ -6412,6 +6625,11 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + wide-align@1.1.5: dependencies: string-width: 4.2.3 From 966f2a217e3266532638c300510c0122f5e52549 Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 28 Jul 2024 19:50:56 +0200 Subject: [PATCH 09/12] remove useless skip --- packages/tests/end2end.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tests/end2end.ts b/packages/tests/end2end.ts index 7f4acc02..41d51136 100644 --- a/packages/tests/end2end.ts +++ b/packages/tests/end2end.ts @@ -39,7 +39,7 @@ async function executeTests() { testName = `${testName} / ${JSON.stringify(testCase.options)}`; const testMethod = testCase.runSynchronously ? test : test.concurrent; - testMethod.skip(testName, async () => { + testMethod(testName, async () => { await runAdderEndToEndTests( testCase.template, testCase.adder, From bc0a416e59a33ed4ab48514fab0ad8842c7e43ae Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 28 Jul 2024 19:53:21 +0200 Subject: [PATCH 10/12] fix formatting --- .prettierignore | 2 ++ eslint.config.js | 1 + 2 files changed, 3 insertions(+) diff --git a/.prettierignore b/.prettierignore index 3849c953..7ea3dfca 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,6 +2,8 @@ /.changeset/ CHANGELOG.md packages/website/.svelte-kit/ +packages/tests/.snapshots/ +packages/tests/.outputs/ adders/*/README.md adders/*/package.json temp/ diff --git a/eslint.config.js b/eslint.config.js index 4c2995bc..49a112cd 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -47,6 +47,7 @@ export default tseslint.config( 'packages/dev-utils/build', 'packages/testing-library/build', 'packages/tests/.outputs', + 'packages/tests/.snapshots', 'packages/tests/build', 'packages/website/.svelte-kit', 'packages/website/build', From ada10e384cde6bc10db264454f3a645696cfaaec Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Sun, 28 Jul 2024 19:58:19 +0200 Subject: [PATCH 11/12] improve snapshot failure message --- packages/tests/integration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tests/integration.ts b/packages/tests/integration.ts index 409433b1..f261d165 100644 --- a/packages/tests/integration.ts +++ b/packages/tests/integration.ts @@ -56,7 +56,7 @@ async function executeTests() { const content = contentBuffer.toString(); const snapshotFilePath = path.join(testCaseSnapshotDirectory, filePath); - await expect(content).toMatchFileSnapshot(snapshotFilePath); + await expect(content).toMatchFileSnapshot(snapshotFilePath, filePath); } }); } From 1ee50e2000382588c2c8c81b8f3d759b31b6e68b Mon Sep 17 00:00:00 2001 From: Manuel Serret Date: Thu, 1 Aug 2024 19:16:21 +0200 Subject: [PATCH 12/12] fix most failing tests --- package.json | 1 + packages/testing-library/utils/test-cases.ts | 4 +-- .../.env.example | 1 + .../.env.example | 1 + .../.env.example | 1 + .../.env.example | 1 + .../.env.example | 1 + .../.env.example | 1 + .../.env.example | 1 + .../.env.example | 1 + .../.env.example | 1 + .../.env.example | 1 + .../.env.example | 1 + .../.env.example | 1 + .../playwright/kit-js-comments/.gitignore | 22 ++++++++++++++++ .../kit-js-comments/e2e/demo.test.ts | 6 +++++ .../playwright/kit-js-comments/package.json | 25 +++++++++++++++++++ .../kit-js-comments/playwright.config.ts | 10 ++++++++ .../integration/playwright/kit-js/.gitignore | 22 ++++++++++++++++ .../playwright/kit-js/e2e/demo.test.ts | 6 +++++ .../playwright/kit-js/package.json | 21 ++++++++++++++++ .../playwright/kit-js/playwright.config.ts | 10 ++++++++ .../integration/playwright/kit-ts/.gitignore | 22 ++++++++++++++++ .../playwright/kit-ts/e2e/demo.test.ts | 6 +++++ .../playwright/kit-ts/package.json | 25 +++++++++++++++++++ .../playwright/kit-ts/playwright.config.ts | 10 ++++++++ .../playwright/svelte-js/.gitignore | 25 +++++++++++++++++++ .../playwright/svelte-js/e2e/demo.test.ts | 6 +++++ .../playwright/svelte-js/package.json | 19 ++++++++++++++ .../playwright/svelte-js/playwright.config.ts | 10 ++++++++ .../playwright/svelte-ts/.gitignore | 25 +++++++++++++++++++ .../playwright/svelte-ts/e2e/demo.test.ts | 6 +++++ .../playwright/svelte-ts/package.json | 24 ++++++++++++++++++ .../playwright/svelte-ts/playwright.config.ts | 10 ++++++++ .../vitest/kit-js-comments/package.json | 25 +++++++++++++++++++ .../vitest/kit-js-comments/src/demo.spec.ts | 7 ++++++ .../vitest/kit-js-comments/vite.config.ts | 7 ++++++ .../integration/vitest/kit-js/package.json | 21 ++++++++++++++++ .../vitest/kit-js/src/demo.spec.ts | 7 ++++++ .../integration/vitest/kit-js/vite.config.ts | 7 ++++++ .../integration/vitest/kit-ts/package.json | 25 +++++++++++++++++++ .../vitest/kit-ts/src/demo.spec.ts | 7 ++++++ .../integration/vitest/kit-ts/vite.config.ts | 10 ++++++++ .../integration/vitest/svelte-js/package.json | 19 ++++++++++++++ .../vitest/svelte-js/src/demo.spec.ts | 7 ++++++ .../vitest/svelte-js/vite.config.ts | 7 ++++++ .../integration/vitest/svelte-ts/package.json | 24 ++++++++++++++++++ .../vitest/svelte-ts/src/demo.spec.ts | 7 ++++++ .../vitest/svelte-ts/vite.config.ts | 11 ++++++++ 49 files changed, 516 insertions(+), 2 deletions(-) create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/.env.example create mode 100644 packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/.env.example create mode 100644 packages/tests/.snapshots/integration/playwright/kit-js-comments/.gitignore create mode 100644 packages/tests/.snapshots/integration/playwright/kit-js-comments/e2e/demo.test.ts create mode 100644 packages/tests/.snapshots/integration/playwright/kit-js-comments/package.json create mode 100644 packages/tests/.snapshots/integration/playwright/kit-js-comments/playwright.config.ts create mode 100644 packages/tests/.snapshots/integration/playwright/kit-js/.gitignore create mode 100644 packages/tests/.snapshots/integration/playwright/kit-js/e2e/demo.test.ts create mode 100644 packages/tests/.snapshots/integration/playwright/kit-js/package.json create mode 100644 packages/tests/.snapshots/integration/playwright/kit-js/playwright.config.ts create mode 100644 packages/tests/.snapshots/integration/playwright/kit-ts/.gitignore create mode 100644 packages/tests/.snapshots/integration/playwright/kit-ts/e2e/demo.test.ts create mode 100644 packages/tests/.snapshots/integration/playwright/kit-ts/package.json create mode 100644 packages/tests/.snapshots/integration/playwright/kit-ts/playwright.config.ts create mode 100644 packages/tests/.snapshots/integration/playwright/svelte-js/.gitignore create mode 100644 packages/tests/.snapshots/integration/playwright/svelte-js/e2e/demo.test.ts create mode 100644 packages/tests/.snapshots/integration/playwright/svelte-js/package.json create mode 100644 packages/tests/.snapshots/integration/playwright/svelte-js/playwright.config.ts create mode 100644 packages/tests/.snapshots/integration/playwright/svelte-ts/.gitignore create mode 100644 packages/tests/.snapshots/integration/playwright/svelte-ts/e2e/demo.test.ts create mode 100644 packages/tests/.snapshots/integration/playwright/svelte-ts/package.json create mode 100644 packages/tests/.snapshots/integration/playwright/svelte-ts/playwright.config.ts create mode 100644 packages/tests/.snapshots/integration/vitest/kit-js-comments/package.json create mode 100644 packages/tests/.snapshots/integration/vitest/kit-js-comments/src/demo.spec.ts create mode 100644 packages/tests/.snapshots/integration/vitest/kit-js-comments/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/vitest/kit-js/package.json create mode 100644 packages/tests/.snapshots/integration/vitest/kit-js/src/demo.spec.ts create mode 100644 packages/tests/.snapshots/integration/vitest/kit-js/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/vitest/kit-ts/package.json create mode 100644 packages/tests/.snapshots/integration/vitest/kit-ts/src/demo.spec.ts create mode 100644 packages/tests/.snapshots/integration/vitest/kit-ts/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/vitest/svelte-js/package.json create mode 100644 packages/tests/.snapshots/integration/vitest/svelte-js/src/demo.spec.ts create mode 100644 packages/tests/.snapshots/integration/vitest/svelte-js/vite.config.ts create mode 100644 packages/tests/.snapshots/integration/vitest/svelte-ts/package.json create mode 100644 packages/tests/.snapshots/integration/vitest/svelte-ts/src/demo.spec.ts create mode 100644 packages/tests/.snapshots/integration/vitest/svelte-ts/vite.config.ts diff --git a/package.json b/package.json index 77ed6d3d..daff1bce 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "website:preview": "pnpm -C ./packages/website preview", "test": "pnpm -F @svelte-add/tests exec vitest", "test:ui": "pnpm -F @svelte-add/tests exec vitest --ui", + "test:related": "pnpm -F @svelte-add/tests exec vitest related ./packages/tests/integration.ts --ui", "check": "tsc --project tsconfig.json --noEmit", "utils:dependencies": "node ./packages/dev-utils/build/index.js dependencies && pnpm prettier:fix", "postinstall": "pnpm -F @svelte-add/testing-library exec playwright install chromium" diff --git a/packages/testing-library/utils/test-cases.ts b/packages/testing-library/utils/test-cases.ts index 5676be17..3dd41485 100644 --- a/packages/testing-library/utils/test-cases.ts +++ b/packages/testing-library/utils/test-cases.ts @@ -9,7 +9,7 @@ import { installDependencies, prepareWorkspaceWithTemplate, } from './workspace'; -import { runAdder } from './adder'; +import { runAdder, runAdderAndPrepareTests } from './adder'; import { prompts, remoteControl } from '@svelte-add/core/internal'; import * as Throttle from 'promise-parallel-throttle'; import type { AdderWithoutExplicitArgs } from '@svelte-add/core/adder/config'; @@ -78,7 +78,7 @@ export async function runAdderEndToEndTests( getTemplatesDirectory(testOptions.outputDirectory), ); - await runAdder(adder, workingDirectory, options); + await runAdderAndPrepareTests(adder, workingDirectory, options); await installDependencies(workingDirectory); diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/.env.example new file mode 100644 index 00000000..d60baea7 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/mysql=mysql2+docker=true+database=mysql/.env.example @@ -0,0 +1 @@ +DATABASE_URL="mysql://root:mysecretpassword@localhost:3306/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/.env.example new file mode 100644 index 00000000..2b1531e4 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/postgresql=postgres.js+docker=true+database=postgresql/.env.example @@ -0,0 +1 @@ +DATABASE_URL="postgres://root:mysecretpassword@localhost:5432/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/.env.example new file mode 100644 index 00000000..d59bf335 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=better-sqlite3+database=sqlite/.env.example @@ -0,0 +1 @@ +DATABASE_URL=local.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/.env.example new file mode 100644 index 00000000..317118de --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js-comments/sqlite=libsql+database=sqlite/.env.example @@ -0,0 +1 @@ +DATABASE_URL=file:local.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/.env.example new file mode 100644 index 00000000..d60baea7 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/mysql=mysql2+docker=true+database=mysql/.env.example @@ -0,0 +1 @@ +DATABASE_URL="mysql://root:mysecretpassword@localhost:3306/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/.env.example new file mode 100644 index 00000000..2b1531e4 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/postgresql=postgres.js+docker=true+database=postgresql/.env.example @@ -0,0 +1 @@ +DATABASE_URL="postgres://root:mysecretpassword@localhost:5432/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/.env.example new file mode 100644 index 00000000..d59bf335 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=better-sqlite3+database=sqlite/.env.example @@ -0,0 +1 @@ +DATABASE_URL=local.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/.env.example new file mode 100644 index 00000000..317118de --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-js/sqlite=libsql+database=sqlite/.env.example @@ -0,0 +1 @@ +DATABASE_URL=file:local.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/.env.example new file mode 100644 index 00000000..d60baea7 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/mysql=mysql2+docker=true+database=mysql/.env.example @@ -0,0 +1 @@ +DATABASE_URL="mysql://root:mysecretpassword@localhost:3306/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/.env.example new file mode 100644 index 00000000..2b1531e4 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/postgresql=postgres.js+docker=true+database=postgresql/.env.example @@ -0,0 +1 @@ +DATABASE_URL="postgres://root:mysecretpassword@localhost:5432/local" diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/.env.example new file mode 100644 index 00000000..d59bf335 --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=better-sqlite3+database=sqlite/.env.example @@ -0,0 +1 @@ +DATABASE_URL=local.db diff --git a/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/.env.example b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/.env.example new file mode 100644 index 00000000..317118de --- /dev/null +++ b/packages/tests/.snapshots/integration/drizzle/kit-ts/sqlite=libsql+database=sqlite/.env.example @@ -0,0 +1 @@ +DATABASE_URL=file:local.db diff --git a/packages/tests/.snapshots/integration/playwright/kit-js-comments/.gitignore b/packages/tests/.snapshots/integration/playwright/kit-js-comments/.gitignore new file mode 100644 index 00000000..246cecff --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-js-comments/.gitignore @@ -0,0 +1,22 @@ +test-results +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/packages/tests/.snapshots/integration/playwright/kit-js-comments/e2e/demo.test.ts b/packages/tests/.snapshots/integration/playwright/kit-js-comments/e2e/demo.test.ts new file mode 100644 index 00000000..9985ce11 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-js-comments/e2e/demo.test.ts @@ -0,0 +1,6 @@ +import { expect, test } from '@playwright/test'; + +test('home page has expected h1', async ({ page }) => { + await page.goto('/'); + await expect(page.locator('h1')).toBeVisible(); +}); diff --git a/packages/tests/.snapshots/integration/playwright/kit-js-comments/package.json b/packages/tests/.snapshots/integration/playwright/kit-js-comments/package.json new file mode 100644 index 00000000..4c6f5efb --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-js-comments/package.json @@ -0,0 +1,25 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", + "test:e2e": "playwright test", + "test": "npm run test:e2e" + }, + "devDependencies": { + "@playwright/test": "^1.45.3", + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/playwright/kit-js-comments/playwright.config.ts b/packages/tests/.snapshots/integration/playwright/kit-js-comments/playwright.config.ts new file mode 100644 index 00000000..79321000 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-js-comments/playwright.config.ts @@ -0,0 +1,10 @@ +import type { PlaywrightTestConfig } from "@playwright/test"; + +export default { + webServer: { + command: "npm run build && npm run preview", + port: 4173 + }, + + testDir: "e2e" +} as PlaywrightTestConfig; diff --git a/packages/tests/.snapshots/integration/playwright/kit-js/.gitignore b/packages/tests/.snapshots/integration/playwright/kit-js/.gitignore new file mode 100644 index 00000000..246cecff --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-js/.gitignore @@ -0,0 +1,22 @@ +test-results +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/packages/tests/.snapshots/integration/playwright/kit-js/e2e/demo.test.ts b/packages/tests/.snapshots/integration/playwright/kit-js/e2e/demo.test.ts new file mode 100644 index 00000000..9985ce11 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-js/e2e/demo.test.ts @@ -0,0 +1,6 @@ +import { expect, test } from '@playwright/test'; + +test('home page has expected h1', async ({ page }) => { + await page.goto('/'); + await expect(page.locator('h1')).toBeVisible(); +}); diff --git a/packages/tests/.snapshots/integration/playwright/kit-js/package.json b/packages/tests/.snapshots/integration/playwright/kit-js/package.json new file mode 100644 index 00000000..dadf4c71 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-js/package.json @@ -0,0 +1,21 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "test:e2e": "playwright test", + "test": "npm run test:e2e" + }, + "devDependencies": { + "@playwright/test": "^1.45.3", + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.2.7", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/playwright/kit-js/playwright.config.ts b/packages/tests/.snapshots/integration/playwright/kit-js/playwright.config.ts new file mode 100644 index 00000000..79321000 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-js/playwright.config.ts @@ -0,0 +1,10 @@ +import type { PlaywrightTestConfig } from "@playwright/test"; + +export default { + webServer: { + command: "npm run build && npm run preview", + port: 4173 + }, + + testDir: "e2e" +} as PlaywrightTestConfig; diff --git a/packages/tests/.snapshots/integration/playwright/kit-ts/.gitignore b/packages/tests/.snapshots/integration/playwright/kit-ts/.gitignore new file mode 100644 index 00000000..246cecff --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-ts/.gitignore @@ -0,0 +1,22 @@ +test-results +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/packages/tests/.snapshots/integration/playwright/kit-ts/e2e/demo.test.ts b/packages/tests/.snapshots/integration/playwright/kit-ts/e2e/demo.test.ts new file mode 100644 index 00000000..9985ce11 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-ts/e2e/demo.test.ts @@ -0,0 +1,6 @@ +import { expect, test } from '@playwright/test'; + +test('home page has expected h1', async ({ page }) => { + await page.goto('/'); + await expect(page.locator('h1')).toBeVisible(); +}); diff --git a/packages/tests/.snapshots/integration/playwright/kit-ts/package.json b/packages/tests/.snapshots/integration/playwright/kit-ts/package.json new file mode 100644 index 00000000..0949b146 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-ts/package.json @@ -0,0 +1,25 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "test:e2e": "playwright test", + "test": "npm run test:e2e" + }, + "devDependencies": { + "@playwright/test": "^1.45.3", + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/playwright/kit-ts/playwright.config.ts b/packages/tests/.snapshots/integration/playwright/kit-ts/playwright.config.ts new file mode 100644 index 00000000..79321000 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/kit-ts/playwright.config.ts @@ -0,0 +1,10 @@ +import type { PlaywrightTestConfig } from "@playwright/test"; + +export default { + webServer: { + command: "npm run build && npm run preview", + port: 4173 + }, + + testDir: "e2e" +} as PlaywrightTestConfig; diff --git a/packages/tests/.snapshots/integration/playwright/svelte-js/.gitignore b/packages/tests/.snapshots/integration/playwright/svelte-js/.gitignore new file mode 100644 index 00000000..406cb0f0 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/svelte-js/.gitignore @@ -0,0 +1,25 @@ +test-results +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/packages/tests/.snapshots/integration/playwright/svelte-js/e2e/demo.test.ts b/packages/tests/.snapshots/integration/playwright/svelte-js/e2e/demo.test.ts new file mode 100644 index 00000000..9985ce11 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/svelte-js/e2e/demo.test.ts @@ -0,0 +1,6 @@ +import { expect, test } from '@playwright/test'; + +test('home page has expected h1', async ({ page }) => { + await page.goto('/'); + await expect(page.locator('h1')).toBeVisible(); +}); diff --git a/packages/tests/.snapshots/integration/playwright/svelte-js/package.json b/packages/tests/.snapshots/integration/playwright/svelte-js/package.json new file mode 100644 index 00000000..310c2829 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/svelte-js/package.json @@ -0,0 +1,19 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "test:e2e": "playwright test", + "test": "npm run test:e2e" + }, + "devDependencies": { + "@playwright/test": "^1.45.3", + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "svelte": "^4.2.18", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/playwright/svelte-js/playwright.config.ts b/packages/tests/.snapshots/integration/playwright/svelte-js/playwright.config.ts new file mode 100644 index 00000000..79321000 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/svelte-js/playwright.config.ts @@ -0,0 +1,10 @@ +import type { PlaywrightTestConfig } from "@playwright/test"; + +export default { + webServer: { + command: "npm run build && npm run preview", + port: 4173 + }, + + testDir: "e2e" +} as PlaywrightTestConfig; diff --git a/packages/tests/.snapshots/integration/playwright/svelte-ts/.gitignore b/packages/tests/.snapshots/integration/playwright/svelte-ts/.gitignore new file mode 100644 index 00000000..406cb0f0 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/svelte-ts/.gitignore @@ -0,0 +1,25 @@ +test-results +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/packages/tests/.snapshots/integration/playwright/svelte-ts/e2e/demo.test.ts b/packages/tests/.snapshots/integration/playwright/svelte-ts/e2e/demo.test.ts new file mode 100644 index 00000000..9985ce11 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/svelte-ts/e2e/demo.test.ts @@ -0,0 +1,6 @@ +import { expect, test } from '@playwright/test'; + +test('home page has expected h1', async ({ page }) => { + await page.goto('/'); + await expect(page.locator('h1')).toBeVisible(); +}); diff --git a/packages/tests/.snapshots/integration/playwright/svelte-ts/package.json b/packages/tests/.snapshots/integration/playwright/svelte-ts/package.json new file mode 100644 index 00000000..ff57c547 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/svelte-ts/package.json @@ -0,0 +1,24 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json", + "test:e2e": "playwright test", + "test": "npm run test:e2e" + }, + "devDependencies": { + "@playwright/test": "^1.45.3", + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4" + } +} diff --git a/packages/tests/.snapshots/integration/playwright/svelte-ts/playwright.config.ts b/packages/tests/.snapshots/integration/playwright/svelte-ts/playwright.config.ts new file mode 100644 index 00000000..79321000 --- /dev/null +++ b/packages/tests/.snapshots/integration/playwright/svelte-ts/playwright.config.ts @@ -0,0 +1,10 @@ +import type { PlaywrightTestConfig } from "@playwright/test"; + +export default { + webServer: { + command: "npm run build && npm run preview", + port: 4173 + }, + + testDir: "e2e" +} as PlaywrightTestConfig; diff --git a/packages/tests/.snapshots/integration/vitest/kit-js-comments/package.json b/packages/tests/.snapshots/integration/vitest/kit-js-comments/package.json new file mode 100644 index 00000000..8684cde4 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/kit-js-comments/package.json @@ -0,0 +1,25 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", + "test:unit": "vitest", + "test": "npm run test:unit -- --run" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3", + "vitest": "^2.0.4" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/vitest/kit-js-comments/src/demo.spec.ts b/packages/tests/.snapshots/integration/vitest/kit-js-comments/src/demo.spec.ts new file mode 100644 index 00000000..e07cbbd7 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/kit-js-comments/src/demo.spec.ts @@ -0,0 +1,7 @@ +import { describe, it, expect } from 'vitest'; + +describe('sum test', () => { + it('adds 1 + 2 to equal 3', () => { + expect(1 + 2).toBe(3); + }); +}); diff --git a/packages/tests/.snapshots/integration/vitest/kit-js-comments/vite.config.ts b/packages/tests/.snapshots/integration/vitest/kit-js-comments/vite.config.ts new file mode 100644 index 00000000..c90ab442 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/kit-js-comments/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ['src/**/*.{test,spec}.{js,ts}'] + } +}); diff --git a/packages/tests/.snapshots/integration/vitest/kit-js/package.json b/packages/tests/.snapshots/integration/vitest/kit-js/package.json new file mode 100644 index 00000000..e863f01a --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/kit-js/package.json @@ -0,0 +1,21 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "test:unit": "vitest", + "test": "npm run test:unit -- --run" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.2.7", + "vite": "^5.0.3", + "vitest": "^2.0.4" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/vitest/kit-js/src/demo.spec.ts b/packages/tests/.snapshots/integration/vitest/kit-js/src/demo.spec.ts new file mode 100644 index 00000000..e07cbbd7 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/kit-js/src/demo.spec.ts @@ -0,0 +1,7 @@ +import { describe, it, expect } from 'vitest'; + +describe('sum test', () => { + it('adds 1 + 2 to equal 3', () => { + expect(1 + 2).toBe(3); + }); +}); diff --git a/packages/tests/.snapshots/integration/vitest/kit-js/vite.config.ts b/packages/tests/.snapshots/integration/vitest/kit-js/vite.config.ts new file mode 100644 index 00000000..c90ab442 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/kit-js/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ['src/**/*.{test,spec}.{js,ts}'] + } +}); diff --git a/packages/tests/.snapshots/integration/vitest/kit-ts/package.json b/packages/tests/.snapshots/integration/vitest/kit-ts/package.json new file mode 100644 index 00000000..d97d93e1 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/kit-ts/package.json @@ -0,0 +1,25 @@ +{ + "name": "test", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "test:unit": "vitest", + "test": "npm run test:unit -- --run" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3", + "vitest": "^2.0.4" + }, + "type": "module" +} diff --git a/packages/tests/.snapshots/integration/vitest/kit-ts/src/demo.spec.ts b/packages/tests/.snapshots/integration/vitest/kit-ts/src/demo.spec.ts new file mode 100644 index 00000000..e07cbbd7 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/kit-ts/src/demo.spec.ts @@ -0,0 +1,7 @@ +import { describe, it, expect } from 'vitest'; + +describe('sum test', () => { + it('adds 1 + 2 to equal 3', () => { + expect(1 + 2).toBe(3); + }); +}); diff --git a/packages/tests/.snapshots/integration/vitest/kit-ts/vite.config.ts b/packages/tests/.snapshots/integration/vitest/kit-ts/vite.config.ts new file mode 100644 index 00000000..ac4dba08 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/kit-ts/vite.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "vitest/config"; +import { sveltekit } from '@sveltejs/kit/vite'; + +export default defineConfig({ + plugins: [sveltekit()], + + test: { + include: ['src/**/*.{test,spec}.{js,ts}'] + } +}); diff --git a/packages/tests/.snapshots/integration/vitest/svelte-js/package.json b/packages/tests/.snapshots/integration/vitest/svelte-js/package.json new file mode 100644 index 00000000..9a804d01 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/svelte-js/package.json @@ -0,0 +1,19 @@ +{ + "name": "svelte-js", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "test:unit": "vitest", + "test": "npm run test:unit -- --run" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "svelte": "^4.2.18", + "vite": "^5.3.4", + "vitest": "^2.0.4" + } +} diff --git a/packages/tests/.snapshots/integration/vitest/svelte-js/src/demo.spec.ts b/packages/tests/.snapshots/integration/vitest/svelte-js/src/demo.spec.ts new file mode 100644 index 00000000..e07cbbd7 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/svelte-js/src/demo.spec.ts @@ -0,0 +1,7 @@ +import { describe, it, expect } from 'vitest'; + +describe('sum test', () => { + it('adds 1 + 2 to equal 3', () => { + expect(1 + 2).toBe(3); + }); +}); diff --git a/packages/tests/.snapshots/integration/vitest/svelte-js/vite.config.ts b/packages/tests/.snapshots/integration/vitest/svelte-js/vite.config.ts new file mode 100644 index 00000000..c90ab442 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/svelte-js/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ['src/**/*.{test,spec}.{js,ts}'] + } +}); diff --git a/packages/tests/.snapshots/integration/vitest/svelte-ts/package.json b/packages/tests/.snapshots/integration/vitest/svelte-ts/package.json new file mode 100644 index 00000000..2797d0c4 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/svelte-ts/package.json @@ -0,0 +1,24 @@ +{ + "name": "svelte-ts", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json", + "test:unit": "vitest", + "test": "npm run test:unit -- --run" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.1.1", + "@tsconfig/svelte": "^5.0.4", + "svelte": "^4.2.18", + "svelte-check": "^3.8.4", + "tslib": "^2.6.3", + "typescript": "^5.2.2", + "vite": "^5.3.4", + "vitest": "^2.0.4" + } +} diff --git a/packages/tests/.snapshots/integration/vitest/svelte-ts/src/demo.spec.ts b/packages/tests/.snapshots/integration/vitest/svelte-ts/src/demo.spec.ts new file mode 100644 index 00000000..e07cbbd7 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/svelte-ts/src/demo.spec.ts @@ -0,0 +1,7 @@ +import { describe, it, expect } from 'vitest'; + +describe('sum test', () => { + it('adds 1 + 2 to equal 3', () => { + expect(1 + 2).toBe(3); + }); +}); diff --git a/packages/tests/.snapshots/integration/vitest/svelte-ts/vite.config.ts b/packages/tests/.snapshots/integration/vitest/svelte-ts/vite.config.ts new file mode 100644 index 00000000..dd0716c9 --- /dev/null +++ b/packages/tests/.snapshots/integration/vitest/svelte-ts/vite.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from "vitest/config"; +import { svelte } from '@sveltejs/vite-plugin-svelte' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [svelte()], + + test: { + include: ['src/**/*.{test,spec}.{js,ts}'] + } +})