diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ffafed..124ec2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Manifest Version 1.4.10 + +- changed release script to automatically take the changes from the CHANGELOG.md +- bumped all dependencies to the latest versions +- improved network selection UI and UX ( network selection view ) +- minor UI change to main view of the wallet +- fixed release script to work with `bun` package manager + ## Manifest Version 1.4.9 - updated dependencies and Vite to 6 diff --git a/bun.lockb b/bun.lockb index ab45b38..cf66b81 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 650bc32..e46f7bd 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "dependencies": { "@ionic/vue": "^8.4.1", "@ionic/vue-router": "^8.4.1", - "core-js": "^3.39.0", - "ethers": "^6.13.4", + "core-js": "^3.40.0", + "ethers": "^6.13.5", "qr-scanner": "^1.4.2", "vue": "^3.5.13", "vue-router": "^4.5.0" @@ -29,26 +29,26 @@ "devDependencies": { "@crxjs/vite-plugin": "2.0.0-beta.28", "@types/archiver": "^6.0.3", - "@types/chrome": "^0.0.287", + "@types/chrome": "^0.0.297", "@types/jest": "^29.5.14", - "@types/node": "^22.10.2", - "@typescript-eslint/eslint-plugin": "^8.18.2", - "@typescript-eslint/parser": "^8.18.2", + "@types/node": "^22.10.7", + "@typescript-eslint/eslint-plugin": "^8.20.0", + "@typescript-eslint/parser": "^8.20.0", "@vitejs/plugin-vue": "^5.2.1", - "@vue/eslint-config-typescript": "^14.2.0", + "@vue/eslint-config-typescript": "^14.3.0", "archiver": "^7.0.1", - "eslint": "^9.17.0", + "eslint": "^9.18.0", "eslint-plugin-vue": "^9.32.0", "http-browserify": "^1.7.0", "https-browserify": "^1.0.0", "jest": "^29.7.0", - "sass": "^1.83.0", + "sass": "^1.83.4", "stream-browserify": "^3.0.0", "ts-jest": "^29.2.5", "tsx": "^4.19.2", - "typescript": "^5.7.2", + "typescript": "^5.7.3", "util": "^0.12.5", - "vite": "^6.0.5", + "vite": "^6.0.7", "vue-tsc": "^2.2.0" }, "disabledNativeDependencies": { diff --git a/release-scripts/create-release.ts b/release-scripts/create-release.ts index 78cbf0f..45662f9 100644 --- a/release-scripts/create-release.ts +++ b/release-scripts/create-release.ts @@ -1,7 +1,65 @@ const pFs = import('fs') const pCps = import('child_process') -async function ghRelease (changes: string[], isRebuild: boolean) { + +async function readFirst2000Characters(filePath: string): Promise { + + const fs = (await pFs).default + try { + const fileStream = fs.createReadStream(filePath, { encoding: 'utf8' }); + let data = ''; + + for await (const chunk of fileStream) { + data += chunk; + if (data.length >= 2000) { + break; + } + } + + return data.substring(0, 2000); + } catch (err) { + console.error(`Error reading file: ${err}`); + throw err; + } +} + +function limitedSplit(str: string, delimiter: string, limit: number): string[] { + if (limit <= 0) { + throw new Error("Limit must be greater than 0"); + } + + const result: string[] = []; + let current = 0; + let found; + + do { + found = str.indexOf(delimiter, current); + if (found === -1 || result.length === limit - 1) { + result.push(str.substring(current)); + break; + } + result.push(str.substring(current, found)); + current = found + delimiter.length; + } while (true); + + return result; +} + +const getLastChangeLog = async () => { + const mainChainLogPath = 'CHANGELOG.md'; + const fs = (await pFs).default + if (!fs.existsSync(mainChainLogPath)) { + return ''; + } + const mainChainLog = await readFirst2000Characters(mainChainLogPath) + const manifestVersions = limitedSplit(mainChainLog, '## ', 2)[1] + const changesText = '## ' + manifestVersions + return changesText +} + + + +async function ghRelease (isRebuild: boolean) { const fs = (await pFs).default if (!fs.existsSync('releases')) { @@ -38,14 +96,12 @@ async function ghRelease (changes: string[], isRebuild: boolean) { fs.writeFileSync( changeLogPath, `# ${pkg.version} \n - ${changes.reduce((acc: string, change: string) => { - return acc + `- ${change}\n`; - }, '')}`, + ${await getLastChangeLog()}`, ); const cps = (await pCps) console.log( await new Promise((resolve) => { - const p = cps.spawn('gh', ['release', 'create', `v${pkg.version}`, `./${outputPath}`, '-F', `./${changeLogPath}`], { + const p = cps.spawn('gh', ['release', 'create', `v${pkg.version}`, `./${outputPath}`, '-F', `./${changeLogPath}`, '--target', 'main'], { shell: true, }); let result = ''; @@ -60,14 +116,9 @@ async function ghRelease (changes: string[], isRebuild: boolean) { } (async () => { - if (!process.argv[2]) { - console.log('No changes provided'); - return; - } - const changes = process.argv[2].split(','); - const isRebuild = changes.includes('rebuild'); + const isRebuild = process.argv[2] === 'rebuild'; - await ghRelease(changes, isRebuild); - console.log('Release created', changes); + await ghRelease(isRebuild); + console.log('Release created'); })(); diff --git a/src/extension/manifest.json b/src/extension/manifest.json index 05c8346..6dd3aae 100644 --- a/src/extension/manifest.json +++ b/src/extension/manifest.json @@ -3,8 +3,8 @@ "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", - "version": "1.4.9", - "version_name": "1.4.9", + "version": "1.4.10", + "version_name": "1.4.10", "icons": { "16": "assets/extension-icon/wallet_16.png", "32": "assets/extension-icon/wallet_32.png", diff --git a/src/views/HomeTab.vue b/src/views/HomeTab.vue index 1567e95..37d7e9e 100644 --- a/src/views/HomeTab.vue +++ b/src/views/HomeTab.vue @@ -106,11 +106,14 @@ button @click="copyText(String(selectedNetwork?.chainId), getToastRef())" style="cursor: pointer" - >Selected Network ID: + >Selected Network ID:  {{ selectedNetwork?.chainId }} - + Close - Select + Select Network - Networks - - ID: {{ network.chainId }} -> - - {{ network.name }} +
+ + + + {{ + (network.name?.length || 0) > 18 + ? (network.name || "").slice(0, 15) + "..." + : network.name + }}  + + ({{ network.chainId }}) + +
+
+ RPC:  + {{ + network.rpc.replace("https://", "").replace("http://", "") + }} +
- - {{ - network.rpc - }} -