This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
449 changed files
with
109,075 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"*.{ts,js}": ["prettier --write", "git add"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
templates/.npmrc.tmpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8.14.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
templates/.nycrc.tmpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./templates/.prettierignore.tmpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
templates/.prettierrc.json.tmpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
/* | ||
* Copyright © 2018 Lisk Foundation | ||
* | ||
* See the LICENSE file at the top-level directory of this distribution | ||
* for licensing information. | ||
* | ||
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, | ||
* no part of this software, including this file, may be copied, modified, | ||
* propagated, or distributed except according to the terms contained in the | ||
* LICENSE file. | ||
* | ||
* Removal or modification of this copyright notice is prohibited. | ||
* | ||
*/ | ||
@Library('lisk-jenkins') _ | ||
pipeline { | ||
agent { node { label 'lisk-elements' } } | ||
stages { | ||
stage('Cancel previous running PR') { | ||
steps { | ||
script{ | ||
if (env.CHANGE_ID) { | ||
// This is a Pull Request | ||
cancelPreviousBuild() | ||
} | ||
} | ||
} | ||
} | ||
stage('Install dependencies') { | ||
steps { | ||
nvm(getNodejsVersion()) { | ||
sh ''' | ||
mkdir -p "/home/lisk/.cache/Cypress/$( jq -r .devDependencies.cypress ./packages/lisk-constants/package.json )/Cypress" | ||
npm ci | ||
''' | ||
} | ||
} | ||
} | ||
stage('Build') { | ||
steps { | ||
nvm(getNodejsVersion()) { | ||
sh 'npm run build' | ||
} | ||
} | ||
} | ||
stage('Run lint') { | ||
steps { | ||
ansiColor('xterm') { | ||
nvm(getNodejsVersion()) { | ||
sh 'npm run lint' | ||
} | ||
} | ||
} | ||
} | ||
stage('Run tests') { | ||
steps { | ||
timeout(10) { | ||
ansiColor('xterm') { | ||
nvm(getNodejsVersion()) { | ||
sh 'npm run test' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage('Run node tests') { | ||
steps { | ||
timeout(10) { | ||
ansiColor('xterm') { | ||
nvm(getNodejsVersion()) { | ||
sh 'npm run test:node' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage('Run browser tests') { | ||
steps { | ||
timeout(10) { | ||
ansiColor('xterm') { | ||
nvm(getNodejsVersion()) { | ||
sh ''' | ||
npm run build:browsertest | ||
npm run test:browser | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
success { | ||
script { | ||
build_info = getBuildInfo() | ||
liskSlackSend('good', "Recovery: build ${build_info} was successful.") | ||
} | ||
deleteDir() | ||
githubNotify context: 'continuous-integration/jenkins/lisk-elements', description: 'The build passed.', status: 'SUCCESS' | ||
} | ||
failure { | ||
script { | ||
build_info = getBuildInfo() | ||
liskSlackSend('danger', "Build ${build_info} failed (<${env.BUILD_URL}/console|console>, <${env.BUILD_URL}/changes|changes>)\n") | ||
} | ||
archiveArtifacts allowEmptyArchive: true, artifacts: 'cypress/screenshots/' | ||
githubNotify context: 'continuous-integration/jenkins/lisk-elements', description: 'The build failed.', status: 'FAILURE' | ||
} | ||
aborted { | ||
githubNotify context: 'continuous-integration/jenkins/lisk-elements', description: 'The build was aborted.', status: 'ERROR' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Contributing to Lisk Commander | ||
# Contributing to Lisk Elements | ||
|
||
First off, thanks for taking the time to contribute! :raised_hands: | ||
|
||
The following is a set of guidelines for contributing to Lisk Commander, which are hosted in the [LiskHQ Organization](https://github.com/LiskHQ) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. | ||
The following is a set of guidelines for contributing to Lisk Elements, which are hosted in the [LiskHQ Organization](https://github.com/LiskHQ) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. | ||
|
||
#### Table Of Contents | ||
|
||
1. [Code of Conduct](#code-of-conduct) | ||
|
||
1. [Help! I don't want to read this whole thing, I just have one question. :mag_right:](#help-i-dont-want-to-read-this-whole-thing-i-just-have-a-question-mag_right) | ||
1. [Help! I don't want to read this whole thing, I just have one question. :mag_right:](#help!-i-dont-want-to-read-this-whole-thing-i-just-have-a-question) | ||
|
||
1. [How Can I Contribute?](#how-can-i-contribute) | ||
1. [Reporting Bugs](#reporting-bugs) | ||
|
@@ -21,7 +21,7 @@ The following is a set of guidelines for contributing to Lisk Commander, which a | |
|
||
## Code of Conduct | ||
|
||
This project and everyone participating in it is governed by the [Lisk Commander Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]). | ||
This project and everyone participating in it is governed by the [Lisk Elements Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]). | ||
|
||
## Project License | ||
|
||
|
@@ -57,16 +57,15 @@ In case you've never submitted a pull request (PR) via GitHub before, please rea | |
*Before* submitting a pull request, please make sure the following is done: | ||
|
||
1. Fork the repo. | ||
1. If you are creating a pull request that addresses a specific issue, take a look at the projects that issue is a part of (in the right-hand sidebar). Most issues will be a part of a project for a specific version, such as "Version 0.3.0". If this is the case, create your branch from the relevant version branch, e.g. `0.3.0`, and submit your pull request against that branch as a base. Otherwise, create your branch from `master`. | ||
1. Add tests to the code you have contributed! All new code must come with complete test coverage. See [here](test/README.md) for a guide to the testing approach we’re using. | ||
1. End all files with a newline. In general, your code should conform to the rules listed in the `.editorconfig` file. There are plugins for most editors/IDEs to do this for you automatically. Update the README for the changes that adhere to your new code. | ||
1. Ensure the test and linting suite passes (`npm run prepush` runs both). Follow the [JavaScript](https://github.com/airbnb/javascript) styleguide from Airbnb with the [lisk extension](https://github.com/LiskHQ/eslint-config-lisk-base). | ||
1. Submit a pull request via GitHub. Include issue numbers in the PR title, at the end with: `Description - Closes #IssueNumber`. | ||
1. If you are creating a pull request that addresses a specific issue, take a look at the projects that issue is a part of (in the right-hand sidebar). Most issues will be a part of a project for a specific version, such as "Version 1.0.0". If this is the case, create your branch from the relevant version branch, e.g. `1.0.0`, and submit your pull request against that branch as a base. Otherwise, create your branch from master. | ||
1. Add tests to the code you have contributed! All new code must come with complete test coverage. End all files with a newline. In general, your code should conform to the rules listed in the .editorconfig file. There are plugins for most editors/IDEs to do this for you automatically. Update the README for the changes that adhere to your new code. | ||
1. Ensure the test and linting suite passes (`npm run prepush` runs both). Follow the JavaScript styleguide from Airbnb with the lisk extension. | ||
1. Submit a pull request via GitHub. Include issue numbers in the PR title, at the end with: Description - Closes #IssueNumber. Also mention the #IssueNumber in the Comment, to easier browse to the issue. | ||
1. Check that Jenkins CI tests pass (pull request turns green). First time contributors will need to wait for a trusted team member to start Jenkins CI on a Pull Request. | ||
|
||
### Reporting Bugs | ||
|
||
This section guides you through submitting a bug report for Lisk Commander. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :computer:, and find related reports :mag_right:. | ||
This section guides you through submitting a bug report for Lisk Elements. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :computer:, and find related reports :mag_right:. | ||
|
||
Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](ISSUE_TEMPLATE.md), the information it asks for helps us resolve issues faster. | ||
|
||
|
@@ -85,7 +84,7 @@ Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). | |
Explain the problem and include additional details to help maintainers reproduce the problem: | ||
|
||
* **Use a clear and descriptive title** for the issue to identify the problem. | ||
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started Lisk Commander, e.g. in interactive or non-interactive mode, and with which commands. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you have passed a sensitive input via a file provide the permissions for that file. **Make sure to erase sensitive information from the configuration or details you are passing - NEVER SHARE YOUR SECRET PASSPHRASES OR PRIVATE KEYS**. | ||
* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started Lisk Elements, e.g. with Node.js or in the Browser (which one? which version?), or how you started Lisk Elements otherwise. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you have used an API model provide the configuration you have chosen and the functions you have executed. **Make sure to erase sensitive information from the configuration or details you are passing - NEVER SHARE YOUR SECRET PASSPHRASES OR PRIVATE KEYS**. | ||
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines). | ||
* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior. | ||
* **Explain which behavior you expected to see instead and why.** | ||
|
@@ -94,15 +93,15 @@ Explain the problem and include additional details to help maintainers reproduce | |
|
||
Provide more context by answering these questions: | ||
|
||
* **Did the problem start happening recently** (e.g. after updating to a new version of Lisk Commander, Lisk or any other repository) or was this always a problem? | ||
* If the problem started happening recently, **can you reproduce the problem in an older version of Lisk Commander?** What's the most recent version in which the problem doesn't happen? You can download older versions of Lisk Commander from [the releases page](https://github.com/LiskHQ/lisk-commander/releases). | ||
* **Did the problem start happening recently** (e.g. after updating to a new version of Lisk Elements, Lisk or any other repository) or was this always a problem? | ||
* If the problem started happening recently, **can you reproduce the problem in an older version of Lisk Elements?** What's the most recent version in which the problem doesn't happen? You can download older versions of Lisk Elements from [the releases page](https://github.com/LiskHQ/lisk-elements/releases). | ||
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens. | ||
|
||
### Suggesting Enhancements | ||
|
||
This section guides you through submitting an enhancement suggestion for Lisk Commander, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:. | ||
This section guides you through submitting an enhancement suggestion for Lisk Elements, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:. | ||
|
||
When you are creating an enhancement suggestion, please include as many details as possible. Fill in [the template](ISSUE_TEMPLATE.md), including the steps that you imagine you would take if the feature you're requesting existed. | ||
When you are creating an enhancement suggestion, please include as many details as possible. Fill in [the template](ISSUE_TEMPLATE.md), including the steps that you imagine you would take if the feature you're requesting existed. | ||
|
||
#### How Do I Submit A (Good) Enhancement Suggestion? | ||
|
||
|
@@ -112,9 +111,9 @@ Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com | |
* **Provide a step-by-step description of the suggested enhancement** in as many details as possible. | ||
* **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines). | ||
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why. | ||
* **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of Lisk Commander which the suggestion is related to. You can use [this tool](http://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. | ||
* **Explain why this enhancement would be useful** to most Lisk and Lisk Commander users. | ||
* **Specify which version of Lisk and Lisk Commander you're using.** | ||
* **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of Lisk Elements which the suggestion is related to. You can use [this tool](http://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. | ||
* **Explain why this enhancement would be useful** to most Lisk and Lisk Elements users. | ||
* **Specify which version of Lisk and Lisk Elements you're using.** | ||
* **Specify the name and version of the OS you're using.** | ||
|
||
## Styleguides | ||
|
@@ -126,25 +125,25 @@ Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com | |
* Limit the first line to 72 characters or less | ||
* Reference issues and pull requests liberally after the first line | ||
* Consider starting the commit message with an applicable emoji: | ||
* :seedling: `:seedling:` when adding a new feature | ||
* :bug: `:bug:` when fixing a bug | ||
* :books: `:books:` when adding or updating documentation | ||
* :nail_care: `:nail_care:` when making changes to code style (e.g. lint settings) | ||
* :recycle: `:recycle:` when refactoring code | ||
* :fire: `:fire:` when removing code or files (including dependencies) | ||
* :racehorse: `:racehorse:` when improving performance | ||
* :white_check_mark: `:white_check_mark:` when adding or updating tests | ||
* :construction_worker: `:construction_worker:` when updating the build process | ||
* :bowtie: `:bowtie:` when updating CI | ||
* :house: `:house:` when performing chores | ||
* :new: `:new:` when adding a new dependency | ||
* :arrow_up: `:arrow_up:` when upgrading a dependency | ||
* :arrow_down: `:arrow_down:` when downgrading a dependency | ||
* :back: `:back:` when reverting changes | ||
* :seedling: `:seedling:` when adding a new feature | ||
* :bug: `:bug:` when fixing a bug | ||
* :books: `:books:` when adding or updating documentation | ||
* :nail_care: `:nail_care:` when making changes to code style (e.g. lint settings) | ||
* :recycle: `:recycle:` when refactoring code | ||
* :fire: `:fire:` when removing code or files (including dependencies) | ||
* :racehorse: `:racehorse:` when improving performance | ||
* :white_check_mark: `:white_check_mark:` when adding or updating tests | ||
* :construction_worker: `:construction_worker:` when updating the build process | ||
* :bowtie: `:bowtie:` when updating CI | ||
* :house: `:house:` when performing chores | ||
* :new: `:new:` when adding a new dependency | ||
* :arrow_up: `:arrow_up:` when upgrading a dependency | ||
* :arrow_down: `:arrow_down:` when downgrading a dependency | ||
* :back: `:back:` when reverting changes | ||
|
||
### JavaScript Styleguide | ||
|
||
On Lisk Commander we are using [ESLint](https://eslint.org/). | ||
On Lisk Elements we are using [ESLint](https://eslint.org/). | ||
Our JavaScript style expands [Airbnb's](https://github.com/airbnb/javascript) style. You can get more details here: https://github.com/LiskHQ/eslint-config-lisk-base | ||
|
||
These contribution guidelines were inspired by and are based on Atom's contribution guidelines. They were modified for the purposes of this repository. https://github.com/atom/atom/blob/master/CONTRIBUTING.md - Copyright (c) 2011-2017 GitHub Inc. (MIT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,7 @@ | ||
Have you read Lisk Commander's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/LiskHQ/lisk-commander/blob/master/CODE_OF_CONDUCT.md | ||
### Expected behavior | ||
|
||
### Description | ||
### Actual behavior | ||
|
||
[Description of the issue] | ||
### Steps to reproduce | ||
|
||
### Steps to Reproduce | ||
|
||
1. [First Step] | ||
1. [Second Step] | ||
1. [and so on...] | ||
|
||
**Expected behavior:** [What you expect to happen] | ||
|
||
**Actual behavior:** [What actually happens] | ||
|
||
**Reproduces how often:** [What percentage of the time does it reproduce?] | ||
|
||
### Versions | ||
|
||
Please provide the version you are working with. Please include the OS and what version of the OS you're running. | ||
|
||
### Additional Information | ||
|
||
Any additional information, configuration or data that might be necessary to reproduce the issue. | ||
### Which version(s) does this affect? (Environment, OS, etc...) |
Oops, something went wrong.