From be182ac51343114d3215b7607633031347d0c848 Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:46:35 -0400 Subject: [PATCH] Assorted Desktop App repo fixes (#3065) * Fix ESLint and turn on the check in CI * npm audit fix * Remove electron-rebuild, use electron-builder for robotjs * Add mochawesome-report to eslintignore * Remove linebreak-style * Revert "Remove electron-rebuild, use electron-builder for robotjs" This reverts commit be35eb7300df725e381538dd30446a9acb8ab1df. --- .eslintignore | 3 ++- .eslintrc.json | 1 + .github/actions/test/action.yaml | 3 +++ package-lock.json | 20 ++++++++++---------- scripts/beforepack.js | 8 ++++---- scripts/cp_msi_app_update.js | 2 +- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/.eslintignore b/.eslintignore index ae9050f6..7ab7d983 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ node_modules dist -api-types/lib \ No newline at end of file +api-types/lib +mochawesome-report \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 135ffa52..120fa968 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -29,6 +29,7 @@ "react/no-find-dom-node": 2, "no-underscore-dangle": ["warn"], "@mattermost/use-external-link": 0, + "linebreak-style": 0, "import/order": [ 2, { diff --git a/.github/actions/test/action.yaml b/.github/actions/test/action.yaml index 9c4f5f06..bcda2927 100644 --- a/.github/actions/test/action.yaml +++ b/.github/actions/test/action.yaml @@ -11,6 +11,9 @@ inputs: runs: using: "composite" steps: + - name: ci/run-eslint + run: npm run lint:js-quiet + shell: ${{ inputs.shell }} - name: ci/run-check-types run: npm run check-types shell: ${{ inputs.shell }} diff --git a/package-lock.json b/package-lock.json index a4c3096f..3d6d8266 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8011,12 +8011,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -9661,9 +9661,9 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "node_modules/ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dev": true, "dependencies": { "jake": "^10.8.5" @@ -11600,9 +11600,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" diff --git a/scripts/beforepack.js b/scripts/beforepack.js index eb8bb094..e1ddd99a 100644 --- a/scripts/beforepack.js +++ b/scripts/beforepack.js @@ -1,14 +1,14 @@ // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. -var fs = require('fs'); -var path = require('path'); +const fs = require('fs'); +const path = require('path'); exports.default = async function beforePack(context) { // The debian packager (fpm) complains when the directory to output the package to doesn't exist // So we have to manually create it first - var dir = path.join(context.outDir, context.packager.appInfo.version) - if (!fs.existsSync(dir)){ + const dir = path.join(context.outDir, context.packager.appInfo.version); + if (!fs.existsSync(dir)) { fs.mkdirSync(dir, {recursive: true}); } }; diff --git a/scripts/cp_msi_app_update.js b/scripts/cp_msi_app_update.js index f5c397c2..7701ff05 100644 --- a/scripts/cp_msi_app_update.js +++ b/scripts/cp_msi_app_update.js @@ -3,4 +3,4 @@ const fs = require('fs'); fs.copyFileSync('release/win-unpacked/resources/app-update.yml', 'release/msi-app-update.yml'); -fs.unlinkSync('release/win-unpacked/resources/app-update.yml'); \ No newline at end of file +fs.unlinkSync('release/win-unpacked/resources/app-update.yml');