Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): Yarn and ESLint #2711

Merged
merged 7 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node 16
- name: Setup Node 14.21.3
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '14.21.3'
- name: Setup node_modules cache
uses: actions/cache@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ jobs:
run: git config --global core.autocrlf false
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node 16
- name: Setup Node 14.21.3
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '14.21.3'
- name: Setup node_modules cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install package dependencies
run: yarn install --check-files
run: yarn install
- name: Lint
run: yarn lint
- name: Test
Expand Down
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@ Thumbs.db

/app
/dist
/Development.provisionprofile
/Development.provisionprofile

# yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

783 changes: 783 additions & 0 deletions .yarn/releases/yarn-3.2.2.cjs

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
defaultSemverRangePrefix: "~"

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"

yarnPath: .yarn/releases/yarn-3.2.2.cjs
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
},
],
'@babel/preset-react',
'@babel/preset-typescript',
],
plugins: [
'@babel/plugin-proposal-function-bind',
Expand Down
49 changes: 27 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,35 @@
"postinstall": "run-s install-app-deps clean",
"start": "run-s clean build:watch",
"clean": "rimraf app dist",
"build": "run-p .:build:rollup .:build:workspaces",
"build-mac": "yarn --silent electron-builder --publish never --mac --universal",
"build-win": "yarn --silent electron-builder --publish never --win",
"build-linux": "yarn --silent electron-builder --publish never --linux",
".:build:rollup": "rollup -c",
".:build:workspaces": "yarn workspaces run build",
"release": "yarn electron-builder --publish onTagOrDraft --x64",
"build": "rollup -c",
"build:watch": "rollup -c -w",
"install-app-deps": "electron-builder install-app-deps",
"test": "xvfb-maybe jest",
"build-mac": "yarn electron-builder --publish never --mac --universal",
"build-win": "yarn electron-builder --publish never --win",
"build-linux": "yarn electron-builder --publish never --linux",
"build-assets": "ts-node -O '{\"module\":\"commonjs\"}' src/buildAssets.ts",
"build-assets-win": "ts-node -O \"{\\\"module\\\":\\\"commonjs\\\"}\" src/buildAssets.ts",
"release": "yarn electron-builder --publish onTagOrDraft --x64",
"install-app-deps": "electron-builder install-app-deps",
"test": "xvfb-maybe jest",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"lint": "run-s .:lint:eslint .:lint:tsc",
".:lint:eslint": "eslint .",
".:lint:tsc": "tsc --noEmit --skipLibCheck",
"lint-fix": "run-s .:lint-fix:eslint .:lint:tsc",
".:lint-fix:eslint": "eslint --fix ."
".:lint-fix:eslint": "eslint --fix .",
"workspaces:build": "yarn workspaces foreach -t run build"
},
"dependencies": {
"@bugsnag/js": "^7.16.0",
"@emotion/css": "^11.7.1",
"@emotion/react": "^11.7.1",
"@emotion/styled": "^11.6.0",
"@ewsjs/xhr": "^1.5.0",
"@rocket.chat/css-in-js": "^0.31.23-dev.165",
"@rocket.chat/fuselage": "^0.32.0-dev.391",
"@rocket.chat/fuselage-hooks": "^0.32.0-dev.304",
"@rocket.chat/fuselage-polyfills": "^0.31.23-dev.165",
"@rocket.chat/icons": "^0.32.0-dev.373",
"@ewsjs/xhr": "^1.5.0",
"abort-controller": "^3.0.0",
"axios": "^1.4.0",
"electron-dl": "^3.5.0",
Expand Down Expand Up @@ -91,12 +90,11 @@
"@rocket.chat/eslint-config": "^0.4.0",
"@rocket.chat/eslint-config-alt": "^0.32.0-dev.143",
"@rocket.chat/prettier-config": "^0.31.23-dev.165",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-replace": "^3.0.1",
"@rollup/plugin-typescript": "^8.3.0",
"@rollup/plugin-babel": "~5.3.1",
"@rollup/plugin-commonjs": "~21.1.0",
"@rollup/plugin-json": "~4.1.0",
"@rollup/plugin-node-resolve": "~13.3.0",
"@rollup/plugin-replace": "~3.1.0",
"@types/electron-devtools-installer": "^2.2.1",
"@types/jest": "^27.4.0",
"@types/meteor": "^2.0.4",
Expand All @@ -107,7 +105,8 @@
"@types/react-redux": "^7.1.22",
"@types/resize-observer-browser": "^0.1.6",
"@types/rimraf": "^3.0.2",
"@typescript-eslint/parser": "^5.10.1",
"@typescript-eslint/eslint-plugin": "~5.60.1",
"@typescript-eslint/parser": "~5.60.1",
"builtin-modules": "^3.2.0",
"chokidar": "^3.5.3",
"conventional-changelog-cli": "^2.2.2",
Expand All @@ -116,14 +115,15 @@
"electron-builder": "^23.6.0",
"electron-devtools-installer": "^3.2.0",
"electron-notarize": "^1.2.2",
"eslint": "^7.32.0",
"eslint": "~8.45.0",
"eslint-plugin-import": "~2.26.0",
"jest": "^26.6.3",
"jimp": "^0.16.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"puppeteer": "^13.1.2",
"rollup": "^2.66.1",
"rollup-plugin-copy": "^3.4.0",
"rollup": "~2.79.1",
"rollup-plugin-copy": "~3.4.0",
"ts-jest": "^26.5.6",
"ts-node": "^10.4.0",
"typescript": "^4.5.5",
Expand All @@ -142,5 +142,10 @@
"resolutions": {
"@fiahfy/icns-convert/sharp": "0.29.3",
"@fiahfy/ico-convert/sharp": "0.29.3"
}
},
"volta": {
"node": "14.21.3",
"yarn": "1.22.18"
},
"packageManager": "[email protected]"
}
22 changes: 11 additions & 11 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import nodeResolve from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import typescript from '@rollup/plugin-typescript';
import builtinModules from 'builtin-modules';
import electron from 'electron';
import copy from 'rollup-plugin-copy';
Expand Down Expand Up @@ -43,10 +42,7 @@ const run = () => {
};
};

