@alcalzone/release-script-plugin-package
Advanced tools
Comparing version 3.5.0-beta.0 to 3.5.0-beta.3
@@ -150,9 +150,23 @@ "use strict"; | ||
.map((line) => JSON.parse(line)) | ||
.filter((info) => info.location !== ".") | ||
.map((info) => info.name); | ||
.filter((info) => info.location !== "."); | ||
// Work around https://github.com/yarnpkg/berry/issues/3868 | ||
const packageJsonFiles = [".", ...changedPackages.map((info) => info.location)].map((loc) => path_1.default.join(context.cwd, loc, "package.json")); | ||
const deleteStableVersions = async () => { | ||
for (const packPath of packageJsonFiles) { | ||
try { | ||
const pack = await fs_extra_1.default.readJSON(packPath); | ||
delete pack.stableVersion; | ||
await fs_extra_1.default.writeJSON(packPath, pack, { spaces: 2 }); | ||
} | ||
catch { | ||
// ignore | ||
} | ||
} | ||
}; | ||
if (context.argv.dryRun) { | ||
context.cli.log(`Dry run, would update monorepo version from ${context.cli.colors.blue(pack.version)} to ${context.cli.colors.green(newVersion)}. The following packages would be updated:${context.cli.colors.blue(changedPackages.map((info) => `\n¡ ${info}`).join(""))}`); | ||
context.cli.log(`Dry run, would update monorepo version from ${context.cli.colors.blue(pack.version)} to ${context.cli.colors.green(newVersion)}. The following packages would be updated:${context.cli.colors.blue(changedPackages.map((info) => `\n¡ ${info.name}`).join(""))}`); | ||
} | ||
else { | ||
context.cli.log(`updating package.json version from ${context.cli.colors.blue(pack.version)} to ${context.cli.colors.green(newVersion)}. The following packages will be updated:${context.cli.colors.blue(changedPackages.map((info) => `\n¡ ${info}`).join(""))}`); | ||
context.cli.log(`updating package.json version from ${context.cli.colors.blue(pack.version)} to ${context.cli.colors.green(newVersion)}. The following packages will be updated:${context.cli.colors.blue(changedPackages.map((info) => `\n¡ ${info.name}`).join(""))}`); | ||
await deleteStableVersions(); | ||
const commands = [ | ||
@@ -174,2 +188,3 @@ [ | ||
} | ||
await deleteStableVersions(); | ||
} | ||
@@ -176,0 +191,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "3.5.0-beta.0", | ||
"version": "3.5.0-beta.3", | ||
"description": "Plugin for Al Calzone's release script: npm package files", | ||
@@ -64,4 +64,3 @@ "keywords": [], | ||
}, | ||
"readmeFilename": "README.md", | ||
"stableVersion": "3.4.3" | ||
"readmeFilename": "README.md" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23156
248