dotenv-defaults 2.0.0 → 3.0.1

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/README.md CHANGED
@@ -5,7 +5,8 @@ A dotenv system that supports defaults
5
5
  ### Status
6
6
 
7
7
  ![npm](https://img.shields.io/npm/v/dotenv-defaults.svg)
8
- [![Greenkeeper badge](https://badges.greenkeeper.io/mrsteele/dotenv-defaults.svg)](https://greenkeeper.io/)
8
+ [![Main](https://github.com/mrsteele/dotenv-defaults/actions/workflows/main.yml/badge.svg)](https://github.com/mrsteele/dotenv-defaults/actions/workflows/main.yml)
9
+ [![dependabot badge](https://badgen.net/dependabot/mrsteele/dotenv-defaults?icon=dependabot)](https://dependabot.com/)
9
10
 
10
11
  ### Installation
11
12
 
@@ -27,7 +28,7 @@ EMAIL=test@email.com
27
28
 
28
29
  ```
29
30
  # .env, DO NOT COMMIT
30
- HOST=omnionline.us
31
+ HOST=mrsteele.dev
31
32
  ```
32
33
 
33
34
  The result
@@ -39,7 +40,7 @@ require('dotenv-defaults').config()
39
40
  require('dotenv-defaults/config')
40
41
 
41
42
  console.log(process.env.HOST)
42
- // Outputs: omnionline.us
43
+ // Outputs: mrsteele.dev
43
44
 
44
45
  console.log(process.env.EMAIL)
45
46
  // Outputs: test@email.com
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "dotenv-defaults",
3
- "version": "2.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "dotenv... but with defaults!",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
7
  "test": "jest",
8
- "lint": "standard",
9
- "travis": "npm run lint && npm t"
8
+ "lint": "standard"
10
9
  },
11
10
  "repository": {
12
11
  "type": "git",
@@ -31,11 +30,11 @@
31
30
  ],
32
31
  "homepage": "https://github.com/mrsteele/dotenv-defaults#readme",
33
32
  "dependencies": {
34
- "dotenv": "^8.2.0"
33
+ "dotenv": "^14.0.0"
35
34
  },
36
35
  "devDependencies": {
37
- "jest": "^25.0.0",
38
- "standard": "^13.0.1"
36
+ "jest": "^27.2.0",
37
+ "standard": "^16.0.3"
39
38
  },
40
39
  "jest": {
41
40
  "coverageDirectory": "./coverage/",
package/src/index.test.js CHANGED
@@ -50,12 +50,12 @@ describe('dotenv-defaults', () => {
50
50
  })
51
51
 
52
52
  test('should read variables', () => {
53
- expect(Module.parse(`TEST=hello`)).toEqual({ TEST: 'hello' })
53
+ expect(Module.parse('TEST=hello')).toEqual({ TEST: 'hello' })
54
54
  })
55
55
 
56
56
  test('should include defaults', () => {
57
- const src = `TEST=hello`
58
- const defaults = `TEST2=goodbye`
57
+ const src = 'TEST=hello'
58
+ const defaults = 'TEST2=goodbye'
59
59
  expect(Module.parse(src, defaults)).toEqual({
60
60
  TEST: 'hello',
61
61
  TEST2: 'goodbye'
@@ -63,8 +63,8 @@ describe('dotenv-defaults', () => {
63
63
  })
64
64
 
65
65
  test('should not override defaults', () => {
66
- const src = `TEST=hello`
67
- const defaults = `TEST=goodbye`
66
+ const src = 'TEST=hello'
67
+ const defaults = 'TEST=goodbye'
68
68
  expect(Module.parse(src, defaults)).toEqual({ TEST: 'hello' })
69
69
  })
70
70
  })