GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(project): clean up the tooling scripts, ignore files, and READMEs by dschach · Pull Request #353 · dschach/salesforce-trigger-framework

Conversation

@dschach

@dschach dschach commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Clean up the project files that every contributor touches: the Prettier setup, the npm scripts and the commit hook, the 3 ignore files, and the READMEs. Nothing here changes the Apex code.

Changes

  • .prettierignore is grouped and commented. The 2 lines that matched nothing (./*.json and its negation) and the LWC leftovers are gone, and the generated docs/ site is ignored as a whole.
  • The 4 Prettier scripts run on . and let .prettierignore decide what is checked, so prettier:verify now covers CSS and HTML too. prettier:docs reads .gitignore, so it still formats the 8 generated pages after a regeneration. lint-staged runs Prettier on every staged file it can parse. The initialize script, which pointed at a missing file, is deleted.
  • scripts/updateHighlight.sh writes its separator line to doc-assets/highlight.js instead of a missing assets/ folder, uses a sed form that works on macOS and Linux, and stops when a download fails.
  • The pre-commit hook calls lint-staged directly, so the precommit script is gone. orginit and updateHighlight run with bash and sh instead of being sourced. package.json declares the Node version that the locked lint-staged needs.
  • prune runs a new scripts/prune-branches.sh, which deletes only local branches whose remote branch is gone. Squash merges make git branch -d refuse every merged branch, so the remote branch is the sign instead. It never deletes the checked-out branch or a branch that was never pushed.
  • The README examples compile and follow 1 pattern: a no-arg constructor that passes the class name to super(), and new Handler().run() in the trigger. The global bypass is bypassAll(), the alias is BypassAll, and the setBypass typo is fixed. The loop count section says how counts are really used: 1 per trigger context, more for each 200-record chunk, and a warning plus a skip when the limit is passed.
  • The README gains an API Reference table with every public member. The documentation link goes straight to the HTTPS site, because the GitHub Pages address first redirected to plain HTTP, and the Twitter badge links to the profile instead of to its own image.
  • The sample README moves from the classes folder to sample-handler/README.md and describes the real trigger, handler, and test.
  • The 2 action READMEs show the Code Analyzer CLI the way ci.yml calls it, and the parse-sfca-results README says that CI does not call that action.
  • .forceignore and .gitignore lose the LWC and old CLI template lines, and .gitignore ignores the tests/ folder that the Apex test run writes. The template examples scripts/apex/hello.apex and scripts/soql/account.soql are deleted.

Behavior notes

  • The scratch org definition and .vscode/launch.json are unchanged on purpose.
  • The set of files that git ignores in a working copy is the same before and after this change.
  • A local node_modules older than the lock file still works; npm ci brings it up to the locked versions.

Test plan

  • npm run prettier:verify is clean on the whole tree, and prettier:docs reaches exactly the 8 generated HTML pages.
  • Every Apex block in the README and every example in the TriggerHandler ApexDoc compiled in a check-only deploy to a scratch org, with 0 errors and nothing saved.
  • scripts/prune-branches.sh deleted only the branch with a deleted remote branch in a throwaway repository, and skipped the checked-out one.
  • A deploy preview of force-app and sample-handler holds exactly the 5 Apex components.

Closes #333

BEGIN_NESTED_COMMIT
chore(prettier): ignore only what Prettier should skip

The ignore file loses 2 lines that matched nothing and the LWC leftovers, groups its entries with comments, and ignores the generated docs site as a whole.
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
build(npm): run the Prettier scripts on the whole tree

The 4 Prettier scripts run on the project root with the ignore file in charge, lint-staged formats every staged file it can parse, and the initialize script for a missing file is deleted.
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
fix(scripts): write highlight.js to doc-assets with portable sed

The highlight script writes its separator to the right folder, edits files with a sed form that works on macOS and Linux, and stops when a download fails.
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
build(npm): call lint-staged from the hook and prune gone branches

The hook calls lint-staged directly, the shell scripts run instead of being sourced, the Node engine is declared, and prune deletes only local branches whose remote branch is gone.
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
docs(readme): correct the bypass, loop count, and handler examples

The README examples compile and follow 1 constructor pattern, the global bypass and alias names are right, and the loop count section describes how counts are really used.
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
docs(readme): add an API reference and fix the documentation links

A table lists every public member, the documentation link goes straight to the HTTPS site, and the Twitter badge links to the profile.
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
docs(sample): move the sample README and describe the sample

The sample README moves to the sample folder and describes the real trigger, handler, and test, with the commands to try them in a scratch org.
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
docs(actions): show the Code Analyzer CLI in the action examples

The 2 action READMEs call the Code Analyzer the way CI does, and the parse action README says that CI does not call it.
END_NESTED_COMMIT

BEGIN_NESTED_COMMIT
chore(project): remove template leftovers from the ignore files

The force and git ignore files lose their LWC and old CLI lines, git ignores the Apex test results folder, and 2 template example files are deleted.
END_NESTED_COMMIT

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Claude AI @claude
chore(project): clean up the tooling scripts, ignore files, and READMEs
f320595
The Prettier setup, the npm scripts, the commit hook, and the 3 ignore files lose their dead and template lines, prune deletes only branches whose remote branch is gone, the README examples compile and gain an API reference, and the sample and action READMEs describe what is really there.

Co-Authored-By: Claude <[email protected]>
@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d3c42d2) to head (f320595).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #353   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          214       214           
=========================================
  Hits           214       214           
Flag Coverage Δ
Apex 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dschach
dschach merged commit 032a7b9 into main Oct 29, 2026
5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dschach
dschach deleted the chore/tooling-and-readmes branch October 29, 2026 11:19
@github-actions github-actions Bot mentioned this pull request Oct 29, 2026
chore(main): release 1.4.0 #348
Merged
dschach pushed a commit that referenced this pull request Oct 29, 2026
@github-actions
chore(main): release 1.4.0 (#348)
0adece6
🤖 I have created a release *beep* *boop*
---


##
[1.4.0](v1.3.0...v1.4.0)
(2026-10-29)


### Features

* **ci:** Add a job summary report for Code Analyzer results
([437f453](437f453))
* **handler:** Add protected accessors and correct the ApexDoc
([#349](#349))
([d3c42d2](d3c42d2))
* **handler:** Add protected getTriggerEvent and getHandlerName
([d3c42d2](d3c42d2))


### Bug Fixes

* **handler:** Log a warning when the loop limit is exceeded
([d3c42d2](d3c42d2))
* **scripts:** Write highlight.js to doc-assets with portable sed
([032a7b9](032a7b9))


### Miscellaneous Chores

* **apexdox:** Correct 2 stale comments in the ApexDox config
([a15667e](a15667e))
* **code-analyzer:** Install Salesforce Code Analyzer config
([01b0bae](01b0bae))
* **code-analyzer:** Remove machine paths from the config on commit
([437f453](437f453))
* **codecov:** Drop the LWC flag that nothing uploads
([6bd4946](6bd4946))
* **git:** Ignore the Code Analyzer report folder
([437f453](437f453))
* **ignore:** Skip the husky hooks and the LWC config files
([7ec40cd](7ec40cd))
* **pmd:** Move the PMD rulesets to config and add Code Analyzer
([#351](#351))
([01b0bae](01b0bae))
* **pmd:** Move the PMD rulesets under config/pmd
([01b0bae](01b0bae))
* **prettier:** Adopt the shared x2od prettier config
([#359](#359))
([7ec40cd](7ec40cd))
* **prettier:** Correct the comment on the XML print width override
([7ec40cd](7ec40cd))
* **prettier:** Extend the shared x2od Prettier configuration
([7ec40cd](7ec40cd))
* **prettier:** Ignore only what Prettier should skip
([032a7b9](032a7b9))
* **project:** Clean up the tooling scripts, ignore files, and READMEs
([#353](#353))
([032a7b9](032a7b9))
* **project:** Remove template leftovers from the ignore files
([032a7b9](032a7b9))
* **release:** Drop the 2 pre-major release-please flags
([6bd4946](6bd4946))
* **vscode:** Recommend better-comments-next instead of better-comments
([d3c42d2](d3c42d2))


### Code Refactoring

* **ci:** Read Code Analyzer results from JSON, not SARIF
([437f453](437f453))
* **handler:** Simplify setBypass to 4 statements
([d3c42d2](d3c42d2))


### Styles

* **docs:** Reformat the documentation assets to the shared style
([7ec40cd](7ec40cd))
* **pmd:** Rewrap the PMD rulesets at 80 characters
([7ec40cd](7ec40cd))
* **prettier:** Reformat the config and scripts to the shared style
([7ec40cd](7ec40cd))


### Documentation

* **actions:** Show the Code Analyzer CLI in the action examples
([032a7b9](032a7b9))
* **ApexDoc:** Add throws tags to TriggerHandler headers
([01b0bae](01b0bae))
* **changelog:** Link the first release to its release page
([a15667e](a15667e))
* **contributing:** Add a contributing guide for this repository
([a15667e](a15667e))
* **deploy:** Correct the scratch org instructions
([a15667e](a15667e))
* **github:** Add a pull request template
([a15667e](a15667e))
* **github:** Add the code of conduct to this repository
([f1ff40b](f1ff40b))
* **github:** Replace the issue templates with framework issue forms
([a15667e](a15667e))
* **handler:** Correct the ApexDoc statements and examples
([d3c42d2](d3c42d2))
* **handler:** Say when andFinally does not run
([d3c42d2](d3c42d2))
* **license:** Keep the BSD text alone and credit the original in NOTICE
([a15667e](a15667e))
* **project:** Add community files and fix the license and deploy docs
([#355](#355))
([a15667e](a15667e))
* **readme:** Add an API reference and fix the documentation links
([032a7b9](032a7b9))
* **readme:** Correct the bypass, loop count, and handler examples
([032a7b9](032a7b9))
* **sample:** Move the sample README and describe the sample
([032a7b9](032a7b9))


### Build System

* **@x2od/prettier-config:** Update devDependency @x2od/prettier-config
from 0.6.1 to 0.7.0
([#360](#360))
([a4585f7](a4585f7))
* **node:** Update Node.js from v22.22.1 to v24.22.2
([#356](#356))
([f522648](f522648))
* **npm:** Call lint-staged from the hook and prune gone branches
([032a7b9](032a7b9))
* **npm:** Get the Prettier plugins through the shared x2od config
([7ec40cd](7ec40cd))
* **npm:** Remove the local Apex Prettier server scripts
([7ec40cd](7ec40cd))
* **npm:** Run the Prettier scripts on the whole tree
([032a7b9](032a7b9))


### Continuous Integration

* **actions/setup-java:** Update actions/setup-java action from v5 to v6
([#357](#357))
([34c1596](34c1596))
* **apex-tests:** Fetch 2 commits and give Codecov the pull request base
([d3c42d2](d3c42d2))
* **apex-tests:** Pass the Dev Hub secret through stdin
([6bd4946](6bd4946))
* **apex-tests:** Put the stdin flag last so the alias is kept
([6bd4946](6bd4946))
* **code-analyzer:** Report Code Analyzer results from JSON
([#352](#352))
([437f453](437f453))
* **codecov:** Troubleshoot Codecov base commit error
([#350](#350))
([d0f4621](d0f4621))
* **java-jdk:** Update dependency java-jdk from v21 to v25
([#358](#358))
([83abc66](83abc66))
* **workflows:** Give the workflow tokens read-only permissions
([6bd4946](6bd4946))
* **workflows:** Harden the CI workflows and run the checks for every
author
([#347](#347))
([6bd4946](6bd4946))
* **workflows:** Run the Code Analyzer CLI and write results to sfca
([437f453](437f453))
* **workflows:** Run the formatting and PMD checks for every author
([6bd4946](6bd4946))
* **workflows:** Split the Apex tests from CI and drop the residue
([6bd4946](6bd4946))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

ci: format-lint fails because package-lock.json is not Prettier-formatted

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dschach
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.