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

feat: compatibility endpoint #1212

Merged
merged 40 commits into from
Nov 27, 2023
Merged

feat: compatibility endpoint #1212

merged 40 commits into from
Nov 27, 2023

Conversation

eemmiillyy
Copy link
Contributor

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 6, 2023

🦋 Changeset detected

Latest commit: 91d1e30

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@xata.io/cli Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

size-limit report 📦

Path Size
packages/client/dist/index.mjs 15.77 KB (0%)
packages/client/dist/index.cjs 16.9 KB (0%)
packages/codegen/dist/index.mjs 1.95 MB (0%)
packages/codegen/dist/index.cjs 1.95 MB (0%)

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Your pull request has been published to npm.

You can install @xata.io/client by running:

npm install @xata.io/[email protected]

Other packages are published like this:

npm install @xata.io/[email protected]

To test the CLI, run:

npx @xata.io/[email protected]

@eemmiillyy eemmiillyy marked this pull request as ready for review October 9, 2023 13:24
@eemmiillyy eemmiillyy requested a review from a team as a code owner October 9, 2023 13:24
cli/package.json Outdated Show resolved Hide resolved
@eemmiillyy eemmiillyy requested a review from SferaDev October 10, 2023 08:10
compatibility.json Outdated Show resolved Hide resolved
}) => {
const { pkg, compatibilityObj } = params;
const currentVersion = semver.coerce(params.currentVersion)?.version as string;
const updateAvailable = semver.lt(currentVersion, compatibilityObj[pkg].latest);
Copy link
Contributor Author

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.

Signed-off-by: Alexis Rico <[email protected]>
Signed-off-by: Alexis Rico <[email protected]>
Signed-off-by: Alexis Rico <[email protected]>
@eemmiillyy eemmiillyy added this pull request to the merge queue Nov 27, 2023
Merged via the queue into main with commit 1348a7f Nov 27, 2023
6 checks passed
@eemmiillyy eemmiillyy deleted the feat/compatibility-endpoint branch November 27, 2023 09:07
@xata-bot xata-bot mentioned this pull request Nov 27, 2023
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.

Check for compatibility semver version
2 participants