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

Use npm over lerna #396

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [10.x, 12.x, 14.x, 16.x]
node-version: [16.x, 18.x, 20.x, 22.x]
fail-fast: false

steps:
Expand All @@ -35,12 +34,7 @@ jobs:
${{ runner.os }}-

- name: Install dependencies
run: npm run setup-no-old-node
if: ${{ matrix.node-version == '10.x' || matrix.node-version == '12.x' }}

- name: Install dependencies
run: npm run setup
if: ${{ matrix.node-version != '10.x' && matrix.node-version != '12.x' }}
run: npm ci --workspaces

- name: Execute unit tests
run: npm run test:unit
Expand Down
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,31 @@

## Install dependencies
```bash
$ npm run setup
$ npm ci
```
this command will run a clean installation of all workspaces based on their respective `package-lock.json`.

## Add dependencies
```bash
$ npm i -S <dependency> -w <package>
```
to install a dependency for a specific workspace.

## Upgrade dependencies
```bash
$ npm run deps
```
This command will display an interactive check that will prompt for new dependency version to install,
then automatically run `npm audit fix`.

Use `npm run deps --workspaces` to run against all packages.
Or `npm run deps -w <package>` to run against a specific workspace.

## Audit dependencies
```bash
$ npm audit fix --workspaces
```
This command will run an audit against all packages dependencies and try to fix them if possible.

## Development
**Run the `simple` example in `moleculer-db` service with watching**
Expand All @@ -42,10 +65,11 @@ $ npm run demo moleculer-db full
```bash
$ npm test
```
or run `npm test -w <package>` to run a specific package test.

## Create a new addon
```bash
$ npm run init moleculer-<modulename>
$ npm init -w ./packages/moleculer-db-<modulename>
```

## Publish new releases
Expand Down
Loading
Loading