Skip to content

Commit dd9751c

Browse files
authored
Migrate from Lerna to npm workspaces (#570)
* chore(lerna) migrate from lerna to npm workspaces * build on Node v18 Signed-off-by: Dan Selman <[email protected]>
1 parent 2b97862 commit dd9751c

File tree

35 files changed

+5047
-13636
lines changed

35 files changed

+5047
-13636
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
9292
- name: build and publish
9393
run: |
94+
export NODE_OPTIONS="--max_old_space_size=6144"
9495
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
95-
npm version --no-git-tag-version --yes --exact ${{ steps.timestamp.outputs.stamp }}
96-
npx lerna version --no-git-tag-version --yes --exact ${{ steps.timestamp.outputs.stamp }}
97-
npx lerna exec --ignore dingus -- npm publish --access public --ignore-scripts --tag=unstable 2>&1
96+
npm version --workspaces --include-workspace-root --no-git-tag-version --yes --exact ${{ steps.timestamp.outputs.stamp }}
97+
npm publish --workspaces --access public --tag=unstable 2>&1

.github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ jobs:
3232
run: |
3333
export NODE_OPTIONS="--max_old_space_size=6144"
3434
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
35-
npm version --no-git-tag-version --yes --exact ${{ github.event.release.tag_name }}
36-
npx lerna version --no-git-tag-version --yes --exact ${{ github.event.release.tag_name }}
37-
npx lerna exec --ignore dingus -- npm publish --access public ${{ steps.tag.outputs.tag }} 2>&1
35+
npm version --workspaces --include-workspace-root --no-git-tag-version --yes --exact ${{ github.event.release.tag_name }}
36+
npm publish --workspaces --access public ${{ steps.tag.outputs.tag }} 2>&1
3837
3938
- name: Create PR to increment version
4039
uses: peter-evans/create-pull-request@v3

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,17 @@
1515
</a>
1616
</p>
1717

18-
### Visit the [TemplateMark Dingus](https://templatemark-dingus.netlify.app)
19-
2018
## Introduction
2119

22-
A transformation and parsing framework for converting markdown content to HTML, Slate (for rich-text editing) and other structured document object models (DOMs).
20+
A transformation and parsing framework for converting markdown content to HTML, PDF, DOCX, Slate (for rich-text editing) and other structured document object models (DOMs).
2321

2422
![Transformations](./packages/markdown-transform/transformations.png)
2523

2624
## Structure of the Code Repository
2725

28-
Top level repository (markdown-transform), with sub packages. Each sub-package is published as an independent npm module using `lerna`:
26+
Top level repository (markdown-transform), with sub packages. Each sub-package is published as an independent npm module using `npm workspaces`:
2927
* [markdown-cli](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-cli) : command line utilities
30-
* [markdown-transform](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-transform) : High-level API to transform markdown into different formats
28+
* [markdown-transform](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-transform) : High-level API to transform files into different formats
3129
* [markdown-common](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-common) : converts between markdown strings and the CommonMark DOM
3230
* [markdown-cicero](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-cicero) : converts between the CommonMark DOM and the CiceroMark DOM
3331
* [markdown-template](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-template) : converts between JSON data + markdown strings and TemplateMark
@@ -37,7 +35,6 @@ Top level repository (markdown-transform), with sub packages. Each sub-package i
3735
* [markdown-docx](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-docx) : converts a DOCX file to the CiceroMark DOM
3836
* [markdown-it-cicero](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-it-cicero) : markdown-it plugin for contracts and CiceroMark
3937
* [markdown-it-template](https://github.com/accordproject/markdown-transform/tree/main/packages/markdown-it-template) : markdown-it plugin for templates and TemplateMark
40-
* [dingus](https://github.com/accordproject/markdown-transform/tree/main/packages/dingus) : published tool to edit markdown as HTML or a DOM
4138

4239
### CommonMark DOM
4340

@@ -82,9 +79,7 @@ markus --help
8279

8380
### For developers
8481

85-
To install for development, in the project directory, you will need to first install [lerna](https://lerna.js.org):
8682
```
87-
npm install -g lerna@^3.20.2
8883
npm install
8984
```
9085

@@ -94,7 +89,7 @@ Then run:
9489
npm run test
9590
```
9691

97-
Invokes _lerna_ to run the test suite.
92+
This command uses npm workspaces to run the tests for each package in the monorepo.
9893

9994
---
10095

0 commit comments

Comments
 (0)