Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
# Regenerate NOTICE.txt whenever package.json or package-lock.json is staged.
# This keeps the file accurate for both manual dependency bumps and automated
# tool runs (e.g. `npm install`) that stage lockfile changes.

if git diff --cached --name-only | grep -qE '^package(-lock)?\.json$'; then
echo "package.json or package-lock.json changed — regenerating NOTICE.txt..."
node scripts/generate-notice.mjs
git add NOTICE.txt
fi
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"packages/*"
],
"scripts": {
"prepare": "git config core.hooksPath .githooks || true",
"build": "node --max-old-space-size=6144 node_modules/typescript/bin/tsc -b",
"test": "npm run build && npm run test:unit && npm run test:license",
"test:unit": "node --import tsx/esm --test --experimental-test-coverage --test-coverage-lines=90 --test-coverage-branches=90 --test-coverage-functions=90 --test-coverage-include='src/**/*.ts' --test-coverage-include='packages/*/src/**/*.ts' --test-coverage-exclude='src/cloud/apis/**' --test-coverage-exclude='src/es/apis.ts' --test-coverage-exclude='src/es/api-manifest.ts' --test-coverage-exclude='src/es/apis/**' --test-coverage-exclude='src/cloud/apis.ts' --test-coverage-exclude='src/cloud/serverless-apis.ts' --test-coverage-exclude='node_modules/**'",
Expand Down
7 changes: 6 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>elastic/renovate-config"
]
],
"postUpgradeTasks": {
"commands": ["node scripts/generate-notice.mjs"],
"fileFilters": ["NOTICE.txt"],
"executionMode": "branch"
}
}
Loading