You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .changeset/nasty-kiwis-talk.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,10 @@
2
2
"wrangler": minor
3
3
---
4
4
5
-
Include runtime types in the output of `wrangler types`
5
+
Include runtime types in the output of `wrangler types` by default
6
6
7
7
`wrangler types` will now produce one file that contains both `Env` types and runtime types based on your compatibility date and flags. This is located at `worker-configuration.d.ts` by default.
8
8
9
-
This behaviour was previously gated behind `--experimental-include-runtime`. That flag is no longer necessary and has been removed. It has been replaced by `--include-runtime` and `include-env`, both of which are set to `true` by default.
9
+
This behaviour was previously gated behind `--experimental-include-runtime`. That flag is no longer necessary and has been removed. It has been replaced by `--include-runtime` and `--include-env`, both of which are set to `true` by default. If you were previously using `--x-include-runtime`, you can drop that flag and remove the separate `runtime.d.ts` file.
10
+
11
+
If you were previously using `@cloudflare/workers-types` we recommend you run uninstall and run `wrangler types` instead. Note that `@cloudflare/workers-types` will continue to be published without any changes.
Copy file name to clipboardExpand all lines: packages/wrangler/src/type-generation/runtime/log-runtime-types-message.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ export function logRuntimeTypesMessage(
54
54
logAction("Install types@node");
55
55
logger.log(
56
56
chalk.dim(
57
-
`Since you have the \`nodejs_compat\` flag, you should install Node.js types by running "npm i --save-dev @types/node${isWorkersTypesInstalled ? '@20.8.3".\nFor more details: https://developers.cloudflare.com/workers/languages/typescript/#known-issues' : '".'}`
57
+
`Since you have the \`nodejs_compat\` flag, you should install Node.js types by running "npm i --save-dev ${isWorkersTypesInstalled ? '@types/node@20.8.3".\nFor more details: https://developers.cloudflare.com/workers/languages/typescript/#known-issues' : '@types/node".'}`
0 commit comments