Skip to content

Commit 8eefd60

Browse files
authored
Merge pull request #161 from TrueNine/dev
chore: release 2026.10424.111
2 parents b469c25 + 72e5c36 commit 8eefd60

46 files changed

Lines changed: 1167 additions & 168 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.githooks/sync-versions.test.ts

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,19 @@ function createFixtureRepo(): string {
3333
})
3434
writeJson(join(rootDir, 'cli', 'package.json'), {
3535
name: '@truenine/memory-sync-cli',
36-
version: initialVersion
36+
version: initialVersion,
37+
optionalDependencies: {
38+
'@truenine/memory-sync-cli-darwin-arm64': initialVersion,
39+
'@truenine/memory-sync-cli-linux-x64-gnu': initialVersion
40+
}
41+
})
42+
writeJson(join(rootDir, 'mcp', 'package.json'), {
43+
name: '@truenine/memory-sync-mcp',
44+
version: initialVersion,
45+
optionalDependencies: {
46+
'@truenine/memory-sync-mcp-darwin-arm64': initialVersion,
47+
'@truenine/memory-sync-mcp-linux-x64-gnu': initialVersion
48+
}
3749
})
3850
writeJson(join(rootDir, 'gui', 'package.json'), {
3951
name: '@truenine/memory-sync-gui',
@@ -121,7 +133,20 @@ function createFixtureRepo(): string {
121133

122134
function expectSharedVersionSurfaces(rootDir: string, nextVersion: string): void {
123135
expect(JSON.parse(readFileSync(join(rootDir, 'package.json'), 'utf-8')) as {version: string}).toMatchObject({version: nextVersion})
124-
expect(JSON.parse(readFileSync(join(rootDir, 'cli', 'package.json'), 'utf-8')) as {version: string}).toMatchObject({version: nextVersion})
136+
expect(JSON.parse(readFileSync(join(rootDir, 'cli', 'package.json'), 'utf-8')) as {version: string, optionalDependencies: Record<string, string>}).toMatchObject({
137+
version: nextVersion,
138+
optionalDependencies: {
139+
'@truenine/memory-sync-cli-darwin-arm64': nextVersion,
140+
'@truenine/memory-sync-cli-linux-x64-gnu': nextVersion
141+
}
142+
})
143+
expect(JSON.parse(readFileSync(join(rootDir, 'mcp', 'package.json'), 'utf-8')) as {version: string, optionalDependencies: Record<string, string>}).toMatchObject({
144+
version: nextVersion,
145+
optionalDependencies: {
146+
'@truenine/memory-sync-mcp-darwin-arm64': nextVersion,
147+
'@truenine/memory-sync-mcp-linux-x64-gnu': nextVersion
148+
}
149+
})
125150
expect(JSON.parse(readFileSync(join(rootDir, 'gui', 'package.json'), 'utf-8')) as {version: string}).toMatchObject({version: nextVersion})
126151
expect(JSON.parse(readFileSync(join(rootDir, 'doc', 'package.json'), 'utf-8')) as {version: string}).toMatchObject({version: nextVersion})
127152
expect(JSON.parse(readFileSync(join(rootDir, 'cli', 'npm', 'darwin-arm64', 'package.json'), 'utf-8')) as {version: string}).toMatchObject({version: nextVersion})
@@ -171,6 +196,7 @@ describe('sync-versions hook', () => {
171196
'gui/package.json',
172197
'gui/src-tauri/Cargo.toml',
173198
'gui/src-tauri/tauri.conf.json',
199+
'mcp/package.json',
174200
'package.json'
175201
]))
176202
})
@@ -202,6 +228,7 @@ describe('sync-versions hook', () => {
202228
'gui/package.json',
203229
'gui/src-tauri/Cargo.toml',
204230
'gui/src-tauri/tauri.conf.json',
231+
'mcp/package.json',
205232
'package.json'
206233
]))
207234
})

.githooks/sync-versions.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,42 @@ function validateVersion(version: string, source: string): void {
207207
}
208208
}
209209

