chore: remove lerna

This was a premature optimization of workspace handling.
Lerna tries to be clever and cache build artefact, etc, but the step
to decide what packages to build takes more than 5s.

For now, using workspaces feature of npm.

Note that npm execute scripts in the order of the `workspaces` field of
`package.json`.
This commit is contained in:
fryorcraken.eth 2022-12-02 14:04:26 +11:00
parent 3fb0f364c2
commit 31fe78d5a7
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
4 changed files with 31 additions and 8400 deletions

View File

@ -1,5 +0,0 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "0.0.0"
}

40
nx.json
View File

@ -1,40 +0,0 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": [
"build",
"build:esm",
"build:bundle",
"fix",
"fix:prettier",
"fix:lint",
"check",
"check:lint",
"check:prettier",
"check:spelling",
"check:tsc",
"test",
"test:node",
"test:browser",
"proto"
]
}
}
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/dist, {projectRoot}/bundle"]
},
"build:esm": {
"dependsOn": ["^build:esm"],
"outputs": ["{projectRoot}/dist"]
},
"build:bundle": {
"dependsOn": ["^build:bundle"],
"outputs": ["{projectRoot}/bundle"]
}
}
}

8362
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,18 +2,25 @@
"name": "@waku/root",
"private": true,
"workspaces": [
"packages/*"
"packages/byte-utils",
"packages/interfaces",
"packages/core",
"packages/enr",
"packages/dns-discovery",
"packages/message-encryption",
"packages/create",
"packages/tests"
],
"scripts": {
"prepare": "husky install",
"build": "lerna run build",
"build": "npm run build --workspaces --if-present",
"size": "npm run build && size-limit",
"fix": "lerna run fix",
"check": "lerna run check",
"test": "lerna run test",
"test:browser": "lerna run test:browser",
"test:node": "lerna run test:node",
"proto": "lerna run proto",
"fix": "npm run fix --workspaces --if-present",
"check": "npm run check --workspaces --if-present",
"test": "npm run test --workspaces --if-present",
"test:browser": "npm run test:browser --workspaces --if-present",
"test:node": "npm run test:node --workspaces --if-present",
"proto": "npm run proto --workspaces --if-present",
"doc": "run-s doc:*",
"doc:html": "typedoc # --treatWarningsAsErrors",
"doc:cname": "echo 'js.waku.org' > docs/CNAME",
@ -29,7 +36,6 @@
"@size-limit/preset-big-lib": "^8.1.0",
"conventional-changelog-conventionalcommits": "^5.0.0",
"husky": "^8.0.1",
"lerna": "^6.0.1",
"lint-staged": "^13.0.3",
"multi-semantic-release": "^3.0.1",
"semantic-release": "^19.0.5",