Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
fix(build): Update configuration for webpack 5
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Simeon <[email protected]>
  • Loading branch information
jeromesimeon committed Mar 17, 2022
1 parent cdd0bb2 commit 74f7f27
Show file tree
Hide file tree
Showing 9 changed files with 6,667 additions and 557 deletions.
7,088 changes: 6,593 additions & 495 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"coveralls": "3.0.1",
"dayjs": "1.10.4",
"event-stream": "3.3.2",
"jsdoc": "^3.6.7",
"jsdoc": "^3.6.10",
"lerna": "^4.0.0",
"license-check-and-add": "2.3.6",
"lodash": "4.17.21",
Expand All @@ -44,8 +44,8 @@
"sleep-promise": "2.0.0"
},
"engines": {
"node": ">=8",
"npm": ">=3"
"node": ">=14",
"npm": ">=6"
},
"license-check-and-add-config": {
"folder": ".",
Expand Down
10 changes: 5 additions & 5 deletions packages/ergo-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
"yargs": "13.2.4"
},
"devDependencies": {
"chai": "4.2.0",
"chai": "4.3.6",
"chai-as-promised": "7.1.1",
"chai-things": "0.2.0",
"cucumber": "5.1.0",
"eslint": "6.0.1",
"jsdoc": "^3.6.7",
"eslint": "8.2.0",
"jsdoc": "^3.6.10",
"license-check": "1.1.5",
"mocha": "5.2.0",
"nyc": "13.3.0"
"mocha": "8.3.2",
"nyc": "15.1.0"
},
"license-check-config": {
"src": [
Expand Down
14 changes: 7 additions & 7 deletions packages/ergo-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
"winston": "3.2.1"
},
"devDependencies": {
"chai": "4.2.0",
"chai": "4.3.6",
"chai-as-promised": "7.1.1",
"chai-things": "0.2.0",
"eslint": "6.0.1",
"jsdoc": "^3.6.7",
"eslint": "8.2.0",
"jsdoc": "^3.6.10",
"license-check": "1.1.5",
"mocha": "5.2.0",
"nyc": "13.3.0",
"sinon": "6.3.5",
"sinon-chai": "3.2.0"
"mocha": "8.3.2",
"nyc": "15.1.0",
"sinon": "12.0.0",
"sinon-chai": "3.7.0"
},
"license-check-config": {
"src": [
Expand Down
3 changes: 3 additions & 0 deletions packages/ergo-engine/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
File renamed without changes.
37 changes: 21 additions & 16 deletions packages/ergo-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"directory": "packages/ergo-engine"
},
"main": "index.js",
"browser": "index.dist.js",
"scripts": {
"webpack": "webpack --config webpack.config.js --mode production",
"prepublishOnly": "npm run webpack",
Expand All @@ -21,7 +22,7 @@
"contributors": [
{
"name": "Jerome Simeon",
"email": "[email protected]"
"email": "[email protected]"
}
],
"license": "Apache-2.0",
Expand All @@ -40,24 +41,28 @@
"vm2": "3.5.0"
},
"devDependencies": {
"@babel/cli": "7.1.5",
"@babel/core": "7.1.6",
"@babel/preset-env": "7.1.6",
"archiver": "2.1.1",
"babel-core": "7.0.0-bridge.0",
"babel-loader": "8.0.4",
"babel-preset-env": "1.7.0",
"chai": "4.2.0",
"@babel/cli": "7.17.6",
"@babel/core": "7.17.5",
"@babel/preset-env": "7.16.11",
"@babel/register": "7.17.0",
"@istanbuljs/nyc-config-babel": "3.0.0",
"archiver": "3.0.0",
"assert": "2.0.0",
"babel-loader": "8.2.3",
"babel-plugin-istanbul": "6.1.1",
"chai": "4.3.6",
"chai-as-promised": "7.1.1",
"chai-things": "0.2.0",
"eslint": "6.0.1",
"jsdoc": "^3.6.7",
"constants-browserify": "1.0.0",
"eslint": "8.2.0",
"jsdoc": "^3.6.10",
"license-check": "1.1.5",
"mocha": "5.2.0",
"nyc": "13.3.0",
"raw-loader": "0.5.1",
"webpack": "4.16.3",
"webpack-cli": "3.1.0"
"mocha": "8.3.2",
"nyc": "15.1.0",
"raw-loader": "^4.0.2",
"stream-browserify": "3.0.0",
"webpack": "5.64.2",
"webpack-cli": "4.9.1"
},
"license-check-config": {
"src": [
Expand Down
56 changes: 30 additions & 26 deletions packages/ergo-engine/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,29 @@ const packageJson = require('./package.json');
module.exports = {
entry: {
client: [
'./index.browser.js'
'./index.dist.js'
]
},
output: {
path: path.join(__dirname, 'umd'),
filename: 'ergo-engine.js',
library: 'ergo-engine',
libraryTarget: 'umd',
umdNamedDefine: true
library: {
name: 'markdown-pdf',
type: 'umd',
},
umdNamedDefine: true,
},
plugins: [
new webpack.BannerPlugin(`Accord Project, Ergo v${packageJson.version} http://accordproject.org. Copyright 2018-2019, Clause Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.`),
new webpack.BannerPlugin(`Ergo v${packageJson.version}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.`),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
Expand All @@ -55,22 +55,26 @@ limitations under the License.`),
{
test: /\.js$/,
include: [path.join(__dirname, 'lib')],
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
use: ['babel-loader']
},
{
test: /\.ne$/,
use:['raw-loader']
}
]
},
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
resolve: {
fallback: {
'fs': false,
'tls': false,
'net': false,
'path': false,
'os': false,
'util': false,
'url': false,
'assert': require.resolve('assert/'),
'constants': require.resolve('constants-browserify'),
'stream': require.resolve('stream-browserify'),
}
}
};
10 changes: 5 additions & 5 deletions packages/ergo-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@
"dependencies": {
"@accordproject/ergo-compiler": "0.22.2",
"@accordproject/ergo-engine": "0.22.2",
"chai": "4.2.0",
"chai": "4.3.6",
"chai-as-promised": "7.1.1",
"chai-things": "0.2.0",
"cucumber": "5.1.0"
},
"devDependencies": {
"eslint": "6.0.1",
"jsdoc": "^3.6.7",
"eslint": "8.2.0",
"jsdoc": "^3.6.10",
"license-check": "1.1.5",
"mocha": "5.2.0",
"nyc": "13.3.0"
"mocha": "8.3.2",
"nyc": "15.1.0"
},
"license-check-config": {
"src": [
Expand Down

0 comments on commit 74f7f27

Please sign in to comment.