From 5fea9a117691bef20aa22fbd107522d43b8b1b62 Mon Sep 17 00:00:00 2001 From: Patrick Sullivan Date: Sat, 18 Nov 2023 17:39:20 -0500 Subject: [PATCH] fix(workspace-tools): Resolved issue with order of package.json search in tsup executor --- README.md | 1 + packages/create-storm-workspace/README.md | 2 +- packages/git-tools/README.md | 2 +- packages/linting-tools/README.md | 2 +- packages/testing-tools/README.md | 2 +- packages/workspace-tools/README.md | 2 +- .../preset/files/README.md.template | 5 ++-- .../README.header.md.template | 3 +- patches/tsup@7.2.0.patch | 30 ++++++++++--------- pnpm-lock.yaml | 6 ++-- 10 files changed, 30 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 916b0c135..68498079d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@
+
Website | Contact | Repository | Documentation | Report a Bug | Request a Feature | Ask a Question
diff --git a/packages/create-storm-workspace/README.md b/packages/create-storm-workspace/README.md index cc5d46708..ebcbc1965 100644 --- a/packages/create-storm-workspace/README.md +++ b/packages/create-storm-workspace/README.md @@ -15,7 +15,7 @@ This package is part of the ⚡Storm-Ops monorepo. The Storm-Ops packages

💻 Visit stormsoftware.org to stay up to date with this developer


