-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: compatibility endpoint #1212
Conversation
🦋 Changeset detectedLatest commit: 91d1e30 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
Your pull request has been published to npm. You can install @xata.io/client by running:
Other packages are published like this:
To test the CLI, run:
|
cli/src/hooks/init/compatibility.ts
Outdated
}) => { | ||
const { pkg, compatibilityObj } = params; | ||
const currentVersion = semver.coerce(params.currentVersion)?.version as string; | ||
const updateAvailable = semver.lt(currentVersion, compatibilityObj[pkg].latest); |
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.
If the user is using version ^1.1.1 and the newest version is 1.1.2 they will still see an update available log.
Co-authored-by: Alexis Rico <[email protected]>
Signed-off-by: Alexis Rico <[email protected]>
Signed-off-by: Alexis Rico <[email protected]>
Signed-off-by: Alexis Rico <[email protected]>
Signed-off-by: Alexis Rico <[email protected]>
Signed-off-by: Alexis Rico <[email protected]>
Signed-off-by: Alexis Rico <[email protected]>
This PR checks the current CLI version running. If it is not semver compatible with our list of versions then an error is thrown. If it is not the latest version then we show a warning that a new version is available.
Resolves #1207