Revert most changes

Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
This commit is contained in:
Gabriel Dugny
2026-02-22 17:00:06 +01:00
parent b2d9d78c27
commit 0e5fd0fd27
11 changed files with 18 additions and 152 deletions
+3 -3
View File
@@ -20,7 +20,6 @@ const crypto = require('node:crypto');
const glob = require('node:util').promisify(require('glob'));
const { version } = require('../package.json');
const paths = require('@backstage/cli-common').findPaths(process.cwd());
const { getWorkspacesPatterns } = require('@backstage/cli-common');
const {
getJestEnvironment,
getJestMajorVersion,
@@ -337,10 +336,11 @@ async function getRootConfig() {
rejectFrontendNetworkRequests,
};
const workspacePatterns = getWorkspacesPatterns(rootPkgJson);
const ws = rootPkgJson.workspaces;
const workspacePatterns = Array.isArray(ws) ? ws : ws?.packages;
// Check if we're running within a specific monorepo package. In that case just get the single project config.
if (workspacePatterns.length === 0 || paths.targetRoot !== paths.targetDir) {
if (!workspacePatterns || paths.targetRoot !== paths.targetDir) {
return getProjectConfig(
paths.targetDir,
{