-
Notifications
You must be signed in to change notification settings - Fork 13
chore: auto-upgrade demo strapi #110
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
base: main
Are you sure you want to change the base?
Conversation
Convly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the issue with using latest here?
@Convly - The exact version is still pinned into the pnpm lock file, hiding the actual installed version from our eyes (since the lock file is long, GH previews are usually disabled by default). |
|
going off @Convly 's comment, how about we keep it |
9c82477 to
6372eb5
Compare
| - name: Get current version from package.json | ||
| id: current-version | ||
| run: | | ||
| CURRENT_VERSION=$(node -p "require('./demo/.strapi-app/package.json').dependencies['@strapi/strapi']") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With exact version being listed in package.json, it allows the action to use it as state and derive the comparison from it.
If we go back to latest, we'd have to either:
pnpm installthenpnpm up ...@latestthen, look into thenode_modules/@strapi/strapi/package.jsonto observe a diff, then conditionally make the PR.- Rely on reading the lock file with a regex to match the @strapi/strapi version declaration, which I find clunky
@Convly @innerdvations can you detail the rationale/preference behind keeping latest instead of a pinned version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no strong opinion here, but I think I have to agree with Nico here regarding pinned versions in package.json
Having explicit versions in the diff makes it much easier to see what actually changed. It’s valuable for debugging and for understanding compatibility issues across both sides.
That said, I’d also suggest running the update job more frequently than once a week on Wednesday. We sometimes release on Thursdays, and we occasionally ship hotfixes as well. A more frequent schedule (e.g. daily ) would keep the example app synced much more reliably and reduce the lag between Strapi releases and the example’s updates.
chore: update demo strapi-app to latest
6372eb5 to
bb58b19
Compare
What does it do?
demo/.strapi-appstrapi version to 5.31.0Why is it needed?
How to test it?
Launch demo app:
cd demo/.strapi-app && pnpm i && pnpm developRelated issue(s)/PR(s)