@graphql-mesh/cross-helpers 0.1.5 → 0.1.6-alpha-aa8d75313.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @graphql-mesh/cross-helpers
2
2
 
3
+ ## 0.1.6-alpha-aa8d75313.0
4
+
5
+ ### Patch Changes
6
+
7
+ - ca5cdcf1f: Support import.meta.env instead of process.env
8
+
3
9
  ## 0.1.5
4
10
 
5
11
  ### Patch Changes
package/browser.js CHANGED
@@ -5,3 +5,19 @@ export const fs = {
5
5
  };
6
6
 
7
7
  export { path };
8
+
9
+ const processObj = typeof process !== 'undefined' ? process : {
10
+ get env() {
11
+ try {
12
+ // eslint-disable-next-line no-new-func
13
+ return new Function('return import.meta.env')();
14
+ } catch {
15
+ return {
16
+ NODE_ENV: 'production',
17
+ platform: 'linux',
18
+ }
19
+ }
20
+ }
21
+ }
22
+
23
+ export { processObj as process };
package/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
+ import process from 'process';
3
4
 
4
- export { fs, path };
5
+ export { fs, path, process };
package/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  module.exports.fs = require('fs');
2
2
  module.exports.path = require('path');
3
+ module.exports.process = require('process');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-mesh/cross-helpers",
3
- "version": "0.1.5",
3
+ "version": "0.1.6-alpha-aa8d75313.0",
4
4
  "description": "Cross Platform Helpers for GraphQL Mesh",
5
5
  "author": "Arda TANRIKULU <ardatanrikulu@gmail.com>",
6
6
  "repository": {
package/react-native.js CHANGED
@@ -18,3 +18,10 @@ Promise.allSettled =
18
18
  }))
19
19
  )
20
20
  ));
21
+
22
+ module.exports.process = typeof process !== 'undefined' ? process : {
23
+ env: {
24
+ NODE_ENV: 'production',
25
+ },
26
+ platform: 'linux',
27
+ }