Skip to content

Commit

Permalink
Merge pull request #1191 from Codeinwp/bugfix/pro/498
Browse files Browse the repository at this point in the history
Update npm packages to latest versions
  • Loading branch information
vytisbulkevicius authored Nov 6, 2024
2 parents 6ac162a + 88e1635 commit f57cd95
Show file tree
Hide file tree
Showing 8 changed files with 6,182 additions and 13,082 deletions.
3 changes: 1 addition & 2 deletions classes/Visualizer/Gutenberg/build/block.css

Large diffs are not rendered by default.

260 changes: 1 addition & 259 deletions classes/Visualizer/Gutenberg/build/block.js

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions classes/Visualizer/Gutenberg/build/handsontable.css

Large diffs are not rendered by default.

44 changes: 1 addition & 43 deletions classes/Visualizer/Gutenberg/build/handsontable.js

Large diffs are not rendered by default.

18,741 changes: 6,063 additions & 12,678 deletions classes/Visualizer/Gutenberg/package-lock.json

Large diffs are not rendered by default.

36 changes: 19 additions & 17 deletions classes/Visualizer/Gutenberg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,34 @@
"handsontable": "^5.0.2",
"is-plain-object": "^2.0.4",
"merge": "^1.2.1",
"react": "16.4.1",
"react": "18.3.1",
"react-dom": "^18.3.1",
"react-google-charts": "^3.0.8",
"react-json-editor-ajrm": "^2.5.8",
"sprintf-js": "^1.1.2",
"uuid": "^3.3.3"
"uuid": "^8.3.2"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/core": "^7.21.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-async-to-generator": "^7.1.0",
"@babel/plugin-transform-react-jsx": "^7.1.6",
"@babel/preset-env": "^7.1.6",
"autoprefixer": "^9.3.1",
"babel-loader": "^8.0.4",
"cross-env": "3.2.4",
"css-loader": "^1.0.1",
"eslint": "^5.7.0",
"autoprefixer": "^10.4.0",
"babel-loader": "^9.1.0",
"cross-env": "7.0.3",
"css-loader": "^6.5.0",
"eslint": "^6.0.0",
"eslint-config-wordpress": "^2.0.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-react": "^7.11.1",
"file-loader": "^4.0.0",
"mini-css-extract-plugin": "^0.4.4",
"node-sass": "^4.10.0",
"postcss-loader": "^3.0.0",
"sass-loader": "^7.1.0",
"webpack": "^4.25.1",
"webpack-cli": "^3.1.2"
"eslint-loader": "^4.0.0",
"eslint-plugin-react": "^7.30.0",
"file-loader": "^6.0.0",
"mini-css-extract-plugin": "^2.4.5",
"node-sass": "^7.0.0",
"postcss-loader": "^6.2.1",
"sass-loader": "^12.0.0",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"terser-webpack-plugin": "^5.3.10"
}
}
2 changes: 1 addition & 1 deletion classes/Visualizer/Gutenberg/src/Components/DataTable.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import uuidv4 from 'uuid';
import { v4 as uuidv4 } from 'uuid';

/**
* WordPress dependencies
Expand Down
171 changes: 93 additions & 78 deletions classes/Visualizer/Gutenberg/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,93 +1,108 @@
const webpack = require( 'webpack' );
const webpack = require('webpack');
const NODE_ENV = process.env.NODE_ENV || 'development';
const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' );
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');

module.exports = {
externals: {
externals: {
'lodash': 'lodash'
},
mode: NODE_ENV,
entry: './src/index.js',
output: {
path: __dirname,
filename: './build/block.js',
chunkFilename: './build/[name].js'
},
module: {
rules: [
{
test: /.js?$/,
use: [ {
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env' ],
plugins: [
'@babel/plugin-transform-async-to-generator',
'@babel/plugin-proposal-object-rest-spread',
[
'@babel/plugin-transform-react-jsx', {
'pragma': 'wp.element.createElement'
}
]
]
}
},
'eslint-loader' ],
exclude: /node_modules/
},
{
test: /\.(css|scss)$/,
use: [ {
loader: MiniCssExtractPlugin.loader
},
'css-loader',
{
loader: 'postcss-loader',
options: {
plugins: [
require( 'autoprefixer' )
]
}
},
{
loader: 'sass-loader',
query: {
outputStyle:
'production' === process.env.NODE_ENV ? 'compressed' : 'nested'
}
} ]
},
{
test: /\.(png|jpe?g|gif)$/,
use: [
{
loader: 'file-loader',
options: {
name: './[name].[ext]'
}
}
]
}
]
},
optimization: {
mode: NODE_ENV,
entry: {
block: './src/index.js'
},
output: {
path: __dirname,
filename: './build/[name].js'
},
module: {
rules: [
{
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: [
'@babel/plugin-transform-async-to-generator',
'@babel/plugin-proposal-object-rest-spread',
[
'@babel/plugin-transform-react-jsx', {
'pragma': 'wp.element.createElement'
}
]
]
}
},
exclude: /node_modules/
},
{
test: /\.(css|scss)$/,
use: [
{
loader: MiniCssExtractPlugin.loader
},
'css-loader',
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [
require('autoprefixer')
]
}
}
},
{
loader: 'sass-loader',
options: {
implementation: require('sass'),
sassOptions: {
outputStyle: NODE_ENV === 'production' ? 'compressed' : 'expanded'
}
}
}
]
},
{
test: /\.(png|jpe?g|gif)$/,
use: [
{
loader: 'file-loader',
options: {
name: './[name].[ext]'
}
}
]
}
]
},
optimization: {
splitChunks: {
cacheGroups: {
handsontable: {
name: 'handsontable',
test: /[\\/]node_modules[\\/]handsontable/,
chunks: 'all'
chunks: 'all',
enforce: true
}
}
}
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify( NODE_ENV )
}),
new MiniCssExtractPlugin({
filename: './build/block.css',
chunkFilename: './build/[name].css'
})
]
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(NODE_ENV)
}),
new MiniCssExtractPlugin({
filename: './build/[name].css'
}),
new TerserPlugin({
terserOptions: {
format: {
comments: false // Disable comments
}
},
extractComments: false // Prevents LICENSE.txt generation
})
]
};

0 comments on commit f57cd95

Please sign in to comment.