From 93483572d8b0086d293ff92d9cefb9c3e1a7c508 Mon Sep 17 00:00:00 2001 From: David Snelling Date: Fri, 1 Aug 2025 16:22:18 -0700 Subject: [PATCH] **chore(scripts): prefix internal scripts with underscore for consistency** - Updated `package.json` in `web-service-package`, `cli-package`, and the root project to prefix internal NPM scripts with an underscore (`_`), such as `_version`, `_deploy`, `_dry-run`, etc. - Adjusted all relevant build, versioning, deployment, and test scripts to follow this convention. - Updated `.gitignore` to include `/brainy-models-package/node_modules/` for effective exclusion. **Purpose**: Standardize the naming of internal scripts to better differentiate them from user-facing commands and maintain consistency across packages. --- .gitignore | 1 + cli-package/package.json | 12 +++++----- package.json | 40 ++++++++++++++++---------------- web-service-package/package.json | 12 +++++----- 4 files changed, 33 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 4b0b10be..b3739f3e 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,4 @@ debug*.js debug*.ts /temp/ /temp-tests/ +/brainy-models-package/node_modules/ diff --git a/cli-package/package.json b/cli-package/package.json index 3cc20b41..133fcea0 100644 --- a/cli-package/package.json +++ b/cli-package/package.json @@ -16,12 +16,12 @@ "build": "rollup -c rollup.config.js", "prepare": "npm run build", "postinstall": "node cli-wrapper.js --version", - "version": "echo 'Version updated in package.json'", - "version:patch": "npm version patch", - "version:minor": "npm version minor", - "version:major": "npm version major", - "deploy": "npm run build && npm publish", - "dry-run": "npm pack --dry-run" + "_version": "echo 'Version updated in package.json'", + "_version:patch": "npm version patch", + "_version:minor": "npm version minor", + "_version:major": "npm version major", + "_deploy": "npm run build && npm publish", + "_dry-run": "npm pack --dry-run" }, "keywords": [ "vector-database", diff --git a/package.json b/package.json index d5106832..1b151de4 100644 --- a/package.json +++ b/package.json @@ -54,26 +54,7 @@ "build:browser": "BUILD_TYPE=browser rollup -c rollup.config.js", "start": "node dist/unified.js", "demo": "npm run build && npm run build:browser && npx http-server -o /demo/index.html", - "release": "standard-version", - "release:patch": "standard-version --release-as patch", - "release:minor": "standard-version --release-as minor", - "release:major": "standard-version --release-as major", - "release:dry-run": "standard-version --dry-run", - "github-release": "node scripts/create-github-release.js", - "changelog:check": "echo 'Changelog is now automatically generated from commit messages'", - "lint": "eslint --ext .ts,.js src/", - "lint:fix": "eslint --ext .ts,.js src/ --fix", - "format": "prettier --write \"src/**/*.{ts,js}\"", - "check:format": "prettier --check \"src/**/*.{ts,js}\"", - "check:style": "node scripts/check-code-style.js", "prepare": "npm run build", - "deploy": "npm run build && npm publish", - "workflow": "node scripts/release-workflow.js", - "workflow:patch": "node scripts/release-workflow.js patch", - "workflow:minor": "node scripts/release-workflow.js minor", - "workflow:major": "node scripts/release-workflow.js major", - "workflow:dry-run": "npm run build && npm test && npm run release:dry-run", - "dry-run": "npm pack --dry-run", "test": "vitest run", "test:watch": "vitest", "test:ui": "vitest --ui", @@ -90,7 +71,26 @@ "test:environments": "vitest run tests/multi-environment.test.ts", "test:specialized": "vitest run tests/specialized-scenarios.test.ts", "test:performance": "vitest run tests/performance.test.ts", - "test:comprehensive": "npm run test:error-handling && npm run test:edge-cases && npm run test:storage && npm run test:environments && npm run test:specialized" + "test:comprehensive": "npm run test:error-handling && npm run test:edge-cases && npm run test:storage && npm run test:environments && npm run test:specialized", + "_release": "standard-version", + "_release:patch": "standard-version --release-as patch", + "_release:minor": "standard-version --release-as minor", + "_release:major": "standard-version --release-as major", + "_release:dry-run": "standard-version --dry-run", + "_github-release": "node scripts/create-github-release.js", + "_changelog:check": "echo 'Changelog is now automatically generated from commit messages'", + "_lint": "eslint --ext .ts,.js src/", + "_lint:fix": "eslint --ext .ts,.js src/ --fix", + "_format": "prettier --write \"src/**/*.{ts,js}\"", + "_check:format": "prettier --check \"src/**/*.{ts,js}\"", + "_check:style": "node scripts/check-code-style.js", + "_deploy": "npm run build && npm publish", + "_workflow": "node scripts/release-workflow.js", + "_workflow:patch": "node scripts/release-workflow.js patch", + "_workflow:minor": "node scripts/release-workflow.js minor", + "_workflow:major": "node scripts/release-workflow.js major", + "_workflow:dry-run": "npm run build && npm test && npm run _release:dry-run", + "_dry-run": "npm pack --dry-run" }, "keywords": [ "vector-database", diff --git a/web-service-package/package.json b/web-service-package/package.json index eeec394c..2a313efd 100644 --- a/web-service-package/package.json +++ b/web-service-package/package.json @@ -22,12 +22,12 @@ "test:watch": "vitest", "test:cloud": "vitest run tests/cloud-storage.test.ts", "test:service": "vitest run tests/service.test.ts", - "version": "echo 'Version updated in package.json'", - "version:patch": "npm version patch", - "version:minor": "npm version minor", - "version:major": "npm version major", - "deploy": "npm run build && npm publish", - "dry-run": "npm pack --dry-run" + "_version": "echo 'Version updated in package.json'", + "_version:patch": "npm version patch", + "_version:minor": "npm version minor", + "_version:major": "npm version major", + "_deploy": "npm run build && npm publish", + "_dry-run": "npm pack --dry-run" }, "keywords": [ "vector-database",