workspace-tools 0.25.2 → 0.25.3

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,36 @@
2
2
  "name": "workspace-tools",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 02 Aug 2022 23:03:07 GMT",
5
+ "date": "Wed, 03 Aug 2022 08:01:26 GMT",
6
+ "tag": "workspace-tools_v0.25.3",
7
+ "version": "0.25.3",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "renovate@whitesourcesoftware.com",
12
+ "package": "workspace-tools",
13
+ "commit": "c51bca9b331ae106b22ed260b5c045936dd3b723",
14
+ "comment": "Update devDependency gh-pages to v4"
15
+ }
16
+ ],
17
+ "patch": [
18
+ {
19
+ "author": "elcraig@microsoft.com",
20
+ "package": "workspace-tools",
21
+ "commit": "ae076192e9010c32fc90a7cb2a6d1488d382cec6",
22
+ "comment": "Simplify createPackageGraph and getPackageDependencies"
23
+ },
24
+ {
25
+ "author": "elcraig@microsoft.com",
26
+ "package": "workspace-tools",
27
+ "commit": "f81a7c1f61ec402febbc1cc1927343dadefbcdd5",
28
+ "comment": "Update find-up to v5"
29
+ }
30
+ ]
31
+ }
32
+ },
33
+ {
34
+ "date": "Tue, 02 Aug 2022 23:03:14 GMT",
6
35
  "tag": "workspace-tools_v0.25.2",
7
36
  "version": "0.25.2",
8
37
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - workspace-tools
2
2
 
3
- This log was last generated on Tue, 02 Aug 2022 23:03:07 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 03 Aug 2022 08:01:26 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.25.3
8
+
9
+ Wed, 03 Aug 2022 08:01:26 GMT
10
+
11
+ ### Patches
12
+
13
+ - Simplify createPackageGraph and getPackageDependencies (elcraig@microsoft.com)
14
+ - Update find-up to v5 (elcraig@microsoft.com)
15
+
7
16
  ## 0.25.2
8
17
 
9
- Tue, 02 Aug 2022 23:03:07 GMT
18
+ Tue, 02 Aug 2022 23:03:14 GMT
10
19
 
11
20
  ### Patches
12
21
 
@@ -2,11 +2,9 @@ import { getTransitiveConsumers, getTransitiveProviders } from "./transitiveDeps
2
2
  import { getPackageDependencies } from "../graph/getPackageDependencies";
3
3
  /** @deprecated Do not use */
4
4
  export declare const getTransitiveDependencies: typeof getTransitiveProviders;
5
- /** @deprecated Do not use */
6
5
  export { getTransitiveProviders };
7
6
  /** @deprecated Do not use */
8
7
  export declare const getTransitiveDependents: typeof getTransitiveConsumers;
9
- /** @deprecated Do not use */
10
8
  export { getTransitiveConsumers };
11
9
  /** @deprecated Do not use */
12
10
  export declare const getInternalDeps: typeof getPackageDependencies;
@@ -4,16 +4,11 @@ export declare function getDependentMap(packages: PackageInfos): Map<string, Set
4
4
  * @deprecated Do not use
5
5
  *
6
6
  * for a package graph of a->b->c (where b depends on a), transitive consumers of a are b & c and their consumers (or what are the consequences of a)
7
- * @param targets
8
- * @param packages
9
- * @param scope
10
7
  */
11
8
  export declare function getTransitiveConsumers(targets: string[], packages: PackageInfos, scope?: string[]): string[];
12
9
  /**
13
10
  * @deprecated Do not use
14
11
  *
15
12
  * for a package graph of a->b->c (where b depends on a), transitive providers of c are a & b and their providers (or what is needed to satisfy c)
16
- * @param targets
17
- * @param packages
18
13
  */
19
14
  export declare function getTransitiveProviders(targets: string[], packages: PackageInfos): string[];
@@ -53,9 +53,6 @@ exports.getDependentMap = getDependentMap;
53
53
  * @deprecated Do not use
54
54
  *
55
55
  * for a package graph of a->b->c (where b depends on a), transitive consumers of a are b & c and their consumers (or what are the consequences of a)
56
- * @param targets
57
- * @param packages
58
- * @param scope
59
56
  */
60
57
  function getTransitiveConsumers(targets, packages, scope = []) {
61
58
  const graph = getPackageGraph(packages, scope);
@@ -79,8 +76,6 @@ exports.getTransitiveConsumers = getTransitiveConsumers;
79
76
  * @deprecated Do not use
80
77
  *
81
78
  * for a package graph of a->b->c (where b depends on a), transitive providers of c are a & b and their providers (or what is needed to satisfy c)
82
- * @param targets
83
- * @param packages
84
79
  */
85
80
  function getTransitiveProviders(targets, packages) {
86
81
  const graph = getPackageGraph(packages);
package/lib/paths.d.ts CHANGED
@@ -1,10 +1,7 @@
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.
6
3
  */
7
- export declare function searchUp(pathName: string, cwd: string, type?: "file" | "directory"): string | null;
4
+ export declare function searchUp(pathName: string, cwd: string): string | null;
8
5
  /**
9
6
  * Starting from `cwd`, uses `git rev-parse --show-toplevel` to find the root of the git repo.
10
7
  * Throws if `cwd` is not in a Git repository.
package/lib/paths.js CHANGED
@@ -10,21 +10,14 @@ const getWorkspaceRoot_1 = require("./workspaces/getWorkspaceRoot");
10
10
  const git_1 = require("./git");
11
11
  /**
12
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.
16
13
  */
17
- function searchUp(pathName, cwd, type) {
14
+ function searchUp(pathName, cwd) {
18
15
  const root = path_1.default.parse(cwd).root;
19
16
  let found = false;
20
17
  while (!found && cwd !== root) {
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
- }
18
+ if (fs_1.default.existsSync(path_1.default.join(cwd, pathName))) {
19
+ found = true;
20
+ break;
28
21
  }
29
22
  cwd = path_1.default.dirname(cwd);
30
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workspace-tools",
3
- "version": "0.25.2",
3
+ "version": "0.25.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@yarnpkg/lockfile": "^1.1.0",
27
- "find-up": "^4.1.0",
27
+ "find-up": "^5.0.0",
28
28
  "git-url-parse": "^12.0.0",
29
29
  "globby": "^11.0.0",
30
30
  "jju": "^1.4.0",
@@ -47,6 +47,6 @@
47
47
  "ts-jest": "28.0.7",
48
48
  "typedoc": "0.22.15",
49
49
  "typescript": "4.5.4",
50
- "gh-pages": "3.2.3"
50
+ "gh-pages": "4.0.0"
51
51
  }
52
52
  }