Skip to content

Commit 06bcd93

Browse files
committed
docs: remove lerna references
1 parent a891ad4 commit 06bcd93

File tree

4 files changed

+24
-72
lines changed

4 files changed

+24
-72
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ To understand more about the structure and the design of the Toolkit check out t
3434

3535
## Setup & Development
3636

37-
This project uses [`lerna`](https://npm.im/lerna) as a tool to manage the monorepo. If you are unfamiliar with the tool, start by checking out the the [lerna docs](https://lerna.js.org/).
37+
This project uses [`npm` workspaces](https://docs.npmjs.com/cli/v8/using-npm/workspaces) as a tool to manage the monorepo. If you are unfamiliar with the tool, start by checking out the the [`npm` docs](https://docs.npmjs.com/cli/v7/using-npm/workspaces) and make sure you use at least npm version 8 or newer (`npm install -g npm@8`).
3838

3939
```bash
4040
git clone git@github.com:twilio-labs/serverless-toolkit.git
4141
cd serverless-toolkit
4242
npm install
43-
npm run bootstrap
43+
npm run build
4444
```
4545

4646
## License

docs/CONTRIBUTING.md

Lines changed: 21 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## About the Project
44

5-
This project is a "monorepo" meaning it contains several Node.js packages in one repository. The code for all packages are in the [`packages/`](../packages) directory. We are using a tool called [Lerna](https://lerna.js.org) to manage those multiple packages.
5+
This project is a "monorepo" meaning it contains several Node.js packages in one repository. The code for all packages are in the [`packages/`](../packages) directory. We are using a concept called [`npm` workspaces](https://docs.npmjs.com/cli/v8/using-npm/workspaces) to manage those multiple packages and a tool called [`changesets`](https://github.com/changesets/changesets) to handle the versioning and releasing.
66

77
## Before you contribute
88

@@ -14,10 +14,10 @@ If you are planning to contribute something that does not have an open issue yet
1414

1515
## Requirements
1616

17-
Make sure you have Node.js 12 or newer installed. Due to compatibility with Twilio
18-
Functions this project has to support at least Node.js 12.0.0.
17+
Make sure you have Node.js 14 or newer installed. Due to compatibility with Twilio
18+
Functions this project has to support at least Node.js 14.0.0.
1919

20-
We are using the npm CLI to manage our project. You should be able to use yarn but you might hit some issues.
20+
We are using the npm CLI to manage our project. You'll need at least `npm` version 8 or newer.
2121

2222
## Setup your local project
2323

@@ -32,79 +32,52 @@ npm run bootstrap
3232

3333
## Contributing
3434

35-
1. Perform changes. Check out [Working with Lerna](#working-with-lerna) for more info
35+
1. Perform changes. Check out [Working with Workspaces](#working-with-workspaces) for more info
3636
2. Make sure tests pass by running `npm test`
3737
3. Stage the files you changed by running `git add` with the files you changed.
38-
4. Run `git commit` to kick off validation and enter your commit message. We are using [conventional commits](https://www.conventionalcommits.org/en/) for this project. When you run `npm run cm` it will trigger [`commitizen`](https://npm.im/commitizen) to assist you with your commit message.
39-
5. Submit a Pull Request
38+
4. If you have a customer facing change make sure to run `npm run changeset` at the root of the project, select what type of version change it is and which packages are impacted and describe the change. Check out ["How we version"](#how-we-version) for more details.
39+
5. Run `git commit` to kick off validation and enter your commit message. We are using [conventional commits](https://www.conventionalcommits.org/en/) for this project. When you run `npm run cm` it will trigger [`commitizen`](https://npm.im/commitizen) to assist you with your commit message.
40+
6. Push your changes and submit a Pull Request
4041

4142
**Working on your first Pull Request?** You can learn how from this _free_ series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
4243

4344
## For Maintainers: Releasing
4445

45-
This project uses [`lerna version`](https://www.npmjs.com/package/@lerna/version) to create new releases for any package needed, create the respective git tag and update the necessary `CHANGELOG.md` files. We always pass certain flags, so please use it via `npm run release`. Here are the steps you need to run to release a new version:
46+
Version bumps are handled automatically by [this GitHub Action](../.github/workflows/on-merge-main.yml) whenever changes have been merged to `main`. If the automation will detect any changeset files inside the `.changeset` directory it will either open a new Pull Request to bump the version or force-push to the currently open Pull Request. In order to release to `npm` you'll have to merge that Pull Request which will automatically kick off the release.
4647

47-
### Pre-release version (from `main` or any `features/*` branch):
48+
## How we version
4849

49-
For example to release a new pre-release version containing `beta` and releasing it as `next`:
50+
All packages that are part of this project follow the [SemVer convention](https://semver.org/). Specifically this means the following version changes apply for the following changes:
51+
- `no change` (no changeset) - Changes in `devDependencies`, changes at the root of the project that don't result in a compilation output change, test changes, documentation changes, etc.
52+
- `patch` - Any changes that do not add new features such as bug fixes that are not altering the behavior
53+
- `minor` - New features that are additive and are not breaking current behavior
54+
- `major` - Any changes that are breaking changes incl. dropping support for features or arguments or drastic changes in behavior
5055

51-
```bash
52-
npm run release -- --conventional-prerelease --exact --preid beta
53-
git push origin main --follow-tags
54-
npm run npm:publish -- --otp=<OTP> --dist-tag next
55-
```
56-
57-
If you want to turn a prerelease into a permanent version you can use:
58-
59-
```bash
60-
npm run release -- --conventional-commits --conventional-graduate
61-
git push origin main --follow-tags
62-
npm run npm:publish -- --otp=<OTP>
63-
```
64-
65-
### Normal release (from `main` branch):
66-
67-
For a normal release `standard-version` will detect the version increment automatically. Run:
68-
69-
```bash
70-
npm run release
71-
git push origin main --follow-tags
72-
npm run npm:publish -- --otp=<OTP>
73-
```
74-
75-
To ship a specific version instead (like a forced minor bump) you can run:
76-
77-
```bash
78-
npm run release -- minor
79-
git push origin main --follow-tags
80-
npm run npm:publish -- --otp=<OTP>
81-
```
82-
83-
## Working with Lerna
56+
## Working with Workspaces
8457

8558
### Linking Packages
8659

87-
Lerna will automatically link together the different dependencies that are part of the project. You can run `npm run bootstrap` to create the links.
60+
npm will automatically link together the different dependencies that are part of the project when you run `npm install` at the root.
8861

8962
### Installing Dependencies
9063

9164
Dev dependencies should ideally be installed at the top level using `npm install --save-dev`. If you want to execute a binary from a dependency in a particular package you should install it in that particular package instead.
9265

93-
Installing dependencies for packages can be done in two ways. You can either use the [`lerna add` command](https://github.com/lerna/lerna/tree/master/commands/add) or using `npm install` inside the respective package.
66+
Installing dependencies for packages can be done in two ways. You can either use the `npm install <package-name> -w <package-to-install-dependency-in>` command (ex. `npm install lodash -w @twilio-labs/serverless-api`) or using `npm install` inside the respective package.
9467

9568
The later might be the more intuitive one but it might cause some bootstraping issues.
9669

9770
### Running Scripts
9871

9972
Scripts that are on the top level can be run via `npm run <script>`.
10073

101-
If you want to run a script in every individual package where it is defined you can run: [`lerna run <script>`](https://github.com/lerna/lerna/tree/master/commands/run).
74+
If you want to run a script in every individual package where it is defined you can run: [`npm run <script> --workspaces --if-present`](https://docs.npmjs.com/cli/v8/using-npm/workspaces?v=true#running-commands-in-the-context-of-workspaces).
10275

103-
To execute any bash command inside every package you can use [`lerna exec`](https://github.com/lerna/lerna/tree/master/commands/exec).
76+
To execute any bash command inside every package you can use [`npm exec`](https://docs.npmjs.com/cli/v8/commands/npm-exec).
10477

10578
### Resetting dependencies
10679

107-
You can run `lerna clean` to delete all `node_modules` folder. To reinstall them run `npm run bootstrap`
80+
You can run `npm run reset` to delete all `node_modules` folder. To reinstall them run `npm install`
10881

10982
## Code of Conduct
11083

lerna.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

packages/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Packages Overview
22

3-
This repository is structured as a monorepo using [Lerna](https://lerna.js.org) and contains multiple packages:
3+
This repository is structured as a monorepo using [`npm` workspaces](https://docs.npmjs.com/cli/v8/using-npm/workspaces) and contains multiple packages:
44

55
| Package | Description | Changelog | |
66
| :-------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

0 commit comments

Comments
 (0)