diff --git a/packages/create-svelte/index.js b/packages/create-svelte/index.js index 65802ad11048..0848fdcde7f2 100755 --- a/packages/create-svelte/index.js +++ b/packages/create-svelte/index.js @@ -105,7 +105,11 @@ function merge(target, source) { throw new Error('Mismatched values'); } - merge(target_value, source_value); + if (typeof source_value === 'object') { + merge(target_value, source_value); + } else { + target[key] = source_value; + } } else { target[key] = source[key]; } diff --git a/packages/create-svelte/package.json b/packages/create-svelte/package.json index 28e1d994ac5a..79989be0d2fd 100644 --- a/packages/create-svelte/package.json +++ b/packages/create-svelte/package.json @@ -15,6 +15,7 @@ "prompts": "^2.4.2" }, "devDependencies": { + "@playwright/test": "^1.20.1", "@sveltejs/kit": "workspace:*", "@types/gitignore-parser": "^0.0.0", "@types/prettier": "^2.4.2", diff --git a/packages/create-svelte/shared/+playwright+typescript/package.json b/packages/create-svelte/shared/+playwright+typescript/package.json new file mode 100644 index 000000000000..7751d454869f --- /dev/null +++ b/packages/create-svelte/shared/+playwright+typescript/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "@playwright/test": "next" + } +} diff --git a/packages/create-svelte/shared/+playwright+typescript/playwright.config.ts b/packages/create-svelte/shared/+playwright+typescript/playwright.config.ts new file mode 100644 index 000000000000..87c293e5a113 --- /dev/null +++ b/packages/create-svelte/shared/+playwright+typescript/playwright.config.ts @@ -0,0 +1,10 @@ +import type { PlaywrightTestConfig } from '@playwright/test'; + +const config: PlaywrightTestConfig = { + webServer: { + command: 'npm run build && npm run preview', + port: 3000 + } +}; + +export default config; diff --git a/packages/create-svelte/shared/+playwright/playwright.config.js b/packages/create-svelte/shared/+playwright-typescript/playwright.config.js similarity index 100% rename from packages/create-svelte/shared/+playwright/playwright.config.js rename to packages/create-svelte/shared/+playwright-typescript/playwright.config.js diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3593335d50c5..05454dab5eac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -189,6 +189,7 @@ importers: packages/create-svelte: specifiers: + '@playwright/test': ^1.20.1 '@sveltejs/kit': workspace:* '@types/gitignore-parser': ^0.0.0 '@types/prettier': ^2.4.2 @@ -206,6 +207,7 @@ importers: kleur: 4.1.4 prompts: 2.4.2 devDependencies: + '@playwright/test': 1.20.1 '@sveltejs/kit': link:../kit '@types/gitignore-parser': 0.0.0 '@types/prettier': 2.4.2 @@ -484,7 +486,7 @@ packages: '@babel/traverse': 7.17.3 '@babel/types': 7.17.0 convert-source-map: 1.8.0 - debug: 4.3.3 + debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.0 semver: 6.3.0 @@ -522,24 +524,6 @@ packages: semver: 6.3.0 dev: true - /@babel/helper-create-class-features-plugin/7.16.7_@babel+core@7.16.12: - resolution: {integrity: sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.16.12 - '@babel/helper-annotate-as-pure': 7.16.7 - '@babel/helper-environment-visitor': 7.16.7 - '@babel/helper-function-name': 7.16.7 - '@babel/helper-member-expression-to-functions': 7.16.7 - '@babel/helper-optimise-call-expression': 7.16.7 - '@babel/helper-replace-supers': 7.16.7 - '@babel/helper-split-export-declaration': 7.16.7 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/helper-create-class-features-plugin/7.17.6_@babel+core@7.16.12: resolution: {integrity: sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==} engines: {node: '>=6.9.0'} @@ -721,7 +705,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.16.12 - '@babel/helper-create-class-features-plugin': 7.16.7_@babel+core@7.16.12 + '@babel/helper-create-class-features-plugin': 7.17.6_@babel+core@7.16.12 '@babel/helper-plugin-utils': 7.16.7 transitivePeerDependencies: - supports-color @@ -815,7 +799,7 @@ packages: dependencies: '@babel/core': 7.16.12 '@babel/helper-annotate-as-pure': 7.16.7 - '@babel/helper-create-class-features-plugin': 7.16.7_@babel+core@7.16.12 + '@babel/helper-create-class-features-plugin': 7.17.6_@babel+core@7.16.12 '@babel/helper-plugin-utils': 7.16.7 '@babel/plugin-syntax-private-property-in-object': 7.14.5_@babel+core@7.16.12 transitivePeerDependencies: @@ -1027,7 +1011,7 @@ packages: '@babel/helper-split-export-declaration': 7.16.7 '@babel/parser': 7.17.3 '@babel/types': 7.17.0 - debug: 4.3.3 + debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -1281,7 +1265,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.3 '@types/istanbul-reports': 3.0.1 - '@types/node': 16.11.11 + '@types/node': 17.0.21 '@types/yargs': 16.0.4 chalk: 4.1.2 dev: true @@ -1483,6 +1467,51 @@ packages: - utf-8-validate dev: true + /@playwright/test/1.20.1: + resolution: {integrity: sha512-muk3KZXfA7sXTwUEXfL3m4tusj/MBGYjxIFmooi+F2Pf6hKjjVl4+8niy77Xujk4jpL7hZbbqq9v5bRl2m+C8Q==} + engines: {node: '>=12'} + hasBin: true + dependencies: + '@babel/code-frame': 7.16.7 + '@babel/core': 7.16.12 + '@babel/helper-plugin-utils': 7.16.7 + '@babel/plugin-proposal-class-properties': 7.16.7_@babel+core@7.16.12 + '@babel/plugin-proposal-dynamic-import': 7.16.7_@babel+core@7.16.12 + '@babel/plugin-proposal-export-namespace-from': 7.16.7_@babel+core@7.16.12 + '@babel/plugin-proposal-logical-assignment-operators': 7.16.7_@babel+core@7.16.12 + '@babel/plugin-proposal-nullish-coalescing-operator': 7.16.7_@babel+core@7.16.12 + '@babel/plugin-proposal-numeric-separator': 7.16.7_@babel+core@7.16.12 + '@babel/plugin-proposal-optional-chaining': 7.16.7_@babel+core@7.16.12 + '@babel/plugin-proposal-private-methods': 7.16.11_@babel+core@7.16.12 + '@babel/plugin-proposal-private-property-in-object': 7.16.7_@babel+core@7.16.12 + '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.16.12 + '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.16.12 + '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.16.12 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.16.12 + '@babel/plugin-transform-modules-commonjs': 7.16.8_@babel+core@7.16.12 + '@babel/preset-typescript': 7.16.7_@babel+core@7.16.12 + colors: 1.4.0 + commander: 8.3.0 + debug: 4.3.3 + expect: 27.2.5 + jest-matcher-utils: 27.2.5 + json5: 2.2.1 + mime: 3.0.0 + minimatch: 3.0.4 + ms: 2.1.3 + open: 8.4.0 + pirates: 4.0.4 + playwright-core: 1.20.1 + rimraf: 3.0.2 + source-map-support: 0.4.18 + stack-utils: 2.0.5 + yazl: 2.5.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + /@polka/send/1.0.0-next.15: resolution: {integrity: sha512-esR7W5PrLIo9tJqI59gotUHQOQHhYG1hsT3Vn/PPhOoL/LDDSbNHXBN/TtOA4Puhq7rFJwzP3WdtJeekfn/64g==} engines: {node: '>=6'} @@ -1959,7 +1988,7 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} dependencies: - debug: 4.3.3 + debug: 4.3.4 transitivePeerDependencies: - supports-color dev: true @@ -3380,7 +3409,7 @@ packages: engines: {node: '>= 10.17.0'} hasBin: true dependencies: - debug: 4.3.3 + debug: 4.3.4 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -3762,7 +3791,7 @@ packages: engines: {node: '>= 6'} dependencies: agent-base: 6.0.2 - debug: 4.3.3 + debug: 4.3.4 transitivePeerDependencies: - supports-color dev: true @@ -4118,7 +4147,7 @@ packages: '@jest/types': 27.4.2 '@types/stack-utils': 2.0.1 chalk: 4.1.2 - graceful-fs: 4.2.8 + graceful-fs: 4.2.9 micromatch: 4.0.4 pretty-format: 27.4.2 slash: 3.0.0 @@ -4191,6 +4220,12 @@ packages: minimist: 1.2.5 dev: true + /json5/2.2.1: + resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==} + engines: {node: '>=6'} + hasBin: true + dev: true + /jsonc-parser/3.0.0: resolution: {integrity: sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==} dev: true @@ -5016,6 +5051,35 @@ packages: - utf-8-validate dev: true + /playwright-core/1.20.1: + resolution: {integrity: sha512-A8ZsZ09gaSbxP0UijoLyzp3LJc0kWMxDooLPi+mm4/5iYnTbd6PF5nKjoFw1a7KwjZIEgdhJduah4BcUIh+IPA==} + engines: {node: '>=12'} + hasBin: true + dependencies: + colors: 1.4.0 + commander: 8.3.0 + debug: 4.3.3 + extract-zip: 2.0.1 + https-proxy-agent: 5.0.0 + jpeg-js: 0.4.3 + mime: 3.0.0 + pixelmatch: 5.2.1 + pngjs: 6.0.0 + progress: 2.0.3 + proper-lockfile: 4.1.2 + proxy-from-env: 1.1.0 + rimraf: 3.0.2 + socks-proxy-agent: 6.1.1 + stack-utils: 2.0.5 + ws: 8.4.2 + yauzl: 2.10.0 + yazl: 2.5.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + /pngjs/4.0.1: resolution: {integrity: sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg==} engines: {node: '>=8.0.0'} @@ -5561,7 +5625,7 @@ packages: engines: {node: '>= 10'} dependencies: agent-base: 6.0.2 - debug: 4.3.3 + debug: 4.3.4 socks: 2.6.2 transitivePeerDependencies: - supports-color