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

tests/browser.migration: compare version parts as numbers not strings #8767

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

alxndrsn
Copy link
Member

@alxndrsn alxndrsn commented Oct 5, 2023

Current master implementation:

> versionGte('PouchDB v9.0.0', '8.0.0')
true
> versionGte('PouchDB v10.0.0', '8.0.0')
false

This PR implementation:

> versionGte('PouchDB v9.0.0', '8.0.0')
true
> versionGte('PouchDB v10.0.0', '8.0.0')
true

Copy link
Member

@garethbowen garethbowen left a comment

Choose a reason for hiding this comment

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

Nice catch!

Might be worth using semver, but I'll leave that up to you.

@alxndrsn
Copy link
Member Author

alxndrsn commented Oct 5, 2023

Might be worth using semver, but I'll leave that up to you.

Possibly, but we can't just require() deps in the integration tests & I'd rather not add extra dependencies as they are currently minimal:

<script src="../../node_modules/whatwg-fetch/fetch.js"></script>
<script src="../../node_modules/mocha/mocha.js"></script>
<script src="../../node_modules/chai/chai.js"></script>
<script src="../../node_modules/chai-as-promised/lib/chai-as-promised.js"></script>

@alxndrsn alxndrsn merged commit 6c5aa2b into pouchdb:master Oct 5, 2023
79 checks passed
@alxndrsn alxndrsn deleted the version-check-as-numbers branch October 5, 2023 18:22
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.

None yet

2 participants