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

@alcalzone/release-script-plugin-package

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alcalzone/release-script-plugin-package - npm Package Compare versions

Comparing version 3.7.0 to 3.7.3

32

build/index.js

@@ -38,2 +38,10 @@ "use strict";

}
async function getYarnVersion(context) {
const { stdout: output } = await context.sys.exec("yarn", ["--version"], { cwd: context.cwd });
const version = output.trim();
if (!semver_1.default.valid(version)) {
context.cli.fatal(`Invalid yarn version "${version}"`);
}
return version;
}
class PackagePlugin {

@@ -91,2 +99,3 @@ constructor() {

if (await fs_extra_1.default.pathExists(yarnRcPath)) {
const yarnVersion = await getYarnVersion(context);
const yarnRc = await fs_extra_1.default.readFile(yarnRcPath, "utf8");

@@ -104,6 +113,11 @@ const yarnPlugins = yarnRc

const requiredPlugins = {
"workspace-tools": "workspace-tools",
version: "version",
changed: "https://github.com/Dcard/yarn-plugins/releases/latest/download/plugin-changed.js",
};
if (semver_1.default.lt(yarnVersion, "4.0.0")) {
// Yarn v4 includes these plugins by default
Object.assign(requiredPlugins, {
"workspace-tools": "workspace-tools",
version: "version",
});
}
const missingPlugins = Object.keys(requiredPlugins).filter((plugin) => !yarnPlugins.includes(plugin));

@@ -119,2 +133,3 @@ // context.cli.log(`Installed yarn plugins: ${yarnPlugins.join(", ")}`);

context.setData("monorepo", "yarn");
context.setData("yarn_version", yarnVersion);
// One last check: make sure there is anything to publish

@@ -216,5 +231,15 @@ // We cannot use getEffectivePublishAllFlag here without introducing a circular dependency

await deleteStableVersions();
const yarnGte4 = context.hasData("yarn_version") &&
semver_1.default.gte(context.getData("yarn_version"), "4.0.0");
const commands = [
publishAll
? ["yarn", "workspaces", "foreach", "version", newVersion, "--deferred"]
? [
"yarn",
"workspaces",
"foreach",
...(yarnGte4 ? ["--all"] : []),
"version",
newVersion,
"--deferred",
]
: [

@@ -224,2 +249,3 @@ "yarn",

"foreach",
...(yarnGte4 ? ["--all"] : []),
`--git-range=v${pack.version}`,

@@ -226,0 +252,0 @@ "version",

2

package.json

@@ -6,3 +6,3 @@ {

},
"version": "3.7.0",
"version": "3.7.3",
"description": "Plugin for Al Calzone's release script: npm package files",

@@ -9,0 +9,0 @@ "keywords": [],

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