dynenv 1.2.5 → 1.2.8

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 +4 -4
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  const spawn = require('cross-spawn');
3
3
  const { readdir } = require('fs');
4
- const { join, resolve } = require('path');
4
+ const { join, resolve, sep } = require('path');
5
5
 
6
6
  parseArgs()
7
7
  .then(state => requireFiles(state))
8
- .then(state => spawnNextCommand(state))
8
+ .then(state => process.exitCode = spawnNextCommand(state).status)
9
9
  ;
10
10
 
11
11
  async function parseArgs() {
@@ -13,7 +13,7 @@ async function parseArgs() {
13
13
  const barrier = args.indexOf('--');
14
14
  if (-1 === barrier) {
15
15
  const modules = await listDirectory('./node_modules/');
16
- for (const parentDirectory of modules.filter(m => m.indexOf('/@') >= 0)) {
16
+ for (const parentDirectory of modules.filter(m => m.indexOf(`${sep}@`) >= 0)) {
17
17
  modules.push(...await listDirectory(parentDirectory));
18
18
  }
19
19
  const filesToRequire = [];
@@ -73,7 +73,7 @@ function safeRequire(ref) {
73
73
  }
74
74
 
75
75
  function spawnNextCommand({ nextCommand, nextCommandArgs, env }) {
76
- spawn(nextCommand, nextCommandArgs, {
76
+ return spawn.sync(nextCommand, nextCommandArgs, {
77
77
  stdio: 'inherit',
78
78
  env,
79
79
  });
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.5",
2
+ "version": "1.2.8",
3
3
  "name": "dynenv",
4
4
  "description": "Dynamically loads environment variables from modules and then spawns a child process with them",
5
5
  "author": "Dawson Toth",
@@ -18,8 +18,8 @@
18
18
  "cross-spawn": "^7.0.3"
19
19
  },
20
20
  "devDependencies": {
21
- "@semantic-release/git": "^9.0.0",
22
- "semantic-release": "^17.1.1"
21
+ "@semantic-release/git": "^10.0.1",
22
+ "semantic-release": "^19.0.3"
23
23
  },
24
24
  "plugins": [
25
25
  "@semantic-release/commit-analyzer",