update dependencies & bump minimum node version (#1329)

- bump all dependences
- add github-actions reporter to jest
- convert (most) webpack configs to ESM
  - manifest.cjs cannot be converted since there is no native .json import until node 17
This commit is contained in:
Michael C 2022-05-24 21:14:36 -04:00
parent 4738c1897f
commit 2665327729
No known key found for this signature in database
GPG key ID: FFB04FB3B878B7B4
7 changed files with 3436 additions and 2793 deletions

View file

@ -5,4 +5,5 @@ module.exports = {
"transform": {
"^.+\\.ts$": "ts-jest"
},
"reporters": ["github-actions"]
};

6152
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -3,39 +3,40 @@
"version": "1.0.0",
"description": "",
"main": "background.js",
"type": "module",
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@types/chrome": "^0.0.180",
"@types/chrome": "^0.0.188",
"@types/firefox-webext-browser": "^94.0.1",
"@types/jest": "^27.4.1",
"@types/jest": "^27.5.1",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
"@types/selenium-webdriver": "^4.0.18",
"@types/selenium-webdriver": "^4.1.0",
"@types/wicg-mediasession": "^1.1.3",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"chromedriver": "^100.0.0",
"concurrently": "^7.0.0",
"copy-webpack-plugin": "^10.2.4",
"eslint": "^8.12.0",
"eslint-plugin-react": "^7.29.4",
"fork-ts-checker-webpack-plugin": "^7.2.1",
"jest": "^27.5.1",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"chromedriver": "^101.0.0",
"concurrently": "^7.2.1",
"copy-webpack-plugin": "^11.0.0",
"eslint": "^8.16.0",
"eslint-plugin-react": "^7.30.0",
"fork-ts-checker-webpack-plugin": "^7.2.11",
"jest": "^28.1.0",
"rimraf": "^3.0.2",
"schema-utils": "^4.0.0",
"selenium-webdriver": "^4.1.1",
"selenium-webdriver": "^4.1.2",
"speed-measure-webpack-plugin": "^1.5.0",
"ts-jest": "^27.1.4",
"ts-loader": "^9.2.8",
"ts-node": "^10.7.0",
"typescript": "4.6",
"ts-jest": "^28.0.3",
"ts-loader": "^9.3.0",
"ts-node": "^10.8.0",
"typescript": "4.7",
"web-ext": "^6.8.0",
"webpack": "^5.64.4",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2",
"webpack-merge": "^4.2.2"
"webpack-merge": "^5.8.0"
},
"scripts": {
"web-run": "npm run web-run:chrome",
@ -65,7 +66,7 @@
"lint:fix": "eslint src --fix"
},
"engines": {
"node": ">=12.20.0"
"node": ">=16"
},
"funding": [
{

View file

@ -1,12 +1,15 @@
/* eslint-disable @typescript-eslint/no-var-requires */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const webpack = require("webpack");
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const BuildManifest = require('./webpack.manifest');
const srcDir = '../src/';
const fs = require("fs");
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
import webpack from "webpack"
import path from "path"
import { fileURLToPath } from "url"
import CopyPlugin from "copy-webpack-plugin"
import BuildManifest from "./webpack.manifest.cjs";
const srcDir = "../src/";
import fs from "fs";
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const edgeLanguages = [
"de",
@ -24,7 +27,7 @@ const edgeLanguages = [
"zh_CN"
]
module.exports = env => ({
export default env => ({
entry: {
popup: path.join(__dirname, srcDir + 'popup.ts'),
background: path.join(__dirname, srcDir + 'background.ts'),

View file

@ -1,8 +1,7 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
import { merge } from "webpack-merge";
import common from './webpack.common.js';
module.exports = env => merge(common(env), {
export default env => merge(common(env), {
devtool: 'inline-source-map',
mode: 'development'
});

View file

@ -1,8 +1,7 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
import { merge } from "webpack-merge";
import common from './webpack.common.js';
module.exports = env => {
export default env => {
let mode = "production";
env.mode = mode;