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