@adonisjs/env 3.0.5 → 3.0.6

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
@@ -19,7 +19,7 @@
19
19
 
20
20
  <div align="center">
21
21
  <h3>
22
- <a href="https://preview.adonisjs.com">
22
+ <a href="https://adonisjs.com">
23
23
  Website
24
24
  </a>
25
25
  <span> | </span>
@@ -31,7 +31,7 @@ function castToBoolean(key, value, message) {
31
31
  */
32
32
  function boolean(options) {
33
33
  return function validate(key, value) {
34
- helpers_1.ensureValue(key, value, options?.message);
34
+ (0, helpers_1.ensureValue)(key, value, options?.message);
35
35
  return castToBoolean(key, value, options?.message);
36
36
  };
37
37
  }
@@ -29,7 +29,7 @@ exports.castToNumber = castToNumber;
29
29
  */
30
30
  function number(options) {
31
31
  return function validate(key, value) {
32
- helpers_1.ensureValue(key, value, options?.message);
32
+ (0, helpers_1.ensureValue)(key, value, options?.message);
33
33
  return castToNumber(key, value, options?.message);
34
34
  };
35
35
  }
@@ -51,7 +51,7 @@ function ensureOneOf(choices, key, value, message) {
51
51
  */
52
52
  function oneOf(choices, options) {
53
53
  return function validate(key, value) {
54
- helpers_1.ensureValue(key, value, options?.message);
54
+ (0, helpers_1.ensureValue)(key, value, options?.message);
55
55
  return ensureOneOf(choices, key, value, options?.message);
56
56
  };
57
57
  }
@@ -42,7 +42,7 @@ const formats = {
42
42
  */
43
43
  function string(options) {
44
44
  return function validate(key, value) {
45
- helpers_1.ensureValue(key, value, options?.message);
45
+ (0, helpers_1.ensureValue)(key, value, options?.message);
46
46
  if (options?.format) {
47
47
  formats[options.format](key, value, options);
48
48
  }
@@ -18,7 +18,7 @@ const utils_1 = require("@poppinss/utils");
18
18
  */
19
19
  function loadFile(filePath, optional = false) {
20
20
  try {
21
- return fs_1.readFileSync(filePath, 'utf-8');
21
+ return (0, fs_1.readFileSync)(filePath, 'utf-8');
22
22
  }
23
23
  catch (error) {
24
24
  if (error.code !== 'ENOENT') {
@@ -35,14 +35,14 @@ function loadFile(filePath, optional = false) {
35
35
  */
36
36
  function envLoader(appRoot) {
37
37
  const envPath = process.env.ENV_PATH || '.env';
38
- const absPath = path_1.isAbsolute(envPath) ? envPath : path_1.join(appRoot, envPath);
38
+ const absPath = (0, path_1.isAbsolute)(envPath) ? envPath : (0, path_1.join)(appRoot, envPath);
39
39
  const envContents = loadFile(absPath, true);
40
40
  /**
41
41
  * Optionally loading the `.env.testing` file in test environment
42
42
  */
43
43
  let testEnvContent = '';
44
44
  if (process.env.NODE_ENV === 'testing') {
45
- testEnvContent = loadFile(path_1.join(appRoot, '.env.testing'), true);
45
+ testEnvContent = loadFile((0, path_1.join)(appRoot, '.env.testing'), true);
46
46
  }
47
47
  return { testEnvContent, envContents };
48
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonisjs/env",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "description": "Environment variable manager for Node.js",
5
5
  "main": "build/index.js",
6
6
  "files": [
@@ -31,20 +31,20 @@
31
31
  "author": "virk,adonisjs",
32
32
  "license": "MIT",
33
33
  "devDependencies": {
34
- "@adonisjs/mrm-preset": "^4.1.2",
34
+ "@adonisjs/mrm-preset": "^5.0.2",
35
35
  "@adonisjs/require-ts": "^2.0.7",
36
- "@poppinss/dev-utils": "^1.1.5",
37
- "@types/node": "^16.3.3",
36
+ "@poppinss/dev-utils": "^2.0.1",
37
+ "@types/node": "^17.0.8",
38
38
  "commitizen": "^4.2.4",
39
39
  "cz-conventional-changelog": "^3.3.0",
40
40
  "del-cli": "^4.0.1",
41
- "eslint": "^7.31.0",
41
+ "eslint": "^8.7.0",
42
42
  "eslint-config-prettier": "^8.3.0",
43
- "eslint-plugin-adonis": "^1.3.3",
44
- "eslint-plugin-prettier": "^3.4.0",
43
+ "eslint-plugin-adonis": "^2.1.0",
44
+ "eslint-plugin-prettier": "^4.0.0",
45
45
  "github-label-sync": "^2.0.1",
46
46
  "husky": "^7.0.1",
47
- "japa": "^3.1.1",
47
+ "japa": "^4.0.0",
48
48
  "mrm": "^3.0.2",
49
49
  "np": "^7.5.0",
50
50
  "prettier": "^2.3.2",
@@ -73,8 +73,8 @@
73
73
  "anyBranch": false
74
74
  },
75
75
  "dependencies": {
76
- "@poppinss/utils": "^3.1.4",
77
- "dotenv": "^10.0.0",
76
+ "@poppinss/utils": "^4.0.1",
77
+ "dotenv": "^12.0.4",
78
78
  "validator": "^13.6.0"
79
79
  },
80
80
  "directories": {