Skip to content

Commit

Permalink
chore(project): migrate from lerna to pnpm
Browse files Browse the repository at this point in the history
Fixes #263
  • Loading branch information
stalniy committed May 27, 2020
1 parent 28955d6 commit ef03981
Show file tree
Hide file tree
Showing 29 changed files with 9,326 additions and 21,450 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ jobs:
- latest
steps:
- uses: actions/checkout@v2
- name: Install dev dependencies
run: npm ci
- name: Install dependencies and cross link packages
run: npm run bootstrap
- name: Install pnpm
run: npx pnpm add -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: npm run build
run: pnpm recursive run build
- name: lint & test
run: WITH_COVERAGE=1 npm test
run: |
pnpm recursive run lint
WITH_COVERAGE=1 pnpm recursive run test
- name: submit coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: npm run coverage.submit
run: pnpm run coverage.submit
50 changes: 28 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Contributing to CASL

I would love for you to contribute to CASL and help make it even better than it is
today! As a contributor, here are the guidelines I would like you to follow:
I would love for you to contribute to CASL and help make it even better than it is today! As a contributor, here are the guidelines I would like you to follow:

- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
Expand All @@ -12,12 +11,14 @@ today! As a contributor, here are the guidelines I would like you to follow:

## <a name="question"></a> Got a Question or Problem?

Do not open issues for general support questions as I want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [gitter chat][gitter].
Do not open issues for general support questions as I want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [gitter chat][gitter] or [stackoverflow](https://stackoverflow.com/questions/tagged/casl).

## <a name="issue"></a> Found a Bug?

If you find a bug in the source code, you can help by [submitting an issue](#submit-issue) or even better, you can [submit a Pull Request](#submit-pr) with a fix.

## <a name="feature"></a> Missing a Feature?

You can *request* a new feature by [submitting an issue](#submit-issue) to this GitHub Repository. If you would like to *implement* a new feature, please submit an issue with a proposal for your work first, to be sure that somebody else hasn't started to do the same.

## <a name="submit"></a> Submission Guidelines
Expand All @@ -26,38 +27,42 @@ You can *request* a new feature by [submitting an issue](#submit-issue) to this

Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.

Please provide steps to reproduce for found bug (using http://plnkr.co or similar), this will help to understand and fix the issue faster.
Please provide steps to reproduce for found bug (using http://plnkr.co, https://codesandbox.io/, https://repl.it/ or similar), this will help to understand and fix the issue faster.

### <a name="submit-pr"></a> Submitting a Pull Request (PR)

Before you submit your Pull Request (PR) consider the following guidelines:

* Search [GitHub](https://github.com/stalniy/casl/pulls) for an open or closed PR
that relates to your submission. You don't want to duplicate effort.

* Fork the project and setup it (CASL uses [lerna](https://lernajs.io/) monorepo structure):
* Fork the project and setup it (CASL uses [pnpm](https://pnpm.js.org/) for monorepo management):

```shell
git clone [email protected]:${YOUR_GITHUB_USER_NAME}/casl.git # replace ${YOUR_GITHUB_USER_NAME} with your github username
cd casl
npm ci # requires npm v6+
npm run bootstrap # installs external and links internal dependencies
```
```sh
# replace ${YOUR_GITHUB_USER_NAME} with your github username
git clone [email protected]:${YOUR_GITHUB_USER_NAME}/casl.git
# install pnpm, other ways at https://pnpm.js.org/en/installation
npx pnpm add -g pnpm
cd casl
pnpm recursive i
```

* Make your changes in a new git branch:
* Make your changes in a new git branch (fork master branch):

```sh
git checkout -b my-fix-branch master
```
```sh
git checkout -b my-fix-branch master
```

* **include appropriate test cases**.
* Follow defined [Coding Rules](#rules).
* Run all test suites `npm test`
* Commit your changes using a descriptive commit message that follows defined [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages.
* Run all test suites `pnpm test`
* Commit your changes using a descriptive commit message that follows defined [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages using [semantic-release](https://semantic-release.gitbook.io/semantic-release/).
* Push your branch to GitHub:

```shell
git push origin my-fix-branch
```
```sh
git push origin my-fix-branch
```

* In GitHub, send a pull request to `casl:master`.
* If somebody from project contributors suggest changes then:
* Make the required updates.
Expand All @@ -67,11 +72,12 @@ Before you submit your Pull Request (PR) consider the following guidelines:
That's it! Thank you for your contribution!

## <a name="rules"></a> Coding Rules

To ensure consistency throughout the source code, keep these rules in mind as you are working:

* All features or bug fixes **must be tested** by one or more specs (unit-tests).
* All public API methods **must be documented**.
* Project follows [Airbnb's JavaScript Style Guide][js-style-guide] with [some exceptions](.eslintrc). All these will be checked by Travis ci when you submit your PR
* All public API methods **must be documented** in docs-src/src/content/pages.
* Project follows [Airbnb's TypeScript Style Guide][js-style-guide] with [some exceptions](.eslintrc). All these will be checked by CI when you submit your PR

## <a name="commit"></a> Commit Message Guidelines

Expand Down
7 changes: 0 additions & 7 deletions lerna.json

This file was deleted.

Loading

0 comments on commit ef03981

Please sign in to comment.