@dotenvx/dotenvx 1.47.3 → 1.47.4

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
@@ -2,7 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.47.3...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.47.4...main)
6
+
7
+ ## 1.47.4
8
+
9
+ ### Changed
10
+
11
+ * Smarter require of non-installed libs like [`dotenvx-radar`](https://dotenvx.com/radar) ([#638](https://github.com/dotenvx/dotenvx/pull/638))
6
12
 
7
13
  ## 1.47.3
8
14
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.47.3",
2
+ "version": "1.47.4",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a better dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -15,9 +15,10 @@ class ProKeypair {
15
15
  try {
16
16
  // if installed as sibling module
17
17
  const projectRoot = path.resolve(process.cwd())
18
- const dotenvxProPath = require.resolve('@dotenvx/dotenvx-pro', { paths: [projectRoot] })
19
- const { keypair } = require(dotenvxProPath)
20
-
18
+ // eslint-disable-next-line no-eval
19
+ const dotenvxProPath = eval('require').resolve('@dotenvx/dotenvx-pro', { paths: [projectRoot] }) // necessary for webpack builds
20
+ // eslint-disable-next-line no-eval
21
+ const { keypair } = eval('require')(dotenvxProPath) // necessary for webpack builds
21
22
  result = keypair(this.envFilepath)
22
23
  } catch (_e) {
23
24
  try {
@@ -36,8 +36,10 @@ class Radar {
36
36
 
37
37
  _radarNpm () {
38
38
  const projectRoot = path.resolve(process.cwd())
39
- const npmPath = require.resolve('@dotenvx/dotenvx-radar', { paths: [projectRoot] })
40
- return require(npmPath)
39
+ // eslint-disable-next-line no-eval
40
+ const npmPath = eval('require').resolve('@dotenvx/dotenvx-radar', { paths: [projectRoot] }) // necessary for webpack builds
41
+ // eslint-disable-next-line no-eval
42
+ return eval('require')(npmPath) // necessary for webpack builds
41
43
  }
42
44
 
43
45
  _radarCli () {