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

adding webpack 5 #5649

Merged
merged 18 commits into from
Dec 6, 2022
Merged

adding webpack 5 #5649

merged 18 commits into from
Dec 6, 2022

Conversation

luu-alex
Copy link
Contributor

@luu-alex luu-alex commented Nov 22, 2022

Description

(#5629) Webpack 4 -> Webpack 5:
As well an update to webpack, the build size has been made smaller with optimizations in webpack configs.
Packages were added to dev-dependencies due to breaking changes upgrading to webpack 5

previously: 1.39mb
Screen Shot 2022-11-25 at 5 03 53 PM

current: 1.31mb
Screen Shot 2022-11-25 at 5 01 41 PM

edit: was able to improve and now 1.12-1.13mb
Screen Shot 2022-12-02 at 1 10 11 PM

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist for 1.x:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:cov and my test cases cover all the lines and branches of the added code.
  • I ran npm run build with success.
  • I have tested the built dist/web3.min.js in a browser.
  • I have tested my code on the live network.
  • I have checked the Deploy Preview and it looks correct.
  • I have updated the CHANGELOG.md file in the root folder.

Checklist for 4.x:

  • I have selected the correct 4.x base branch.
  • Within the description, the feature or issue is discussed in detail or an issue is linked.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added any required tests for the changes I made
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules.
  • I ran yarn successfully
  • I ran yarn lint successfully
  • I ran yarn build:web successfully
  • I ran yarn test:unit successfully
  • I ran yarn test:integration successfully
  • I ran compile:contracts successfully
  • I have tested my code.
  • I have updated the corresponding CHANGELOG.md file in the packages I have edited.

@coveralls
Copy link

coveralls commented Nov 22, 2022

Pull Request Test Coverage Report for Build 3525432817

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 74.573%

Totals Coverage Status
Change from base Build 3517769346: 0.0%
Covered Lines: 3282
Relevant Lines: 4146

💛 - Coveralls

@luu-alex luu-alex marked this pull request as ready for review November 25, 2022 21:56
Copy link
Contributor

@avkos avkos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have some problems with encrypt/decrypt the wallet in tests. Can it be related to webpack config?

@spacesailor24 spacesailor24 added 1.x 1.0 related issues dependencies Updates dependency labels Nov 30, 2022
@luu-alex luu-alex requested a review from avkos November 30, 2022 17:07
@luu-alex
Copy link
Contributor Author

@avkos yes, a browser test was failing due to the upgrade. its passing now

@luu-alex
Copy link
Contributor Author

luu-alex commented Dec 2, 2022

Screen Shot 2022-12-02 at 12 51 21 PM

new webpack now produces a web3.min.js.lincese.txt
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/*!
 * @overview es6-promise - a tiny implementation of Promises/A+.
 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
 * @license   Licensed under MIT license
 *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
 * @version   v4.2.8+1e68dce6
 */

/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <[email protected]> <http://feross.org>
 * @license  MIT
 */

/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */

/*!
 * v2.1.4-104-gc868b3a
 * 
 */

/*! https://mths.be/utf8js v3.0.0 by @mathias */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
 * [js-sha3]{@link https://github.com/emn178/js-sha3}
 *
 * @version 0.5.7
 * @author Chen, Yi-Cyuan [[email protected]]
 * @copyright Chen, Yi-Cyuan 2015-2016
 * @license MIT
 */

/**
 * [js-sha3]{@link https://github.com/emn178/js-sha3}
 *
 * @version 0.8.0
 * @author Chen, Yi-Cyuan [[email protected]]
 * @copyright Chen, Yi-Cyuan 2015-2018
 * @license MIT
 */

Its an MIT license for some modules, it looks ok to keep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues dependencies Updates dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants