Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Cap-go/CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Nov 20, 2024
2 parents 0b1f0df + caf6bd9 commit 7433609
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [4.26.2](https://github.com/Cap-go/CLI/compare/v4.26.1...v4.26.2) (2024-11-20)


### Bug Fixes

* compatibility table with semver ([805044e](https://github.com/Cap-go/CLI/commit/805044ef041d68135953095b34e3d2cf64ed8b03))

### [4.26.1](https://github.com/Cap-go/CLI/compare/v4.26.0...v4.26.1) (2024-11-20)


### Bug Fixes

* remove old comment ([f9b96a3](https://github.com/Cap-go/CLI/commit/f9b96a3fd0e431e682eb52ed9de50327612885ed))

## [4.26.0](https://github.com/Cap-go/CLI/compare/v4.25.6...v4.26.0) (2024-11-20)


Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capgo/cli",
"version": "4.26.0",
"version": "4.26.2",
"description": "A CLI to upload to capgo servers",
"author": "github.com/riderx",
"license": "Apache 2.0",
Expand Down Expand Up @@ -56,6 +56,7 @@
"@types/adm-zip": "^0.5.6",
"@types/node": "^22.8.4",
"@types/prettyjson": "^0.0.33",
"@types/semver": "7.5.8",
"@types/tmp": "^0.2.6",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
Expand All @@ -73,6 +74,7 @@
"open": "^10.1.0",
"pkg": "5.8.1",
"prettyjson": "^1.2.5",
"semver": "^7.6.3",
"tmp": "^0.2.3",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
Expand Down
10 changes: 9 additions & 1 deletion src/bundle/compatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { OptionsBase } from '../utils'
import { intro, log } from '@clack/prompts'
import { Table } from '@sauber/table'
import { program } from 'commander'
import subset from 'semver/ranges/subset'
import { checkAppExistsAndHasPermissionOrgErr } from '../api/app'
import { checkCompatibility, createSupabaseClient, findSavedKey, getAppId, getConfig, OrganizationPerm, verifyUser } from '../utils'

Expand Down Expand Up @@ -59,7 +60,14 @@ export async function checkCompatibilityCommand(appId: string, options: Options)

finalCompatibility.forEach((data) => {
const { name, localVersion, remoteVersion } = data
const compatible = remoteVersion === localVersion ? yesSymbol : noSymbol
// remoteVersion === localVersion
let compatible = noSymbol
try {
compatible = subset(localVersion ?? '', remoteVersion ?? '') ? yesSymbol : noSymbol
}
catch (e) {
log.error(`Fail when compare. Error: ${e}`)
}
t.rows.push([name, localVersion, remoteVersion, compatible])
})

Expand Down

0 comments on commit 7433609

Please sign in to comment.