bluera-knowledge 0.9.21 → 0.9.26

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluera-knowledge",
3
- "version": "0.9.21",
3
+ "version": "0.9.26",
4
4
  "description": "Clone repos, crawl docs, search locally. Fast, authoritative answers for AI coding agents without web lookups.",
5
5
  "author": {
6
6
  "name": "Bluera Inc",
@@ -16,6 +16,7 @@ jobs:
16
16
  runs-on: ubuntu-latest
17
17
  permissions:
18
18
  contents: write
19
+ id-token: write # Required for npm trusted publishing (OIDC)
19
20
  steps:
20
21
  - uses: actions/checkout@v4
21
22
  with:
@@ -51,9 +52,12 @@ jobs:
51
52
  - name: Setup Node.js (for npm publish)
52
53
  uses: actions/setup-node@v4
53
54
  with:
54
- node-version: '20'
55
+ node-version: '22'
55
56
  registry-url: 'https://registry.npmjs.org'
56
57
 
58
+ - name: Update npm for trusted publishing
59
+ run: npm install -g npm@latest
60
+
57
61
  - name: Install dependencies
58
62
  run: bun install
59
63
 
@@ -61,6 +65,4 @@ jobs:
61
65
  run: bun run build
62
66
 
63
67
  - name: Publish to npm
64
- run: npm publish
65
- env:
66
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
68
+ run: npm publish --provenance --access public
package/CHANGELOG.md CHANGED
@@ -2,6 +2,36 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.9.26](https://github.com/blueraai/bluera-knowledge/compare/v0.9.25...v0.9.26) (2026-01-06)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **tests:** make spawn-worker tests more robust ([05e3127](https://github.com/blueraai/bluera-knowledge/commit/05e312748d250592df1ce23395006954907f5387))
11
+
12
+ ## [0.9.25](https://github.com/blueraai/bluera-knowledge/compare/v0.9.23...v0.9.25) (2026-01-06)
13
+
14
+
15
+ ### Features
16
+
17
+ * **ci:** switch to npm trusted publishing (OIDC) ([269c48d](https://github.com/blueraai/bluera-knowledge/commit/269c48d6b04c9e6ebc3c3d77bfe1543f6519c68e))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **ci:** upgrade npm for trusted publishing support ([9a4a8e0](https://github.com/blueraai/bluera-knowledge/commit/9a4a8e041eb90d549fa5474368c60261e5ed0005))
23
+
24
+ ## [0.9.24](https://github.com/blueraai/bluera-knowledge/compare/v0.9.23...v0.9.24) (2026-01-06)
25
+
26
+
27
+ ### Features
28
+
29
+ * **ci:** switch to npm trusted publishing (OIDC) ([269c48d](https://github.com/blueraai/bluera-knowledge/commit/269c48d6b04c9e6ebc3c3d77bfe1543f6519c68e))
30
+
31
+ ## [0.9.23](https://github.com/blueraai/bluera-knowledge/compare/v0.9.22...v0.9.23) (2026-01-06)
32
+
33
+ ## [0.9.22](https://github.com/blueraai/bluera-knowledge/compare/v0.9.20...v0.9.22) (2026-01-06)
34
+
5
35
  ## [0.9.21](https://github.com/blueraai/bluera-knowledge/compare/v0.9.20...v0.9.21) (2026-01-06)
6
36
 
7
37
  ## [0.9.20](https://github.com/blueraai/bluera-knowledge/compare/v0.9.16...v0.9.20) (2026-01-06)
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # 🧠 Bluera Knowledge
2
2
 
3
3
  [![CI](https://github.com/blueraai/bluera-knowledge/actions/workflows/ci.yml/badge.svg)](https://github.com/blueraai/bluera-knowledge/actions/workflows/ci.yml)
4
- ![Version](https://img.shields.io/badge/version-0.9.21-blue)
4
+ ![Version](https://img.shields.io/badge/version-0.9.26-blue)
5
5
  ![License](https://img.shields.io/badge/license-MIT-green)
6
6
  ![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen)
7
7
  ![Python](https://img.shields.io/badge/python-%3E%3D3.8-blue)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluera-knowledge",
3
- "version": "0.9.21",
3
+ "version": "0.9.26",
4
4
  "description": "CLI tool for managing knowledge stores with semantic search",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,27 +22,26 @@ describe('spawnBackgroundWorker', () => {
22
22
  it('should use tsx in development mode (src folder)', () => {
23
23
  spawnBackgroundWorker('test-job', '/test/data');
24
24
 
25
- const callArgs = mockSpawn.mock.calls[0];
26
- const command = callArgs?.[0];
27
- const args = callArgs?.[1];
25
+ expect(mockSpawn).toHaveBeenCalledTimes(1);
26
+ const [command, args] = mockSpawn.mock.calls[0] as [string, string[], object];
28
27
 
29
28
  // In development (src folder), should use npx tsx
30
29
  expect(command).toBe('npx');
31
- expect(args?.[0]).toBe('tsx');
30
+ expect(args[0]).toBe('tsx');
32
31
  });
33
32
 
34
33
  it('should spawn a background worker process', () => {
35
34
  spawnBackgroundWorker('test-job-id', '/test/data/dir');
36
35
 
37
- expect(mockSpawn).toHaveBeenCalled();
38
- expect(mockUnref).toHaveBeenCalled();
36
+ expect(mockSpawn).toHaveBeenCalledTimes(1);
37
+ expect(mockUnref).toHaveBeenCalledTimes(1);
39
38
  });
40
39
 
41
40
  it('should pass job ID as argument', () => {
42
41
  spawnBackgroundWorker('my-job-123', '/test/data/dir');
43
42
 
44
- const callArgs = mockSpawn.mock.calls[0];
45
- const args = callArgs?.[1];
43
+ expect(mockSpawn).toHaveBeenCalledTimes(1);
44
+ const [, args] = mockSpawn.mock.calls[0] as [string, string[], object];
46
45
 
47
46
  expect(args).toContain('my-job-123');
48
47
  });
@@ -50,8 +49,8 @@ describe('spawnBackgroundWorker', () => {
50
49
  it('should spawn detached process with ignored stdio', () => {
51
50
  spawnBackgroundWorker('test-job', '/test/data/dir');
52
51
 
53
- const callArgs = mockSpawn.mock.calls[0];
54
- const options = callArgs?.[2];
52
+ expect(mockSpawn).toHaveBeenCalledTimes(1);
53
+ const [, , options] = mockSpawn.mock.calls[0] as [string, string[], { detached: boolean; stdio: string }];
55
54
 
56
55
  expect(options).toMatchObject({
57
56
  detached: true,
@@ -63,10 +62,10 @@ describe('spawnBackgroundWorker', () => {
63
62
  const dataDir = '/custom/data/directory';
64
63
  spawnBackgroundWorker('test-job', dataDir);
65
64
 
66
- const callArgs = mockSpawn.mock.calls[0];
67
- const options = callArgs?.[2];
65
+ expect(mockSpawn).toHaveBeenCalledTimes(1);
66
+ const [, , options] = mockSpawn.mock.calls[0] as [string, string[], { env: Record<string, string> }];
68
67
 
69
- expect(options?.env).toMatchObject({
68
+ expect(options.env).toMatchObject({
70
69
  ...process.env,
71
70
  BLUERA_DATA_DIR: dataDir
72
71
  });
@@ -76,10 +75,10 @@ describe('spawnBackgroundWorker', () => {
76
75
  const testDataDir = '.bluera/bluera-knowledge/data';
77
76
  spawnBackgroundWorker('job-456', testDataDir);
78
77
 
79
- const callArgs = mockSpawn.mock.calls[0];
80
- const options = callArgs?.[2];
78
+ expect(mockSpawn).toHaveBeenCalledTimes(1);
79
+ const [, , options] = mockSpawn.mock.calls[0] as [string, string[], { env: Record<string, string> }];
81
80
 
82
- expect(options?.env?.BLUERA_DATA_DIR).toBe(testDataDir);
81
+ expect(options.env.BLUERA_DATA_DIR).toBe(testDataDir);
83
82
  });
84
83
  });
85
84
 
@@ -116,13 +115,12 @@ describe('spawnBackgroundWorker (production mode)', () => {
116
115
 
117
116
  spawnProd('test-job', '/test/data');
118
117
 
119
- const callArgs = mockSpawnProd.mock.calls[0];
120
- const command = callArgs?.[0];
121
- const args = callArgs?.[1];
118
+ expect(mockSpawnProd).toHaveBeenCalledTimes(1);
119
+ const [command, args] = mockSpawnProd.mock.calls[0] as [string, string[]];
122
120
 
123
121
  // In production (dist folder), should use Node.js directly
124
122
  expect(command).toBe(process.execPath);
125
- expect(args?.[0]).toContain('background-worker-cli.js');
126
- expect(args?.[1]).toBe('test-job');
123
+ expect(args[0]).toContain('background-worker-cli.js');
124
+ expect(args[1]).toBe('test-job');
127
125
  });
128
126
  });