concurrently 6.2.1 → 6.2.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.
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Concurrently
2
2
 
3
- [![Build Status](https://github.com/open-cli-tools/concurrently/workflows/Tests/badge.svg)](https://github.com/open-cli-tools/concurrently/actions?workflow=Tests) *master branch status*
3
+ [![Build Status](https://github.com/open-cli-tools/concurrently/workflows/Tests/badge.svg)](https://github.com/open-cli-tools/concurrently/actions?workflow=Tests)
4
+ [![Coverage Status](https://coveralls.io/repos/github/open-cli-tools/concurrently/badge.svg?branch=master)](https://coveralls.io/github/open-cli-tools/concurrently?branch=master)
4
5
 
5
6
  [![NPM Badge](https://nodei.co/npm/concurrently.png?downloads=true)](https://www.npmjs.com/package/concurrently)
6
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "concurrently",
3
- "version": "6.2.1",
3
+ "version": "6.2.2",
4
4
  "description": "Run commands concurrently",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -32,7 +32,6 @@
32
32
  "chalk": "^4.1.0",
33
33
  "date-fns": "^2.16.1",
34
34
  "lodash": "^4.17.21",
35
- "read-pkg": "^5.2.0",
36
35
  "rxjs": "^6.6.3",
37
36
  "spawn-command": "^0.0.2-1",
38
37
  "supports-color": "^8.1.0",
@@ -1,8 +1,17 @@
1
1
  const _ = require('lodash');
2
- const readPkg = require('read-pkg');
2
+ const fs = require('fs');
3
3
 
4
4
  module.exports = class ExpandNpmWildcard {
5
- constructor(readPackage = readPkg.sync) {
5
+ static readPackage() {
6
+ try {
7
+ const json = fs.readFileSync('package.json', { encoding: 'utf-8' });
8
+ return JSON.parse(json);
9
+ } catch (e) {
10
+ return {};
11
+ }
12
+ }
13
+
14
+ constructor(readPackage = ExpandNpmWildcard.readPackage) {
6
15
  this.readPackage = readPackage;
7
16
  }
8
17
 
@@ -55,11 +55,11 @@ module.exports = (commands, options) => {
55
55
  return {
56
56
  commands,
57
57
  onFinishCallbacks: _.concat(onFinishCallbacks, onFinish ? [onFinish] : [])
58
- }
58
+ };
59
59
  },
60
60
  { commands, onFinishCallbacks: [] }
61
61
  );
62
- commands = handleResult.commands
62
+ commands = handleResult.commands;
63
63
 
64
64
  const commandsLeft = commands.slice();
65
65
  const maxProcesses = Math.max(1, Number(options.maxProcesses) || commandsLeft.length);
@@ -183,4 +183,4 @@ it('runs onFinish hook after all commands run', async () => {
183
183
 
184
184
  expect(controllers[0].onFinish).toHaveBeenCalled();
185
185
  expect(controllers[1].onFinish).toHaveBeenCalled();
186
- })
186
+ });