@backstage/cli-node
Advanced tools
+15
-2
| # @backstage/cli-node | ||
| ## 0.0.0-nightly-20260227031022 | ||
| ## 0.0.0-nightly-20260304030634 | ||
@@ -11,7 +11,20 @@ ### Patch Changes | ||
| - 3c811bf: Added `hasBackstageYarnPlugin` and `SuccessCache` exports, moved from `@backstage/cli`. | ||
| - a9d23c4: Properly support `package.json` `workspaces` field | ||
| - Updated dependencies | ||
| - @backstage/cli-common@0.0.0-nightly-20260227031022 | ||
| - @backstage/cli-common@0.0.0-nightly-20260304030634 | ||
| - @backstage/errors@1.2.7 | ||
| - @backstage/types@1.2.2 | ||
| ## 0.2.19-next.1 | ||
| ### Patch Changes | ||
| - 61cb976: Added `toString()` method to `Lockfile` for serializing lockfiles back to string format. | ||
| - 3c811bf: Added `hasBackstageYarnPlugin` and `SuccessCache` exports, moved from `@backstage/cli`. | ||
| - a9d23c4: Properly support `package.json` `workspaces` field | ||
| - Updated dependencies | ||
| - @backstage/cli-common@0.2.0-next.1 | ||
| - @backstage/errors@1.2.7 | ||
| - @backstage/types@1.2.2 | ||
| ## 0.2.19-next.0 | ||
@@ -18,0 +31,0 @@ |
+4
-1
@@ -103,4 +103,7 @@ import { Package } from '@manypkg/get-packages'; | ||
| /** | ||
| * Returns try if the current project is a monorepo. | ||
| * Returns true if the current project is a monorepo. | ||
| * | ||
| * Uses a simple presence check on the `workspaces` field. Empty or invalid | ||
| * workspace config is treated as a monorepo; we do not validate patterns. | ||
| * | ||
| * @public | ||
@@ -107,0 +110,0 @@ */ |
@@ -14,3 +14,3 @@ 'use strict'; | ||
| const pkg = await fs__default.default.readJson(rootPackageJsonPath); | ||
| return Boolean(pkg?.workspaces?.packages); | ||
| return Boolean(pkg?.workspaces); | ||
| } catch (error) { | ||
@@ -17,0 +17,0 @@ return false; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"isMonoRepo.cjs.js","sources":["../../src/monorepo/isMonoRepo.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { targetPaths } from '@backstage/cli-common';\nimport fs from 'fs-extra';\n\n/**\n * Returns try if the current project is a monorepo.\n *\n * @public\n */\nexport async function isMonoRepo(): Promise<boolean> {\n const rootPackageJsonPath = targetPaths.resolveRoot('package.json');\n try {\n const pkg = await fs.readJson(rootPackageJsonPath);\n return Boolean(pkg?.workspaces?.packages);\n } catch (error) {\n return false;\n }\n}\n"],"names":["targetPaths","fs"],"mappings":";;;;;;;;;AAwBA,eAAsB,UAAA,GAA+B;AACnD,EAAA,MAAM,mBAAA,GAAsBA,qBAAA,CAAY,WAAA,CAAY,cAAc,CAAA;AAClE,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,MAAMC,mBAAA,CAAG,QAAA,CAAS,mBAAmB,CAAA;AACjD,IAAA,OAAO,OAAA,CAAQ,GAAA,EAAK,UAAA,EAAY,QAAQ,CAAA;AAAA,EAC1C,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,KAAA;AAAA,EACT;AACF;;;;"} | ||
| {"version":3,"file":"isMonoRepo.cjs.js","sources":["../../src/monorepo/isMonoRepo.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { targetPaths } from '@backstage/cli-common';\nimport fs from 'fs-extra';\n\n/**\n * Returns true if the current project is a monorepo.\n *\n * Uses a simple presence check on the `workspaces` field. Empty or invalid\n * workspace config is treated as a monorepo; we do not validate patterns.\n *\n * @public\n */\nexport async function isMonoRepo(): Promise<boolean> {\n const rootPackageJsonPath = targetPaths.resolveRoot('package.json');\n try {\n const pkg = await fs.readJson(rootPackageJsonPath);\n return Boolean(pkg?.workspaces);\n } catch (error) {\n return false;\n }\n}\n"],"names":["targetPaths","fs"],"mappings":";;;;;;;;;AA2BA,eAAsB,UAAA,GAA+B;AACnD,EAAA,MAAM,mBAAA,GAAsBA,qBAAA,CAAY,WAAA,CAAY,cAAc,CAAA;AAClE,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,MAAMC,mBAAA,CAAG,QAAA,CAAS,mBAAmB,CAAA;AACjD,IAAA,OAAO,OAAA,CAAQ,KAAK,UAAU,CAAA;AAAA,EAChC,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,KAAA;AAAA,EACT;AACF;;;;"} |
+5
-5
| { | ||
| "name": "@backstage/cli-node", | ||
| "version": "0.0.0-nightly-20260227031022", | ||
| "version": "0.0.0-nightly-20260304030634", | ||
| "description": "Node.js library for Backstage CLIs", | ||
@@ -34,3 +34,3 @@ "backstage": { | ||
| "dependencies": { | ||
| "@backstage/cli-common": "0.0.0-nightly-20260227031022", | ||
| "@backstage/cli-common": "0.0.0-nightly-20260304030634", | ||
| "@backstage/errors": "1.2.7", | ||
@@ -47,5 +47,5 @@ "@backstage/types": "1.2.2", | ||
| "devDependencies": { | ||
| "@backstage/backend-test-utils": "0.0.0-nightly-20260227031022", | ||
| "@backstage/cli": "0.0.0-nightly-20260227031022", | ||
| "@backstage/test-utils": "0.0.0-nightly-20260227031022", | ||
| "@backstage/backend-test-utils": "0.0.0-nightly-20260304030634", | ||
| "@backstage/cli": "0.0.0-nightly-20260304030634", | ||
| "@backstage/test-utils": "0.0.0-nightly-20260304030634", | ||
| "@types/yarnpkg__lockfile": "^1.1.4" | ||
@@ -52,0 +52,0 @@ }, |
135742
0.56%1345
0.22%+ Added
- Removed