scv-bilara 3.182.62 → 3.197.1

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,17 +1,22 @@
1
1
  name: push-actions
2
2
  on: [push]
3
+ #schedule:
4
+ # - cron: 20 3,11,19 * * *
5
+ #workflow_dispatch: # Allows manual trigger from Github UI
3
6
  jobs:
4
7
  push-job:
8
+ timeout-minutes: 30
5
9
  runs-on: ubuntu-latest
10
+ permissions:
11
+ id-token: write # OIDC npm
12
+ contents: write
6
13
  steps:
7
- - uses: actions/checkout@v4
8
- - uses: actions/setup-node@v4
14
+ - uses: actions/checkout@v6
15
+ - uses: actions/setup-node@v6
9
16
  with:
10
- node-version: '20.x'
11
- registry-url: 'https://registry.npmjs.org'
17
+ node-version: '24.x'
18
+ #registry-url: 'https://registry.npmjs.org'
12
19
  - run: scripts/install
13
20
  - run: git config user.name github-actions
14
21
  - run: git config user.email github-actions@github.com
15
22
  - run: npm run push-action
16
- env:
17
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -2,18 +2,21 @@ name: schedule-actions
2
2
  on:
3
3
  schedule:
4
4
  - cron: 20 3,11,19 * * *
5
+ workflow_dispatch: # Allows manual trigger from Github UI
5
6
  jobs:
6
7
  build-job:
8
+ timeout-minutes: 30
7
9
  runs-on: ubuntu-latest
10
+ permissions:
11
+ id-token: write # OIDC npm
12
+ contents: write
8
13
  steps:
9
- - uses: actions/checkout@v4
10
- - uses: actions/setup-node@v4
14
+ - uses: actions/checkout@v6
15
+ - uses: actions/setup-node@v6
11
16
  with:
12
- node-version: '20.x'
17
+ node-version: '24.x'
13
18
  registry-url: 'https://registry.npmjs.org'
14
19
  - run: scripts/install
15
20
  - run: git config --global user.name github-actions
16
21
  - run: git config --global user.email github-actions@github.com
17
22
  - run: npm run schedule-action
18
- env:
19
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CLAUDE.md ADDED
@@ -0,0 +1,76 @@
1
+ # CLAUDE.md - scv-bilara Project Guidelines
2
+
3
+ ## Bug Types
4
+
5
+ Two kinds of bugs can cause test failures:
6
+
7
+ 1. **Code Bug**: Code logic is broken (e.g., search algorithm, filtering logic)
8
+ - Fix: Update source code logic
9
+ - Test: Use TESTTEST prefix, run with mocha --grep
10
+
11
+ 2. **Content Bug**: Content has changed since test was written
12
+ - Fix: Update test expectations to match new content
13
+ - Test: Use TESTTEST prefix, run with mocha --grep
14
+
15
+ ## Determining Bug Type During Analysis
16
+
17
+ 1. **Check the actual vs expected values** in test failure
18
+ 2. **Look at the content files** that are being tested
19
+ 3. **Determine if content is present**:
20
+ - If content IS there and test expects it missing → Content Bug
21
+ - If content is missing and test expects it there → Content Bug
22
+ - If content hasn't changed but behavior is wrong → Code Bug
23
+
24
+ ## Content Bug Fixing Process
25
+
26
+ When tests fail due to content changes:
27
+
28
+ ### Understanding
29
+ - Tests represent **past truth** (when tests were written)
30
+ - Content in bilara-data/ebt-data changes over time
31
+ - Test failures indicate content has changed, not that code is broken
32
+ - **Our job**: Update test expectations to match new content reality
33
+ - NOT: Fix code to filter out or exclude content
34
+
35
+ ### Process for Each Failing Test
36
+
37
+ 1. **Analyze**:
38
+ - Run failing test, capture output
39
+ - Check content files (JSON translation files) for what's actually there
40
+ - Identify what changed since test was written
41
+ - **Determine bug type** (Content or Code)
42
+
43
+ 2. **Agree**:
44
+ - Share analysis with developer
45
+ - Confirm understanding of the change
46
+
47
+ 3. **Propose**:
48
+ - Suggest fix (update test expectations)
49
+ - Explain which content was added/changed
50
+
51
+ 4. **Approve**:
52
+ - Get developer approval before making changes
53
+
54
+ 5. **Implement**:
55
+ - Update test file with new expected values
56
+ - Add TESTTEST prefix to test name (e.g., `it("TESTTESTexampleSuttas()"`)
57
+
58
+ 6. **Test**:
59
+ - Run: `npx mocha test/<file>.mjs --grep "TESTTEST"`
60
+ - Verify test passes
61
+ - Remove TESTTEST prefix when confirmed
62
+
63
+ 7. **Next**:
64
+ - Move to next failing test
65
+
66
+ ### Key Files
67
+ - Test files: `/test/*.mjs` and `/test/*.js`
68
+ - Content files: `/local/bilara-data/translation/` and `/local/ebt-data/translation/`
69
+ - JSON structure: `{suttaId:segmentId: "translation text", ...}`
70
+
71
+ ### Example
72
+ When `mn105/de/sabbamitta` content changed to include "Wurzel des Leidens", tests that search for that phrase now return mn105. Update test expectations to include mn105 in expected results.
73
+
74
+ ## Build Status
75
+
76
+ - **v3.192.3**: Node v20 tests all passing (255 tests). All 7 failing tests were Content Bugs fixed by updating test expectations for mn105 German translations.
package/Makefile ADDED
@@ -0,0 +1,9 @@
1
+ .PHONY: commit
2
+
3
+ commit:
4
+ @if [ ! -f .commit-msg ]; then echo "Error: .commit-msg not found"; exit 1; fi
5
+ @MSG=$$(cat .commit-msg); \
6
+ rm .commit-msg; \
7
+ git add .; \
8
+ git commit -m "$$MSG"; \
9
+ git status
package/WORK.md ADDED
@@ -0,0 +1,44 @@
1
+ # WORK.md
2
+
3
+ **Build**: v3.192.2
4
+ **Status**: In Progress
5
+ **Started**: 2025-12-16
6
+
7
+ ## Objective
8
+
9
+ Fix errors found by "npm run test" one-by-one with developer
10
+
11
+ ## Process for Fixing Each Bug (1-7)
12
+
13
+ 1. **Analyze**: Run test, capture failure output, identify what's wrong
14
+ 2. **Agree**: Share analysis with developer, get agreement
15
+ 3. **Propose**: Suggest fix based on analysis, explain reasoning
16
+ 4. **Approve**: Get developer approval before making changes
17
+ 5. **Implement**: Make code changes and add TESTTEST prefix to test name
18
+ 6. **Test**: Run `npx mocha test/<file>.mjs --grep "TESTTEST"` to verify fix works
19
+ 7. **Next**: Move to next bug
20
+
21
+ ## Plan
22
+
23
+ 1. [x] Bug 1: example-v2 exampleSuttas()
24
+ 2. [x] Bug 2: example-v2 suttasOfExamples()
25
+ 3. [x] Bug 3: Seeker phraseSearch(...) finds Deutsch results
26
+ 4. [x] Bug 4: Seeker find({minLang:3}) root of suffering
27
+ 5. [x] Bug 5: Seeker find(...) => finds phrase
28
+ 6. [x] Bug 6: Seeker find() keywords: wurzel leidens
29
+ 7. [x] Bug 7: Seeker find(...) ignores translation stubs
30
+
31
+ ## Current Step
32
+
33
+ Complete - All 7 bugs fixed, 255 tests passing
34
+
35
+ ## Blockers
36
+
37
+ None
38
+
39
+ ## Notes
40
+
41
+ - 248 passing, 7 failing tests
42
+ - All failures involve unwanted inclusion of mn105 in search results
43
+ - Bug 1 FIXED: Updated test to include mn105 in expected results
44
+ - All bugs appear to be Content Bugs (content changed, not code broken)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scv-bilara",
3
- "version": "3.182.62",
3
+ "version": "3.197.1",
4
4
  "description": "SuttaCentral bilara-data library",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -9,14 +9,13 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "check-node-version": "^4.0.1",
