diff --git a/.changeset/lucky-rats-grab.md b/.changeset/lucky-rats-grab.md new file mode 100644 index 000000000..699817c4b --- /dev/null +++ b/.changeset/lucky-rats-grab.md @@ -0,0 +1,7 @@ +--- +"@rnx-kit/dep-check": patch +"@rnx-kit/golang": patch +"@rnx-kit/metro-config": patch +--- + +Bump workspace-tools to 0.18.2 for performance improvements diff --git a/package.json b/package.json index c6ff0d912..e139e1394 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@changesets/cli": "^2.18.0", "@rnx-kit/dep-check": "*", "cosmiconfig": "^7.0.0", - "lage": "~1.1.0", + "lage": "~1.5.0", "metro": "^0.66.2", "metro-config": "^0.66.2", "metro-core": "^0.66.2", diff --git a/packages/dep-check/package.json b/packages/dep-check/package.json index c3a87e49d..ef82f5399 100644 --- a/packages/dep-check/package.json +++ b/packages/dep-check/package.json @@ -47,7 +47,7 @@ "pacote": "^12.0.0", "prompts": "^2.4.0", "semver": "^7.0.0", - "workspace-tools": "^0.16.2", + "workspace-tools": "^0.18.2", "yargs": "^16.0.0" }, "eslintConfig": { diff --git a/packages/golang/package.json b/packages/golang/package.json index 37158968a..a7fefc2b4 100644 --- a/packages/golang/package.json +++ b/packages/golang/package.json @@ -26,7 +26,7 @@ "find-up": "^5.0.0", "got": "^11.8.2", "hasha": "^5.2.2", - "workspace-tools": "^0.16.2" + "workspace-tools": "^0.18.2" }, "devDependencies": { "@rnx-kit/eslint-config": "^0.0.1", diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index 125a4dca2..759da72cf 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -22,7 +22,7 @@ "dependencies": { "@rnx-kit/babel-preset-metro-react-native": "^1.0.17", "@rnx-kit/tools-node": "^1.2.6", - "workspace-tools": "^0.16.2" + "workspace-tools": "^0.18.2" }, "peerDependencies": { "metro-config": ">=0.58.0", diff --git a/packages/metro-config/test/__fixtures__/app-repo/package.json b/packages/metro-config/test/__fixtures__/app-repo/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/packages/metro-config/test/__fixtures__/app-repo/package.json @@ -0,0 +1 @@ +{} diff --git a/packages/metro-config/test/__fixtures__/app-repo/yarn.lock b/packages/metro-config/test/__fixtures__/app-repo/yarn.lock new file mode 100644 index 000000000..b0f317f26 --- /dev/null +++ b/packages/metro-config/test/__fixtures__/app-repo/yarn.lock @@ -0,0 +1 @@ +# `workspace-tools` 0.18+ determines repo root by looking for a lock file diff --git a/packages/metro-config/test/__fixtures__/awesome-repo/yarn.lock b/packages/metro-config/test/__fixtures__/awesome-repo/yarn.lock new file mode 100644 index 000000000..b0f317f26 --- /dev/null +++ b/packages/metro-config/test/__fixtures__/awesome-repo/yarn.lock @@ -0,0 +1 @@ +# `workspace-tools` 0.18+ determines repo root by looking for a lock file diff --git a/packages/metro-config/test/index.test.ts b/packages/metro-config/test/index.test.ts index b0812368c..1a28e3529 100644 --- a/packages/metro-config/test/index.test.ts +++ b/packages/metro-config/test/index.test.ts @@ -39,8 +39,8 @@ describe("@rnx-kit/metro-config", () => { afterEach(() => process.chdir(currentWorkingDir)); test("defaultWatchFolders() returns an empty list outside a monorepo", () => { - const root = process.platform === "win32" ? "C:\\" : "/"; - expect(defaultWatchFolders(root).length).toBe(0); + setFixture("app-repo"); + expect(defaultWatchFolders().length).toBe(0); }); test("defaultWatchFolders() returns packages in a monorepo", () => { diff --git a/scripts/package.json b/scripts/package.json index cf48b9635..5df1fa697 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -27,7 +27,7 @@ "markdown-table": "^2.0.0", "midgard-yarn": "^1.23.24", "typescript": "^4.0.0", - "workspace-tools": "^0.16.2", + "workspace-tools": "^0.18.2", "yargs": "^16.0.0" }, "devDependencies": { diff --git a/scripts/rnx-dep-check.js b/scripts/rnx-dep-check.js index b6289f658..17f83d5b9 100755 --- a/scripts/rnx-dep-check.js +++ b/scripts/rnx-dep-check.js @@ -57,7 +57,7 @@ module.exports = { }, "workspace-tools": { name: "workspace-tools", - version: "^0.16.2", + version: "^0.18.2", }, yargs: { name: "yargs", diff --git a/yarn.lock b/yarn.lock index ffadd0ca4..60ec95af7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2825,6 +2825,11 @@ resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.7.5.tgz#09fa51e356d07d0be200642b0e4f91d8e6dd408d" integrity sha512-V3BIhmY36fXZ1OtVcI9W+FxQqxVLsPKcNjWigIaa81dLC9IolJl5Mt4Cvhmr0flUnjSpTdrbMTSbXqYqV5dT6A== +"@xmldom/xmldom@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.1.tgz#70c239275fc6d6a84e41b9a8d623a93c0d59b6b4" + integrity sha512-4wOae+5N2RZ+CZXd9ZKwkaDi55IxrSTOjHpxTvQQ4fomtOJmqVxbmICA9jE1jvnqNhpfgz8cnfFagG86wV/xLQ== + "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" @@ -3182,11 +3187,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - azure-devops-node-api@^11.0.0: version "11.0.1" resolved "https://registry.yarnpkg.com/azure-devops-node-api/-/azure-devops-node-api-11.0.1.tgz#b7ec4783230e1de8fc972b23effe7ed2ebac17ff" @@ -3364,17 +3364,17 @@ backfill-config@^6.2.0: fs-extra "^8.1.0" pkg-dir "^4.2.0" -backfill-hasher@^6.2.6: - version "6.2.6" - resolved "https://registry.yarnpkg.com/backfill-hasher/-/backfill-hasher-6.2.6.tgz#751466f9413f94f10965c2e5fd682197d3eecd24" - integrity sha512-Gf8uMlTaCi+8GQwE1Zh9hOxzTFpSXK3ZBVu3/6pFnn4Esd0GjlQsISmEdOS8KE97UfHl0sbhk26a92FFQ0GuHw== +backfill-hasher@^6.2.9: + version "6.2.9" + resolved "https://registry.yarnpkg.com/backfill-hasher/-/backfill-hasher-6.2.9.tgz#720d341a954cb9374217d742b69f713044b3b33d" + integrity sha512-Fop5Yiu2oEbMHBseGLL3M49mhnj7rpMj2KsCDDTud7wHRiWWenqAqA9GQSG/wDkGeON567holsrZDYQasgv1Dw== dependencies: "@rushstack/package-deps-hash" "^2.4.48" backfill-config "^6.2.0" backfill-logger "^5.1.3" find-up "^5.0.0" fs-extra "^8.1.0" - workspace-tools "^0.15.0" + workspace-tools "^0.18.2" backfill-logger@^5.1.3: version "5.1.3" @@ -3393,15 +3393,15 @@ backfill-utils-dotenv@^5.1.1: dotenv "^8.1.0" find-up "^5.0.0" -backfill@^6.1.10: - version "6.1.10" - resolved "https://registry.yarnpkg.com/backfill/-/backfill-6.1.10.tgz#502c4d2574f6c7191ca607f100e17e31fbeee4c8" - integrity sha512-C7GEAdhhlg2yZ6Xb5yBsgUTaZdpM0htfxKRTYT6oma/D6FzsvZywfwdA/IgwPnsRv7+0DAC+FEe+l3mA13UOAA== +backfill@^6.1.13: + version "6.1.13" + resolved "https://registry.yarnpkg.com/backfill/-/backfill-6.1.13.tgz#75bc887f1afb5de7e57d39d8d3729f5e5727a1ac" + integrity sha512-74VSZqDHQsupKAk1Lg9UZvRwZXu7FPJi7Z5FQYI3pOZzRe7bZTCz0wcRiHcZOZNzPG9lNQg++LjBNDxZy6rq6A== dependencies: anymatch "^3.0.3" backfill-cache "^5.3.0" backfill-config "^6.2.0" - backfill-hasher "^6.2.6" + backfill-hasher "^6.2.9" backfill-logger "^5.1.3" backfill-utils-dotenv "^5.1.1" chokidar "^3.2.1" @@ -5087,14 +5087,6 @@ find-yarn-workspace-root2@1.2.16: micromatch "^4.0.2" pkg-dir "^4.2.0" -find-yarn-workspace-root@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz#40eb8e6e7c2502ddfaa2577c176f221422f860db" - integrity sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q== - dependencies: - fs-extra "^4.0.3" - micromatch "^3.1.4" - flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -5155,15 +5147,6 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^7.0.1, fs-extra@~7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -5182,16 +5165,6 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.0.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-minipass@^2.0.0, fs-minipass@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -6822,13 +6795,14 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -lage@~1.1.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/lage/-/lage-1.1.4.tgz#36cd8c8bbbba6b6d71dad04dbc9e0d6ea3216439" - integrity sha512-vbplWjvHTuIozgxS7EE3WeswgZIL+pN3I9wt7jilMDdzrc2kbnyLVxLrfJshoc9pdkbLIFJvbHfe6p1qHH9ubQ== +lage@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/lage/-/lage-1.5.0.tgz#8312a2d35aa74050e79a824b59d8ff18545b0bb3" + integrity sha512-j6Twoob5WgC9Gx1MFE3jU9QH1nc1IgdPskYOoMhbmhpTwMZjH5rdjQi1u4pXsogH0Q06OfIRj/fpZkvugP8EuQ== dependencies: + "@xmldom/xmldom" "^0.8.0" abort-controller "^3.0.0" - backfill "^6.1.10" + backfill "^6.1.13" backfill-cache "^5.3.0" backfill-config "^6.2.0" backfill-logger "^5.1.3" @@ -6843,7 +6817,7 @@ lage@~1.1.0: p-graph "^1.1.1" p-limit "^3.1.0" p-profiler "^0.2.1" - workspace-tools "^0.16.2" + workspace-tools "^0.18.2" yargs-parser "^18.1.3" leven@^3.1.0: @@ -10392,30 +10366,13 @@ word-wrap@^1.2.3, word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -workspace-tools@^0.15.0: - version "0.15.1" - resolved "https://registry.yarnpkg.com/workspace-tools/-/workspace-tools-0.15.1.tgz#895d4defe1417d7f4948b6afe9d36acf3a6cd64e" - integrity sha512-Thp+DVHkzjMF3JWWEc6VES04FhkE6QqZL7Dyknh1bJowjbAntXp6Op8/JuH0MYrww4AgQnuvB1O5waVrmsHtBg== +workspace-tools@^0.18.2: + version "0.18.2" + resolved "https://registry.yarnpkg.com/workspace-tools/-/workspace-tools-0.18.2.tgz#59753b5fb7c709f72250c8fbf5ccfe1903033a7d" + integrity sha512-XEW7VrD5XmYNLli89cHGQESf6Jgh45ELlKJQHbAAwd67XfC+Tf+hpJZ+GLFsKPIzJ+xIUvnJE6F71ScsMfu7KA== dependencies: "@yarnpkg/lockfile" "^1.1.0" find-up "^4.1.0" - find-yarn-workspace-root "^1.2.1" - fs-extra "^9.0.0" - git-url-parse "^11.1.2" - globby "^11.0.0" - jju "^1.4.0" - multimatch "^4.0.0" - read-yaml-file "^2.0.0" - -workspace-tools@^0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/workspace-tools/-/workspace-tools-0.16.2.tgz#b7355c811dcda648d12e92ceb89f8fccacca3901" - integrity sha512-Z/NHo4t39DUd50MdWiPfxICyVaCjWZc/xwZxE4a/n2nAQGgeYeg6GWBY1juULPi/BGSrjSVaDQfDCj/Y80033A== - dependencies: - "@yarnpkg/lockfile" "^1.1.0" - find-up "^4.1.0" - find-yarn-workspace-root "^1.2.1" - fs-extra "^9.0.0" git-url-parse "^11.1.2" globby "^11.0.0" jju "^1.4.0"