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

chore: remove lagon #109

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ List of well known providers can be found from [./src/providers.ts](./src/provid
```ts
import { runtime, runtimeInfo } from "std-env";

// "" | "node" | "deno" | "bun" | "workerd" | "lagon" ...
// "" | "node" | "deno" | "bun" | "workerd" ...
console.log(runtime);

// { name: "node" }
Expand All @@ -93,7 +93,6 @@ You can also use individual named exports for each runtime detection:
- `isNetlify`
- `isEdgeLight`
- `isWorkerd`
- `isLagon`
- `isFastly`

List of well known providers can be found from [./src/runtimes.ts](./src/runtimes.ts).
Expand Down
1 change: 0 additions & 1 deletion src/_types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ type EnvObject = Record<string, string | undefined>;
declare global {
var EdgeRuntime: undefined | unknown;
var Netlify: undefined | unknown;
var __lagon__: undefined | unknown;
var fastly: undefined | unknown;
var Bun: undefined | unknown;

Expand Down
9 changes: 0 additions & 9 deletions src/runtimes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
export type RuntimeName =
| "workerd"
| "deno"
| "lagon"
| "netlify"
| "node"
| "bun"
Expand Down Expand Up @@ -54,13 +53,6 @@ export const isEdgeLight = !!globalThis.EdgeRuntime;
export const isWorkerd =
globalThis.navigator?.userAgent === "Cloudflare-Workers";

/**
* Indicates if running in Lagon runtime.
*
* @deprecated https://github.com/unjs/std-env/issues/105
*/
export const isLagon = !!globalThis.__lagon__;

const runtimeChecks: [boolean, RuntimeName][] = [
[isNetlify, "netlify"],
[isEdgeLight, "edge-light"],
Expand All @@ -69,7 +61,6 @@ const runtimeChecks: [boolean, RuntimeName][] = [
[isDeno, "deno"],
[isBun, "bun"],
[isNode, "node"],
[isLagon, "lagon"],
];

function _detectRuntime(): RuntimeInfo | undefined {
Expand Down
1 change: 0 additions & 1 deletion test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ describe("std-env", () => {
"isNetlify",
"isEdgeLight",
"isWorkerd",
"isLagon",
"runtimeInfo",
"runtime",
]
Expand Down
Loading