-[![Version](https://img.shields.io/badge/version-1.6.56-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  +[![Version](https://img.shields.io/badge/version-1.7.19-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)

⚠️ Attention ⚠️ - This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.


diff --git a/packages/git-tools/README.md b/packages/git-tools/README.md index 90e3e09bd..aff75f7d7 100644 --- a/packages/git-tools/README.md +++ b/packages/git-tools/README.md @@ -15,7 +15,7 @@ This package is part of the ⚡Storm-Ops monorepo. The Storm-Ops packages

💻 Visit stormsoftware.org to stay up to date with this developer


-[![Version](https://img.shields.io/badge/version-1.2.34-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  +[![Version](https://img.shields.io/badge/version-1.2.41-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)

⚠️ Attention ⚠️ - This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.


diff --git a/packages/linting-tools/README.md b/packages/linting-tools/README.md index 14088b93d..9c7fcc4ab 100644 --- a/packages/linting-tools/README.md +++ b/packages/linting-tools/README.md @@ -15,7 +15,7 @@ This package is part of the ⚡Storm-Ops monorepo. The Storm-Ops packages

💻 Visit stormsoftware.org to stay up to date with this developer


-[![Version](https://img.shields.io/badge/version-1.3.30-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  +[![Version](https://img.shields.io/badge/version-1.3.37-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)

⚠️ Attention ⚠️ - This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.


diff --git a/packages/testing-tools/README.md b/packages/testing-tools/README.md index 0ef2f17de..7d33361e2 100644 --- a/packages/testing-tools/README.md +++ b/packages/testing-tools/README.md @@ -15,7 +15,7 @@ This package is part of the ⚡Storm-Ops monorepo. The Storm-Ops packages

💻 Visit stormsoftware.org to stay up to date with this developer


-[![Version](https://img.shields.io/badge/version-1.1.22-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  +[![Version](https://img.shields.io/badge/version-1.1.28-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)

⚠️ Attention ⚠️ - This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.


diff --git a/packages/workspace-tools/README.md b/packages/workspace-tools/README.md index bf7f7c0e2..66e6a3beb 100644 --- a/packages/workspace-tools/README.md +++ b/packages/workspace-tools/README.md @@ -15,7 +15,7 @@ This package is part of the ⚡Storm-Ops monorepo. The Storm-Ops packages

💻 Visit stormsoftware.org to stay up to date with this developer


-[![Version](https://img.shields.io/badge/version-1.6.56-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  +[![Version](https://img.shields.io/badge/version-1.7.19-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)

⚠️ Attention ⚠️ - This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.


diff --git a/packages/workspace-tools/src/generators/preset/files/README.md.template b/packages/workspace-tools/src/generators/preset/files/README.md.template index a223fa585..6cceece13 100644 --- a/packages/workspace-tools/src/generators/preset/files/README.md.template +++ b/packages/workspace-tools/src/generators/preset/files/README.md.template @@ -1,11 +1,12 @@
+
Website | Contact | Repository | Report a Bug | Request a Feature | Request Documentation | Ask a Question

-

Storm's <%= name %> Monorepo

+

<%= name %>

<%= description %>

Storm Workspaces are built using Nx, a set of extensible dev tools for monorepos, which helps you develop like Google, Facebook, and Microsoft. Building on top of Nx, the Open System provides a set of tools and patterns that help you scale your monorepo to many teams while keeping the codebase maintainable. @@ -14,7 +15,7 @@ [![github](https://img.shields.io/github/package-json/v/<%= namespace %>/<%= name %>?style=for-the-badge&color=1fb2a6)](https://github.com/<%= namespace %>/<%= name %>) [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) ![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/<%= namespace %>/<%= name %>/build-release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6) -

⚠️ Attention ⚠️ - This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.


+

⚠️ Attention ⚠️ This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.


diff --git a/packages/workspace-tools/src/generators/preset/files/docs/readme-templates/README.header.md.template b/packages/workspace-tools/src/generators/preset/files/docs/readme-templates/README.header.md.template index 0ac549b5e..0cf648cb0 100644 --- a/packages/workspace-tools/src/generators/preset/files/docs/readme-templates/README.header.md.template +++ b/packages/workspace-tools/src/generators/preset/files/docs/readme-templates/README.header.md.template @@ -1,5 +1,6 @@
+
Website | Contact | Repository | Documentation | Report a Bug | Request a Feature | Request Documentation | Ask a Question
@@ -13,4 +14,4 @@ This package is part of the ⚡<%= name %> monorepo. The <%= name %> pack [![Version](https://img.shields.io/badge/version--1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/) [![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/) ![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6) [![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6) -

⚠️ Attention ⚠️ - This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.


+

⚠️ Attention ⚠️ This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.


diff --git a/patches/tsup@7.2.0.patch b/patches/tsup@7.2.0.patch index 15830cb23..05f5f4ecf 100644 --- a/patches/tsup@7.2.0.patch +++ b/patches/tsup@7.2.0.patch @@ -1,8 +1,8 @@ diff --git a/dist/index.js b/dist/index.js -index 68c197cb2b8dfa928a448475b4020e7301da959e..cc92650d617929522ea8895220f5a88340cf70f6 100644 +index 68c197cb2b8dfa928a448475b4020e7301da959e..1582e5270ea13dde43abef6456dae8f082b07dc9 100644 --- a/dist/index.js +++ b/dist/index.js -@@ -1605,8 +1605,35 @@ async function runEsbuild(options, { +@@ -1605,8 +1605,37 @@ async function runEsbuild(options, { buildDependencies, pluginContainer }) { @@ -16,16 +16,18 @@ index 68c197cb2b8dfa928a448475b4020e7301da959e..cc92650d617929522ea8895220f5a883 + if (pkgPath) { + const splits = pkgPath.split(_path2.default.sep); + if (splits.length > 0) { -+ const pkgPathIndex = splits.slice(0, -+ splits.length).reverse() -+ .findIndex((split, index) => { -+ const packageJsonPath = _path2.default.join(splits.slice(0, -+ index).join(_path2.default.sep), -+ "package.json"); -+ logger.info(format, `⚡ Searching for package.json file in ${packageJsonPath}`); ++ let pkgPathIndex = -1; ++ for (let i = splits.length - 1; i >= 0 && pkgPathIndex < 0; i--) { ++ const packageJsonPath = _path2.default.join(splits.slice(0, ++ splits.length - i).join(_path2.default.sep), ++ "package.json"); ++ logger.info(format, `⚡ Searching for package.json file in ${packageJsonPath}`); + -+ return existsSync(packageJsonPath); -+ }); ++ if (_fs2.default.existsSync(packageJsonPath)) { ++ logger.info(format, `⚡ Found the package.json file in ${packageJsonPath} (index: ${i})`); ++ pkgPathIndex = i; ++ } ++ } + + logger.info(format, `⚡ Package path index: ${pkgPathIndex}`); + if (pkgPathIndex) { @@ -40,7 +42,7 @@ index 68c197cb2b8dfa928a448475b4020e7301da959e..cc92650d617929522ea8895220f5a883 const external = [ // Exclude dependencies, e.g. `lodash`, `lodash/get` ...deps.map((dep) => new RegExp(`^${dep}($|\\/|\\\\)`)), -@@ -1676,7 +1703,7 @@ async function runEsbuild(options, { +@@ -1676,7 +1705,7 @@ async function runEsbuild(options, { jsxFragment: options.jsxFragment, sourcemap: options.sourcemap ? "external" : false, target: options.target, @@ -49,7 +51,7 @@ index 68c197cb2b8dfa928a448475b4020e7301da959e..cc92650d617929522ea8895220f5a883 footer, tsconfig: options.tsconfig, loader: { -@@ -1727,7 +1754,7 @@ async function runEsbuild(options, { +@@ -1727,7 +1756,7 @@ async function runEsbuild(options, { outExtension: options.legacyOutput ? void 0 : outExtension, write: false, splitting, @@ -58,7 +60,7 @@ index 68c197cb2b8dfa928a448475b4020e7301da959e..cc92650d617929522ea8895220f5a883 minify: options.minify === "terser" ? false : options.minify, minifyWhitespace: options.minifyWhitespace, minifyIdentifiers: options.minifyIdentifiers, -@@ -2052,6 +2079,7 @@ var sizeReporter = () => { +@@ -2052,6 +2081,7 @@ var sizeReporter = () => { // src/plugins/tree-shaking.ts var import_rollup_plugin_hashbang = _chunkB7UJSB4Njs.__toESM.call(void 0, _chunk52KWB5QBjs.require_dist.call(void 0, )); var _rollup = require('rollup'); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3befdadd1..b6f20b363 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,7 +19,7 @@ patchedDependencies: hash: sdh76cbs3s6gimrygngciaff4a path: patches/semantic-release@22.0.7.patch tsup@7.2.0: - hash: dmhzqdla54qrasadq46t5rzvuy + hash: z3tis5v4h7ndwlym3qhvzntqku path: patches/tsup@7.2.0.patch importers: @@ -512,7 +512,7 @@ importers: version: 2.6.2 tsup: specifier: 7.2.0 - version: 7.2.0(patch_hash=dmhzqdla54qrasadq46t5rzvuy)(@swc/core@1.3.96)(ts-node@10.9.1)(typescript@5.2.2) + version: 7.2.0(patch_hash=z3tis5v4h7ndwlym3qhvzntqku)(@swc/core@1.3.96)(ts-node@10.9.1)(typescript@5.2.2) packages: /@aashutoshrathi/word-wrap@1.2.6: @@ -19908,7 +19908,7 @@ packages: engines: { node: ">=0.6.x" } dev: false - /tsup@7.2.0(patch_hash=dmhzqdla54qrasadq46t5rzvuy)(@swc/core@1.3.96)(ts-node@10.9.1)(typescript@5.2.2): + /tsup@7.2.0(patch_hash=z3tis5v4h7ndwlym3qhvzntqku)(@swc/core@1.3.96)(ts-node@10.9.1)(typescript@5.2.2): resolution: { integrity: sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==