Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

fix(lsp): accept flow release candidate version#344

Merged
orta merged 6 commits intoflow:masterfrom
telaoumatenyanis:patch-1
Jun 22, 2019
Merged

fix(lsp): accept flow release candidate version#344
orta merged 6 commits intoflow:masterfrom
telaoumatenyanis:patch-1

Conversation

@telaoumatenyanis
Copy link
Copy Markdown
Contributor

@Mayank1791989 Mayank1791989 self-requested a review June 19, 2019 15:43

export default function assertFlowSupportsLSP(version: string) {
if (!semver.satisfies(version, FLOW_VERSION_FOR_LSP)) {
if (!semver.satisfies(version.replace(/-rc/gu, ''), FLOW_VERSION_FOR_LSP)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You need to put the same fix here also https://github.com/flowtype/flow-for-vscode/blob/7bd24accc13cc842c2ff6fce18e37d61b66b53d7/lib/flowLSP/FlowLanguageClient/createMiddleware.js#L25-L28
To avoid logic duplication create separate function in utils and use that function in both places and also add test case for it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

use semver.satisfies(version, FLOW_VERSION_FOR_LSP, { includePrerelease: true })

mroch
mroch previously requested changes Jun 20, 2019

export default function assertFlowSupportsLSP(version: string) {
if (!semver.satisfies(version, FLOW_VERSION_FOR_LSP)) {
if (!semver.satisfies(version.replace(/-rc/gu, ''), FLOW_VERSION_FOR_LSP)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

use semver.satisfies(version, FLOW_VERSION_FOR_LSP, { includePrerelease: true })

@Mayank1791989
Copy link
Copy Markdown
Contributor

LGTM 👍

@Mayank1791989 Mayank1791989 requested a review from orta June 22, 2019 07:09
@orta orta dismissed mroch’s stale review June 22, 2019 14:04

Resolved

@orta
Copy link
Copy Markdown
Contributor

orta commented Jun 22, 2019

👍

@orta orta merged commit 9b88709 into flow:master Jun 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flow issue "Please upgrade flow to version >=0.75."

5 participants