diff --git a/CHANGELOG.md b/CHANGELOG.md index 01a50fa93a..c985272009 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [unreleased] +## [2.3.3] + ### New features * Adds basic sigchain functions ([#2625](https://github.com/TryQuiet/quiet/issues/2625)) @@ -9,8 +11,10 @@ * Added in LFA-ready invite links ([#2627](https://github.com/TryQuiet/quiet/issues/2627)) ### Fixes -* Changed company name in app to "A Quiet LLC" ([#2642] (https://github.com/TryQuiet/quiet/issues/2642)) -* Fixed copyright statement in Electron app ([#2589] (https://github.com/TryQuiet/quiet/issues/2589)) + +* Changed company name in app to "A Quiet LLC" ([#2642](https://github.com/TryQuiet/quiet/issues/2642)) +* Fixed copyright statement in Electron app ([#2589](https://github.com/TryQuiet/quiet/issues/2589)) +* Improved clickable link contrast ([#2593](https://github.com/TryQuiet/quiet/issues/2593)) ## [2.3.2] diff --git a/packages/backend/package-lock.json b/packages/backend/package-lock.json index 23d54892f8..b92f94d429 100644 --- a/packages/backend/package-lock.json +++ b/packages/backend/package-lock.json @@ -16,6 +16,7 @@ "@nestjs/common": "^10.2.10", "@nestjs/core": "^10.2.10", "@nestjs/platform-express": "^10.2.10", + "@paralleldrive/cuid2": "^2.2.2", "@peculiar/webcrypto": "1.4.3", "abortable-iterator": "^3.0.0", "bs58": "^6.0.0", @@ -32,7 +33,6 @@ "fastq": "^1.17.1", "fetch-retry": "^6.0.0", "get-port": "^5.1.1", - "getmac": "^6.6.0", "go-ipfs": "npm:mocked-go-ipfs@0.17.0", "http-server": "^0.12.3", "https-proxy-agent": "^5.0.0", @@ -6690,6 +6690,25 @@ "webidl-conversions": "^3.0.0" } }, + "node_modules/@paralleldrive/cuid2": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@paralleldrive/cuid2/-/cuid2-2.2.2.tgz", + "integrity": "sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==", + "dependencies": { + "@noble/hashes": "^1.1.5" + } + }, + "node_modules/@paralleldrive/cuid2/node_modules/@noble/hashes": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.1.tgz", + "integrity": "sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@peculiar/asn1-schema": { "version": "2.3.6", "license": "MIT", @@ -11414,17 +11433,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/getmac": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/getmac/-/getmac-6.6.0.tgz", - "integrity": "sha512-o1sq9o5QTfwUyWy7Dao1YGZOI9lN+xzEr9Ul36hyOxFrtuwgLG1ff7oiBEfRDxOrB3jJ2u4jKEs5KMSElyE0cQ==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, "node_modules/getpass": { "version": "0.1.7", "license": "MIT", @@ -28227,6 +28235,21 @@ } } }, + "@paralleldrive/cuid2": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@paralleldrive/cuid2/-/cuid2-2.2.2.tgz", + "integrity": "sha512-ZOBkgDwEdoYVlSeRbYYXs0S9MejQofiVYoTbKzy/6GQa39/q5tQU2IX46+shYnUkpEl3wc+J6wRlar7r2EK2xA==", + "requires": { + "@noble/hashes": "^1.1.5" + }, + "dependencies": { + "@noble/hashes": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.1.tgz", + "integrity": "sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==" + } + } + }, "@peculiar/asn1-schema": { "version": "2.3.6", "requires": { @@ -31469,11 +31492,6 @@ "get-intrinsic": "^1.1.1" } }, - "getmac": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/getmac/-/getmac-6.6.0.tgz", - "integrity": "sha512-o1sq9o5QTfwUyWy7Dao1YGZOI9lN+xzEr9Ul36hyOxFrtuwgLG1ff7oiBEfRDxOrB3jJ2u4jKEs5KMSElyE0cQ==" - }, "getpass": { "version": "0.1.7", "optional": true, diff --git a/packages/backend/package.json b/packages/backend/package.json index 8707a58644..096a9e1aca 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -94,6 +94,7 @@ "@nestjs/common": "^10.2.10", "@nestjs/core": "^10.2.10", "@nestjs/platform-express": "^10.2.10", + "@paralleldrive/cuid2": "^2.2.2", "@peculiar/webcrypto": "1.4.3", "@quiet/common": "^2.0.2-alpha.1", "@quiet/identity": "^2.0.2-alpha.2", @@ -114,7 +115,6 @@ "fastq": "^1.17.1", "fetch-retry": "^6.0.0", "get-port": "^5.1.1", - "getmac": "^6.6.0", "go-ipfs": "npm:mocked-go-ipfs@0.17.0", "http-server": "^0.12.3", "https-proxy-agent": "^5.0.0", diff --git a/packages/backend/src/nest/auth/services/members/device.service.spec.ts b/packages/backend/src/nest/auth/services/members/device.service.spec.ts index 8b917e9d8d..8ee3edf7dc 100644 --- a/packages/backend/src/nest/auth/services/members/device.service.spec.ts +++ b/packages/backend/src/nest/auth/services/members/device.service.spec.ts @@ -20,7 +20,7 @@ describe('invites', () => { expect(adminSigChain.roles.amIMemberOfRole(adminSigChain.context, RoleName.MEMBER)).toBe(true) }) it('sigchain should contain admin device', () => { - const adminDeviceName = DeviceService.determineDeviceName() + const adminDeviceName = DeviceService.generateDeviceName() adminSigChain.team.hasDevice(adminSigChain.context.device.deviceId) }) it('should generate a new device', () => { diff --git a/packages/backend/src/nest/auth/services/members/device.service.ts b/packages/backend/src/nest/auth/services/members/device.service.ts index 18dff4cf5b..9b22c2ea95 100644 --- a/packages/backend/src/nest/auth/services/members/device.service.ts +++ b/packages/backend/src/nest/auth/services/members/device.service.ts @@ -2,7 +2,7 @@ * Handles device-related chain operations */ -import getMAC from 'getmac' +import { createId } from '@paralleldrive/cuid2' import { ChainServiceBase } from '../chainServiceBase' import { Device, DeviceWithSecrets, redactDevice } from '@localfirst/auth' import { SigChain } from '../../sigchain' @@ -23,7 +23,7 @@ class DeviceService extends ChainServiceBase { public static generateDeviceForUser(userId: string): DeviceWithSecrets { const params = { userId, - deviceName: DeviceService.determineDeviceName(), + deviceName: DeviceService.generateDeviceName(), } return SigChain.lfa.createDevice(params) @@ -32,11 +32,11 @@ class DeviceService extends ChainServiceBase { /** * Get an identifier for the current device * - * @returns Formatted MAC address of the current device + * @returns collision-resistant device identifier */ - public static determineDeviceName(): string { - const mac = getMAC() - return mac.replace(/:/g, '') + public static generateDeviceName(): string { + // TODO: let users set their own device name in a GUI + return createId() } public static redactDevice(device: DeviceWithSecrets): Device { diff --git a/packages/backend/src/nest/connections-manager/connections-manager.service.ts b/packages/backend/src/nest/connections-manager/connections-manager.service.ts index a1bdbd16a4..7ec637ae19 100644 --- a/packages/backend/src/nest/connections-manager/connections-manager.service.ts +++ b/packages/backend/src/nest/connections-manager/connections-manager.service.ts @@ -249,6 +249,7 @@ export class ConnectionsManagerService extends EventEmitter implements OnModuleI public async closeAllServices(options: { saveTor: boolean } = { saveTor: false }) { this.logger.info('Saving active sigchain') await this.saveActiveChain() + await this.sigChainService.deleteChain(this.sigChainService.activeChainTeamName!, false) this.logger.info('Closing services') diff --git a/packages/backend/src/nest/ipfs-file-manager/testUtils/storageSnapshot.ts b/packages/backend/src/nest/ipfs-file-manager/testUtils/storageSnapshot.ts index c6eb9b15a1..320895d664 100644 --- a/packages/backend/src/nest/ipfs-file-manager/testUtils/storageSnapshot.ts +++ b/packages/backend/src/nest/ipfs-file-manager/testUtils/storageSnapshot.ts @@ -39,7 +39,7 @@ export class StorageTestSnapshot extends Storage { public useSnapshot: boolean public name: string public replicationTime: number - public declare options: StorageTestSnapshotOptions + declare public options: StorageTestSnapshotOptions protected snapshotSaved: boolean protected msgReplCount: number @@ -133,9 +133,7 @@ export class StorageTestSnapshot extends Storage { }) // eslint-disable-next-line - this.messages.events.on( - 'replicate.progress', - async (_address, _hash, _entry, progress, _total) => { + this.messages.events.on('replicate.progress', async (_address, _hash, _entry, progress, _total) => { if (!this.replicationStartTime) { logger.time(`${this.name}; Replication time`) this.replicationStartTime = new Date() diff --git a/packages/desktop/CHANGELOG.md b/packages/desktop/CHANGELOG.md index eac559ccc7..c985272009 100644 --- a/packages/desktop/CHANGELOG.md +++ b/packages/desktop/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [unreleased] + +## [2.3.3] + +### New features + +* Adds basic sigchain functions ([#2625](https://github.com/TryQuiet/quiet/issues/2625)) +* Instantiates signature chain when creating communities and reloading application ([#2626](https://github.com/TryQuiet/quiet/issues/2626)) +* Added in LFA-ready invite links ([#2627](https://github.com/TryQuiet/quiet/issues/2627)) + +### Fixes + +* Changed company name in app to "A Quiet LLC" ([#2642](https://github.com/TryQuiet/quiet/issues/2642)) +* Fixed copyright statement in Electron app ([#2589](https://github.com/TryQuiet/quiet/issues/2589)) +* Improved clickable link contrast ([#2593](https://github.com/TryQuiet/quiet/issues/2593)) + ## [2.3.2] ### Chores diff --git a/packages/desktop/package-lock.json b/packages/desktop/package-lock.json index a9cfc126cb..94599a1ce1 100644 --- a/packages/desktop/package-lock.json +++ b/packages/desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "@quiet/desktop", - "version": "2.3.2", + "version": "2.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@quiet/desktop", - "version": "2.3.2", + "version": "2.3.3", "license": "GPL-3.0-or-later", "dependencies": { "@electron/remote": "^2.0.8", diff --git a/packages/desktop/package.json b/packages/desktop/package.json index 922defc120..2eb484a20e 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -80,7 +80,7 @@ }, "homepage": "https://github.com/TryQuiet", "@comment version": "To build new version for specific platform, just replace platform in version tag to one of following linux, mac, windows", - "version": "2.3.2", + "version": "2.3.3", "description": "Decentralized team chat", "main": "dist/main/main.js", "scripts": { diff --git a/packages/desktop/src/main/main.test.ts b/packages/desktop/src/main/main.test.ts index 66d2873457..f4a13e3f21 100644 --- a/packages/desktop/src/main/main.test.ts +++ b/packages/desktop/src/main/main.test.ts @@ -20,7 +20,6 @@ const mockWindowOnce = jest.fn() const mockSetMovable = jest.fn() const mockSetAlwaysOnTop = jest.fn() -const spyApplyDevTools = jest.spyOn(main, 'applyDevTools') const spyCreateWindow = jest.spyOn(main, 'createWindow') const spyGetPorts = jest.spyOn(backendHelpers, 'getPorts') @@ -137,11 +136,6 @@ describe('electron app ready event', () => { expect(setApplicationMenu).toHaveBeenCalledWith(null) }) - // todo - // it('apply devtools logic will trigger one time and ... todo', async () => { - // expect(spyApplyDevTools).toHaveBeenCalledTimes(1) - // }) - it('get ports logic will trigger and will return propper ports', async () => { expect(spyGetPorts).toHaveBeenCalledTimes(1) const getPortsResult = async (): Promise => spyGetPorts.mock.results[0].value diff --git a/packages/desktop/src/main/main.ts b/packages/desktop/src/main/main.ts index 0617bc9e64..9c036f8f0e 100644 --- a/packages/desktop/src/main/main.ts +++ b/packages/desktop/src/main/main.ts @@ -132,12 +132,21 @@ export const applyDevTools = async () => { ] await Promise.all( extensionsData.map(async extension => { - await installer.default(extension.name) + try { + await installer.default(extension.name) + } catch (error) { + logger.error(`Failed to install ${extension.name}:${extension.path}:`, error) + } }) ) + await Promise.all( extensionsData.map(async extension => { - await session.defaultSession.loadExtension(extension.path, { allowFileAccess: true }) + try { + await session.defaultSession.loadExtension(extension.path, { allowFileAccess: true }) + } catch (error) { + logger.error(`Failed to load extension from ${extension.path}:`, error) + } }) ) } diff --git a/packages/desktop/src/renderer/components/ui/OpenlinkModal/OpenlinkModal.test.tsx b/packages/desktop/src/renderer/components/ui/OpenlinkModal/OpenlinkModal.test.tsx index 3710296e72..65458abdda 100644 --- a/packages/desktop/src/renderer/components/ui/OpenlinkModal/OpenlinkModal.test.tsx +++ b/packages/desktop/src/renderer/components/ui/OpenlinkModal/OpenlinkModal.test.tsx @@ -173,7 +173,7 @@ describe('OpenlinkModal', () => { - www.tryquiet.org + tryquiet.org - I trust them with my data and I'm not using Quiet for anonymity protection. @@ -215,7 +215,7 @@ describe('OpenlinkModal', () => { - www.tryquiet.org + tryquiet.org again, but don't auto-load images. @@ -281,7 +281,7 @@ describe('OpenlinkModal', () => { href="" style="color: rgb(103, 191, 211); text-decoration: none; word-break: break-all;" > - Load image from site www.tryquiet.org + Load image from site tryquiet.org diff --git a/packages/mobile/CHANGELOG.md b/packages/mobile/CHANGELOG.md index eac559ccc7..c985272009 100644 --- a/packages/mobile/CHANGELOG.md +++ b/packages/mobile/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [unreleased] + +## [2.3.3] + +### New features + +* Adds basic sigchain functions ([#2625](https://github.com/TryQuiet/quiet/issues/2625)) +* Instantiates signature chain when creating communities and reloading application ([#2626](https://github.com/TryQuiet/quiet/issues/2626)) +* Added in LFA-ready invite links ([#2627](https://github.com/TryQuiet/quiet/issues/2627)) + +### Fixes + +* Changed company name in app to "A Quiet LLC" ([#2642](https://github.com/TryQuiet/quiet/issues/2642)) +* Fixed copyright statement in Electron app ([#2589](https://github.com/TryQuiet/quiet/issues/2589)) +* Improved clickable link contrast ([#2593](https://github.com/TryQuiet/quiet/issues/2593)) + ## [2.3.2] ### Chores diff --git a/packages/mobile/android/app/build.gradle b/packages/mobile/android/app/build.gradle index a8c976ed98..b0d6df33a8 100644 --- a/packages/mobile/android/app/build.gradle +++ b/packages/mobile/android/app/build.gradle @@ -192,8 +192,8 @@ android { applicationId "com.quietmobile" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 433 - versionName "2.3.2" + versionCode 436 + versionName "2.3.3" resValue "string", "build_config_package", "com.quietmobile" testBuildType System.getProperty('testBuildType', 'debug') testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' diff --git a/packages/mobile/ios/Quiet/Info.plist b/packages/mobile/ios/Quiet/Info.plist index 9b745c2737..5e2e874ead 100644 --- a/packages/mobile/ios/Quiet/Info.plist +++ b/packages/mobile/ios/Quiet/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.3.2 + 2.3.3 CFBundleSignature ???? CFBundleURLTypes @@ -34,7 +34,7 @@ CFBundleVersion - 390 + 393 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/packages/mobile/ios/QuietTests/Info.plist b/packages/mobile/ios/QuietTests/Info.plist index f08665efec..4cf2e17734 100644 --- a/packages/mobile/ios/QuietTests/Info.plist +++ b/packages/mobile/ios/QuietTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.3.2 + 2.3.3 CFBundleSignature ???? CFBundleVersion - 390 + 393 diff --git a/packages/mobile/package-lock.json b/packages/mobile/package-lock.json index 110e85522e..2545a081de 100644 --- a/packages/mobile/package-lock.json +++ b/packages/mobile/package-lock.json @@ -1,12 +1,12 @@ { "name": "@quiet/mobile", - "version": "2.3.2", + "version": "2.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@quiet/mobile", - "version": "2.3.2", + "version": "2.3.3", "dependencies": { "@peculiar/webcrypto": "^1.4.3", "@react-native-clipboard/clipboard": "^1.13.2", diff --git a/packages/mobile/package.json b/packages/mobile/package.json index c260e079c0..c53b04f247 100644 --- a/packages/mobile/package.json +++ b/packages/mobile/package.json @@ -1,6 +1,6 @@ { "name": "@quiet/mobile", - "version": "2.3.2", + "version": "2.3.3", "scripts": { "build": "tsc -p tsconfig.build.json --noEmit", "storybook-android": "ENVFILE=.env.storybook react-native run-android --mode=storybookDebug --appIdSuffix=storybook.debug",