Dependency Updates as of 2020Dec15 (#995)

* Update icon dependencies

* chore(deps): bootstrap

* chore(deps): ipaddr.js to 2.0.0

* chore(deps): Update React+dom to 17

* Prep for transforming import React

* chore(deps): Update typescript, Tsconfig with react-jsx, post npx react-codemod.

* chore(deps): update archiver from 5.0.2 to 5.1.0

* chore(deps): Bump react-redux from 7.2.1 to 7.2.2.
Bump @types/react-redux from 7.1.9 to 7.1.12

* chore(deps): Bump shortid from 2.2.15 to 2.2.26.|
Bump webextension-polyfill from 0.6 to 0.7

* chore(deps): Bump ajv from 6.12.5 to 6.12.6

* chore(deps): Bump eslint and ts packages

* chore(deps): Bump source-map-loader from 1.1.1 to 1.1.3.

* chore(deps): Bump prettier from 2.1.2 to 2.2.1

* chore(deps): Update Jest from 26.4.2 to 26.6.3.
Update jest-when from 2.7.2 to 3.0.1

* chore(deps): Bump ajv from 6.12.6 to 7.0.0

* chore(deps): Update webpack and config files.
Ignore all files in bundles directory.
Bump webpack from 4.44.2 to 5.10.3.
Bump webpack-cli from 3.3.12 to 4.2.0.
Bump copy-webpack-plugin from 6.1.1 to 7.0.0
Bump webpack-bundle-analyzer from 3.9.0 to 4.2.0

* Update Release Notes

* Add missing js script in settings.html

Co-authored-by: Kenneth T <kennethtran93@users.noreply.github.com>
pull/1007/head
Kenneth T 2020-12-21 20:55:07 -08:00 committed by GitHub
parent d438edad75
commit 71288b1fce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 18949 additions and 3979 deletions

View File

@ -31,7 +31,9 @@
"plugins": ["react", "@typescript-eslint"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"react/jsx-uses-react": "off",
"react/prop-types": ["off"],
"react/react-in-jsx-scope": "off",
"no-console": "warn"
}
}

1
.gitignore vendored
View File

@ -41,6 +41,7 @@ jspm_packages
report.html
*Bundle.js
*bundle.js
bundles/
builds/
.directory

View File

@ -102,7 +102,7 @@ describe('SettingService', () => {
.calledWith({ windowType: 'normal' })
.mockResolvedValue([] as never);
when(global.browser.contextMenus.update)
.calledWith(expect.anything())
.calledWith(expect.anything(), expect.anything())
.mockResolvedValue(null as never);
});

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,5 @@
/*!
* Bootstrap v4.5.3 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
/*! jQuery v3.5.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-deprecated/ajax-event-alias,-effects,-effects/Tween,-effects/animatedSelector | (c) JS Foundation and other contributors | jquery.org/license */

View File

@ -19,6 +19,7 @@
<script src="../global_files/bootstrap.bundle.min.js"></script>
<script src="../bundles/common-background-popup-setting.bundle.js"></script>
<script src="../bundles/common-popup-setting.bundle.js"></script>
<script src="../bundles/common-setting.bundle.js"></script>
<script src="../bundles/setting.bundle.js"></script>
</body>
</html>

View File

