Skip to content

Commit

Permalink
chore: migrate from lerna to npm workspaces (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuisi authored Mar 19, 2024
1 parent 23e3fb8 commit b71e103
Show file tree
Hide file tree
Showing 12 changed files with 4,117 additions and 12,824 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@ jobs:
- name: Build
run: |
npm ci
npx lerna bootstrap --ci
npm run build
- name: Package
run: npx lerna run --scope=lean4 package
run: npm run package --workspace=lean4
if: ${{ !startsWith(github.ref, 'refs/tags/v') || !endsWith(github.ref, '-pre') }}

- name: Package pre-release
run: npx lerna run --scope=lean4 packagePreRelease
run: npm run packagePreRelease --workspace=lean4
if: ${{ startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-pre') }}

- name: Upload artifact
Expand Down
7 changes: 3 additions & 4 deletions docs/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This page is designed for software developers who are helping to develop this Le
The repository contains NPM packages implementing editor integration for the Lean 4 programming language. The VS Code
extension proper is in [`vscode-lean4`](vscode-lean4/), while [`lean4-infoview`](lean4-infoview/) implements the
information display. The API glue code between them is in [`lean4-infoview-api`](lean4-infoview-api/). We build
the packages in tandem using Lerna.
the packages in tandem using NPM workspaces.

![overview](images/overview.png)

Expand All @@ -14,9 +14,8 @@ See the following design topics:

### Building
- Make sure you have an up to date installation of `npm` and `node.js`. For example `npm` version 8.1.3 and `node.js` version v16.13.0.
- Run `npm install` in your workspace root folder. This installs the Lerna package manager.
- Run `npx lerna bootstrap`. This sets up the project's dependencies.
- Run `npx lerna run build`. This compiles the extension (which is necessary for go-to-definition in VS Code).
- Run `npm install` in your workspace root folder to set up the project's dependencies.
- Run `npm run build`. This compiles the extension (which is necessary for go-to-definition in VS Code).

### Testing
- Make sure you have executed the above build steps
Expand Down
55 changes: 0 additions & 55 deletions lean4-infoview-api/package-lock.json

This file was deleted.

4 changes: 2 additions & 2 deletions lean4-infoview-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"license": "Apache-2.0",
"devDependencies": {
"typescript": "^4.9.4",
"vscode-languageserver-protocol": "^3.17.2"
"typescript": "^4.9.5",
"vscode-languageserver-protocol": "^3.17.3"
}
}
2 changes: 1 addition & 1 deletion lean4-infoview-api/src/rpcSessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class RpcSessionForFile {
clearTimeout(releaseTimeout);
releaseTimeout = undefined;
} else if (releaseTimeout === undefined) {
releaseTimeout = setTimeout(() => {
releaseTimeout = window.setTimeout(() => {
void this.releaseNow()
releaseTimeout = undefined;
}, 100);
Expand Down
Loading

0 comments on commit b71e103

Please sign in to comment.