workspace-tools 0.24.0 → 0.25.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/CHANGELOG.json CHANGED
@@ -2,7 +2,229 @@
2
2
  "name": "workspace-tools",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 20 Jul 2022 22:31:28 GMT",
5
+ "date": "Tue, 02 Aug 2022 23:03:07 GMT",
6
+ "tag": "workspace-tools_v0.25.2",
7
+ "version": "0.25.2",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "elcraig@microsoft.com",
12
+ "package": "workspace-tools",
13
+ "commit": "476b210fe32e5ebfc5ab6ac0fc3c209e17767f0b",
14
+ "comment": "Add fs-extra to devDependencies and remove non-dev usage"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Tue, 26 Jul 2022 05:21:19 GMT",
21
+ "tag": "workspace-tools_v0.25.1",
22
+ "version": "0.25.1",
23
+ "comments": {
24
+ "none": [
25
+ {
26
+ "author": "email not defined",
27
+ "package": "workspace-tools",
28
+ "commit": "not available",
29
+ "comment": "Update devDependency @types/tmp to v0.2.3"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Tue, 26 Jul 2022 05:20:52 GMT",
36
+ "tag": "workspace-tools_v0.25.1",
37
+ "version": "0.25.1",
38
+ "comments": {
39
+ "none": [
40
+ {
41
+ "author": "email not defined",
42
+ "package": "workspace-tools",
43
+ "commit": "b1541150f96f183fdc2ec1c07eba08316494ad38",
44
+ "comment": "Update devDependency @types/tmp to v0.2.3"
45
+ },
46
+ {
47
+ "author": "renovate@whitesourcesoftware.com",
48
+ "package": "workspace-tools",
49
+ "commit": "not available",
50
+ "comment": "Update jest monorepo to v28"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Tue, 26 Jul 2022 05:20:33 GMT",
57
+ "tag": "workspace-tools_v0.25.1",
58
+ "version": "0.25.1",
59
+ "comments": {
60
+ "none": [
61
+ {
62
+ "author": "renovate@whitesourcesoftware.com",
63
+ "package": "workspace-tools",
64
+ "commit": "ceb72cdb72daff7d8e303ba61fec567ae880a35e",
65
+ "comment": "Update jest monorepo to v28"
66
+ }
67
+ ]
68
+ }
69
+ },
70
+ {
71
+ "date": "Tue, 26 Jul 2022 03:54:05 GMT",
72
+ "tag": "workspace-tools_v0.25.1",
73
+ "version": "0.25.1",
74
+ "comments": {
75
+ "none": [
76
+ {
77
+ "author": "renovate@whitesourcesoftware.com",
78
+ "package": "workspace-tools",
79
+ "commit": "not available",
80
+ "comment": "Update devDependency @types/yarnpkg__lockfile to v1.1.5"
81
+ }
82
+ ]
83
+ }
84
+ },
85
+ {
86
+ "date": "Tue, 26 Jul 2022 03:53:33 GMT",
87
+ "tag": "workspace-tools_v0.25.1",
88
+ "version": "0.25.1",
89
+ "comments": {
90
+ "none": [
91
+ {
92
+ "author": "renovate@whitesourcesoftware.com",
93
+ "package": "workspace-tools",
94
+ "commit": "215d005bda9685bfd53131078e13aa00fb27f291",
95
+ "comment": "Update devDependency @types/yarnpkg__lockfile to v1.1.5"
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ "date": "Tue, 26 Jul 2022 02:20:08 GMT",
102
+ "tag": "workspace-tools_v0.25.1",
103
+ "version": "0.25.1",
104
+ "comments": {
105
+ "none": [
106
+ {
107
+ "author": "renovate@whitesourcesoftware.com",
108
+ "package": "workspace-tools",
109
+ "commit": "beb806b17f64ce3d5babf13621e6e3b63bd16f90",
110
+ "comment": "Update devDependency beachball to v2.26.0"
111
+ }
112
+ ]
113
+ }
114
+ },
115
+ {
116
+ "date": "Tue, 26 Jul 2022 02:16:55 GMT",
117
+ "tag": "workspace-tools_v0.25.1",
118
+ "version": "0.25.1",
119
+ "comments": {
120
+ "none": [
121
+ {
122
+ "author": "email not defined",
123
+ "package": "workspace-tools",
124
+ "comment": "Update devDependency @types/jest to v25.2.3",
125
+ "commit": "a4ea3510cab1d33efa55e2644cec7e0d543a6ef2"
126
+ }
127
+ ]
128
+ }
129
+ },
130
+ {
131
+ "date": "Tue, 26 Jul 2022 01:37:45 GMT",
132
+ "tag": "workspace-tools_v0.25.1",
133
+ "version": "0.25.1",
134
+ "comments": {
135
+ "none": [
136
+ {
137
+ "author": "renovate@whitesourcesoftware.com",
138
+ "package": "workspace-tools",
139
+ "comment": "Update devDependency @types/jju to v1.4.2",
140
+ "commit": "f5b7af07f4bcbecb5db1d47589ac7e66f4bae21f"
141
+ }
142
+ ]
143
+ }
144
+ },
145
+ {
146
+ "date": "Tue, 26 Jul 2022 01:37:23 GMT",
147
+ "tag": "workspace-tools_v0.25.1",
148
+ "version": "0.25.1",
149
+ "comments": {
150
+ "none": [
151
+ {
152
+ "author": "renovate@whitesourcesoftware.com",
153
+ "package": "workspace-tools",
154
+ "comment": "Update devDependency @types/jju to v1.4.2",
155
+ "commit": "763800ee9cdb0f39e9748e601cd6fdc8997de64b"
156
+ },
157
+ {
158
+ "author": "email not defined",
159
+ "package": "workspace-tools",
160
+ "comment": "Update devDependency @types/git-url-parse to v9.0.1",
161
+ "commit": "763800ee9cdb0f39e9748e601cd6fdc8997de64b"
162
+ }
163
+ ]
164
+ }
165
+ },
166
+ {
167
+ "date": "Tue, 26 Jul 2022 01:36:52 GMT",
168
+ "tag": "workspace-tools_v0.25.1",
169
+ "version": "0.25.1",
170
+ "comments": {
171
+ "none": [
172
+ {
173
+ "author": "email not defined",
174
+ "package": "workspace-tools",
175
+ "comment": "Update devDependency @types/git-url-parse to v9.0.1",
176
+ "commit": "51be1586f27bd2029028e9c2f035d809f3ce07cb"
177
+ }
178
+ ]
179
+ }
180
+ },
181
+ {
182
+ "date": "Tue, 26 Jul 2022 01:31:27 GMT",
183
+ "tag": "workspace-tools_v0.25.1",
184
+ "version": "0.25.1",
185
+ "comments": {
186
+ "none": [
187
+ {
188
+ "author": "email not defined",
189
+ "package": "workspace-tools",
190
+ "comment": "Pin devDependencies",
191
+ "commit": "fd4e4d468c26f7ea6003b590cdabf0eac1acec9a"
192
+ }
193
+ ]
194
+ }
195
+ },
196
+ {
197
+ "date": "Thu, 21 Jul 2022 21:21:48 GMT",
198
+ "tag": "workspace-tools_v0.25.1",
199
+ "version": "0.25.1",
200
+ "comments": {
201
+ "patch": [
202
+ {
203
+ "author": "dannyfritz@gmail.com",
204
+ "package": "workspace-tools",
205
+ "comment": "Use git ls-files for checkUntrackedFiles",
206
+ "commit": "f19c194e3636c08c2c3367daff9510efc07559da"
207
+ }
208
+ ]
209
+ }
210
+ },
211
+ {
212
+ "date": "Thu, 21 Jul 2022 21:11:11 GMT",
213
+ "tag": "workspace-tools_v0.25.0",
214
+ "version": "0.25.0",
215
+ "comments": {
216
+ "minor": [
217
+ {
218
+ "author": "dlannoye@microsoft.com",
219
+ "package": "workspace-tools",
220
+ "comment": "BREAKING CHANGE: Improve detection of git root and throw if not found",
221
+ "commit": "5a18b0d43f1a434b8ee7b03f7b5e273e2aee8330"
222
+ }
223
+ ]
224
+ }
225
+ },
226
+ {
227
+ "date": "Wed, 20 Jul 2022 22:31:31 GMT",
6
228
  "tag": "workspace-tools_v0.24.0",
7
229
  "version": "0.24.0",
8
230
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,36 @@
1
1
  # Change Log - workspace-tools
2
2
 
3
- This log was last generated on Wed, 20 Jul 2022 22:31:28 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 02 Aug 2022 23:03:07 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.25.2
8
+
9
+ Tue, 02 Aug 2022 23:03:07 GMT
10
+
11
+ ### Patches
12
+
13
+ - Add fs-extra to devDependencies and remove non-dev usage (elcraig@microsoft.com)
14
+
15
+ ## 0.25.1
16
+
17
+ Thu, 21 Jul 2022 21:21:48 GMT
18
+
19
+ ### Patches
20
+
21
+ - Use git ls-files for checkUntrackedFiles (dannyfritz@gmail.com)
22
+
23
+ ## 0.25.0
24
+
25
+ Thu, 21 Jul 2022 21:11:11 GMT
26
+
27
+ ### Minor changes
28
+
29
+ - BREAKING CHANGE: Improve detection of git root and throw if not found (dlannoye@microsoft.com)
30
+
7
31
  ## 0.24.0
8
32
 
9
- Wed, 20 Jul 2022 22:31:28 GMT
33
+ Wed, 20 Jul 2022 22:31:31 GMT
10
34
 
11
35
  ### Minor changes
12
36
 
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getDefaultRemote = void 0;
7
- const fs_extra_1 = __importDefault(require("fs-extra"));
7
+ const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const paths_1 = require("../paths");
10
10
  const getRepositoryName_1 = require("./getRepositoryName");
@@ -20,13 +20,10 @@ function getDefaultRemote(cwdOrOptions) {
20
20
  log(message);
21
21
  };
22
22
  const gitRoot = (0, paths_1.findGitRoot)(cwd);
23
- if (!gitRoot) {
24
- throw new Error(`Directory "${cwd}" does not appear to be in a git repository`);
25
- }
26
23
  let packageJson = {};
27
24
  const packageJsonPath = path_1.default.join(gitRoot, "package.json");
28
25
  try {
29
- packageJson = fs_extra_1.default.readJSONSync(packageJsonPath);
26
+ packageJson = JSON.parse(fs_1.default.readFileSync(packageJsonPath, "utf8").trim());
30
27
  }
31
28
  catch (e) {
32
29
  throw new Error(`Could not read "${packageJsonPath}"`);
@@ -8,22 +8,7 @@ exports.listAllTrackedFiles = exports.getDefaultBranch = exports.parseRemoteBran
8
8
  const git_1 = require("./git");
9
9
  function getUntrackedChanges(cwd) {
10
10
  try {
11
- const results = (0, git_1.git)(["status", "--short"], { cwd });
12
- if (!results.success || !results.stdout) {
13
- return [];
14
- }
15
- const lines = results.stdout.split(/[\r\n]+/).filter((line) => line);
16
- const untracked = [];
17
- for (let i = 0; i < lines.length; i++) {
18
- const line = lines[i];
19
- if (line[0] === " " || line[0] === "?") {
20
- untracked.push(line.substring(3));
21
- }
22
- else if (line[0] === "R") {
23
- i++;
24
- }
25
- }
26
- return untracked;
11
+ return processGitOutput((0, git_1.git)(["ls-files", "--others", "--exclude-standard"], { cwd }));
27
12
  }
28
13
  catch (e) {
29
14
  throw new git_1.GitError(`Cannot gather information about untracked changes`, e);
@@ -1,7 +1,9 @@
1
1
  import { PackageDependenciesOptions } from "./getPackageDependencies";
2
2
  import { PackageInfos } from "../types/PackageInfo";
3
+ /** @internal */
3
4
  export interface DependencyMap {
4
5
  dependencies: Map<string, Set<string>>;
5
6
  dependents: Map<string, Set<string>>;
6
7
  }
8
+ /** @internal */
7
9
  export declare function createDependencyMap(packages: PackageInfos, options?: PackageDependenciesOptions): DependencyMap;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createDependencyMap = void 0;
4
4
  const getPackageDependencies_1 = require("./getPackageDependencies");
5
- // @internal
5
+ /** @internal */
6
6
  function createDependencyMap(packages, options = { withDevDependencies: true, withPeerDependencies: false }) {
7
7
  const map = {
8
8
  dependencies: new Map(),
@@ -7,16 +7,15 @@ exports.createPackageGraph = void 0;
7
7
  const createDependencyMap_1 = require("./createDependencyMap");
8
8
  const multimatch_1 = __importDefault(require("multimatch"));
9
9
  function createPackageGraph(packages, filters) {
10
- /** packageSet is the set of packages being accumulated as the graph is filtered */
10
+ /** set of packages being accumulated as the graph is filtered */
11
11
  const packageSet = new Set();
12
- /** edges is the array of package names & its dependency being accumulated as the graph is filtered */
12
+ /** array of package names & its dependency being accumulated as the graph is filtered */
13
13
  const edges = [];
14
14
  const edgeKeys = new Set();
15
15
  let dependencyMapWithPeerDevDeps = undefined;
16
16
  let dependencyMapWithPeerDeps = undefined;
17
17
  let dependencyMapWithDevDeps = undefined;
18
18
  let dependencyMapWithoutPeerDevDeps = undefined;
19
- /** a visitor for a single filter, */
20
19
  function visitorForFilter(filter, pkg, dependencies, dependents) {
21
20
  packageSet.add(pkg);
22
21
  if (!filter || (filter.includeDependencies && dependencies)) {
@@ -41,17 +40,10 @@ function createPackageGraph(packages, filters) {
41
40
  }
42
41
  }
43
42
  if (filters) {
44
- if (Array.isArray(filters)) {
45
- for (const filter of filters) {
46
- const dependencyMap = getDependencyMapForFilter(packages, filter);
47
- const visitor = visitorForFilter.bind(undefined, filter);
48
- visitPackageGraph(packages, dependencyMap, visitor, filter);
49
- }
50
- }
51
- else {
52
- const filter = filters;
53
- const dependencyMap = getDependencyMapForFilter(packages, filter);
43
+ filters = Array.isArray(filters) ? filters : [filters];
44
+ for (const filter of filters) {
54
45
  const visitor = visitorForFilter.bind(undefined, filter);
46
+ const dependencyMap = getDependencyMapForFilter(packages, filter);
55
47
  visitPackageGraph(packages, dependencyMap, visitor, filter);
56
48
  }
57
49
  }
@@ -70,19 +62,20 @@ function createPackageGraph(packages, filters) {
70
62
  if (!filter) {
71
63
  return (0, createDependencyMap_1.createDependencyMap)(packages);
72
64
  }
73
- if (filter.withDevDependencies && filter.withPeerDependencies && !dependencyMapWithPeerDevDeps) {
74
- dependencyMapWithPeerDevDeps = (0, createDependencyMap_1.createDependencyMap)(packages, { withDevDependencies: true, withPeerDependencies: true });
75
- }
76
- else if (filter.withDevDependencies && !filter.withPeerDependencies && !dependencyMapWithDevDeps) {
77
- dependencyMapWithDevDeps = (0, createDependencyMap_1.createDependencyMap)(packages, { withDevDependencies: true, withPeerDependencies: false });
65
+ if (filter.withDevDependencies && filter.withPeerDependencies) {
66
+ dependencyMapWithPeerDevDeps !== null && dependencyMapWithPeerDevDeps !== void 0 ? dependencyMapWithPeerDevDeps : (dependencyMapWithPeerDevDeps = (0, createDependencyMap_1.createDependencyMap)(packages, filter));
67
+ return dependencyMapWithPeerDevDeps;
78
68
  }
79
- else if (!filter.withDevDependencies && filter.withPeerDependencies && !dependencyMapWithPeerDeps) {
80
- dependencyMapWithPeerDeps = (0, createDependencyMap_1.createDependencyMap)(packages, { withDevDependencies: false, withPeerDependencies: true });
69
+ if (filter.withDevDependencies && !filter.withPeerDependencies) {
70
+ dependencyMapWithDevDeps !== null && dependencyMapWithDevDeps !== void 0 ? dependencyMapWithDevDeps : (dependencyMapWithDevDeps = (0, createDependencyMap_1.createDependencyMap)(packages, filter));
71
+ return dependencyMapWithDevDeps;
81
72
  }
82
- else {
83
- dependencyMapWithoutPeerDevDeps = (0, createDependencyMap_1.createDependencyMap)(packages, { withDevDependencies: false, withPeerDependencies: false });
73
+ if (!filter.withDevDependencies && filter.withPeerDependencies) {
74
+ dependencyMapWithPeerDeps !== null && dependencyMapWithPeerDeps !== void 0 ? dependencyMapWithPeerDeps : (dependencyMapWithPeerDeps = (0, createDependencyMap_1.createDependencyMap)(packages, filter));
75
+ return dependencyMapWithPeerDeps;
84
76
  }
85
- return ((filter.withDevDependencies && filter.withPeerDependencies) ? dependencyMapWithPeerDevDeps : (filter.withDevDependencies ? dependencyMapWithDevDeps : (filter.withPeerDependencies ? dependencyMapWithPeerDeps : dependencyMapWithoutPeerDevDeps)));
77
+ dependencyMapWithoutPeerDevDeps !== null && dependencyMapWithoutPeerDevDeps !== void 0 ? dependencyMapWithoutPeerDevDeps : (dependencyMapWithoutPeerDevDeps = (0, createDependencyMap_1.createDependencyMap)(packages, filter));
78
+ return dependencyMapWithoutPeerDevDeps;
86
79
  }
87
80
  }
88
81
  exports.createPackageGraph = createPackageGraph;
@@ -2,19 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPackageDependencies = void 0;
4
4
  function getPackageDependencies(info, packages, options = { withDevDependencies: true }) {
5
- let deps = [];
6
- if (options.withDevDependencies && options.withPeerDependencies) {
7
- deps = Object.keys(Object.assign(Object.assign(Object.assign({}, info.dependencies), info.devDependencies), info.peerDependencies));
8
- }
9
- else if (options.withDevDependencies) {
10
- deps = Object.keys(Object.assign(Object.assign({}, info.dependencies), info.devDependencies));
11
- }
12
- else if (options.withPeerDependencies) {
13
- deps = Object.keys(Object.assign(Object.assign({}, info.dependencies), info.peerDependencies));
14
- }
15
- else {
16
- deps = Object.keys(Object.assign({}, info.dependencies));
17
- }
18
- return Object.keys(packages).filter((pkg) => deps.includes(pkg));
5
+ const deps = Object.assign(Object.assign(Object.assign({}, info.dependencies), (options.withDevDependencies && info.devDependencies)), (options.withPeerDependencies && info.peerDependencies));
6
+ return Object.keys(packages).filter((pkg) => !!deps[pkg]);
19
7
  }
20
8
  exports.getPackageDependencies = getPackageDependencies;
@@ -18,7 +18,7 @@ function parsePnpmLock(yaml) {
18
18
  }
19
19
  return {
20
20
  object,
21
- type: "success"
21
+ type: "success",
22
22
  };
23
23
  }
24
24
  exports.parsePnpmLock = parsePnpmLock;
package/lib/paths.d.ts CHANGED
@@ -1,11 +1,15 @@
1
1
  /**
2
2
  * Starting from `cwd`, searches up the directory hierarchy for `pathName`.
3
+ * @param pathName Path to look for
4
+ * @param cwd Directory to start from
5
+ * @param type If specified, look for only files or only directories. Otherwise accept either.
3
6
  */
4
- export declare function searchUp(pathName: string, cwd: string): string | null;
7
+ export declare function searchUp(pathName: string, cwd: string, type?: "file" | "directory"): string | null;
5
8
  /**
6
- * Starting from `cwd`, searches up the directory hierarchy for `.git`.
9
+ * Starting from `cwd`, uses `git rev-parse --show-toplevel` to find the root of the git repo.
10
+ * Throws if `cwd` is not in a Git repository.
7
11
  */
8
- export declare function findGitRoot(cwd: string): string | null;
12
+ export declare function findGitRoot(cwd: string): string;
9
13
  /**
10
14
  * Starting from `cwd`, searches up the directory hierarchy for `package.json`.
11
15
  */
@@ -14,5 +18,5 @@ export declare function findPackageRoot(cwd: string): string | null;
14
18
  * Starting from `cwd`, searches up the directory hierarchy for the workspace root,
15
19
  * falling back to the git root if no workspace is detected.
16
20
  */
17
- export declare function findProjectRoot(cwd: string): string | null;
21
+ export declare function findProjectRoot(cwd: string): string;
18
22
  export declare function isChildOf(child: string, parent: string): boolean;
package/lib/paths.js CHANGED
@@ -7,16 +7,24 @@ exports.isChildOf = exports.findProjectRoot = exports.findPackageRoot = exports.
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const getWorkspaceRoot_1 = require("./workspaces/getWorkspaceRoot");
10
+ const git_1 = require("./git");
10
11
  /**
11
12
  * Starting from `cwd`, searches up the directory hierarchy for `pathName`.
13
+ * @param pathName Path to look for
14
+ * @param cwd Directory to start from
15
+ * @param type If specified, look for only files or only directories. Otherwise accept either.
12
16
  */
13
- function searchUp(pathName, cwd) {
17
+ function searchUp(pathName, cwd, type) {
14
18
  const root = path_1.default.parse(cwd).root;
15
19
  let found = false;
16
20
  while (!found && cwd !== root) {
17
- if (fs_1.default.existsSync(path_1.default.join(cwd, pathName))) {
18
- found = true;
19
- break;
21
+ const current = path_1.default.join(cwd, pathName);
22
+ if (fs_1.default.existsSync(current)) {
23
+ const isDir = fs_1.default.statSync(current).isDirectory();
24
+ if (!((type === "file" && isDir) || (type === "directory" && !isDir))) {
25
+ found = true;
26
+ break;
27
+ }
20
28
  }
21
29
  cwd = path_1.default.dirname(cwd);
22
30
  }
@@ -27,10 +35,15 @@ function searchUp(pathName, cwd) {
27
35
  }
28
36
  exports.searchUp = searchUp;
29
37
  /**
30
- * Starting from `cwd`, searches up the directory hierarchy for `.git`.
38
+ * Starting from `cwd`, uses `git rev-parse --show-toplevel` to find the root of the git repo.
39
+ * Throws if `cwd` is not in a Git repository.
31
40
  */
32
41
  function findGitRoot(cwd) {
33
- return searchUp(".git", cwd);
42
+ const output = (0, git_1.git)(["rev-parse", "--show-toplevel"], { cwd });
43
+ if (!output.success) {
44
+ throw new Error(`Directory "${cwd}" is not in a git repository`);
45
+ }
46
+ return path_1.default.normalize(output.stdout);
34
47
  }
35
48
  exports.findGitRoot = findGitRoot;
36
49
  /**
package/lib/scope.js CHANGED
@@ -12,9 +12,7 @@ const multimatch_1 = __importDefault(require("multimatch"));
12
12
  * @param packages
13
13
  */
14
14
  function getScopedPackages(search, packages) {
15
- const packageNames = Array.isArray(packages)
16
- ? packages
17
- : Object.keys(packages);
15
+ const packageNames = Array.isArray(packages) ? packages : Object.keys(packages);
18
16
  const results = new Set();
19
17
  // perform a package-scoped search (e.g. search is @scope/foo*)
20
18
  const scopedSearch = search.filter((needle) => needle.startsWith("@") || needle.startsWith("!@"));
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workspace-tools",
3
- "version": "0.24.0",
3
+ "version": "0.25.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,6 +17,7 @@
17
17
  "release:docs": "typedoc src/index.ts && gh-pages -d docs",
18
18
  "change": "beachball change",
19
19
  "checkchange": "beachball check",
20
+ "format": "prettier --write .",
20
21
  "release": "beachball publish -y",
21
22
  "start": "tsc -w --preserveWatchOutput",
22
23
  "test": "jest"
@@ -31,20 +32,21 @@
31
32
  "read-yaml-file": "^2.0.0"
32
33
  },
33
34
  "devDependencies": {
34
- "@types/git-url-parse": "^9.0.0",
35
- "@types/jest": "^25.2.2",
36
- "@types/jju": "^1.4.1",
37
- "@types/multimatch": "^4.0.0",
38
- "@types/node": ">=12.0.0",
39
- "@types/tmp": "^0.2.0",
40
- "@types/yarnpkg__lockfile": "^1.1.3",
41
- "beachball": "^2.17.0",
42
- "jest": "^25.0.0",
43
- "prettier": "^2.7.1",
44
- "tmp": "^0.2.1",
45
- "ts-jest": "^25.5.1",
46
- "typedoc": "^0.22.15",
47
- "typescript": "^4.5.4",
48
- "gh-pages": "^3.2.3"
35
+ "@types/git-url-parse": "9.0.1",
36
+ "@types/jest": "28.1.6",
37
+ "@types/jju": "1.4.2",
38
+ "@types/multimatch": "4.0.0",
39
+ "@types/node": "13.13.5",
40
+ "@types/tmp": "0.2.3",
41
+ "@types/yarnpkg__lockfile": "1.1.5",
42
+ "beachball": "2.26.0",
43
+ "fs-extra": "10.1.0",
44
+ "jest": "28.1.3",
45
+ "prettier": "2.7.1",
46
+ "tmp": "0.2.1",
47
+ "ts-jest": "28.0.7",
48
+ "typedoc": "0.22.15",
49
+ "typescript": "4.5.4",
50
+ "gh-pages": "3.2.3"
49
51
  }
50
52
  }