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

Commit 74f7f27

Browse files
committed
fix(build): Update configuration for webpack 5
Signed-off-by: Jerome Simeon <[email protected]>
1 parent cdd0bb2 commit 74f7f27

File tree

9 files changed

+6667
-557
lines changed

9 files changed

+6667
-557
lines changed

package-lock.json

Lines changed: 6593 additions & 495 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"coveralls": "3.0.1",
3535
"dayjs": "1.10.4",
3636
"event-stream": "3.3.2",
37-
"jsdoc": "^3.6.7",
37+
"jsdoc": "^3.6.10",
3838
"lerna": "^4.0.0",
3939
"license-check-and-add": "2.3.6",
4040
"lodash": "4.17.21",
@@ -44,8 +44,8 @@
4444
"sleep-promise": "2.0.0"
4545
},
4646
"engines": {
47-
"node": ">=8",
48-
"npm": ">=3"
47+
"node": ">=14",
48+
"npm": ">=6"
4949
},
5050
"license-check-and-add-config": {
5151
"folder": ".",

packages/ergo-cli/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@
5252
"yargs": "13.2.4"
5353
},
5454
"devDependencies": {
55-
"chai": "4.2.0",
55+
"chai": "4.3.6",
5656
"chai-as-promised": "7.1.1",
5757
"chai-things": "0.2.0",
5858
"cucumber": "5.1.0",
59-
"eslint": "6.0.1",
60-
"jsdoc": "^3.6.7",
59+
"eslint": "8.2.0",
60+
"jsdoc": "^3.6.10",
6161
"license-check": "1.1.5",
62-
"mocha": "5.2.0",
63-
"nyc": "13.3.0"
62+
"mocha": "8.3.2",
63+
"nyc": "15.1.0"
6464
},
6565
"license-check-config": {
6666
"src": [

packages/ergo-compiler/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141
"winston": "3.2.1"
4242
},
4343
"devDependencies": {
44-
"chai": "4.2.0",
44+
"chai": "4.3.6",
4545
"chai-as-promised": "7.1.1",
4646
"chai-things": "0.2.0",
47-
"eslint": "6.0.1",
48-
"jsdoc": "^3.6.7",
47+
"eslint": "8.2.0",
48+
"jsdoc": "^3.6.10",
4949
"license-check": "1.1.5",
50-
"mocha": "5.2.0",
51-
"nyc": "13.3.0",
52-
"sinon": "6.3.5",
53-
"sinon-chai": "3.2.0"
50+
"mocha": "8.3.2",
51+
"nyc": "15.1.0",
52+
"sinon": "12.0.0",
53+
"sinon-chai": "3.7.0"
5454
},
5555
"license-check-config": {
5656
"src": [

packages/ergo-engine/.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["@babel/preset-env"]
3+
}
File renamed without changes.

packages/ergo-engine/package.json

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"directory": "packages/ergo-engine"
99
},
1010
"main": "index.js",
11+
"browser": "index.dist.js",
1112
"scripts": {
1213
"webpack": "webpack --config webpack.config.js --mode production",
1314
"prepublishOnly": "npm run webpack",
@@ -21,7 +22,7 @@
2122
"contributors": [
2223
{
2324
"name": "Jerome Simeon",
24-
"email": "[email protected]"
25+
"email": "[email protected]"
2526
}
2627
],
2728
"license": "Apache-2.0",
@@ -40,24 +41,28 @@
4041
"vm2": "3.5.0"
4142
},
4243
"devDependencies": {
43-
"@babel/cli": "7.1.5",
44-
"@babel/core": "7.1.6",
45-
"@babel/preset-env": "7.1.6",
46-
"archiver": "2.1.1",
47-
"babel-core": "7.0.0-bridge.0",
48-
"babel-loader": "8.0.4",
49-
"babel-preset-env": "1.7.0",
50-
"chai": "4.2.0",
44+
"@babel/cli": "7.17.6",
45+
"@babel/core": "7.17.5",
46+
"@babel/preset-env": "7.16.11",
47+
"@babel/register": "7.17.0",
48+
"@istanbuljs/nyc-config-babel": "3.0.0",
49+
"archiver": "3.0.0",
50+
"assert": "2.0.0",
51+
"babel-loader": "8.2.3",
52+
"babel-plugin-istanbul": "6.1.1",
53+
"chai": "4.3.6",
5154
"chai-as-promised": "7.1.1",
5255
"chai-things": "0.2.0",
53-
"eslint": "6.0.1",
54-
"jsdoc": "^3.6.7",
56+
"constants-browserify": "1.0.0",
57+
"eslint": "8.2.0",
58+
"jsdoc": "^3.6.10",
5559
"license-check": "1.1.5",
56-
"mocha": "5.2.0",
57-
"nyc": "13.3.0",
58-
"raw-loader": "0.5.1",
59-
"webpack": "4.16.3",
60-
"webpack-cli": "3.1.0"
60+
"mocha": "8.3.2",
61+
"nyc": "15.1.0",
62+
"raw-loader": "^4.0.2",
63+
"stream-browserify": "3.0.0",
64+
"webpack": "5.64.2",
65+
"webpack-cli": "4.9.1"
6166
},
6267
"license-check-config": {
6368
"src": [

packages/ergo-engine/webpack.config.js

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,29 @@ const packageJson = require('./package.json');
2121
module.exports = {
2222
entry: {
2323
client: [
24-
'./index.browser.js'
24+
'./index.dist.js'
2525
]
2626
},
2727
output: {
2828
path: path.join(__dirname, 'umd'),
2929
filename: 'ergo-engine.js',
30-
library: 'ergo-engine',
31-
libraryTarget: 'umd',
32-
umdNamedDefine: true
30+
library: {
31+
name: 'markdown-pdf',
32+
type: 'umd',
33+
},
34+
umdNamedDefine: true,
3335
},
3436
plugins: [
35-
new webpack.BannerPlugin(`Accord Project, Ergo v${packageJson.version} http://accordproject.org. Copyright 2018-2019, Clause Inc.
36-
Licensed under the Apache License, Version 2.0 (the "License");
37-
you may not use this file except in compliance with the License.
38-
You may obtain a copy of the License at
39-
40-
http://www.apache.org/licenses/LICENSE-2.0
41-
42-
Unless required by applicable law or agreed to in writing, software
43-
distributed under the License is distributed on an "AS IS" BASIS,
44-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45-
See the License for the specific language governing permissions and
46-
limitations under the License.`),
37+
new webpack.BannerPlugin(`Ergo v${packageJson.version}
38+
Licensed under the Apache License, Version 2.0 (the "License");
39+
you may not use this file except in compliance with the License.
40+
You may obtain a copy of the License at
41+
http://www.apache.org/licenses/LICENSE-2.0
42+
Unless required by applicable law or agreed to in writing, software
43+
distributed under the License is distributed on an "AS IS" BASIS,
44+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45+
See the License for the specific language governing permissions and
46+
limitations under the License.`),
4747
new webpack.DefinePlugin({
4848
'process.env': {
4949
'NODE_ENV': JSON.stringify('production')
@@ -55,22 +55,26 @@ limitations under the License.`),
5555
{
5656
test: /\.js$/,
5757
include: [path.join(__dirname, 'lib')],
58-
use: {
59-
loader: 'babel-loader',
60-
options: {
61-
presets: ['@babel/preset-env']
62-
}
63-
}
58+
use: ['babel-loader']
6459
},
6560
{
6661
test: /\.ne$/,
6762
use:['raw-loader']
6863
}
6964
]
7065
},
71-
node: {
72-
fs: 'empty',
73-
net: 'empty',
74-
tls: 'empty'
66+
resolve: {
67+
fallback: {
68+
'fs': false,
69+
'tls': false,
70+
'net': false,
71+
'path': false,
72+
'os': false,
73+
'util': false,
74+
'url': false,
75+
'assert': require.resolve('assert/'),
76+
'constants': require.resolve('constants-browserify'),
77+
'stream': require.resolve('stream-browserify'),
78+
}
7579
}
7680
};

packages/ergo-test/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@
3131
"dependencies": {
3232
"@accordproject/ergo-compiler": "0.22.2",
3333
"@accordproject/ergo-engine": "0.22.2",
34-
"chai": "4.2.0",
34+
"chai": "4.3.6",
3535
"chai-as-promised": "7.1.1",
3636
"chai-things": "0.2.0",
3737
"cucumber": "5.1.0"
3838
},
3939
"devDependencies": {
40-
"eslint": "6.0.1",
41-
"jsdoc": "^3.6.7",
40+
"eslint": "8.2.0",
41+
"jsdoc": "^3.6.10",
4242
"license-check": "1.1.5",
43-
"mocha": "5.2.0",
44-
"nyc": "13.3.0"
43+
"mocha": "8.3.2",
44+
"nyc": "15.1.0"
4545
},
4646
"license-check-config": {
4747
"src": [

0 commit comments

Comments
 (0)