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

Add upgrade script for theme imports #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jamesricky
Copy link
Contributor

Description

For the changes made in vivid-planet/comet#3479

Further information

@jamesricky jamesricky self-assigned this Feb 24, 2025
@jamesricky jamesricky force-pushed the update-v8-theme-imports branch from e834212 to 23499cf Compare February 24, 2025 09:36
@jamesricky jamesricky marked this pull request as draft February 24, 2025 12:54
@jamesricky jamesricky removed the request for review from johnnyomair February 24, 2025 12:54
@jamesricky jamesricky force-pushed the update-v8-theme-imports branch from 23499cf to 21bff9b Compare February 24, 2025 13:03
@jamesricky jamesricky marked this pull request as ready for review February 25, 2025 14:31
Comment on lines +52 to +62
if (existsSync("admin/package.json")) {
const packageJson = new PackageJson("admin/package.json");
const themeVersion = packageJson.getDependencyVersion("@comet/admin-theme");
packageJson.removeDependency("@comet/admin-theme");

if (!packageJson.hasDependency("@comet/admin")) {
packageJson.addDependency("@comet/admin", themeVersion || "^8.0.0");
}

packageJson.save();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be done in a before-install script, otherwise the update of the Comet packages will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants