Skip to content

Commit fd65561

Browse files
authoredJan 7, 2023
feat: add env (#1157)
We frequently want to only run certain tests in certain environments so we include `wherearewe`, `detect-node`, `is-electron` and other modules. Ship a `/env` entrypoint to reduce the redundancy: ```js import { isNode } from 'aegir/env' if (isNode) { // do node things } ```
1 parent fb69998 commit fd65561

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎package.json

+5
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@
8484
"types": "./dist/utils/echo-server.d.ts",
8585
"import": "./utils/echo-server.js"
8686
},
87+
"./env": {
88+
"types": "./dist/src/env.d.ts",
89+
"import": "./src/env.js"
90+
},
8791
"./fixtures": {
8892
"types": "./dist/utils/fixtures.d.ts",
8993
"browser": "./utils/fixtures.browser.js",
@@ -310,6 +314,7 @@
310314
"uint8arrays": "^4.0.2",
311315
"undici": "^5.0.0",
312316
"update-notifier": "^6.0.2",
317+
"wherearewe": "^2.0.1",
313318
"yargs": "^17.1.1",
314319
"yargs-parser": "^21.1.1"
315320
},

‎src/env.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from 'wherearewe'

0 commit comments

Comments
 (0)
Please sign in to comment.