chore(release): update version in package.json

This commit is contained in:
Elian Doran 2025-05-02 21:29:19 +03:00
parent d1b945e769
commit 6b64c4daaa
No known key found for this signature in database
5 changed files with 57 additions and 12 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@triliumnext/client",
"version": "0.0.1",
"version": "0.94.0",
"description": "JQuery-based client for TriliumNext, used for both web and desktop (via Electron)",
"private": true,
"license": "AGPL-3.0-only",
@ -63,4 +63,4 @@
"nx": {
"name": "client"
}
}
}

View File

@ -1,9 +1,9 @@
{
"name": "@triliumnext/server",
"version": "0.0.1",
"version": "0.94.0",
"description": "Desktop client for TriliumNext, embedding both the client and the server.",
"private": true,
"dependencies": {
"dependencies": {
"better-sqlite3": "11.9.1",
"jquery.fancytree": "2.38.5",
"jquery-hotkeys": "0.2.2",
@ -11,7 +11,7 @@
},
"devDependencies": {
"@electron/remote": "2.1.2",
"@excalidraw/excalidraw": "0.18.0",
"@excalidraw/excalidraw": "0.18.0",
"@types/archiver": "6.0.3",
"@types/better-sqlite3": "7.6.13",
"@types/cheerio": "0.22.35",
@ -47,7 +47,7 @@
"boxicons": "2.1.4",
"codemirror": "5.65.19",
"express-http-proxy": "2.1.1",
"jquery": "3.7.1",
"jquery": "3.7.1",
"katex": "0.16.22",
"normalize.css": "8.0.1",
"@anthropic-ai/sdk": "0.39.0",
@ -149,11 +149,15 @@
}
},
"package": {
"dependsOn": [ "build" ],
"dependsOn": [
"build"
],
"command": "bash apps/server/scripts/build-server.sh"
},
"start-prod": {
"dependsOn": [ "build" ],
"dependsOn": [
"build"
],
"command": "node apps/server/dist/main.js"
},
"docker-build": {
@ -191,4 +195,4 @@
}
}
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@triliumnext/source",
"version": "0.0.0",
"version": "0.94.0",
"description": "Build your personal knowledge base with TriliumNext Notes",
"directories": {
"doc": "docs"
@ -13,6 +13,7 @@
"electron:build": "nx build desktop",
"chore:ci-update-nightly-version": "tsx ./scripts/update-nightly-version.ts",
"chore:update-build-info": "tsx ./scripts/update-build-info.ts",
"chore:update-version": "tsx ./scripts/update-version.ts",
"test": "pnpm nx run-many -t test"
},
"private": true,

View File

@ -1,6 +1,6 @@
{
"name": "@triliumnext/commons",
"version": "0.0.1",
"version": "0.94.0",
"description": "Shared library between the clients (e.g. browser, Electron) and the server, mostly for type definitions and utility methods.",
"private": true,
"type": "module",
@ -44,4 +44,4 @@
"dependencies": {
"@swc/helpers": "~0.5.11"
}
}
}

40
scripts/update-version.ts Normal file
View File

@ -0,0 +1,40 @@
/**
* @module
*
* This script synchronizes the `package.json` version of the monorepo (root `package.json`)
* into the apps, so that it is properly displayed.
*/
import { fileURLToPath } from "url";
import { dirname, join } from "path";
import fs from "fs";
function patchPackageJson(packageJsonPath: string, version: string) {
// Read the version from package.json and process it.
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
// Write the adjusted version back in.
packageJson.version = version;
const formattedJson = JSON.stringify(packageJson, null, 2);
fs.writeFileSync(packageJsonPath, formattedJson);
}
function getVersion(packageJsonPath: string) {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
return packageJson.version;
}
function main() {
const scriptDir = dirname(fileURLToPath(import.meta.url));
const version = getVersion(join(scriptDir, "..", "package.json"));
for (const appName of ["server", "client"]) {
patchPackageJson(join(scriptDir, "..", "apps", appName, "package.json"), version);
}
for (const packageName of ["commons"]) {
patchPackageJson(join(scriptDir, "..", "packages", packageName, "package.json"), version);
}
}
main();