12
- "esm": "^3.2.25",
13
12
  "js-ebt": "^1.0.1",
14
13
  "json5": "^2.1.3",
15
- "log-instance": "^1.6.0",
16
- "memo-again": "^0.10.0",
17
- "merkle-json": "^2.2.0",
18
- "scv-esm": "^1.115.898",
19
- "suttacentral-api": "^2.17.71",
14
+ "log-instance": "^1.8.0",
15
+ "memo-again": "^0.11.0",
16
+ "merkle-json": "^2.13.0",
17
+ "scv-esm": "^1.127.0",
18
+ "suttacentral-api": "^2.24.0",
20
19
  "tmp": "^0.2.3"
21
20
  },
22
21
  "devDependencies": {
@@ -36,7 +35,8 @@
36
35
  "version": "node -e \"console.log(require('./package.json').version);\""
37
36
  },
38
37
  "repository": {
39
- "tag": "git"
38
+ "type": "git",
39
+ "url": "https://github.com/sc-voice/scv-bilara"
40
40
  },
41
41
  "keywords": [
42
42
  "SuttaCentral",
package/scripts/install CHANGED
@@ -3,8 +3,8 @@
3
3
  DIR=`dirname $0`
4
4
  SCRIPT=`basename $0 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
5
5
 
6
- ${DIR}/install-node 20 &&
7
- ${DIR}/update-npm 10 &&
6
+ ${DIR}/install-node 24 &&
7
+ ${DIR}/update-npm 11 &&
8
8
  ${DIR}/install-ripgrep &&
9
9
  npm install &&
10
10
  echo -e "${SCRIPT}: completed (OK)"
@@ -4,9 +4,10 @@ pushd $DIR/..
4
4
  SCRIPT=`basename $0 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
5
5
 
6
6
  echo "npm version:" `npm -v`
7
- npm install --save suttacentral-api@latest
8
- npm install --save scv-esm@latest
9
- npm install --save log-instance@latest
10
- npm install --save memo-again@latest
7
+ npm install --verbose --save scv-esm@latest
8
+ npm install --verbose --save suttacentral-api@latest
9
+ npm install --verbose --save log-instance@latest
10
+ npm install --verbose --save memo-again@latest
11
+ npm install --verbose --save merkle-json@latest
11
12
  $DIR/js/suidmap.js
12
13
  $DIR/examples PUSH