Skip to content

Commit cf9e626

Browse files
committed
Update changelog for v0.2.0
1 parent 7140631 commit cf9e626

File tree

1 file changed

+164
-0
lines changed

1 file changed

+164
-0
lines changed

changelog.yml

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,163 @@
1+
- semver: 0.2.0
2+
date: 2025-12-10T14:08:54-05:00
3+
packager: Zander Hill <[email protected]>
4+
changes:
5+
- commit: 714063191f82dce7fb93e30da878e5af5bab559e
6+
note: Bump version file to v0.2.0
7+
author:
8+
name: Zander Hill
9+
10+
committer:
11+
name: Zander Hill
12+
13+
- commit: bb4f689ced40203b0de448d0bacf7a01971b3700
14+
note: |-
15+
[Prototype] Implement pre-run hooks with .hooks.d support (#15)
16+
17+
* Implement pre-run hooks with .hooks.d support
18+
19+
Add pre-run hooks feature that executes scripts before main script execution.
20+
Hooks enable environment validation, dependency checking, authentication, and setup tasks.
21+
22+
Implementation:
23+
- Hook discovery from .hooks.d directory with lexicographic ordering
24+
- Two hook types: executable (separate process) and sourced (same shell context)
25+
- Sourced hooks use .source suffix and can modify environment variables
26+
- Wrapper script generation for proper execution flow
27+
- --skip-hooks flag to bypass hook execution
28+
- Full environment variable injection (TOME_ROOT, TOME_SCRIPT_PATH, etc.)
29+
30+
Tests:
31+
- 38 total tests covering unit, integration, and E2E scenarios
32+
- Comprehensive validation of hook discovery, execution, and environment handling
33+
- Deno E2E tests verify real-world usage with both tome-cli and wrapper
34+
35+
Documentation:
36+
- Complete user guide in docs/hooks.md with examples and use cases
37+
- Updated README.md with hooks feature section
38+
- Example hooks in examples/.hooks.d for reference
39+
40+
All tests passing. Feature ready for use.
41+
42+
* Refactor hooks implementation with proper quoting and improved portability
43+
44+
This commit improves the hooks system with better shell compatibility,
45+
proper argument escaping, and cleaner code organization.
46+
47+
Changes:
48+
49+
* Rename findBash() to findShell() and simplify implementation
50+
- Better name reflects that it finds bash OR sh
51+
- Remove hardcoded path checks for bash and sh
52+
- Use exec.LookPath("bash") with fallback to exec.LookPath("sh")
53+
- Use actual shell name (bash/sh) as argv[0] instead of hardcoding
54+
- More portable and idiomatic Go code
55+
56+
* Add proper shell escaping for paths and arguments
57+
- Integrate al.essio.dev/pkg/shellescape library
58+
- Quote all hook paths, script paths in wrapper template
59+
- Quote arguments only when necessary (e.g., spaces, special chars)
60+
- Prevents command injection and handles edge cases correctly
61+
62+
* Fix hardcoded /tmp paths in tests
63+
- Replace all hardcoded /tmp paths with t.TempDir()
64+
- Ensures proper test isolation and cross-platform compatibility
65+
- Updated: hooks_test.go, hooks_integration_test.go
66+
67+
* Add comprehensive sh compatibility tests
68+
- New TestShellCompatibility suite with 3 test cases
69+
- Verify wrapper scripts execute correctly with sh (not just bash)
70+
- Test sourced hooks work with sh
71+
- Validate POSIX-compliant syntax (no bash-specific features)
72+
- Add executeWrapperContentWithSh() helper function
73+
74+
* Add test for paths with spaces
75+
- Verify proper quoting of paths containing spaces
76+
- Test that simple args remain unquoted while complex args are quoted
77+
- Ensures robustness with real-world path scenarios
78+
79+
All tests passing:
80+
- Unit tests: 9 test suites
81+
- Integration tests: including new sh compatibility tests
82+
- E2E tests: 25/25
83+
author:
84+
name: Zander Hill
85+
86+
committer:
87+
name: GitHub
88+
89+
- commit: b5d315d515d4f9632ffee9bc50d30097b549c010
90+
note: |-
91+
Update README and add comprehensive documentation guides
92+
93+
README improvements:
94+
- Add Quick Start section with direct usage and alias options
95+
- Add "Your First Script" section with working example
96+
- Document environment variables (TOME_ROOT, TOME_EXECUTABLE, etc.)
97+
- Add Troubleshooting section for common issues
98+
- Reorganize Features section and add Table of Contents
99+
100+
New docs:
101+
- docs/writing-scripts.md: Guide for writing scripts in multiple languages,
102+
explains USAGE vs SUMMARY (both work identically), environment variables,
103+
organization patterns, and best practices
104+
- docs/completion-guide.md: How to implement script-level completions with
105+
examples in bash, python, typescript, ruby, and advanced patterns
106+
- docs/migration.md: Migration guide from original tome/sub with checklist
107+
and troubleshooting
108+
109+
Clarifies that USAGE and SUMMARY are interchangeable keywords (both
110+
supported for backward compatibility). Adds practical examples based on
111+
storage-cli usage patterns.
112+
author:
113+
name: Zander Hill
114+
115+
committer:
116+
name: Zander Hill
117+
118+
- commit: 248059fc38c56e0f45e251347985fcc3e519e624
119+
note: Update README.md
120+
author:
121+
name: Zander Hill
122+
123+
committer:
124+
name: GitHub
125+
126+
- commit: 590825f00454d7c59c73f447ad52e2ee8d14d77a
127+
note: Add notes on improvements in README
128+
author:
129+
name: Zander Hill
130+
131+
committer:
132+
name: Zander Hill
133+
134+
- commit: 5cae95a2e8b74d4d59f2a79c6e5f0cb4e12d88b3
135+
note: Update wrapper script to handle additional edge cases
136+
author:
137+
name: Zander Hill
138+
139+
committer:
140+
name: Zander Hill
141+
142+
- commit: 32918d5f9dcc01cf4f9473c974cffaf6af9837f9
143+
note: |-
144+
Zero args to the wrapper means call help (#11)
145+
146+
Closes #8
147+
author:
148+
name: Zander Hill
149+
150+
committer:
151+
name: GitHub
152+
153+
- commit: 7b3c373e6756474013bc27e9d17ab9bed201f278
154+
note: 0.1.3 release
155+
author:
156+
name: Zander Hill
157+
158+
committer:
159+
name: Zander Hill
160+
1161
- semver: 0.1.3
2162
date: 2024-08-08T23:38:28-07:00
3163
packager: Zander Hill <[email protected]>
@@ -439,6 +599,10 @@
439599
committer:
440600
name: Zander Hill
441601
602+
- semver: 0.0.1
603+
date: 2024-08-03T09:17:08-07:00
604+
packager: Zander Hill <[email protected]>
605+
changes:
442606
- commit: 40d37218726b1bd967dd1a719ec0307df2ece5fc
443607
note: Inject TOME_ROOT and TOME_EXECUTABLE into context of scripts
444608
author:

0 commit comments

Comments
 (0)