Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/bootstrap-installer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"clsx": "2.1.1",
"katex": "0.16.47",
"lucide-react": "0.577.0",
"nanostores": "1.4.0",
"nanostores": "1.4.2",
"radix-ui": "1.6.7",
"react": "19.2.7",
"react-dom": "19.2.7",
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"katex": "0.16.47",
"mermaid": "11.16.1",
"motion": "12.42.2",
"nanostores": "1.4.0",
"nanostores": "1.4.2",
"node-pty": "1.1.0",
"radix-ui": "1.6.7",
"react": "19.2.7",
Expand Down
31 changes: 31 additions & 0 deletions apps/desktop/src/store/nanostores-batch-guard.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Regression guard: the desktop's gateway-switch publication runs inside
* nanostores' batch(). nanostores 1.4.0–1.4.1 annotated batch() with
* `/* @__NO_SIDE_EFFECTS__ *\/`, which let production bundlers (Rollup, via
* `vite build`) erase result-unused batch(...) calls β€” callback included β€”
* deleting the entire publication from release builds and freezing
* profile/agent switching there. Dev builds and vitest run unminified, so
* only the packaged app broke. nanostores 1.4.2 removed the annotation;
* this test fails if the installed version ever carries it again.
*/
import { readFileSync } from 'node:fs'
import { createRequire } from 'node:module'
import path from 'node:path'

import { describe, expect, it } from 'vitest'

const require = createRequire(import.meta.url)

describe('nanostores batch()', () => {
it('is not annotated @__NO_SIDE_EFFECTS__ β€” bundlers would erase its calls', () => {
const nanostoresEntry = require.resolve('nanostores')
const atomSource = readFileSync(path.join(path.dirname(nanostoresEntry), 'atom/index.js'), 'utf8')

// Capture any block comment immediately preceding the batch export.
const match = atomSource.match(/(\/\*(?:[^*]|\*(?!\/))*\*\/\s*)?export const batch\b/)

expect(match, 'nanostores atom/index.js should export const batch').toBeTruthy()
expect(match![1] ?? '').not.toContain('__NO_SIDE_EFFECTS')
expect(match![1] ?? '').not.toContain('__PURE__')
})
})
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui-tui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@hermes/shared": "file:../apps/shared",
"@nanostores/react": "1.1.0",
"ink-text-input": "6.0.0",
"nanostores": "1.4.0",
"nanostores": "1.4.2",
"react": "19.2.7",
"undici": "6.28.0",
"unicode-animations": "1.0.3"
Expand Down