const tsconfig = {
noEmitOnError: false,
exclude: ['src/**/*.spec.ts', 'src/.jest'],
};
const extensions = ['.js', '.ts', '.tsx'];

export default [
{
Expand All @@ -63,12 +59,13 @@ export default [
'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
'preventAssignment': true,
}),
typescript(tsconfig),
babel({
babelHelpers: 'bundled',
extensions,
}),
nodeResolve({
browser: true,
extensions,
}),
commonjs(),
],
Expand Down Expand Up @@ -97,12 +94,13 @@ export default [
'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
'preventAssignment': true,
}),
typescript(tsconfig),
babel({
babelHelpers: 'bundled',
extensions,
}),
nodeResolve({
browser: true,
extensions,
}),
commonjs(),
],
Expand All @@ -128,12 +126,13 @@ export default [
'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
'preventAssignment': true,
}),
typescript(tsconfig),
babel({
babelHelpers: 'bundled',
extensions,
}),
nodeResolve({
browser: true,
extensions,
}),
commonjs(),
],
Expand All @@ -153,12 +152,13 @@ export default [
'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
'preventAssignment': true,
}),
typescript(tsconfig),
babel({
babelHelpers: 'bundled',
extensions,
}),
nodeResolve({
browser: true,
extensions,
}),
commonjs(),
],
Expand Down Expand Up @@ -192,11 +192,11 @@ export default [
'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
'preventAssignment': true,
}),
typescript(tsconfig),
babel({
babelHelpers: 'bundled',
extensions,
}),
nodeResolve(),
nodeResolve({ extensions }),
commonjs(),
run(),
],
Expand Down
2 changes: 1 addition & 1 deletion src/servers/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import {
SERVER_URL_RESOLVED,
SERVERS_LOADED,
} from './actions';
import type { Server, ServerUrlResolutionResult } from './common';
import {
ServerUrlResolutionStatus,
isServerUrlResolutionResult,
} from './common';
import type { Server, ServerUrlResolutionResult } from './common';

const REQUIRED_SERVER_VERSION_RANGE = '>=2.0.0';

Expand Down
Loading
Loading