@trenskow/config 3.1.0 → 3.1.2

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.
Files changed (2) hide show
  1. package/index.js +3 -2
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -7,7 +7,7 @@
7
7
  //
8
8
 
9
9
  import { readFileSync } from 'fs';
10
- import { resolve } from 'path';
10
+ import { resolve, dirname } from 'path';
11
11
 
12
12
  import caseit from '@trenskow/caseit';
13
13
  import merge from '@trenskow/merge';
@@ -135,7 +135,8 @@ export default async (schema = {}, options = {}) => {
135
135
 
136
136
  try {
137
137
  return await isvalid(
138
- camelCased(schema, merge({}, process.env, readEnvironment())),
138
+ camelCased(schema, merge({}, process.env, readEnvironment(
139
+ dirname(resolve(process.cwd(), process.argv[1])) || __dirname))),
139
140
  schema,
140
141
  options);
141
142
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trenskow/config",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "Converts `process.env` into a neatly packed object.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -28,8 +28,8 @@
28
28
  "dependencies": {
29
29
  "@trenskow/caseit": "^1.4.4",
30
30
  "@trenskow/merge": "^0.1.30",
31
- "isvalid": "^4.1.19",
32
- "keyd": "^2.1.11"
31
+ "isvalid": "^4.1.20",
32
+ "keyd": "^2.1.12"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@eslint/eslintrc": "^3.1.0",