New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cloudflare/unenv-preset

Package Overview
Dependencies
Maintainers
0
Versions
337
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudflare/unenv-preset - npm Package Compare versions

Comparing version

to
0.0.0-595f17092

dist/runtime/node/async_hooks.d.ts

29

package.json
{
"name": "@cloudflare/unenv-preset",
"version": "0.0.0-5955dac5e",
"version": "0.0.0-595f17092",
"description": "cloudflare preset for unenv",

@@ -28,11 +28,10 @@ "keywords": [

"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs"
},
"./runtime/*": {
"types": "./dist/runtime/*.d.ts",
"import": "./dist/runtime/*.mjs"
}
"./*": {
"types": "./dist/runtime/*.d.mts",
"default": "./dist/runtime/*.mjs"
},
"./package.json": "./package.json"
},
"main": "./dist/index.cjs",
"types": "./dist/index.d.ts",

@@ -43,12 +42,12 @@ "files": [

"devDependencies": {
"@types/node": "*",
"typescript": "~5.6.3",
"unbuild": "^2.0.0",
"undici": "^5.28.4",
"vitest": "~2.1.8",
"wrangler": "0.0.0-5955dac5e"
"@types/node-unenv": "npm:@types/node@^22.13.1",
"typescript": "^5.7.2",
"unbuild": "^3.2.0",
"undici": "^5.28.5",
"vitest": "~3.0.5",
"wrangler": "0.0.0-595f17092"
},
"peerDependencies": {
"unenv": "npm:unenv-nightly@*",
"workerd": "^1.20241230.0"
"unenv": "2.0.0-rc.8",
"workerd": "^1.20250124.0"
},

@@ -55,0 +54,0 @@ "peerDependenciesMeta": {

@@ -5,10 +5,17 @@ # @cloudflare/unenv-preset

unenv provides polyfills to add [Node.js](https://nodejs.org/) compatibility for any JavaScript runtime, including browsers and edge workers.
## 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({
presets: [cloudflare],
});
const { alias, inject, external, polyfill } = env;
```
See the unenv [README](https://github.com/unjs/unenv/blob/main/README.md) for more details.

Sorry, the diff of this file is not supported yet