REFACTOR(node_version)! update to v20 #1553

Merged
alexm merged 7 commits from salix-node20 into dev 2023-06-02 06:14:10 +00:00
6 changed files with 11184 additions and 13766 deletions

View File

@ -22,7 +22,8 @@ export async function getBrowser() {
env.E2E_SHOW = true; env.E2E_SHOW = true;
} }
const headless = !env.E2E_SHOW; const headless = env.E2E_SHOW ? false : 'new';
Review

Aço es de chrome, no crec q siga la opcio més elegant pero ho he dixat aixina per a que funcionara

Aço es de chrome, no crec q siga la opcio més elegant pero ho he dixat aixina per a que funcionara
const browser = await Puppeteer.launch({ const browser = await Puppeteer.launch({
args, args,
defaultViewport: null, defaultViewport: null,

24871
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
"url": "https://gitea.verdnatura.es/verdnatura/salix" "url": "https://gitea.verdnatura.es/verdnatura/salix"
}, },
"engines": { "engines": {
"node": ">=14" "node": ">=20"
}, },
"dependencies": { "dependencies": {
"axios": "^1.2.2", "axios": "^1.2.2",
@ -33,19 +33,20 @@
"loopback-boot": "3.3.1", "loopback-boot": "3.3.1",
"loopback-component-explorer": "^6.5.0", "loopback-component-explorer": "^6.5.0",
"loopback-component-storage": "3.6.1", "loopback-component-storage": "3.6.1",
"loopback-connector-mysql": "^5.4.3", "loopback-connector-mysql": "^6.2.0",
"loopback-connector-remote": "^3.4.1", "loopback-connector-remote": "^3.4.1",
"loopback-context": "^3.4.0", "loopback-context": "^3.5.2",
"mailparser": "^2.8.0", "mailparser": "^2.8.0",
"md5": "^2.2.1", "md5": "^2.2.1",
"node-ssh": "^11.0.0", "node-ssh": "^11.0.0",
"object-diff": "0.0.4", "object-diff": "0.0.4",
"object.pick": "^1.3.0", "object.pick": "^1.3.0",
"puppeteer": "^18.0.5", "puppeteer": "^20.3.0",
"read-chunk": "^3.2.0", "read-chunk": "^3.2.0",
"require-yaml": "0.0.1", "require-yaml": "0.0.1",
"smbhash": "0.0.1", "smbhash": "0.0.1",
"strong-error-handler": "^2.3.2", "strong-error-handler": "^2.3.2",
"url-loader": "^4.1.1",
"uuid": "^3.3.3", "uuid": "^3.3.3",
"vn-loopback": "file:./loopback", "vn-loopback": "file:./loopback",
"vn-print": "file:./print", "vn-print": "file:./print",
@ -58,15 +59,15 @@
"@babel/register": "^7.7.7", "@babel/register": "^7.7.7",
"angular-mocks": "^1.7.9", "angular-mocks": "^1.7.9",
"babel-jest": "^26.0.1", "babel-jest": "^26.0.1",
"babel-loader": "^8.0.6", "babel-loader": "^8.2.4",
"core-js": "^3.9.1", "core-js": "^3.30.1",
"css-loader": "^2.1.0", "css-loader": "^6.7.4",
"del": "^2.2.2", "del": "^2.2.2",
"eslint": "^7.11.0", "eslint": "^7.11.0",
"eslint-config-google": "^0.11.0", "eslint-config-google": "^0.11.0",
"eslint-plugin-jasmine": "^2.10.1", "eslint-plugin-jasmine": "^2.10.1",
"fancy-log": "^1.3.2", "fancy-log": "^1.3.2",
"file-loader": "^1.1.11", "file-loader": "^6.2.0",
"gulp": "^4.0.2", "gulp": "^4.0.2",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",
"gulp-env": "^0.4.0", "gulp-env": "^0.4.0",
@ -79,9 +80,9 @@
"gulp-yaml": "^1.0.1", "gulp-yaml": "^1.0.1",
"html-loader": "^0.4.5", "html-loader": "^0.4.5",
"html-loader-jest": "^0.2.1", "html-loader-jest": "^0.2.1",
"html-webpack-plugin": "^4.0.0-beta.11", "html-webpack-plugin": "^5.5.1",
"identity-obj-proxy": "^3.0.0", "identity-obj-proxy": "^3.0.0",
"jasmine": "^4.5.0", "jasmine": "^5.0.0",
"jasmine-reporters": "^2.4.0", "jasmine-reporters": "^2.4.0",
"jasmine-spec-reporter": "^7.0.0", "jasmine-spec-reporter": "^7.0.0",
"jest": "^26.0.1", "jest": "^26.0.1",
@ -90,15 +91,16 @@
"merge-stream": "^1.0.1", "merge-stream": "^1.0.1",
"minimist": "^1.2.5", "minimist": "^1.2.5",
"mysql2": "^1.7.0", "mysql2": "^1.7.0",
"node-sass": "^4.14.1", "node-sass": "^9.0.0",
"nodemon": "^2.0.16", "nodemon": "^2.0.16",
"plugin-error": "^1.0.1", "plugin-error": "^1.0.1",
"raw-loader": "^1.0.0", "raw-loader": "^4.0.2",
"regenerator-runtime": "^0.13.7", "regenerator-runtime": "^0.13.7",
"sass-loader": "^7.3.1", "sass": "^1.62.1",
"style-loader": "^0.23.1", "sass-loader": "^13.3.0",
"webpack": "^4.41.5", "style-loader": "^3.3.3",
"webpack-cli": "^3.3.10", "webpack": "^5.83.1",
"webpack-cli": "^5.1.1",
"webpack-dev-server": "^3.11.0", "webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2", "webpack-merge": "^4.2.2",
"yaml-loader": "^0.5.0" "yaml-loader": "^0.5.0"

View File

@ -9,7 +9,7 @@ module.exports = {
concurrency: Cluster.CONCURRENCY_CONTEXT, concurrency: Cluster.CONCURRENCY_CONTEXT,
maxConcurrency: cpus().length, maxConcurrency: cpus().length,
puppeteerOptions: { puppeteerOptions: {
headless: true, headless: 'new',
args: [ args: [
'--no-sandbox', '--no-sandbox',
'--disable-setuid-sandbox', '--disable-setuid-sandbox',

View File

@ -2,7 +2,6 @@
"name": "vn-print", "name": "vn-print",
"version": "2.0.0", "version": "2.0.0",
"description": "Print service", "description": "Print service",
"main": "server/server.js",
"scripts": { "scripts": {
"start": "node server/server.js", "start": "node server/server.js",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"

View File

@ -20,13 +20,13 @@ let baseConfig = {
test: /\.js$/, test: /\.js$/,
loader: 'babel-loader', loader: 'babel-loader',
exclude: /node_modules/, exclude: /node_modules/,
query: { options: {
presets: ['@babel/preset-env'], presets: ['@babel/preset-env'],
plugins: ['@babel/plugin-syntax-dynamic-import'] plugins: ['@babel/plugin-syntax-dynamic-import']
} }
}, { }, {
test: /\.yml$/, test: /\.yml$/,
loader: 'json-loader!yaml-loader' use: ['json-loader!yaml-loader']
}, { }, {
test: /\.html$/, test: /\.html$/,
loader: 'html-loader', loader: 'html-loader',
@ -38,39 +38,34 @@ let baseConfig = {
} }
}, { }, {
test: /\.css$/, test: /\.css$/,
use: [ use: ['style-loader', 'css-loader']
{
loader: 'style-loader'
}, {
loader: 'css-loader'
}
]
}, { }, {
test: /\.scss$/, test: /\.scss$/,
use: [ use: [
{ 'style-loader', 'css-loader', {
loader: 'style-loader'
}, {
loader: 'css-loader'
}, {
loader: 'sass-loader', loader: 'sass-loader',
options: { options: {
// XXX: Don't work in Firefox // XXX: Don't work in Firefox
// https://github.com/webpack-contrib/style-loader/issues/303 // https://github.com/webpack-contrib/style-loader/issues/303
// sourceMap: true, // sourceMap: true,
includePaths: [ sassOptions: {
path.resolve(__dirname, 'front/core/styles') includePaths: [
] path.resolve(__dirname, 'front/core/styles/')
]
}
} }
} }
] ]
}, { }, {
test: /\.(svg|png|ttf|woff|woff2)$/, test: /\.(woff(2)?|ttf|eot|svg|png)(\?v=\d+\.\d+\.\d+)?$/,
loader: 'file-loader' type: 'asset/resource',
}, { }, {
test: /manifest\.json$/, test: /manifest\.json$/,
type: 'javascript/auto', type: 'javascript/auto',
loader: 'file-loader' loader: 'file-loader',
options: {
esModule: false,
}
} }
] ]
}, },
@ -105,7 +100,7 @@ let baseConfig = {
chunks: ['salix'] chunks: ['salix']
}), }),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) 'process.env.NODE_ENV': JSON.stringify(env)
}) })
], ],
devtool: 'source-map', devtool: 'source-map',
@ -124,7 +119,7 @@ let prodConfig = {
chunkFilename: '[id].[chunkhash].js' chunkFilename: '[id].[chunkhash].js'
}, },
plugins: [ plugins: [
new webpack.HashedModuleIdsPlugin() new webpack.ids.HashedModuleIdsPlugin()
Review

Han canviat la llibreria i ara es .ids.

Han canviat la llibreria i ara es .ids.
], ],
performance: { performance: {
maxEntrypointSize: 2000000, maxEntrypointSize: 2000000,