@ -21,7 +21,7 @@ module.exports = {
collectCoverage: true,
// An array of glob patterns indicating a set of files for which coverage information should be collected
collectCoverageFrom: ['src/**/*.{ts,tsx}',],
collectCoverageFrom: ['src/**/*.{ts,tsx}'],
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
@ -57,7 +57,7 @@ module.exports = {
// A set of global variables that need to be available in all test environments
globals: {
'ts-jest': {
tsConfig: 'tsconfig.json',
tsconfig: 'tsconfig.json',
},
},
@ -67,7 +67,7 @@ module.exports = {
// ],
// An array of file extensions your modules use
moduleFileExtensions: ['ts', 'tsx', 'js',],
moduleFileExtensions: ['ts', 'tsx', 'js'],
// A map from regular expressions to module names that allow to stub out resources with a single module
// moduleNameMapper: {},
@ -132,7 +132,7 @@ module.exports = {
// testLocationInResults: false,
// The glob patterns Jest uses to detect test files
testMatch: ['**/__tests__/*/**.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)',],
testMatch: ['**/__tests__/*/**.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
@ -160,7 +160,7 @@ module.exports = {
},
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
transformIgnorePatterns: ['/node_modules/',],
transformIgnorePatterns: ['/node_modules/'],
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,

22744
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,58 +15,58 @@
},
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-regular-svg-icons": "^5.14.0",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
"@fortawesome/react-fontawesome": "^0.1.11",
"bootstrap": "^4.5.2",
"ipaddr.js": "^1.9.1",
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-regular-svg-icons": "^5.15.1",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/react-fontawesome": "^0.1.13",
"bootstrap": "^4.5.3",
"ipaddr.js": "^2.0.0",
"jquery": "^3.5.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-redux": "^7.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-redux": "^7.2.2",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"redux-webext": "^1.1.2",
"shortid": "^2.2.15",
"webextension-polyfill": "^0.6.0"
"shortid": "^2.2.16",
"webextension-polyfill": "^0.7.0"
},
"devDependencies": {
"@types/jest": "^26.0.14",
"@types/jest-when": "^2.7.1",
"@types/react": "^16.9.53",
"@types/react-dom": "^16.9.8",
"@types/react-redux": "^7.1.9",
"@types/jest": "^26.0.19",
"@types/jest-when": "^2.7.2",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-redux": "^7.1.12",
"@types/redux-thunk": "^2.1.0",
"@types/shortid": "0.0.29",
"@typescript-eslint/eslint-plugin": "^4.3.0",
"@typescript-eslint/eslint-plugin-tslint": "^4.3.0",
"@typescript-eslint/parser": "^4.3.0",
"ajv": "^6.12.5",
"archiver": "^5.0.2",
"copy-webpack-plugin": "^6.1.1",
"eslint": "^7.10.0",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-jsdoc": "^30.6.4",
"@typescript-eslint/eslint-plugin": "^4.10.0",
"@typescript-eslint/eslint-plugin-tslint": "^4.10.0",
"@typescript-eslint/parser": "^4.10.0",
"ajv": "^7.0.0",
"archiver": "^5.1.0",
"copy-webpack-plugin": "^7.0.0",
"eslint": "^7.15.0",
"eslint-config-prettier": "^7.0.0",
"eslint-plugin-jsdoc": "^30.7.8",
"eslint-plugin-prefer-arrow": "^1.2.2",
"eslint-plugin-react": "^7.21.2",
"jest": "^26.4.2",
"eslint-plugin-react": "^7.21.5",
"jest": "^26.6.3",
"jest-date-mock": "^1.0.8",
"jest-when": "^2.7.2",
"prettier": "^2.1.2",
"source-map-loader": "^1.1.1",
"ts-jest": "^26.4.1",
"ts-loader": "^8.0.4",
"typescript": "^4.0.3",
"jest-when": "^3.0.1",
"prettier": "^2.2.1",
"source-map-loader": "^1.1.3",
"ts-jest": "^26.4.4",
"ts-loader": "^8.0.12",
"typescript": "^4.1.3",
"web-ext-types": "^3.2.1",
"webpack": "^4.44.2",
"webpack-bundle-analyzer": "^3.9.0",
"webpack-cli": "^3.3.12"
"webpack": "^5.10.3",
"webpack-bundle-analyzer": "^4.2.0",
"webpack-cli": "^4.2.0"
},
"scripts": {
"build": "npm run compile && node ./tools/buildFilesDev.js",
"compile": "webpack --config webpack.config.js",
"dev": "webpack --config webpack.config.js --progress --colors --watch",
"compile": "webpack --config webpack.config.js --color",
"dev": "webpack --config webpack.config.js --progress --color --watch",
"lint": "eslint src/",
"test": "jest --coverage",
"test-all": "npm run test && npm run lint"

View File

@ -10,7 +10,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import * as React from 'react';
import { Component } from 'react';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';
import { removeExpressionUI, updateExpressionUI } from '../../redux/Actions';
@ -40,10 +40,7 @@ interface DispatchProps {
type ExpressionTableProps = DispatchProps & OwnProps;
class ExpressionTable extends React.Component<
ExpressionTableProps,
EmptyState
> {
class ExpressionTable extends Component<ExpressionTableProps, EmptyState> {
private editInput: HTMLInputElement | undefined | null;
constructor(props: ExpressionTableProps) {
super(props);

View File

@ -12,8 +12,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createUIStore } from 'redux-webext';
import { isChrome, sleep } from '../../services/Libs';

View File

@ -10,7 +10,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import * as React from 'react';
import { Component } from 'react';
import { connect } from 'react-redux';
import ErrorBoundary from '../common_components/ErrorBoundary';
import About from './components/About';
@ -24,7 +24,7 @@ interface OwnProps {
sizeSetting: number;
}
class App extends React.Component<OwnProps> {
class App extends Component<OwnProps> {
public state = {
activeTab: 'tabWelcome',
settingsURL: '',

View File

@ -1,9 +1,5 @@
{
"releases": [
{
"version": "unreleased",
"notes": ["Fixed: Partial Regex Domain Replacements in backend."]
},
{
"version": "3.6.0",
"notes": [
@ -14,7 +10,8 @@
"Chore: Backend Code Optimizations.",
"Chore: Dependency Updates.",
"Fixed: Duplication of domains in siteData Notifications.",
"Fixed: Usage of commas within Regular Expressions. Closes #865."
"Fixed: Usage of commas within Regular Expressions. Closes #865.",
"Fixed: Partial Regex Domain Replacements in backend."
]
},
{

View File

@ -11,8 +11,7 @@
* SOFTWARE.
*/
/* istanbul ignore file: React-redux init */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createUIStore } from 'redux-webext';
import { sleep } from '../../services/Libs';

View File

@ -9,7 +9,7 @@
] /* Specify library files to be included in the compilation. */,
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
"jsx": "react-jsx" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
"sourceMap": true /* Generates corresponding '.map' file. */,
@ -46,7 +46,7 @@
"src/typings"
] /* List of folders to include type definitions from. */,
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
/* Source Map Options */

View File

@ -55,31 +55,27 @@ module.exports = {
new CopyPlugin({
patterns: [
{
flatten: true,
force: true,
from: 'bootstrap/dist/css/bootstrap.min.css*',
to: '../../extension/global_files/',
to: '../../extension/global_files/[name].[ext]',
context: `${__dirname}/node_modules`,
},
{
flatten: true,
force: true,
from: 'bootstrap/dist/js/bootstrap.bundle.min.js*',
to: '../../extension/global_files/',
to: '../../extension/global_files/[name].[ext]',
context: `${__dirname}/node_modules`,
},
{
flatten: true,
force: true,
from: 'jquery/dist/jquery.slim.min*',
to: '../../extension/global_files/',
to: '../../extension/global_files/[name].[ext]',
context: `${__dirname}/node_modules`,
},
{
flatten: true,
force: true,
from: 'webextension-polyfill/dist/browser-polyfill.min.js*',
to: '../../extension/global_files/',
to: '../../extension/global_files/[name].[ext]',
context: `${__dirname}/node_modules`,
},
],
@ -98,6 +94,20 @@ module.exports = {
},
common: {
chunks: 'initial',
// cacheGroupKey here is `common` as key of cacheGroup
name: (module, chunks, cacheGroupKey) => {
return [cacheGroupKey, chunks.map((c) => c.runtime).join('-')].join(
'-',
);
},
// Alternate version of above results, only if output.filename stays as [name].bundle.js
// filename: (pathData) => {
// return `common-${
// pathData.runtime.size > 1
// ? Array.from(pathData.runtime).join('-')
// : pathData.runtime
// }.bundle.js`;
// },
priority: -15,
},
default: {