210+
function syncInternalDependencyVersions(json: VersionedJson, targetVersion: string): boolean {
211+
let changed = false
212+
213+
for (const field of ['dependencies', 'devDependencies', 'optionalDependencies', 'peerDependencies']) {
214+
const deps = json[field]
215+
if (deps == null || typeof deps !== 'object' || Array.isArray(deps)) {
216+
continue
217+
}
218+
219+
for (const [name, value] of Object.entries(deps as Record<string, unknown>)) {
220+
if (!name.startsWith('@truenine/memory-sync-')) {
221+
continue
222+
}
223+
224+
if (typeof value !== 'string' || value === targetVersion) {
225+
continue
226+
}
227+
228+
;(deps as Record<string, unknown>)[name] = targetVersion
229+
changed = true
230+
}
231+
}
232+
233+
return changed
234+
}
235+
210236
function syncJsonVersion(
211237
filePath: string,
212238
targetVersion: string,
213239
changedPaths: Set<string>,
214240
): void {
215241
try {
216242
const json = readJsonFile(filePath)
217-
if (json.version === targetVersion) {
243+
const dependenciesChanged = syncInternalDependencyVersions(json, targetVersion)
244+
245+
if (json.version === targetVersion && !dependenciesChanged) {
218246
return
219247
}
220248

@@ -411,6 +439,11 @@ export function runSyncVersions(options: SyncVersionsOptions = {}): SyncVersions
411439

412440
validateVersion(currentRootVersion, 'root package.json')
413441

442+
const target = resolveTargetVersion(rootDir, currentRootVersion, options.requestedVersion)
443+
const changedPaths = new Set<string>()
444+
445+
syncJsonVersion(rootPackagePath, target.version, changedPaths)
446+
414447
const packageJsonPaths = discoverFilesByName(rootDir, 'package.json')
415448
.filter(filePath => resolve(filePath) !== rootPackagePath)
416449
.sort()

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,25 @@ jobs:
7676
- name: Rust unit tests
7777
run: cargo test --workspace --exclude tnmsg --exclude tnmsc-integrate-tests --exclude tnmsc-local-tests --exclude tnmsm-integrate-tests --lib --bins
7878

79+
packaging-smoke:
80+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
81+
runs-on: ubuntu-24.04
82+
timeout-minutes: 45
83+
steps:
84+
- uses: actions/checkout@v6
85+
86+
- uses: ./.github/actions/setup-node-pnpm
87+
88+
- uses: ./.github/actions/setup-rust
89+
with:
90+
cache-key: ci-packaging-smoke
91+
92+
- name: CLI packaging smoke
93+
run: cargo test -p tnmsc-integrate-tests packaging_smoke_covers_release_binary_and_global_install -- --exact --nocapture
94+
95+
- name: MCP packaging smoke
96+
run: cargo test -p tnmsm-integrate-tests packaging_smoke_covers_release_binary_and_global_install -- --exact --nocapture
97+
7998
gui-smoke:
8099
needs: changes
81100
if: |

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,20 @@ jobs:
306306
- name: Build CLI package
307307
run: cargo build --release -p tnmsc
308308

309+
- name: Smoke test CLI main package
310+
shell: bash
311+
run: |
312+
set -euo pipefail
313+
pack_dir="$(mktemp -d)"
314+
trap 'rm -rf "$pack_dir"' EXIT
315+
pnpm -C cli pack --pack-destination "$pack_dir"
316+
cli_tarball="$(find "$pack_dir" -maxdepth 1 -name '*.tgz' -print -quit)"
317+
test -n "$cli_tarball"
318+
npm install -g "$cli_tarball"
319+
command -v tnmsc
320+
tnmsc help >/tmp/tnmsc-help.txt
321+
grep -q 'install' /tmp/tnmsc-help.txt
322+
309323
- name: Publish CLI package
310324
uses: ./.github/actions/npm-publish-package
311325
with:
@@ -382,6 +396,20 @@ jobs:
382396
- name: Build MCP package
383397
run: cargo build --release -p tnmsm
384398

399+
- name: Smoke test MCP main package
400+
shell: bash
401+
run: |
402+
set -euo pipefail
403+
pack_dir="$(mktemp -d)"
404+
trap 'rm -rf "$pack_dir"' EXIT
405+
pnpm -C mcp pack --pack-destination "$pack_dir"
406+
mcp_tarball="$(find "$pack_dir" -maxdepth 1 -name '*.tgz' -print -quit)"
407+
test -n "$mcp_tarball"
408+
npm install -g "$mcp_tarball"
409+
command -v tnmsm
410+
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | tnmsm >/tmp/tnmsm-initialize.json
411+
grep -q '"jsonrpc":"2.0"' /tmp/tnmsm-initialize.json
412+
385413
- name: Publish MCP package
386414
uses: ./.github/actions/npm-publish-package
387415
with:

Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ members = [
2929
]
3030

3131
[workspace.package]
32-
version = "2026.10422.10749"
32+
version = "2026.10424.111"
3333
edition = "2024"
3434
rust-version = "1.88"
3535
license = "AGPL-3.0-only"

cli/.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
*
2+
!bin
3+
!bin/
4+
!bin/tnmsc.js
25
!schema
36
!schema/
47
!schema/tnmsc.schema.json

0 commit comments

Comments
 (0)