From 9dbfef5933716b65c2338cc5ee60b80f4346ae68 Mon Sep 17 00:00:00 2001 From: Amaad Martin Date: Tue, 4 Aug 2026 06:47:09 -0700 Subject: [PATCH 1/2] Fix: keep generator-owned files out of Prettier and check the hook's glob in CI The pre-commit hook maps `**/*.{json,md}` to `prettier --write`, but `.prettierignore` listed only build output, so the release-please-generated `CHANGELOG.md` files were in scope. Staging a two-line note on `integrations/CHANGELOG.md` produced a +11/-14 staged diff; `core/CHANGELOG.md` loses 264 of its 341 lines to the same rewrite. Ignore `CHANGELOG.md` (bare, so it matches every workspace package now and in future) so the hook reproduces the author's edit exactly. Widen `format`/`format:check` to the same `**/*.{ts,json,md}` glob the hook formats, so the formatting the hook writes is the formatting CI enforces and the tree cannot silently drift again. `package-lock.json` is ignored as a forward-looking guard for that widened check: Prettier does not reformat it today (it routes `package.json` and `package-lock.json` to the `json-stringify` parser, whose output is byte-identical to npm's own serialization), but npm owns the file and it should not become a CI formatting failure on three operating systems. --- .prettierignore | 4 ++++ package.json | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.prettierignore b/.prettierignore index b572a242e..29a14d630 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,7 @@ dist/ node_modules/ dev/src/browser + +# Generated files: owned by their generators, not Prettier. +package-lock.json +CHANGELOG.md diff --git a/package.json b/package.json index 36cc0d747..f737d6646 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "ts:check": "tsc --noEmit", "lint": "eslint \"**/*.ts\"", "lint:fix": "eslint --fix \"**/*.ts\"", - "format": "prettier \"**/*.ts\" --write", - "format:check": "prettier \"**/*.ts\" --check", + "format": "prettier \"**/*.{ts,json,md}\" --write", + "format:check": "prettier \"**/*.{ts,json,md}\" --check", "docs": "npm run docs:clean && npm run docs:generate && npm run docs:serve", "docs:clean": "rm -rf ./api-reference", "docs:generate": "typedoc", From 59717248948712a081b4fb02981f384ff15111c2 Mon Sep 17 00:00:00 2001 From: Amaad Martin Date: Tue, 4 Aug 2026 06:47:14 -0700 Subject: [PATCH 2/2] Style: apply Prettier to the four hand-authored files that had drifted Produced by `npx prettier --write` on exactly these four paths, with no hand edits. They are the entire backlog the widened `format:check` surfaces: JSON and Markdown were never checked in CI even though the pre-commit hook formats them, so these had drifted out of the standard the hook applies. `.vscode/settings.json` also carried a trailing comma, which is not valid JSON. --- .github/ISSUE_TEMPLATE/bug_report.md | 11 ++++++----- .github/ISSUE_TEMPLATE/feature_request.md | 3 +-- .vscode/settings.json | 2 +- dev/README.md | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7915a717a..cbd0fc689 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,6 @@ about: Create a report to help us improve title: '' labels: '' assignees: '' - --- ** Please make sure you read the contribution guide and file the issues in the @@ -16,6 +15,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Install '...' 2. Run '....' 3. Open '....' @@ -28,9 +28,10 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - TS version/environment: - - ADK version(see maven dependency): + +- OS: [e.g. iOS] +- TS version/environment: +- ADK version(see maven dependency): **Additional context** -Add any other context about the problem here. \ No newline at end of file +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index d9cfdacfc..5a8491fb5 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -4,7 +4,6 @@ about: Suggest an idea for TypeScript ADK title: '' labels: '' assignees: '' - --- ** Please make sure you read the contribution guide and file the issues in the @@ -23,4 +22,4 @@ A clear and concise description of any alternative solutions or features you've considered. **Additional context** -Add any other context or screenshots about the feature request here. \ No newline at end of file +Add any other context or screenshots about the feature request here. diff --git a/.vscode/settings.json b/.vscode/settings.json index 517be51b1..a03142531 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,5 +6,5 @@ "files.insertFinalNewline": true, "editor.detectIndentation": false, "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, + "editor.formatOnSave": true } diff --git a/dev/README.md b/dev/README.md index 2d84ecc46..1c53d9b68 100644 --- a/dev/README.md +++ b/dev/README.md @@ -1,3 +1,3 @@ # @google/adk-devtools -Please see README for adk-js at https://github.com/google/adk-js \ No newline at end of file +Please see README for adk-js at https://github.com/google/adk-js