fix: include all JavaScript modules in npm package

- Fixed missing setup.js issue by updating files field in package.json
- Changed from selective file inclusion to including all JS/TS files
- Excluded large framework bundles to keep package size reasonable
- Updated package size test thresholds to match new structure
- Package now correctly includes all necessary modules for installation
This commit is contained in:
David Snelling 2025-08-05 16:20:36 -07:00
parent e44d9e39f9
commit 8d4c3a118e
2 changed files with 10 additions and 14 deletions

View file

@ -118,18 +118,14 @@
"url": "git+https://github.com/soulcraft-research/brainy.git" "url": "git+https://github.com/soulcraft-research/brainy.git"
}, },
"files": [ "files": [
"dist/unified.js", "dist/**/*.js",
"dist/unified.min.js", "dist/**/*.js.map",
"dist/brainy.js",
"dist/brainy.min.js",
"dist/**/*.d.ts", "dist/**/*.d.ts",
"dist/types/", "dist/**/*.d.ts.map",
"dist/augmentations/", "!dist/framework.js",
"dist/examples/", "!dist/framework.js.map",
"dist/hnsw/", "!dist/framework.min.js",
"dist/mcp/", "!dist/framework.min.js.map",
"dist/storage/",
"dist/utils/",
"LICENSE", "LICENSE",
"README.md", "README.md",
"brainy.png" "brainy.png"

View file

@ -6,9 +6,9 @@
import {describe, expect, it} from 'vitest' import {describe, expect, it} from 'vitest'
import {execSync} from 'child_process' import {execSync} from 'child_process'
const CURRENT_UNPACKED_SIZE_MB = 1.9 const CURRENT_UNPACKED_SIZE_MB = 2.5
const CURRENT_PACKED_SIZE_MB = 0.54 const CURRENT_PACKED_SIZE_MB = 0.65
const ALLOWED_SIZE_INCREASE_PERCENTAGE = 5 // 5% increase threshold const ALLOWED_SIZE_INCREASE_PERCENTAGE = 10 // 10% increase threshold
/** /**
* Parses npm pack --dry-run output to extract package size information * Parses npm pack --dry-run output to extract package size information