* Made sure server_version_string was avalible. It would be undefined when chainId was provided to the constructor. Made server_version a private late-init member, and added a check to populate when needed * Added node's semver parsing for version string support checks * Security updated moved developement package JsSigniture to use Buffer.from * Updated npm dependancies to include node-fetch and semver * Documentation: Added simple example in readme * Documenation: Added clarity on providers of private key vaults * Documentation: switch to npm build/install no more references to yarn Squashed commit of the following: commit 5c321adb22493298fc0d2b3624ccffddbe66af97 Author: Eric Passmore <eric.passmore@gmail.com> Date: Mon Aug 15 09:51:25 2022 -0700 minor updates for node package updated dependancies in package.json switch all yarn instructures to use npm (its 2022 npm is the way to go) added a very simple example to get info into readme Updated documentation for send_transaction2 Removed EOSIO github references Updated .travel.yml with node_js 16.0.0 and npm@8.0.0 Date: Fri Aug 12 22:22:25 2022 -0700 minor fixes for release of node pkg commit 57bb0003a808e58de9154271cf12d3e9cfb68346 Author: Eric Passmore <eric.passmore@gmail.com> Date: Fri Aug 12 19:22:57 2022 -0700 init commit updated for integration tests commit 5855e69c1ed2a35c20300189272419ab95031fc6 Author: Eric Passmore <eric.passmore@gmail.com> Date: Tue Aug 9 13:36:53 2022 -0700 housekeeping updated .gitignore for webstorm, and added package-lock.json commit ff87097ae66c06808000f046362c0c15b6ed1fa2 Merge: f65d2cb4266b71Author: Eric Passmore <eric.passmore@gmail.com> Date: Tue Aug 9 13:31:57 2022 -0700 Merge remote-tracking branch 'origin' into ericpassmore-working commit f65d2cbfc916081676bf7d4cf61c65ea54c90f14 Author: Eric Passmore <eric.passmore@gmail.com> Date: Mon Aug 8 20:27:55 2022 -0700 first pass instructions for integration tests commit 32a4bd40260a8d8d3debade9d24421e4fdc1e555 Merge: 9d6aa60251beabAuthor: Eric Passmore <eric.passmore@gmail.com> Date: Mon Aug 8 12:39:49 2022 -0700 Merge Updated release 3.0 Endpoints for get info and transaction commit 9d6aa60846d30f66f5e64eb6d29bb7c6f0cd35ae Author: Eric Passmore <eric.passmore@gmail.com> Date: Thu Aug 4 12:48:15 2022 -0700 fixed path for reference commit a22bdfa6f9b539f9736ac2809a33afb0c1148a28 Author: Eric Passmore <eric.passmore@gmail.com> Date: Wed Aug 3 13:09:29 2022 -0700 removed eos.io commit 704be7c65ae3bc00236e5dcac71883c8bf8ada7d Author: Eric Passmore <eric.passmore@gmail.com> Date: Wed Aug 3 13:06:57 2022 -0700 removed eos.io references
8.9 KiB
Contributing to EOSJS
Interested in contributing? That's awesome! Here are some guidelines to get started quickly and easily:
Reporting An Issue
If you're about to raise an issue because you think you've found a problem with EOSJS, or you'd like to make a request for a new feature in the codebase, or any other reason… please read this first.
The GitHub issue tracker is the preferred channel for bug reports, feature requests, and submitting pull requests, but please respect the following restrictions:
-
Please search for existing issues. Help us keep duplicate issues to a minimum by checking to see if someone has already reported your problem or requested your idea.
-
Please be civil. Keep the discussion on topic and respect the opinions of others. See also our Contributor Code of Conduct.
Bug Reports
A bug is a demonstrable problem that is caused by the code in the repository. Good bug reports are extremely helpful - thank you!
Guidelines for bug reports:
-
Use the GitHub issue search — check if the issue has already been reported.
-
Check if the issue has been fixed — look for closed issues in the current milestone or try to reproduce it using the latest
developbranch.
A good bug report shouldn't leave others needing to chase you up for more information. Be sure to include the details of your environment and relevant tests that demonstrate the failure.
Feature Requests
Feature requests are welcome. Before you submit one be sure to have:
- Use the GitHub search and check the feature hasn't already been requested.
- Take a moment to think about whether your idea fits with the scope and aims of the project.
- Remember, it's up to you to make a strong case to convince the project's leaders of the merits of this feature. Please provide as much detail and context as possible, this means explaining the use case and why it is likely to be common.
Change Requests
Change requests cover both architectural and functional changes to how EOSJS works. If you have an idea for a new or different dependency, a refactor, or an improvement to a feature, etc - please be sure to:
- Use the GitHub search and check someone else didn't get there first
- Take a moment to think about the best way to make a case for, and explain what you're thinking. Are you sure this shouldn't really be a bug report or a feature request? Is it really one idea or is it many? What's the context? What problem are you solving? Why is what you are suggesting better than what's already there?
Working on EOSJS
Code contributions are welcome and encouraged! If you are looking for a good place to start, check out the good first issue label in GitHub issues.
Also, please follow these guidelines when submitting code:
Feature Branches
- main contains the latest release of EOSJS. Make your own branch off main for development, and create a pull request to merge into main
- releases Tags starting with v* are the release branches. You don't want to develop off these.
Submitting Pull Requests
Pull requests are awesome. If you're looking to raise a PR for something which doesn't have an open issue, please think carefully about raising an issue which your PR can close, especially if you're fixing a bug. This makes it more likely that there will be enough information available for your PR to be properly tested and merged.
Testing
EOSJS is used by many libraries across the EOS ecosystem, so proper testing is absolutely essential prior to opening a pull request. This can be done in EOSJS by running yarn build-production. This command will build the distrubution bundles (yarn build-all) and test each environment accordingly (yarn test-all).
Automated Unit Test Suite
yarn test will run through the core functionality of each EOSJS module with Jest.
Integration Test Suite
Integration tests will only work with a local node running on port 8888 and with test accounts "bobtestlion1" and "alicetestlio".
Web Environment
Run yarn build-web to create the dist-web folder and web distrubution modules then yarn test-web. This will run through the tests/web.html file using Cypress to inform you on the command line of any test failures.
NodeJS Environment
Run yarn build to build the NPM distribution bundle then run yarn test-node. This will create an out of box node environment with tests/node.js then test that environment with Jest and relay the results to the command line.
Quality Assurance
Never underestimate just how useful quality assurance is. If you're looking to get involved with the code base and don't know where to start, checking out and testing a pull request is one of the most useful things you could do.
Essentially, check out the latest develop branch, take it for a spin, and if you find anything odd, please follow the bug report guidelines and let us know!
Conduct
While contributing, please be respectful and constructive, so that participation in our project is a positive experience for everyone.
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others’ private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
Contributor License & Acknowledgments
Whenever you make a contribution to this project, you license your contribution under the same terms as set out in LICENSE, and you represent and warrant that you have the right to license your contribution under those terms. Whenever you make a contribution to this project, you also certify in the terms of the Developer’s Certificate of Origin set out below:
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
References
- Overall CONTRIB adapted from https://github.com/mathjax/MathJax/blob/master/CONTRIBUTING.md
- Conduct section adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html