Skip to content

Commit bd0d8b1

Browse files
committed
Huge dependencies update. Version 4.0.0.
1 parent 397b688 commit bd0d8b1

File tree

9 files changed

+3707
-5262
lines changed

9 files changed

+3707
-5262
lines changed

.babelrc

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
{
22
"presets": [
3-
"react",
4-
"es2015",
5-
"stage-0"
3+
"@babel/preset-react"
4+
],
5+
"plugins": [
6+
"@babel/plugin-proposal-class-properties",
7+
[
8+
"@babel/plugin-proposal-decorators",
9+
{
10+
"legacy": true
11+
}
12+
],
13+
"@babel/plugin-proposal-numeric-separator",
14+
"@babel/plugin-proposal-optional-chaining",
15+
"@babel/plugin-proposal-nullish-coalescing-operator",
16+
"@babel/plugin-proposal-function-bind"
617
]
718
}

App/containers/CodeContainer.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,15 @@ class CodeContainer extends Component {
192192
<Dropzone
193193
onDrop={::this.onDrop}
194194
multiple={false}
195-
className="DropZone"
196195
>
197-
<div>Try dropping some file here, or click to select file to upload.</div>
196+
{({getRootProps, getInputProps}) => (
197+
<section>
198+
<div {...getRootProps({className: 'DropZone'})}>
199+
<input {...getInputProps()} />
200+
<div>Try dropping some file here, or click to select file to upload.</div>
201+
</div>
202+
</section>
203+
)}
198204
</Dropzone>
199205
</Pane>
200206
)

App/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {Provider} from 'react-redux';
66

77
import {createLogger} from 'redux-logger'
88
import thunk from 'redux-thunk'
9-
import promiseMiddleware from 'redux-promise-middleware';
9+
import promise from 'redux-promise-middleware';
1010

1111
import {loadState, saveState} from './localStorage';
1212

@@ -18,7 +18,7 @@ import "./styles/main.less";
1818
import {sanitizePersistedOptions} from "./reducers/options";
1919

2020

21-
const middleware = [thunk, promiseMiddleware()];
21+
const middleware = [thunk, promise];
2222
if (process.env.NODE_ENV !== 'production') {
2323
middleware.push(createLogger());
2424
}

App/styles/site/globals/site.variables

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
@fontSize : 16px;
1010

1111

12-
@imagePath : '/static/semantic/assets/images';
13-
@fontPath : '/static/semantic/assets/fonts';
12+
@imagePath : '../assets/images';
13+
@fontPath : '../assets/fonts';

package.json

+44-38
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,66 @@
11
{
22
"name": "javascript-obfuscator-web",
3-
"version": "3.14.9",
3+
"version": "4.0.0",
44
"description": "",
55
"engines": {
66
"node": ">=12.13.1"
77
},
88
"scripts": {
99
"start": "node server.js",
1010
"webpack:dev": "webpack --mode development --config webpack.conf.js --watch --color --progress",
11-
"webpack:prod": "NODE_ENV=production webpack --mode production --config webpack.conf.js --devtool source-map --progress --optimize-minimize",
11+
"webpack:prod": "NODE_ENV=production webpack --mode production --config webpack.conf.js --progress",
1212
"postinstall": "npm run updatesemantic && npm run webpack:prod",
1313
"updatesemantic": "cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/"
1414
},
1515
"author": "",
1616
"license": "ISC",
1717
"dependencies": {
18-
"babel-core": "6.14.0",
19-
"babel-eslint": "8.2.2",
20-
"babel-loader": "7.1.4",
21-
"babel-preset-es2015": "6.14.0",
22-
"babel-preset-react": "6.11.1",
23-
"babel-preset-stage-0": "6.5.0",
24-
"body-parser": "1.15.2",
25-
"classnames": "2.2.5",
26-
"codemirror": "5.18.2",
27-
"css-loader": "0.28.11",
18+
"@babel/core": "^7.12.10",
19+
"@babel/eslint-parser": "^7.12.1",
20+
"@babel/plugin-proposal-class-properties": "^7.0.0",
21+
"@babel/plugin-proposal-decorators": "^7.0.0",
22+
"@babel/plugin-proposal-function-bind": "^7.0.0",
23+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
24+
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
25+
"@babel/preset-env": "^7.12.11",
26+
"@babel/preset-es2015": "^7.0.0-beta.53",
27+
"@babel/preset-react": "^7.12.10",
28+
"babel-loader": "8.2.2",
29+
"body-parser": "1.19.0",
30+
"classnames": "2.2.6",
31+
"codemirror": "5.59.2",
32+
"css-loader": "5.0.1",
2833
"emoji-dictionary": "^1.0.11",
29-
"eslint": "4.19.1",
30-
"eslint-plugin-react": "7.7.0",
31-
"express": "4.14.0",
32-
"extract-text-webpack-plugin": "4.0.0-beta.0",
33-
"graceful-fs": "4.1.9",
34-
"html-webpack-plugin": "^3.2.0",
35-
"inert": "5.1.0",
34+
"eslint": "7.18.0",
35+
"eslint-plugin-react": "7.22.0",
36+
"express": "4.17.1",
37+
"file-loader": "^6.2.0",
38+
"graceful-fs": "4.2.4",
39+
"html-webpack-plugin": "^4.5.1",
3640
"javascript-obfuscator": "2.10.3",
3741
"less": "2.7.1",
38-
"less-loader": "4.1.0",
42+
"less-loader": "7.3.0",
43+
"mini-css-extract-plugin": "^1.3.4",
3944
"pm2": "3.5.1",
40-
"prop-types": "15.6.1",
41-
"raw-loader": "^4.0.1",
42-
"react": "16.13.1",
43-
"react-codemirror2": "5.0.1",
44-
"react-dom": "16.13.1",
45-
"react-dropzone": "4.2.9",
46-
"react-markdown": "^4.3.1",
47-
"react-redux": "5.0.7",
48-
"redux": "3.6.0",
45+
"process": "^0.11.10",
46+
"prop-types": "15.7.2",
47+
"raw-loader": "^4.0.2",
48+
"react": "17.0.1",
49+
"react-codemirror2": "7.2.1",
50+
"react-dom": "17.0.1",
51+
"react-dropzone": "11.2.4",
52+
"react-markdown": "^5.0.3",
53+
"react-redux": "7.2.2",
54+
"redux": "4.0.5",
4955
"redux-logger": "3.0.6",
50-
"redux-promise-middleware": "5.0.0",
51-
"redux-thunk": "2.1.0",
52-
"semantic-ui-less": "2.3.1",
53-
"semantic-ui-react": "0.79.0",
54-
"style-loader": "0.20.3",
55-
"threads": "^1.0.2",
56-
"url-loader": "1.0.1",
57-
"webpack": "4.4.1",
58-
"webpack-cli": "2.0.13"
56+
"redux-promise-middleware": "6.1.2",
57+
"redux-thunk": "2.3.0",
58+
"semantic-ui-less": "2.4.1",
59+
"semantic-ui-react": "2.0.3",
60+
"style-loader": "2.0.0",
61+
"threads": "^1.6.3",
62+
"url-loader": "4.1.1",
63+
"webpack": "5.17.0",
64+
"webpack-cli": "4.4.0"
5965
}
6066
}

