Comparing version 3.6.0 to 3.7.0
@@ -41,3 +41,3 @@ type EnvObject = Record<string, string | undefined>; | ||
type ProviderName = "" | "appveyor" | "aws_amplify" | "azure_pipelines" | "azure_static" | "appcircle" | "bamboo" | "bitbucket" | "bitrise" | "buddy" | "buildkite" | "circle" | "cirrus" | "cloudflare_pages" | "codebuild" | "codefresh" | "drone" | "drone" | "dsari" | "github_actions" | "gitlab" | "gocd" | "layerci" | "hudson" | "jenkins" | "magnum" | "netlify" | "nevercode" | "render" | "sail" | "semaphore" | "screwdriver" | "shippable" | "solano" | "strider" | "teamcity" | "travis" | "vercel" | "appcenter" | "codesandbox" | "stackblitz" | "stormkit" | "cleavr" | "zeabur" | "codesphere"; | ||
type ProviderName = "" | "appveyor" | "aws_amplify" | "azure_pipelines" | "azure_static" | "appcircle" | "bamboo" | "bitbucket" | "bitrise" | "buddy" | "buildkite" | "circle" | "cirrus" | "cloudflare_pages" | "codebuild" | "codefresh" | "drone" | "drone" | "dsari" | "github_actions" | "gitlab" | "gocd" | "layerci" | "hudson" | "jenkins" | "magnum" | "netlify" | "nevercode" | "render" | "sail" | "semaphore" | "screwdriver" | "shippable" | "solano" | "strider" | "teamcity" | "travis" | "vercel" | "appcenter" | "codesandbox" | "stackblitz" | "stormkit" | "cleavr" | "zeabur" | "codesphere" | "railway"; | ||
type ProviderInfo = { | ||
@@ -56,10 +56,41 @@ name: ProviderName; | ||
}; | ||
/** | ||
* Indicates if running in Node.js or a Node.js compatible runtime. | ||
* | ||
* **Note:** When running code in Bun and Deno with Node.js compatibility mode, `isNode` flag will be also `true`, indicating running in a Node.js compatible runtime. | ||
* | ||
* Use `runtime === "node"` if you need strict check for Node.js runtime. | ||
*/ | ||
declare const isNode: boolean; | ||
/** | ||
* Indicates if running in Bun runtime. | ||
*/ | ||
declare const isBun: boolean; | ||
/** | ||
* Indicates if running in Deno runtime. | ||
*/ | ||
declare const isDeno: boolean; | ||
/** | ||
* Indicates if running in Fastly runtime. | ||
*/ | ||
declare const isFastly: boolean; | ||
/** | ||
* Indicates if running in Netlify runtime. | ||
*/ | ||
declare const isNetlify: boolean; | ||
/** | ||
* | ||
* Indicates if running in EdgeLight (Vercel Edge) runtime. | ||
*/ | ||
declare const isEdgeLight: boolean; | ||
/** | ||
* Indicates if running in Cloudflare Workers runtime. | ||
*/ | ||
declare const isWorkerd: boolean; | ||
declare const isDeno: boolean; | ||
/** | ||
* Indicates if running in Lagon runtime. | ||
* | ||
* @deprecated https://github.com/unjs/std-env/issues/105 | ||
*/ | ||
declare const isLagon: boolean; | ||
declare const isNode: boolean; | ||
declare const isBun: boolean; | ||
declare const isFastly: boolean; | ||
declare const runtimeInfo: RuntimeInfo | undefined; | ||
@@ -66,0 +97,0 @@ declare const runtime: RuntimeName; |
{ | ||
"name": "std-env", | ||
"version": "3.6.0", | ||
"version": "3.7.0", | ||
"description": "Runtime agnostic JS utils", | ||
@@ -32,16 +32,16 @@ "repository": "unjs/std-env", | ||
"devDependencies": { | ||
"@types/node": "^20.10.1", | ||
"@vitest/coverage-v8": "^0.34.6", | ||
"@types/node": "^20.10.5", | ||
"@vitest/coverage-v8": "^1.1.0", | ||
"changelogen": "^0.5.5", | ||
"esbuild": "^0.19.8", | ||
"eslint": "^8.54.0", | ||
"esbuild": "^0.19.10", | ||
"eslint": "^8.56.0", | ||
"eslint-config-unjs": "^0.2.1", | ||
"jiti": "^1.21.0", | ||
"prettier": "^3.1.0", | ||
"rollup": "^4.6.1", | ||
"typescript": "^5.3.2", | ||
"prettier": "^3.1.1", | ||
"rollup": "^4.9.1", | ||
"typescript": "^5.3.3", | ||
"unbuild": "^2.0.0", | ||
"vitest": "^0.34.6" | ||
"vitest": "^1.1.0" | ||
}, | ||
"packageManager": "pnpm@8.11.0" | ||
"packageManager": "pnpm@8.12.1" | ||
} |
@@ -85,9 +85,14 @@ # std-env | ||
> [!NOTE] | ||
> When running code in Bun and Deno with Node.js compatibility mode, `isNode` flag will be also `true`, indicating running in a Node.js compatible runtime. | ||
> | ||
> Use `runtime === "node"` if you need strict check for Node.js runtime. | ||
- `isNode` | ||
- `isBun` | ||
- `isDeno` | ||
- `isNetlify` | ||
- `isEdgeLight` | ||
- `isWorkerd` | ||
- `isDeno` | ||
- `isLagon` | ||
- `isNode` | ||
- `isBun` | ||
- `isFastly` | ||
@@ -94,0 +99,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26227
129
120