Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(unenv-preset): misc minor changes #7789

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/old-panthers-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@cloudflare/unenv-preset": patch
---

refactor(unenv-preset): misc minor changes

- Bump the Typescript depedency to ^5.7.3 as required by unbuild
vicb marked this conversation as resolved.
Show resolved Hide resolved
- Install a local version of `@types/node` (`@types/node-unenv`)
- Add more details to the README
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@
"@types/react-transition-group>@types/react": "^18",
"@cloudflare/elements>@types/react": "^18",
"capnpc-ts>typescript": "4.2.4",
"@types/node": "$@types/node",
"@cloudflare/unenv-preset>@types/node": "^22.10.5"
"@types/node": "$@types/node"
},
"patchedDependencies": {
"@cloudflare/[email protected]": "patches/@[email protected]",
Expand Down
10 changes: 6 additions & 4 deletions packages/unenv-preset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
## Usage

```ts
import { cloudflare, env, nodeless } from "@cloudflare/unenv-preset";
import { cloudflare } from "@cloudflare/unenv-preset";
import { defineEnv } from "unenv";

const {
/* ... */
} = env(nodeless, cloudflare);
const { env } = defineEnv({
nodeCompat: true,
presets: [cloudflare],
});
```
4 changes: 2 additions & 2 deletions packages/unenv-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"test:watch": "vitest"
},
"devDependencies": {
"@types/node": "*",
"typescript": "catalog:default",
"@types/node-unenv": "npm:@types/node@^22.10.5",
"typescript": "^5.7.3",
"unbuild": "^3.2.0",
"undici": "catalog:default",
"vitest": "catalog:default",
Expand Down
2 changes: 1 addition & 1 deletion packages/unenv-preset/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"strict": true,
"declaration": true,
"resolveJsonModule": true,
"types": ["node"]
"types": ["node-unenv"]
},
"include": ["src/**/*"]
}
Loading
Loading