Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed May 22, 2024
1 parent eccbd21 commit 637222c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
18 changes: 11 additions & 7 deletions src/emulator/emulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,17 @@ export class Emulator {

// Get version of CLI
const flowVersion = await getFlowVersion(this.execName)
const satisfiesVersion = satisfies(flowVersion.raw, SUPPORTED_FLOW_CLI_VERSIONS, {
includePrerelease: true,
})
const satisfiesPreRelease = flowVersion.raw.includes(SUPPORTED_PRE_RELEASE_MATCHER)
if (
!satisfiesVersion && !satisfiesPreRelease
) {
const satisfiesVersion = satisfies(
flowVersion.raw,
SUPPORTED_FLOW_CLI_VERSIONS,
{
includePrerelease: true,
}
)
const satisfiesPreRelease = flowVersion.raw.includes(
SUPPORTED_PRE_RELEASE_MATCHER
)
if (!satisfiesVersion && !satisfiesPreRelease) {
throw new Error(
`Unsupported Flow CLI version: ${flowVersion.raw}. Supported versions: ${SUPPORTED_FLOW_CLI_VERSIONS} or pre-releases tagged with ${SUPPORTED_PRE_RELEASE_MATCHER}`
)
Expand Down

0 comments on commit 637222c

Please sign in to comment.