server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const express = require('express');
22
const bodyParser = require("body-parser");
3-
const { spawn, Worker } = require('threads/dist');
3+
const { spawn, Worker } = require('threads');
44

55
const app = express();
66

templates/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ <h3 class="ui header">Support project:</h3>
237237

238238
</div>
239239

240-
<% if(htmlWebpackPlugin.files.chunks.bundle) { %>
241-
<script src="/static/dist/<%= htmlWebpackPlugin.files.chunks.bundle.entry %>"></script>
240+
<% if(htmlWebpackPlugin.files.js) { %>
241+
<script src="/static/dist/<%= htmlWebpackPlugin.files.js %>"></script>
242242
<% } %>
243243

244244
</body>

webpack.conf.js

+36-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
const ExtractTextPlugin = require('extract-text-webpack-plugin');
2-
3-
const extractLESS = new ExtractTextPlugin('stylesheets/[name].css');
41
const HtmlWebpackPlugin = require('html-webpack-plugin');
2+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3+
const webpack = require('webpack');
54

65
module.exports = {
76
context: __dirname,
7+
devtool: 'source-map',
88
entry: {
9-
"bundle": "./App/index.js",
10-
"workers/obfuscation-worker": "./App/workers/obfuscation-worker.js"
9+
'bundle': './App/index.js',
10+
'workers/obfuscation-worker': './App/workers/obfuscation-worker.js'
1111
},
1212
output: {
13-
path: __dirname + "/dist",
14-
filename: "[name].js",
15-
globalObject: "this"
13+
path: __dirname + '/dist',
14+
filename: '[name].js',
15+
globalObject: 'this'
1616
},
1717
module: {
1818
rules: [
@@ -23,32 +23,53 @@ module.exports = {
2323
},
2424
{
2525
test: /\.css$/,
26-
loader: ['style-loader', 'css-loader'],
26+
use: ['style-loader', 'css-loader'],
2727
},
2828
{
2929
test: /\.less$/,
30-
loader: extractLESS.extract(['css-loader', 'less-loader']),
30+
use: [
31+
{
32+
loader: MiniCssExtractPlugin.loader,
33+
options : {
34+
publicPath : __dirname + '/dist'
35+
}
36+
},
37+
'css-loader',
38+
'less-loader'
39+
]
3140
},
3241
{
33-
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
34-
loader: "url-loader?limit=10000&mimetype=application/font-woff"
42+
test: /\.woff(2)?$/,
43+
loader: 'url-loader',
44+
options: {
45+
limit: 10000,
46+
mimetype: 'application/font-woff'
47+
}
3548
},
3649
{
37-
test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
38-
loader: "file-loader"
50+
test: /\.(ttf|eot|svg)$/,
51+
loader: 'file-loader'
3952
},
4053
{
4154
test: /\.md$/i,
4255
use: 'raw-loader'
4356
}
4457
]
4558
},
59+
resolve: {
60+
alias: {
61+
process: "process/browser"
62+
}
63+
},
4664
plugins: [
65+
new webpack.ProvidePlugin({
66+
process: ['process']
67+
}),
4768
new HtmlWebpackPlugin({
4869
inject: false,
4970
template: './templates/index.html',
5071
hash: true
5172
}),
52-
extractLESS
73+
new MiniCssExtractPlugin()
5374
]
5475
};

0 commit comments

Comments
 (0)