diff --git a/.changeset/c3-frameworks-update-4012.md b/.changeset/c3-frameworks-update-4012.md new file mode 100644 index 000000000000..3d5ae19d6c51 --- /dev/null +++ b/.changeset/c3-frameworks-update-4012.md @@ -0,0 +1,5 @@ +--- +"create-cloudflare": patch +--- + +C3: Bumped `create-solid` from `0.2.26` to `0.3.6` diff --git a/packages/create-cloudflare/e2e-tests/helpers.ts b/packages/create-cloudflare/e2e-tests/helpers.ts index d3ef2d13990a..191defa77b4b 100644 --- a/packages/create-cloudflare/e2e-tests/helpers.ts +++ b/packages/create-cloudflare/e2e-tests/helpers.ts @@ -57,6 +57,8 @@ export const runC3 = async ({ const stdout: string[] = []; const stderr: string[] = []; + promptHandlers = promptHandlers && [...promptHandlers]; + await new Promise((resolve, rejects) => { proc.stdout.on("data", (data) => { const lines: string[] = data.toString().split("\n"); diff --git a/packages/create-cloudflare/src/frameworks/package.json b/packages/create-cloudflare/src/frameworks/package.json index e53bc71a177f..4e7cf1c0eeda 100644 --- a/packages/create-cloudflare/src/frameworks/package.json +++ b/packages/create-cloudflare/src/frameworks/package.json @@ -14,7 +14,7 @@ "create-qwik": "1.2.12", "create-react-app": "5.0.1", "create-remix": "2.0.0", - "create-solid": "0.2.26", + "create-solid": "0.3.6", "create-svelte": "5.0.6", "create-vue": "3.7.5", "gatsby": "5.12.4", diff --git a/packages/create-cloudflare/src/frameworks/solid/index.ts b/packages/create-cloudflare/src/frameworks/solid/index.ts index 37aea0c3c6a6..9d09885cbbbd 100644 --- a/packages/create-cloudflare/src/frameworks/solid/index.ts +++ b/packages/create-cloudflare/src/frameworks/solid/index.ts @@ -1,4 +1,3 @@ -import { mkdirSync } from "fs"; import { logRaw, updateStatus } from "helpers/cli"; import { blue, brandColor, dim } from "helpers/colors"; import { installPackages, runFrameworkGenerator } from "helpers/command"; @@ -11,18 +10,16 @@ import type { PagesGeneratorContext, FrameworkConfig } from "types"; const { npm, dlx } = detectPackageManager(); const generate = async (ctx: PagesGeneratorContext) => { - // Create the project directory and navigate to it - mkdirSync(ctx.project.path); - process.chdir(ctx.project.path); - // Run the create-solid command const cli = getFrameworkCli(ctx); - await runFrameworkGenerator(ctx, `${dlx} ${cli}`); + await runFrameworkGenerator(ctx, `${dlx} ${cli} ${ctx.project.name}`); logRaw(""); }; -const configure = async () => { +const configure = async (ctx: PagesGeneratorContext) => { + process.chdir(ctx.project.path); + // Install the pages adapter const pkg = "solid-start-cloudflare-pages"; await installPackages([pkg], { @@ -37,7 +34,7 @@ const configure = async () => { : `./vite.config.js`; writeFile(viteConfigPath, viteConfig); updateStatus( - `Adding the Cloudflare Pages adapter to ${blue("vite.config.js")}` + `Adding the Cloudflare Pages adapter to ${blue(viteConfigPath)}` ); };