diff --git a/.github/actions/before-build/action.yml b/.github/actions/before-build/action.yml index a0f74cbaa6..9dbb3e1a4d 100644 --- a/.github/actions/before-build/action.yml +++ b/.github/actions/before-build/action.yml @@ -36,5 +36,5 @@ runs: shell: bash - name: "Build the project" - run: lerna run build:prod --scope quiet + run: lerna run build:prod --scope @quiet/desktop shell: bash diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1087841c9b..80a688c61e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,4 +2,11 @@ ### Pull Request Checklist - [ ] I have linked this PR to related GitHub issue. -- [ ] I have updated the CHANGELOG.md file with relevant changes (the file is located at the root of monorepo). \ No newline at end of file +- [ ] I have updated the CHANGELOG.md file with relevant changes (the file is located at the root of monorepo). + +### (Optional) Mobile checklist + +Please ensure you completed the following checks if you did any changes to the mobile package: + +- [ ] I have run e2e tests for mobile +- [ ] I have updated base screenshots for visual regression tests diff --git a/.github/workflows/waggle-tests.yml b/.github/workflows/backend-tests.yml similarity index 100% rename from .github/workflows/waggle-tests.yml rename to .github/workflows/backend-tests.yml diff --git a/.github/workflows/check-visual-regression.yml b/.github/workflows/check-desktop-visual-regression.yml similarity index 90% rename from .github/workflows/check-visual-regression.yml rename to .github/workflows/check-desktop-visual-regression.yml index dcdd1ae1d1..f86cfc14fd 100644 --- a/.github/workflows/check-visual-regression.yml +++ b/.github/workflows/check-desktop-visual-regression.yml @@ -1,4 +1,4 @@ -name: Visual regressions +name: Desktop visual regressions on: pull_request: @@ -24,7 +24,7 @@ jobs: - name: Setup environment uses: ./.github/actions/setup-env with: - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle" - name: "Publish to Chromatic" uses: chromaui/action@v1 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d4bb407c58..7a05a53f69 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -27,14 +27,13 @@ jobs: uses: ./.github/actions/setup-env if: ${{ runner.os != 'Windows' }} with: - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,@quiet/mobile,e2e-tests,backend-bundle" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,@quiet/mobile,e2e-tests,backend-bundle" - - name: "Setup environment for Windows" uses: ./.github/actions/setup-env if: ${{ runner.os == 'Windows' }} with: - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,e2e-tests,backend-bundle" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,e2e-tests,backend-bundle" - name: "Lint" if: ${{ runner.os != 'Windows' }} diff --git a/.github/workflows/build-release.yml b/.github/workflows/desktop-build.yml similarity index 95% rename from .github/workflows/build-release.yml rename to .github/workflows/desktop-build.yml index c00e7a14a1..349f3568fd 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/desktop-build.yml @@ -1,4 +1,4 @@ -name: Build release +name: Desktop release build on: release: @@ -17,7 +17,7 @@ jobs: # needs: run-e2e-tests-linux runs-on: ubuntu-22.04 if: | - startsWith(github.ref, 'refs/tags/quiet') + startsWith(github.ref, 'refs/tags/@quiet/desktop') env: TEST_MODE: ${{ github.event.action == 'prereleased' }} @@ -30,7 +30,7 @@ jobs: - name: Setup environment uses: ./.github/actions/setup-env with: - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle" - name: Install libfuse run: sudo apt install libfuse2 @@ -52,7 +52,7 @@ jobs: run: cd packages/desktop && USE_HARD_LINKS=false node_modules/.bin/electron-builder -p always --linux ${{ env.ELECTRON_BUILDER_PROPS }} - name: "Calculate new checksum for electron updater" - run: lerna run postBuild --scope quiet + run: lerna run postBuild --scope @quiet/desktop - name: "Push electron-updater new checksum to S3" uses: vinkabuki/upload-s3-action@master @@ -89,7 +89,7 @@ jobs: # needs: run-e2e-tests-mac runs-on: macos-latest if: | - startsWith(github.ref, 'refs/tags/quiet') + startsWith(github.ref, 'refs/tags/@quiet/desktop') env: TEST_MODE: ${{ github.event.action == 'prereleased' }} @@ -111,7 +111,7 @@ jobs: - name: Setup environment uses: ./.github/actions/setup-env with: - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle" - name: Before build uses: ./.github/actions/before-build @@ -162,7 +162,7 @@ jobs: # needs: run-e2e-tests-win runs-on: windows-2019 if: | - startsWith(github.ref, 'refs/tags/quiet') + startsWith(github.ref, 'refs/tags/@quiet/desktop') env: TEST_MODE: ${{ github.event.action == 'prereleased' }} @@ -189,7 +189,7 @@ jobs: - name: Setup environment uses: ./.github/actions/setup-env with: - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle,e2e-tests" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,e2e-tests" - name: Before build uses: ./.github/actions/before-build diff --git a/.github/workflows/desktop-rtl-tests.yml b/.github/workflows/desktop-rtl-tests.yml new file mode 100644 index 0000000000..8e8343b736 --- /dev/null +++ b/.github/workflows/desktop-rtl-tests.yml @@ -0,0 +1,31 @@ +name: Desktop - state-manager bracket tests (RTL) + +on: + pull_request: + paths: + - packages/desktop/** + - packages/state-manager/** + +jobs: + desktop-tests: + timeout-minutes: 25 + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-20.04, macos-latest] + + steps: + - name: "Print OS" + run: echo ${{ matrix.os }} + + - uses: actions/checkout@v3 + + - name: "Setup environment" + uses: ./.github/actions/setup-env + with: + cachePrefix: "desktop-tests" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle" + + - name: "Desktop - state-manager bracket tests" + run: lerna run rtl-test --scope @quiet/desktop --stream diff --git a/.github/workflows/regression-test.yml b/.github/workflows/desktop-test-scroll.yml similarity index 93% rename from .github/workflows/regression-test.yml rename to .github/workflows/desktop-test-scroll.yml index 581c0a0b37..bb9a6c6a7c 100644 --- a/.github/workflows/regression-test.yml +++ b/.github/workflows/desktop-test-scroll.yml @@ -1,4 +1,4 @@ -name: Scroll regression tests +name: Desktop scroll regression tests on: pull_request: @@ -23,7 +23,7 @@ jobs: - name: Setup environment uses: ./.github/actions/setup-env with: - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle" - name: "Install libs" run: sudo apt-get update && sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/desktop-tests.yml similarity index 75% rename from .github/workflows/frontend-tests.yml rename to .github/workflows/desktop-tests.yml index aaf54dd035..bba3708c19 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/desktop-tests.yml @@ -24,10 +24,7 @@ jobs: uses: ./.github/actions/setup-env with: cachePrefix: "desktop-tests" - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle" - name: "Unit tests" - run: lerna run test --scope quiet --stream - - - name: "desktop-state-manager bracket tests" - run: lerna run rtl-test --scope quiet --stream + run: lerna run test --scope @quiet/desktop --stream diff --git a/.github/workflows/e2e-crossplatform.yml b/.github/workflows/e2e-crossplatform.yml index 42f4065efb..b45d5caddb 100644 --- a/.github/workflows/e2e-crossplatform.yml +++ b/.github/workflows/e2e-crossplatform.yml @@ -1,6 +1,14 @@ name: E2E cross platform -on: [pull_request] +on: + pull_request: + paths: + - packages/desktop/** + - packages/backend/** + - packages/state-manager/** + - packages/identity/** + - packages/common/** + jobs: mac: uses: ./.github/workflows/e2e-mac.yml diff --git a/.github/workflows/e2e-linux.yml b/.github/workflows/e2e-linux.yml index 0777003d85..3e957e1fe7 100644 --- a/.github/workflows/e2e-linux.yml +++ b/.github/workflows/e2e-linux.yml @@ -30,7 +30,7 @@ jobs: uses: ./.github/actions/setup-env with: cachePrefix: "e2e-crossplatform-linux" - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle,e2e-tests" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,e2e-tests" - name: Run X11 run: | diff --git a/.github/workflows/e2e-mac.yml b/.github/workflows/e2e-mac.yml index 6f0483f752..52154c22dd 100644 --- a/.github/workflows/e2e-mac.yml +++ b/.github/workflows/e2e-mac.yml @@ -17,7 +17,7 @@ jobs: uses: ./.github/actions/setup-env with: cachePrefix: "e2e-crossplatform-mac" - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle,e2e-tests" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,e2e-tests" - name: Before build uses: ./.github/actions/before-build diff --git a/.github/workflows/e2e-win.yml b/.github/workflows/e2e-win.yml index 100e13d4f0..490ae7d32a 100644 --- a/.github/workflows/e2e-win.yml +++ b/.github/workflows/e2e-win.yml @@ -19,7 +19,7 @@ jobs: uses: ./.github/actions/setup-env with: cachePrefix: "e2e-crossplatform-windows" - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle,e2e-tests" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle,e2e-tests" - name: "Fetch jsign" shell: bash diff --git a/.github/workflows/deploy-android.yaml b/.github/workflows/mobile-deploy-android.yaml similarity index 98% rename from .github/workflows/deploy-android.yaml rename to .github/workflows/mobile-deploy-android.yaml index 2ed25b3df4..bac1cc0f33 100644 --- a/.github/workflows/deploy-android.yaml +++ b/.github/workflows/mobile-deploy-android.yaml @@ -1,4 +1,4 @@ -name: Deploy Android to Google Play (internal testing) +name: Deploy Android to Google Play on: release: diff --git a/.github/workflows/deploy-ios.yml b/.github/workflows/mobile-deploy-ios.yml similarity index 100% rename from .github/workflows/deploy-ios.yml rename to .github/workflows/mobile-deploy-ios.yml diff --git a/.github/workflows/nectar-tests.yml b/.github/workflows/state-manager-tests.yml similarity index 81% rename from .github/workflows/nectar-tests.yml rename to .github/workflows/state-manager-tests.yml index b9bb196580..2ecad2b0b1 100644 --- a/.github/workflows/nectar-tests.yml +++ b/.github/workflows/state-manager-tests.yml @@ -23,10 +23,7 @@ jobs: - name: "Setup environment" uses: ./.github/actions/setup-env with: - bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,quiet,backend-bundle" + bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/desktop,backend-bundle" - name: "Unit tests" run: lerna run test --scope @quiet/state-manager --stream - - - name: "desktop-state-manager bracket tests" - run: lerna run rtl-test --scope quiet --stream diff --git a/lerna.json b/lerna.json index 2501ad2db2..aca35a8710 100644 --- a/lerna.json +++ b/lerna.json @@ -5,7 +5,7 @@ "version": "independent", "command": { "version": { - "allowBranch": ["master", "develop", "workflows/require-e2e-before-build-release"], + "allowBranch": ["master", "develop"], "conventionalCommits": true, "createRelease": "github" }, diff --git a/packages/backend-bundle/package.json b/packages/backend-bundle/package.json index a2f5ec99b6..6abf21f4c0 100644 --- a/packages/backend-bundle/package.json +++ b/packages/backend-bundle/package.json @@ -6,5 +6,6 @@ "scripts": {}, "keywords": [], "author": "", - "license": "ISC" -} \ No newline at end of file + "license": "ISC", + "private": true +} diff --git a/packages/backend/package.json b/packages/backend/package.json index 399ef17617..0757fef8d4 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -7,6 +7,7 @@ "exports": "lib/index.js", "author": "", "license": "MIT", + "private": true, "scripts": { "build": "tsc -p tsconfig.build.json", "webpack": "run-script-os", diff --git a/packages/common/package.json b/packages/common/package.json index b16151d680..3ac6ef2b63 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -7,6 +7,7 @@ "files": [ "lib/**/*" ], + "private": true, "scripts": { "build": "tsc -p tsconfig.build.json", "prepare": "npm run build", diff --git a/packages/desktop/package-lock.json b/packages/desktop/package-lock.json index ade50572b0..8345fda13e 100644 --- a/packages/desktop/package-lock.json +++ b/packages/desktop/package-lock.json @@ -1,11 +1,11 @@ { - "name": "quiet", + "name": "@quiet/desktop", "version": "2.0.1-alpha.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "quiet", + "name": "@quiet/desktop", "version": "2.0.1-alpha.1", "license": "ISC", "dependencies": { diff --git a/packages/desktop/package.json b/packages/desktop/package.json index 8c2a0a4e3c..ed6887df44 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,5 +1,5 @@ { - "name": "quiet", + "name": "@quiet/desktop", "productName": "Quiet", "author": { "name": "Zbay LLC", diff --git a/packages/desktop/scripts/setEnvs.js b/packages/desktop/scripts/setEnvs.js index 16989b9382..de94f06d28 100644 --- a/packages/desktop/scripts/setEnvs.js +++ b/packages/desktop/scripts/setEnvs.js @@ -19,7 +19,7 @@ exports.default = async function (context) { childProcess.execSync(`${context.artifactPaths[0]} --appimage-extract`) childProcess.execSync(`mv ./squashfs-root ${context.outDir}/squashfs-root`) const data = fs.readFileSync(`${context.outDir}/squashfs-root/AppRun`, 'utf8').split('\n') - const index = data.findIndex(text => text === 'BIN="$APPDIR/quiet"') + const index = data.findIndex(text => text === 'BIN="$APPDIR/@quietdesktop"') if (index !== -1) { data[index - 1] = 'export LD_PRELOAD="${APPDIR}/usr/lib/libssl.so"' fs.writeFileSync(`${context.outDir}/squashfs-root/AppRun`, data.join('\n'), 'utf8') diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index bee44f4b15..bc216b143b 100644 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -3,6 +3,7 @@ "version": "2.0.1-alpha.1", "description": "For running end to end tests we use Selenium WebDriver (https://www.selenium.dev/documentation/webdriver/) with Electron ChromeDriver (https://www.npmjs.com/package/electron-chromedriver) in Jest", "main": "index.js", + "private": true, "scripts": { "build": "tsc -p tsconfig.build.json", "prepare": "npm run build", diff --git a/packages/eslint-config-custom/package.json b/packages/eslint-config-custom/package.json index a07d3acd70..24df7c7d50 100644 --- a/packages/eslint-config-custom/package.json +++ b/packages/eslint-config-custom/package.json @@ -2,6 +2,7 @@ "name": "@quiet/eslint-config", "main": "index.js", "version": "2.0.1-alpha.1", + "private": true, "devDependencies": { "@typescript-eslint/eslint-plugin": "5.59.11", "@typescript-eslint/parser": "^5.59.11", diff --git a/packages/identity/package.json b/packages/identity/package.json index 61dc6e3a83..454339760d 100644 --- a/packages/identity/package.json +++ b/packages/identity/package.json @@ -4,6 +4,7 @@ "description": "Quiet tools for creating certificates and signing messages", "main": "lib/index.js", "types": "lib/index.d.js", + "private": true, "scripts": { "build": "tsc -p tsconfig.build.json", "prepare": "npm run build", diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 3de8fb67c9..a61ca17d45 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -6,6 +6,7 @@ "main": "lib/index.js", "author": "", "license": "ISC", + "private": true, "scripts": { "build": "tsc -p tsconfig.build.json", "prepare": "npm run build", diff --git a/packages/logger/package.json b/packages/logger/package.json index e9bbdbfb50..0e21fa22c3 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -7,6 +7,7 @@ "files": [ "lib/**/*" ], + "private": true, "scripts": { "build": "tsc -p tsconfig.build.json", "prepare": "npm run build", diff --git a/packages/state-manager/package.json b/packages/state-manager/package.json index 22c85f4e15..53d25d93e2 100644 --- a/packages/state-manager/package.json +++ b/packages/state-manager/package.json @@ -3,6 +3,7 @@ "version": "2.0.1-alpha.1", "description": "", "main": "lib/index.js", + "private": true, "scripts": { "build": "tsc -p tsconfig.build.json", "prepare": "npm run build", diff --git a/packages/types/package.json b/packages/types/package.json index a1778c2253..8473daab09 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -7,6 +7,7 @@ "files": [ "lib/**/*" ], + "private": true, "scripts": { "build": "tsc -p tsconfig.build.json", "prepare": "npm run build",