Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Node 18 without the need to use NODE_OPTIONS=--openssl-legacy-provider #56

Merged
merged 3 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"airbnb/hooks",
"plugin:compat/recommended",
],
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false
},
"env": {
"browser": true,
"commonjs": false,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [14.x, 16.x, 18.x]
config: ["configs/ghostery.js", "configs/user-agent-ios.js"]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v2
Expand Down
35 changes: 8 additions & 27 deletions broccoli/modules/broccoli-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const Plugin = require('broccoli-plugin');
const path = require('path');
const glob = require('glob');
const webpack = require('webpack');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');

const cliqzEnv = require('../cliqz-env');
Expand Down Expand Up @@ -71,29 +70,11 @@ module.exports = class BroccoliWebpack extends Plugin {
pako: 'pako/dist/pako.js',
'plugin-json': 'systemjs-plugin-json/json.js',
'rxjs/operators': 'rxjs/operators/index',
}
},
fallback: {
fs: 'empty',
},
},
node: {
fs: 'empty',
},
// In development mode we would like to speed up any subsequential build process.
// Thus using this HardSourceWebpackPlugin might be useful.
// Since it gets cached previous build results.
// Unlike a production build where it gets compiled only once and we do need to cache it.
plugins: cliqzEnv.DEVELOPMENT ? [
new HardSourceWebpackPlugin({
// Clean up large, old caches automatically.
cachePrune: {
// Caches younger than `maxAge` are not considered for deletion. They must
// be at least this (default: 2 hours) old in milliseconds.
maxAge: 2 * 60 * 60 * 1000,
// All caches together must be larger than `sizeThreshold` before any
// caches will be deleted. Together they must be at least this
// (default: 500 MB) big in bytes.
sizeThreshold: 500 * 1024 * 1024
},
}),
] : [],
externals: this.builderConfig.globalDeps,
optimization: {
minimizer: [
Expand All @@ -115,10 +96,10 @@ module.exports = class BroccoliWebpack extends Plugin {
// could happen so that webpack could avoid including that module in its' bundle.
sideEffects: false,
}
}, (error, stats) => {
if (error || stats.hasErrors()) {
console.log(stats.toString({ colors: true }));
return reject();
}, (error) => {
if (error) {
console.log(error);
return reject(error);
}

const t2 = new Date().getTime();
Expand Down
Loading