create-cloudflare 2.70.9 → 2.70.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.70.9",
3
+ "version": "2.70.11",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -31,7 +31,7 @@
31
31
  "@babel/parser": "^7.21.3",
32
32
  "@babel/types": "^7.21.4",
33
33
  "@clack/prompts": "^1.2.0",
34
- "@cloudflare/workers-types": "^5.20260706.1",
34
+ "@cloudflare/workers-types": "^5.20260710.1",
35
35
  "@types/command-exists": "^1.2.0",
36
36
  "@types/cross-spawn": "^6.0.2",
37
37
  "@types/deepmerge": "^2.2.0",
@@ -71,13 +71,13 @@
71
71
  "which-pm-runs": "^1.1.0",
72
72
  "wrap-ansi": "^9.0.0",
73
73
  "yargs": "^17.7.2",
74
- "@cloudflare/cli-shared-helpers": "0.1.12",
75
- "@cloudflare/codemod": "1.1.0",
74
+ "@cloudflare/cli-shared-helpers": "0.1.14",
76
75
  "@cloudflare/mock-npm-registry": "0.0.0",
77
- "@cloudflare/vite-plugin": "1.43.2",
76
+ "@cloudflare/codemod": "1.1.0",
77
+ "@cloudflare/vite-plugin": "1.45.0",
78
78
  "@cloudflare/workers-tsconfig": "0.0.0",
79
- "@cloudflare/workers-utils": "0.25.1",
80
- "wrangler": "4.108.0"
79
+ "@cloudflare/workers-utils": "0.27.0",
80
+ "wrangler": "4.111.0"
81
81
  },
82
82
  "engines": {
83
83
  "node": ">=22.0.0"
@@ -27,16 +27,19 @@ const configure = async (ctx: C3Context) => {
27
27
  doneText: `${brandColor(`installed`)} ${dim(pkg)}`,
28
28
  });
29
29
 
30
- updateSvelteConfig();
30
+ updateViteConfig(ctx);
31
31
  updatePlaywrightConfig(usesTypescript(ctx));
32
32
  updateTypeDefinitions(ctx);
33
33
  };
34
34
 
35
- const updateSvelteConfig = () => {
36
- // All we need to do is change the import statement in svelte.config.js
37
- updateStatus(`Changing adapter in ${blue("svelte.config.js")}`);
35
+ const updateViteConfig = (ctx: C3Context) => {
36
+ // As of `sv` 0.16, the adapter is configured in the Vite config rather than
37
+ // in `svelte.config.js`, so all we need to do is change the adapter import
38
+ // statement there.
39
+ const configFile = usesTypescript(ctx) ? "vite.config.ts" : "vite.config.js";
40
+ updateStatus(`Changing adapter in ${blue(configFile)}`);
38
41
 
39
- transformFile("svelte.config.js", {
42
+ transformFile(configFile, {
40
43
  visitImportDeclaration: function (n) {
41
44
  // importSource is the `x` in `import y from "x"`
42
45
  const importSource = n.value.source;
@@ -26,15 +26,18 @@ const configure = async (ctx: C3Context) => {
26
26
  doneText: `${brandColor(`installed`)} ${dim(pkg)}`,
27
27
  });
28
28
 
29
- updateSvelteConfig();
29
+ updateViteConfig(ctx);
30
30
  updateTypeDefinitions(ctx);
31
31
  };
32
32
 
33
- const updateSvelteConfig = () => {
34
- // All we need to do is change the import statement in svelte.config.js
35
- updateStatus(`Changing adapter in ${blue("svelte.config.js")}`);
33
+ const updateViteConfig = (ctx: C3Context) => {
34
+ // As of `sv` 0.16, the adapter is configured in the Vite config rather than
35
+ // in `svelte.config.js`, so all we need to do is change the adapter import
36
+ // statement there.
37
+ const configFile = usesTypescript(ctx) ? "vite.config.ts" : "vite.config.js";
38
+ updateStatus(`Changing adapter in ${blue(configFile)}`);
36
39
 
37
- transformFile("svelte.config.js", {
40
+ transformFile(configFile, {
38
41
  visitImportDeclaration: function (n) {
39
42
  // importSource is the `x` in `import y from "x"`
40
43
  const importSource = n.value.source;
@@ -15,6 +15,8 @@ const generate = async (ctx: C3Context) => {
15
15
  "cloudflare",
16
16
  "--framework",
17
17
  "react",
18
+ // c3 will later install the dependencies
19
+ "--no-install",
18
20
  // to prevent asking about git twice, just let c3 do it
19
21
  "--no-git",
20
22
  ]);