Releases: hashicorp/copywrite
v0.25.3
v0.25.3
Bug Fixes
-
LICENSE no longer updated on every run (#224)
anyFileUpdatedwas unconditionally set totruein non-plan mode due
to a buggy condition, causing the LICENSE file's copyright year to
be bumped on every successful run — even when all source file headers were
already correct. This triggered spurious pre-commit hook failures with
"files were modified by this hook" when nothing should have changed.
addlicense.Runnow correctly reports whether it actually wrote any files,
and the LICENSE update is gated on that signal. -
Ignored directories are now skipped in a single step (#225)
Patterns inheader_ignore(e.g..venv/**,vendor/**) were previously
only checked against files — the walk still descended into every directory
unconditionally, visiting each file before discarding it. For directories
with thousands of files this caused significant slowdowns. The walk now
checks each directory against ignore patterns and returnsfilepath.SkipDir
immediately, pruning the entire subtree regardless of how many files are
inside.
Full Changelog
v0.25.2
What's Changed
New Features
-
ignore_year1config option (#213): Added a newproject.ignore_year1boolean flag in.copywrite.hcl. When set totrue, the tool skips updating the start year in existing copyright headers, preserving historically accurate start years (e.g.2015) even when they differ fromcopyright_yearin config. End-year logic is unaffected — files modified after their copyright end year still get the end year bumped to current year. New files with no copyright header are also unaffected and always receive the config year as the start year.project { copyright_year = 2024 # Preserve original start years in existing headers ignore_year1 = true }
Bug Fixes
- Removed unused
ignore_year2references from config, CLI, init template, and README.
Documentation
- README updated with
ignore_year1behaviour for both source file headers and LICENSE files. - Init template updated to include
ignore_year1as a commented-out option.
v0.25.1
Fixed
- Fixed copyright year updates not being applied due to invalid git log format in the year update cache (#191 regression)
- Fixed symlink resolution issue on macOS causing cache misses for file copyright year lookups
- Improved git information caching reliability and accuracy
Details
This release fixes two critical bugs introduced in v0.25.0 (#191):
- The
buildRepositoryCachenow correctly formats git output with__CW_YEAR__=prefix, allowing the parser to properly identify years vs filenames - Symlink paths are now resolved before computing relative paths, preventing cache misses on systems where /tmp is a symlink (macOS)
Users running v0.25.0 who noticed copyright year updates weren't working should upgrade to this version.
v0.25.0
Improvements
- Major Performance Optimizations (#191): Significantly improved performance by caching git repository information and reducing redundant lookups during header processing
- Auto-Migration from HashiCorp to IBM (#189): Added automatic detection and migration of HashiCorp copyright holders to IBM format, supporting all comment styles and preserving year information
v0.24.2
v0.24.2
Bug Fixes
Fix .hbs file copyright parsing to prevent code corruption
Fixed a critical bug where the copyright detection logic was incorrectly modifying JavaScript code inside .hbs (Handlebars) template files. Previously, any indented line containing "copyright" (such as copyright: 'Copyright Acme Inc.' in JavaScript objects) was being treated as a copyright header and modified.
What changed:
- Implemented comment block tracking for
.hbsfiles to distinguish between actual copyright headers inside{{! ... }}comment blocks and regular code - Removed the generic two-space prefix from global comment detection to prevent false positives
- Indented copyright lines are now only detected when inside handlebars
{{! ... }}comment blocks
Impact:
- ✅
.hbsfiles with multi-line copyright headers in{{! ... }}blocks work correctly - ✅ JavaScript code with "copyright" keywords (e.g., in config objects) is no longer modified
- ✅ All other file types (
.js,.go,.py, etc.) are unaffected
This fix was tested against the hashicorp/boundary-ui repository and confirmed to resolve the issue without introducing regressions.
v0.24.1
What's Changed
- Fix .hbs file copyright parsing by supporting indented content by @CreatorHead in #188
v0.24.0
What's Changed
- Rollback: Diff comparision for copyright headers. by @mohanmanikanta2299 in #185
- Update README.md by @mohanmanikanta2299 in #187
Full Changelog: v0.23.0...v0.24.0
v0.23.0
What's Changed
- pin reused github action by @abhijeetviswa in #128
- Add changelog file for standardisation. by @mohanmanikanta2299 in #129
- IND-3799 parameter addition to dependabot by @KaushikiAnand in #130
- Update Heimdall ownership to match CODEOWNERS by @mukeshjc in #143
- fix(pre-commit): Hooks should use the copywrite binary by @bhundven in #120
- fix(.pre-commit-config.yaml): fix hook id to match actual name by @Paillat-dev in #123
- Updated Copyright to IBM Headers by @mohanmanikanta2299 in #170
- Update copyright format for IBM Corp with year ranges by @CreatorHead in #179
- Ibm copyright format by @CreatorHead in #180
- Copyright symbol removal to get inline with policy. by @mohanmanikanta2299 in #183
- Update feature added for headers command. by @mohanmanikanta2299 in #181
New Contributors
- @abhijeetviswa made their first contribution in #128
- @compliance-pr-automation-bot[bot] made their first contribution in #149
- @bhundven made their first contribution in #120
- @Paillat-dev made their first contribution in #123
- @ssagarverma made their first contribution in #172
- @CreatorHead made their first contribution in #179
Full Changelog: v0.22.0...v0.23.0
v0.22.0
What's Changed
- Coverage test by @KaushikiAnand in #125
- [Chore] - add .gjs and .gts files by @emoncuso in #126
New Contributors
- @KaushikiAnand made their first contribution in #125
- @emoncuso made their first contribution in #126
Full Changelog: v0.21.0...v0.22.0