New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lerna-publisher

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lerna-publisher - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

20

cjs/cli.js

@@ -19,11 +19,15 @@ #!/usr/bin/env node

const { args } = commander_1.default;
const pathToProject = path_1.default.resolve(args[0]);
console.log('lerna-publisher starting in ' + pathToProject);
const result = publish_lerna_1.CheckAndPublishMonorepo(pathToProject).catch(printErrorAndExit);
if (result) {
console.log('Success');
async function runTheCommand() {
const pathToProject = path_1.default.resolve(args[0]);
console.log('lerna-publisher starting in ' + pathToProject);
const result = await publish_lerna_1.CheckAndPublishMonorepo(pathToProject).catch(printErrorAndExit);
if (result) {
console.log('Success');
}
else {
console.log('Failed');
}
process.exit(result ? 0 : 1);
}
else {
console.log('Failed');
}
runTheCommand();
function printErrorAndExit(message) {

@@ -30,0 +34,0 @@ console.error(message);

@@ -27,2 +27,3 @@ "use strict";

async function publishIfRequired(pathToFolder, pkgJsonContent) {
let result = true;
const pjson = pkgJsonContent;

@@ -46,5 +47,5 @@ const opts = {

console.log('<<>>Do publish on:' + pathToFolder);
await runPublishCommand(pathToFolder);
result = await runPublishCommand(pathToFolder);
}
return 0;
return result;
}

@@ -56,4 +57,5 @@ async function CheckAndPublishMonorepo(pathToProject) {

console.log('Checking package: ' + entry.location);
await publishIfRequired(entry.location, entry.package);
retVal = true;
if (await publishIfRequired(entry.location, entry.package)) {
retVal = true;
}
}

@@ -60,0 +62,0 @@ return retVal;

2

package.json
{
"name": "lerna-publisher",
"description": "Utility to publish lerna/yarn/workspace types of packages from ci to npm",
"version": "1.0.4",
"version": "1.0.5",
"main": "cjs/index.js",

@@ -6,0 +6,0 @@ "bin": {

@@ -22,11 +22,16 @@ #!/usr/bin/env node

const pathToProject = path.resolve(args[0])
console.log('lerna-publisher starting in ' + pathToProject)
const result = CheckAndPublishMonorepo(pathToProject).catch(printErrorAndExit)
if (result) {
console.log('Success')
} else {
console.log('Failed')
async function runTheCommand(){
const pathToProject = path.resolve(args[0])
console.log('lerna-publisher starting in ' + pathToProject)
const result = await CheckAndPublishMonorepo(pathToProject).catch(printErrorAndExit)
if ( result) {
console.log('Success')
} else {
console.log('Failed')
}
process.exit( result ? 0 : 1 )
}
runTheCommand()
function printErrorAndExit(message: unknown) {

@@ -33,0 +38,0 @@ console.error(message)

@@ -15,3 +15,2 @@ import * as semver from 'semver'

}
return retVal

@@ -21,2 +20,3 @@ }

async function publishIfRequired(pathToFolder: string, pkgJsonContent: {name: string, version: string}) {
let result = true
const pjson = pkgJsonContent

@@ -40,6 +40,6 @@ const opts = {

console.log('<<>>Do publish on:' + pathToFolder)
await runPublishCommand(pathToFolder)
result = await runPublishCommand(pathToFolder)
}
return 0
return result
}

@@ -52,6 +52,7 @@

console.log('Checking package: ' + entry.location)
await publishIfRequired(entry.location, entry.package)
retVal = true
if ( await publishIfRequired(entry.location, entry.package) ){
retVal = true
}
}
return retVal
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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