Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 6b64c4d

Browse files
committed
chore(release): update version in package.json
1 parent d1b945e commit 6b64c4d

File tree

5 files changed

+57
-12
lines changed

5 files changed

+57
-12
lines changed

apps/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@triliumnext/client",
3-
"version": "0.0.1",
3+
"version": "0.94.0",
44
"description": "JQuery-based client for TriliumNext, used for both web and desktop (via Electron)",
55
"private": true,
66
"license": "AGPL-3.0-only",
@@ -63,4 +63,4 @@
6363
"nx": {
6464
"name": "client"
6565
}
66-
}
66+
}

apps/server/package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "@triliumnext/server",
3-
"version": "0.0.1",
3+
"version": "0.94.0",
44
"description": "Desktop client for TriliumNext, embedding both the client and the server.",
55
"private": true,
6-
"dependencies": {
6+
"dependencies": {
77
"better-sqlite3": "11.9.1",
88
"jquery.fancytree": "2.38.5",
99
"jquery-hotkeys": "0.2.2",
1010
"@highlightjs/cdn-assets": "11.11.1"
1111
},
1212
"devDependencies": {
1313
"@electron/remote": "2.1.2",
14-
"@excalidraw/excalidraw": "0.18.0",
14+
"@excalidraw/excalidraw": "0.18.0",
1515
"@types/archiver": "6.0.3",
1616
"@types/better-sqlite3": "7.6.13",
1717
"@types/cheerio": "0.22.35",
@@ -47,7 +47,7 @@
4747
"boxicons": "2.1.4",
4848
"codemirror": "5.65.19",
4949
"express-http-proxy": "2.1.1",
50-
"jquery": "3.7.1",
50+
"jquery": "3.7.1",
5151
"katex": "0.16.22",
5252
"normalize.css": "8.0.1",
5353
"@anthropic-ai/sdk": "0.39.0",
@@ -149,11 +149,15 @@
149149
}
150150
},
151151
"package": {
152-
"dependsOn": [ "build" ],
152+
"dependsOn": [
153+
"build"
154+
],
153155
"command": "bash apps/server/scripts/build-server.sh"
154156
},
155157
"start-prod": {
156-
"dependsOn": [ "build" ],
158+
"dependsOn": [
159+
"build"
160+
],
157161
"command": "node apps/server/dist/main.js"
158162
},
159163
"docker-build": {
@@ -191,4 +195,4 @@
191195
}
192196
}
193197
}
194-
}
198+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@triliumnext/source",
3-
"version": "0.0.0",
3+
"version": "0.94.0",
44
"description": "Build your personal knowledge base with TriliumNext Notes",
55
"directories": {
66
"doc": "docs"
@@ -13,6 +13,7 @@
1313
"electron:build": "nx build desktop",
1414
"chore:ci-update-nightly-version": "tsx ./scripts/update-nightly-version.ts",
1515
"chore:update-build-info": "tsx ./scripts/update-build-info.ts",
16+
"chore:update-version": "tsx ./scripts/update-version.ts",
1617
"test": "pnpm nx run-many -t test"
1718
},
1819
"private": true,

packages/commons/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@triliumnext/commons",
3-
"version": "0.0.1",
3+
"version": "0.94.0",
44
"description": "Shared library between the clients (e.g. browser, Electron) and the server, mostly for type definitions and utility methods.",
55
"private": true,
66
"type": "module",
@@ -44,4 +44,4 @@
4444
"dependencies": {
4545
"@swc/helpers": "~0.5.11"
4646
}
47-
}
47+
}

scripts/update-version.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**
2+
* @module
3+
*
4+
* This script synchronizes the `package.json` version of the monorepo (root `package.json`)
5+
* into the apps, so that it is properly displayed.
6+
*/
7+
8+
import { fileURLToPath } from "url";
9+
import { dirname, join } from "path";
10+
import fs from "fs";
11+
12+
function patchPackageJson(packageJsonPath: string, version: string) {
13+
// Read the version from package.json and process it.
14+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
15+
16+
// Write the adjusted version back in.
17+
packageJson.version = version;
18+
const formattedJson = JSON.stringify(packageJson, null, 2);
19+
fs.writeFileSync(packageJsonPath, formattedJson);
20+
}
21+
22+
function getVersion(packageJsonPath: string) {
23+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
24+
return packageJson.version;
25+
}
26+
27+
function main() {
28+
const scriptDir = dirname(fileURLToPath(import.meta.url));
29+
const version = getVersion(join(scriptDir, "..", "package.json"));
30+
31+
for (const appName of ["server", "client"]) {
32+
patchPackageJson(join(scriptDir, "..", "apps", appName, "package.json"), version);
33+
}
34+
35+
for (const packageName of ["commons"]) {
36+
patchPackageJson(join(scriptDir, "..", "packages", packageName, "package.json"), version);
37+
}
38+
}
39+
40+
main();

0 commit comments

Comments
 (0)