Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@backstage/cli-common

Package Overview
Dependencies
Maintainers
3
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@backstage/cli-common - npm Package Compare versions

Comparing version 0.1.13 to 0.1.14-next.0

6

CHANGELOG.md
# @backstage/cli-common
## 0.1.14-next.0
### Patch Changes
- 142abb0: The monorepo root check in `findPaths` will now accept a shorthand `workspaces` config in `package.json`, no longer requiring `workspaces.packages`.
## 0.1.13

@@ -4,0 +10,0 @@

22

dist/index.cjs.js
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var fs = require('fs');
var path = require('path');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);

@@ -16,3 +14,3 @@ function findRootPath(searchDir, filterFunc) {

const packagePath = path.resolve(path$1, "package.json");
const exists = fs__default["default"].existsSync(packagePath);
const exists = fs__default.default.existsSync(packagePath);
if (exists && filterFunc(packagePath)) {

@@ -41,3 +39,3 @@ return path$1;

function findOwnRootDir(ownDir) {
const isLocal = fs__default["default"].existsSync(path.resolve(ownDir, "src"));
const isLocal = fs__default.default.existsSync(path.resolve(ownDir, "src"));
if (!isLocal) {

@@ -52,3 +50,3 @@ throw new Error(

const ownDir = findOwnDir(searchDir);
const targetDir = fs__default["default"].realpathSync(process.cwd()).replace(/^[a-z]:/, (str) => str.toLocaleUpperCase("en-US"));
const targetDir = fs__default.default.realpathSync(process.cwd()).replace(/^[a-z]:/, (str) => str.toLocaleUpperCase("en-US"));
let ownRoot = "";

@@ -63,10 +61,8 @@ const getOwnRoot = () => {

const getTargetRoot = () => {
var _a;
if (!targetRoot) {
targetRoot = (_a = findRootPath(targetDir, (path) => {
var _a2;
targetRoot = findRootPath(targetDir, (path) => {
try {
const content = fs__default["default"].readFileSync(path, "utf8");
const content = fs__default.default.readFileSync(path, "utf8");
const data = JSON.parse(content);
return Boolean((_a2 = data.workspaces) == null ? void 0 : _a2.packages);
return Boolean(data.workspaces);
} catch (error) {

@@ -77,3 +73,3 @@ throw new Error(

}
})) != null ? _a : targetDir;
}) ?? targetDir;
}

@@ -80,0 +76,0 @@ return targetRoot;

@@ -47,2 +47,2 @@ /**

export { BACKSTAGE_JSON, Paths, ResolveFunc, findPaths, isChildPath };
export { BACKSTAGE_JSON, type Paths, type ResolveFunc, findPaths, isChildPath };
{
"name": "@backstage/cli-common",
"version": "0.1.14-next.0",
"description": "Common functionality used by cli, backend, and create-app",
"version": "0.1.13",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"backstage": {
"role": "node-library"
},
"publishConfig": {

@@ -12,5 +13,5 @@ "access": "public",

},
"backstage": {
"role": "node-library"
},
"keywords": [
"backstage"
],
"homepage": "https://backstage.io",

@@ -22,22 +23,21 @@ "repository": {

},
"keywords": [
"backstage"
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"license": "Apache-2.0",
"scripts": {
"build": "backstage-cli package build",
"clean": "backstage-cli package clean",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"prepack": "backstage-cli package prepack",
"postpack": "backstage-cli package postpack",
"clean": "backstage-cli package clean",
"start": "backstage-cli package start"
"start": "backstage-cli package start",
"test": "backstage-cli package test"
},
"devDependencies": {
"@backstage/cli": "^0.23.0",
"@backstage/cli": "^0.26.7-next.3",
"@types/node": "^18.17.8"
},
"files": [
"dist"
]
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc