|
| 1 | +# @since Tag Update Implementation Plan |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This document outlines the plan for implementing automated `@since` tag updates during the release process. The system will update placeholder version tags (such as `@since todo`, `@since next-version`, and `@since tbd`) with the actual version number during releases. |
| 6 | + |
| 7 | +## Implementation Checklist |
| 8 | + |
| 9 | +### 1. Package.json Updates ✅ |
| 10 | +- [x] Add `chalk` to devDependencies |
| 11 | +- [x] Add a new npm script for running the update-since-tags.js (e.g., `since-tags:update`) |
| 12 | + |
| 13 | +### 2. Script Enhancements (update-since-tags.js) ✅ |
| 14 | +- [x] Add better console output formatting using chalk |
| 15 | +- [x] Enhance logging to provide detailed information about updated files |
| 16 | +- [x] Add functionality to generate a summary of updates for release notes |
| 17 | +- [x] Add documentation for supported placeholders (`todo`, `next-version`, `tbd`) |
| 18 | +- [x] Add error handling for file operations |
| 19 | +- [x] Add validation for version number input |
| 20 | + |
| 21 | +### 3. Testing ✅ |
| 22 | +- [x] Test script locally with various scenarios |
| 23 | +- [x] Test with multiple @since tags in single file |
| 24 | +- [x] Test with no @since tags present |
| 25 | +- [ ] Test workflow with actual PR and release |
| 26 | +- [ ] Test error scenarios in workflow context |
| 27 | + |
| 28 | +### 4. Release Management Workflow Updates (Next Steps) 🚀 |
| 29 | +- [x] Add new step in release-management.yml after version bump |
| 30 | +- [x] Integrate since-tag updates into the workflow |
| 31 | +- [x] Add logging output to release notes |
| 32 | +- [x] Handle potential errors gracefully |
| 33 | +- [x] Ensure changes are committed with version bump |
| 34 | + |
| 35 | +### 5. Changeset Integration |
| 36 | +- [ ] Modify generate-changeset.yml to detect files with @since placeholders |
| 37 | +- [ ] Add @since placeholder information to changeset content |
| 38 | +- [ ] Update release PR template to include @since placeholder information |
| 39 | +- [ ] Ensure this information flows through to final release notes |
| 40 | + |
| 41 | +### 6. Documentation Updates |
| 42 | +- [ ] Update SUMMARY.md with new functionality |
| 43 | +- [ ] Update main README.md with @since tag information |
| 44 | +- [ ] Update workflow documentation |
| 45 | +- [ ] Add examples of using @since placeholders |
| 46 | +- [ ] Document supported file types (PHP only for now) |
| 47 | + |
| 48 | +## Script Enhancements Completed ✅ |
| 49 | + |
| 50 | +The `update-since-tags.js` script has been enhanced with: |
| 51 | +- Improved console output using chalk for better readability |
| 52 | +- Detailed logging of file updates and error conditions |
| 53 | +- Release notes summary generation |
| 54 | +- Version number validation |
| 55 | +- Error handling for file operations |
| 56 | +- Support for counting and reporting the number of updates per file |
| 57 | +- Temporary file creation for workflow integration |
| 58 | + |
| 59 | +## Local Testing Results ✅ |
| 60 | + |
| 61 | +The script has been successfully tested locally with: |
| 62 | +- Multiple files containing @since placeholders |
| 63 | +- Files with multiple placeholders |
| 64 | +- Files with no placeholders |
| 65 | +- Proper version number validation |
| 66 | +- Summary generation for release notes |
| 67 | +- Colored console output for better readability |
| 68 | + |
| 69 | +## Supported Placeholders |
| 70 | + |
| 71 | +The following placeholders will be automatically updated during release: |
| 72 | +- `@since todo` |
| 73 | +- `@since next-version` |
| 74 | +- `@since tbd` |
| 75 | + |
| 76 | +## File Types |
| 77 | + |
| 78 | +Currently, the system only scans PHP files for @since placeholders. This may be expanded in future versions. |
| 79 | + |
| 80 | +## Notes |
| 81 | + |
| 82 | +- The script currently works as-is with CommonJS modules |
| 83 | +- We're focusing on PHP files only for the initial implementation |
| 84 | +- Changes are being made incrementally to avoid disrupting existing workflows |
| 85 | +- Each change is tested thoroughly before moving to the next item |
| 86 | + |
| 87 | +## Next Steps 🚀 |
| 88 | + |
| 89 | +1. Integrate the script into release-management.yml workflow |
| 90 | +2. Test the integration with a real PR and release |
| 91 | +3. Implement changeset integration for @since placeholder tracking |
| 92 | +4. Update all documentation |
| 93 | + |
| 94 | +## Future Considerations |
| 95 | + |
| 96 | +- Support for additional file types (js, jsx, tsx, etc.) |
| 97 | +- Support for additional placeholder formats |
| 98 | +- Integration with other documentation tools |
| 99 | +- Automated testing for the script |
| 100 | +- Performance optimization for large codebases |
0 commit comments