Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update no longer fail when deprecated plugins exist #157

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions commands/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,18 @@ export default async function update(options) {
const remoteDependencies = await getRemoteDependencies();

const outdatedPackages = pluginPackages
.map(({ name, version }) => ({
name,
version,
remoteVersion: remoteDependencies[name],
outdated: compareVersions.compare(cleanVersion(remoteDependencies[name]), cleanVersion(version), ">")
}))
.map(({ name, version }) => {
const remoteDependency = remoteDependencies[name];
if (remoteDependency === undefined) {
Logger.warn(`Plugin ${name} used by the local project has been officially deprecated.`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just kike Brent suggested

Suggested change
Logger.warn(`Plugin ${name} used by the local project has been officially deprecated.`);
Logger.warn(`We were unable to find ${name} to update`);

}
return {
name,
version,
remoteVersion: remoteDependencies[name],
outdated: remoteDependency && compareVersions.compare(cleanVersion(remoteDependency), cleanVersion(version), ">")
};
})
.filter(({ outdated }) => outdated);

if (outdatedPackages.length === 0) {
Expand Down