knowns 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,58 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.8] - 2025-12-27
9
+
10
+ ### Added
11
+ - **Node.js Runtime Support**: Browser command now works with both Bun and Node.js
12
+ - Migrated server from `Bun.serve()` to Express + ws
13
+ - Added `express`, `ws`, and `cors` dependencies
14
+ - WebSocket real-time sync works on both runtimes
15
+ - **Bun Compatibility Layer**: New `src/utils/bun-compat.ts` utility providing cross-runtime support
16
+ - `file()` - Bun.file() compatible wrapper for reading files
17
+ - `write()` - Bun.write() compatible wrapper for writing files
18
+ - `bunSpawn()` - Bun.spawn() compatible wrapper for process spawning
19
+ - CLI commands now work with both Bun and Node.js runtimes
20
+ - **Build Scripts**: Added `scripts/build-cli.js` using esbuild for Node.js-compatible builds
21
+ - CLI can now be built with `node scripts/build-cli.js` (no Bun required)
22
+ - Uses ESM format with `createRequire` shim for CommonJS compatibility
23
+ - Builds both main CLI and MCP server
24
+ - Properly strips old shebangs and adds Node.js-compatible shebang
25
+ - **CI/CD**: Updated GitHub Actions workflows to use only Node.js and npm
26
+ - Removed Bun dependency from CI/CD pipelines
27
+ - Both `ci.yml` and `publish.yml` now use `npm ci`, `npm test`, `npm run build`
28
+ - Added npm cache for faster builds
29
+ - **Testing**: Migrated from `bun test` to `vitest`
30
+ - Added `vitest.config.ts` with path aliases support
31
+ - All 76 tests passing with vitest
32
+
33
+ ### Fixed
34
+ - **File Deletion**: Fixed improper file deletion that was clearing files instead of deleting them
35
+ - Changed from `Bun.write(path, "")` to proper `unlink()` in `file-store.ts` and `version-store.ts`
36
+ - Tasks and version history are now properly deleted when archived or removed
37
+ - **Browser Command**: Fixed browser opening on non-Bun runtimes with proper `spawn()` fallback
38
+ - **Server Path Detection**: Fixed `import.meta.dir` undefined error when running with Node.js
39
+ - Now uses `fileURLToPath(import.meta.url)` as fallback for Node.js compatibility
40
+ - Added Windows path separator support
41
+ - **Windows Build**: Fixed shebang syntax error when running built CLI on Windows
42
+ - Build script now strips BOM and old shebangs before adding Node.js shebang
43
+ - Added `.npmrc` with `legacy-peer-deps=true` for React 19 compatibility
44
+ - **Web UI Doc Update**: Fixed "path must be string" error when updating docs
45
+ - Express 5 wildcard `{*path}` returns array, now properly joined to string
46
+
47
+ ### Changed
48
+ - **Server Architecture**: Complete rewrite of `src/server/index.ts`
49
+ - Replaced `Bun.serve()` with Express HTTP server
50
+ - Replaced Bun WebSocket API with `ws` library
51
+ - All 15 API routes migrated to Express router pattern
52
+ - Static file serving now uses `express.static()`
53
+ - Refactored file operations across multiple modules to use the new compatibility layer:
54
+ - `src/commands/task.ts` - Archive/unarchive operations
55
+ - `src/commands/time.ts` - Time tracking data persistence
56
+ - `src/storage/file-store.ts` - Task and project storage
57
+ - `src/storage/version-store.ts` - Version history storage
58
+ - Simplified `src/utils/bun-compat.ts` - removed `serve()` function (now using Express)
59
+
8
60
  ## [0.1.7] - 2025-12-27
9
61
 
10
62
  ### Fixed
@@ -146,6 +198,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
146
198
  - CLAUDE.md with complete guidelines for AI agents
147
199
  - Example workflows and patterns
148
200
 
201
+ [0.1.8]: https://github.com/knowns-dev/knowns/compare/v0.1.7...v0.1.8
149
202
  [0.1.7]: https://github.com/knowns-dev/knowns/compare/v0.1.6...v0.1.7
150
203
  [0.1.6]: https://github.com/knowns-dev/knowns/compare/v0.1.5...v0.1.6
151
204
  [0.1.5]: https://github.com/knowns-dev/knowns/compare/v0.1.3...v0.1.5