@commitlint/config-lerna-scopes 17.2.1 → 17.4.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 +7 -8
  2. package/package.json +6 -6
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
+ const glob = require('glob');
1
2
  const Path = require('path');
2
3
  const importFrom = require('import-from');
3
4
  const resolvePkg = require('resolve-pkg');
4
- const Globby = require('globby');
5
5
  const semver = require('semver');
6
6
 
7
7
  module.exports = {
@@ -21,14 +21,13 @@ function getPackages(context) {
21
21
  const {workspaces} = require(Path.join(cwd, 'package.json'));
22
22
  if (Array.isArray(workspaces) && workspaces.length) {
23
23
  // use yarn workspaces
24
- return Globby(
25
- workspaces.map((ws) => {
26
- return Path.posix.join(ws, 'package.json');
27
- }),
28
- {cwd, ignore: ['**/node_modules/**']}
29
- ).then((pJsons = []) => {
30
- return pJsons.map((pJson) => require(Path.join(cwd, pJson)));
24
+
25
+ const wsGlobs = workspaces.flatMap((ws) => {
26
+ const path = Path.posix.join(ws, 'package.json');
27
+ return glob.sync(path, {cwd, ignore: ['**/node_modules/**']});
31
28
  });
29
+
30
+ return wsGlobs.map((pJson) => require(Path.join(cwd, pJson)));
32
31
  }
33
32
 
34
33
  const lernaVersion = getLernaVersion(cwd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commitlint/config-lerna-scopes",
3
- "version": "17.2.1",
3
+ "version": "17.4.2",
4
4
  "description": "Shareable commitlint config enforcing lerna package and workspace names as scopes",
5
5
  "files": [
6
6
  "index.js"
@@ -38,14 +38,14 @@
38
38
  "node": ">=v14"
39
39
  },
40
40
  "dependencies": {
41
- "globby": "^11.0.1",
41
+ "glob": "^8.0.3",
42
42
  "import-from": "4.0.0",
43
43
  "resolve-pkg": "2.0.0",
44
- "semver": "7.3.7"
44
+ "semver": "7.3.8"
45
45
  },
46
46
  "devDependencies": {
47
- "@commitlint/test": "^17.2.0",
48
- "@commitlint/utils": "^17.0.0"
47
+ "@commitlint/test": "^17.4.2",
48
+ "@commitlint/utils": "^17.4.0"
49
49
  },
50
- "gitHead": "9f74bfd48006d3d71e77c0a45a241f7aceaff159"
50
+ "gitHead": "3c691ad507293db4ecb7ddd3559afca871c1e0bc"
51
51
  }