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-ff96a7091

dist/runtime/node/async_hooks.d.ts

32

package.json
{
"name": "@cloudflare/unenv-preset",
"version": "0.0.0-ff4e77e5a",
"version": "0.0.0-ff96a7091",
"description": "cloudflare preset for unenv",

@@ -24,15 +24,14 @@ "keywords": [

"sideEffects": false,
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs"
},
"./runtime/*": {
"types": "./dist/runtime/*.d.ts",
"require": "./dist/runtime/*.cjs",
"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,9 +42,12 @@ "files": [

"devDependencies": {
"@types/node": "*",
"typescript": "~5.6.3",
"unbuild": "^2.0.0"
"@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-ff96a7091"
},
"peerDependencies": {
"unenv": "npm:unenv-nightly@*",
"workerd": "^1.20241216.0"
"unenv": "2.0.0-rc.8",
"workerd": "^1.20250124.0"
},

@@ -66,4 +68,6 @@ "peerDependenciesMeta": {

"check:lint": "eslint",
"check:type": "tsc --noEmit"
"check:type": "tsc --noEmit",
"test:ci": "vitest run",
"test:watch": "vitest"
}
}

@@ -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