Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/unstable' into fix/long-userna…
Browse files Browse the repository at this point in the history
…me-quote-author-overflow
  • Loading branch information
Bilb committed Aug 7, 2023
2 parents 9261408 + 953897c commit 4b3c31d
Show file tree
Hide file tree
Showing 427 changed files with 4,549 additions and 5,587 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
build/**
components/**
dist/**
mnemonic_languages/**

Expand All @@ -13,3 +12,5 @@ ts/**/*.js
playwright.config.js
preload.js
stylesheets/dist/
compiled.d.ts
.eslintrc.js
66 changes: 61 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
// For reference: https://github.com/airbnb/javascript

module.exports = {
root: true,
settings: {
'import/core-modules': ['electron'],
react: {
version: 'detect',
},
},

extends: ['airbnb-base', 'prettier'],
extends: [
'airbnb-base',
'prettier',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
],

plugins: ['mocha', 'more'],
plugins: ['mocha', 'more', '@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: { project: ['tsconfig.json'] },

rules: {
'comma-dangle': [
Expand Down Expand Up @@ -47,10 +57,38 @@ module.exports = {
'linebreak-style': ['error', 'unix'],

quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'@typescript-eslint/no-floating-promises': ['error'],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/no-misused-promises': 'error',

// Prettier overrides:
'arrow-parens': 'off',
'no-nested-ternary': 'off',
'function-paren-newline': 'off',

'import/prefer-default-export': 'off',
'operator-linebreak': 'off',
'prefer-destructuring': 'off',
'max-classes-per-file': 'off',
'lines-between-class-members': 'off',
'@typescript-eslint/no-explicit-any': 'off', // to reenable later
'arrow-body-style': 'off',
'no-plusplus': 'off',
'no-continue': 'off',
'no-void': 'off',
'default-param-last': 'off',

'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'class-methods-use-this': 'off',
camelcase: 'off',

'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
// 'no-unused-expressions': 'off',
// '@typescript-eslint/no-unused-expressions': 'error',

'max-len': [
'error',
{
Expand All @@ -59,10 +97,28 @@ module.exports = {
// high value as a buffer to let Prettier control the line length:
code: 999,
// We still want to limit comments as before:
comments: 150,
comments: 200,
ignoreUrls: true,
ignoreRegExpLiterals: true,
},
],
},
overrides: [
{
files: ['*_test.ts'],
rules: {
'no-unused-expressions': 'off',
'no-await-in-loop': 'off',
'no-empty': 'off',
},
},
{
files: ['ts/state/ducks/*.tsx', 'ts/state/ducks/*.ts'],
rules: { 'no-param-reassign': ['error', { props: false }] },
},
{
files: ['ts/node/**/*.ts', 'ts/test/**/*.ts'],
rules: { 'no-console': 'off', 'import/no-extraneous-dependencies': 'off' },
},
],
};
4 changes: 3 additions & 1 deletion .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
branches:
- clearnet
- unstable
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
Expand Down Expand Up @@ -50,7 +53,6 @@ jobs:
if: runner.os == 'Windows'
run: |
npm install --global yarn node-gyp@latest
npm config set msvs_version 2022
- name: Install Desktop node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
branches:
- clearnet
- unstable
- unstable1

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
Expand All @@ -31,7 +36,8 @@ jobs:

- name: Cache Desktop node_modules
id: cache-desktop-modules
uses: actions/cache@v2
uses: actions/cache@v3
if: runner.os != 'Windows'
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }}
Expand All @@ -45,7 +51,6 @@ jobs:
if: runner.os == 'Windows'
run: |
npm install --global node-gyp@latest
npm config set msvs_version 2022
- name: Install Desktop node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Cache Desktop node_modules
id: cache-desktop-modules
uses: actions/cache@v2
uses: actions/cache@v3
if: runner.os != 'Windows'
with:
path: node_modules
Expand All @@ -45,7 +45,6 @@ jobs:
if: runner.os == 'Windows'
run: |
npm install --global node-gyp@latest
npm config set msvs_version 2022
- name: Install Desktop node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.0
18.15.0
2 changes: 1 addition & 1 deletion INTERNALBUILDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ base64 -i certificate.p12 -o encoded.txt

### Node version

You will need node `16.13.0`.
You will need node `18.15.0`.
This can be done by using [nvm](https://github.com/nvm-sh/nvm) and running `nvm use` or you can install it manually.
Once nvm is installed, just run `nvm install` to install the version from the `.nvmrc` file and then `nvm use` to use it.

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Session Desktop

[Download at getsession.org](https://getsession.org/download)

## Summary

Session integrates directly with [Oxen Service Nodes](https://docs.oxen.io/about-the-oxen-blockchain/oxen-service-nodes), which are a set of distributed, decentralized and Sybil resistant nodes. Service Nodes act as servers which store messages offline, and a set of nodes which allow for onion routing functionality obfuscating users IP Addresses. For a full understanding of how Session works, read the [Session Whitepaper](https://getsession.org/whitepaper).
<br/><br/>
![DesktopSession](https://i.imgur.com/ZnHvYjo.jpg)
![DesktopSession](https://i.imgur.com/ydVhH00.png)

## Want to Contribute? Found a Bug or Have a feature request?

Expand Down
1 change: 0 additions & 1 deletion _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
"messageBodyMissing": "Please enter a message body.",
"messageBody": "Message body",
"unblockToSend": "Unblock this contact to send a message.",
"unblockGroupToSend": "This group is blocked. Unlock it if you would like to send a message.",
"youChangedTheTimer": "You set the disappearing message timer to $time$",
"timerSetOnSync": "Updated disappearing message timer to $time$",
"theyChangedTheTimer": "$name$ set the disappearing message timer to $time$",
Expand Down
1 change: 1 addition & 0 deletions about_preload.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* global window */

const { ipcRenderer } = require('electron');
Expand Down
2 changes: 1 addition & 1 deletion build/notarize.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { notarize } = require('electron-notarize');
const { notarize } = require('@electron/notarize');

/*
Pre-requisites: https://github.com/electron/electron-notarize#prerequisites
Expand Down
1 change: 1 addition & 0 deletions debug_log_preload.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* global window */
/* eslint-disable @typescript-eslint/no-var-requires */

const { ipcRenderer } = require('electron');
const url = require('url');
Expand Down
1 change: 1 addition & 0 deletions libsession.worker.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');

module.exports = {
Expand Down
Loading

0 comments on commit 4b3c31d

Please sign in to comment.