Skip to content

Commit a1ee0ad

Browse files
committed
Merge branch 'release/5.26.0'
2 parents 9456163 + 85a1ece commit a1ee0ad

53 files changed

Lines changed: 2866 additions & 183 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

100644100755
File mode changed.

.github/copilot-instructions.md

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<!-- @format -->
2+
3+
# Devcontainer Features Repository
4+
5+
This repository contains a collection of devcontainer features that enhance development environments. It provides Git utilities, hooks, version management, and other development tools that can be installed individually or as a complete development setup.
6+
7+
**Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**
8+
9+
## Critical Guidelines for Code Changes
10+
11+
**MINIMAL CHANGES ONLY**: Make the smallest possible changes to address the specific request. Do NOT modify files that are not directly related to the task:
12+
13+
- **Package files** (`package.json`, `package-lock.json`) should only be modified if explicitly required for the feature being worked on
14+
- **Build artifacts** and **symlinks** should not be committed unless they are the direct target of the request
15+
- **Repository setup** (symlinks, environment bootstrapping) should be done for development/testing only, not committed
16+
- **Infrastructure changes** should be avoided unless they are specifically requested
17+
18+
When working on feature requests:
19+
1. Identify the **exact files** that need to be modified for the request
20+
2. Make changes **only** to those files
21+
3. Use temporary setup for development/testing but revert any unrelated changes before committing
22+
4. Focus on the **specific feature or fix** requested, not general repository improvements
23+
24+
## Quick Reference for Copilot Agents
25+
26+
**MINIMAL CHANGES ONLY**: Make the smallest possible changes to address the specific request. Do NOT modify files that are not directly related to the task:
27+
28+
- **Package files** (`package.json`, `package-lock.json`) should only be modified if explicitly required for the feature being worked on
29+
- **Build artifacts** and **symlinks** should not be committed unless they are the direct target of the request
30+
- **Repository setup** (symlinks, environment bootstrapping) should be done for development/testing only, not committed
31+
- **Infrastructure changes** should be avoided unless they are specifically requested
32+
33+
<<<<<<< HEAD
34+
When working on feature requests:
35+
=======
36+
## Essential Setup Commands (For Development/Testing Only - DO NOT COMMIT)
37+
38+
**IMPORTANT**: These commands are for local development and testing only. Do NOT commit the resulting changes (symlinks, package modifications) unless they are specifically part of the requested feature.
39+
>>>>>>> eb404c6 (Add validate-pr.yml workflow to larasets feature stubs (#21))
40+
41+
1. Identify the **exact files** that need to be modified for the request
42+
2. Make changes **only** to those files
43+
3. Use temporary setup for development/testing but revert any unrelated changes before committing
44+
4. Focus on the **specific feature or fix** requested, not general repository improvements
45+
46+
<<<<<<< HEAD
47+
## Critical Guidelines for Commit Messages
48+
49+
- Title and description must follow conventional commit format: start with a type followed by a colon and a brief summary starting with an imperative verb.
50+
- Type must follow configured types in root package.json or default to standard types.
51+
- Add a scope in parentheses if project structure warrants it (check for workspace, modules or package names)
52+
=======
53+
# 2. Fix known symlink issues (5 seconds) - FOR TESTING ONLY
54+
find src/common-utils/ -type f -name "_*.sh" -exec chmod +x {} \;
55+
find src/common-utils/ -type f -name "_*.sh" | while read file; do
56+
ln -sf $file src/common-utils/$(basename $file | sed 's/^_//;s/.sh$//');
57+
done
58+
59+
# 3. Workaround for install script typo (1 second) - FOR TESTING ONLY
60+
ln -sf src/common-utils/_zz_log.sh src/common-utils/_zz_logs.sh
61+
```
62+
63+
**Set timeouts to 5+ minutes for ALL commands to prevent premature cancellation.**
64+
65+
## Core Development Commands
66+
67+
| Command | Purpose | Duration | Notes |
68+
|---------|---------|----------|-------|
69+
| `npm run lint` | Lint staged files | 1-2s (empty), 15s (with files) | Uses lint-staged, only lints staged files |
70+
| `npm test` | Run tests | <1s | Currently only shows warning - no tests exist |
71+
| `./install.sh -s` | Install stubs only | 10-15s | Creates `.devcontainer/` and `.vscode/` configs |
72+
| `./install.sh -a` | Install all features | 15-20s | Full feature installation |
73+
| `./install.sh gitutils` | Install specific feature | 5-10s | Install individual feature by name |
74+
| `npx tomgrv/devcontainer-features -h` | NPX installation | 2s (cached) | Alternative installation method |
75+
76+
**Validation Commands:**
77+
```bash
78+
# Quick feature test
79+
mkdir /tmp/test-features && cd /tmp/test-features
80+
git init
81+
/path/to/devcontainer-features/install.sh -s
82+
ls -la .devcontainer/ .vscode/ # Verify files created
83+
```
84+
85+
## Repository Architecture
86+
87+
### 7 Devcontainer Features (`src/` directory)
88+
89+
| Feature | Purpose | Key Files |
90+
|---------|---------|-----------|
91+
| **gitutils** | Git aliases and workflow automation | Aliases for common git operations |
92+
| **githooks** | Development environment setup | commitlint, prettier, lint-staged, husky |
93+
| **gitversion** | Semantic versioning | GitVersion tool for automated versioning |
94+
| **act** | Local GitHub Actions | Nektos/act for running actions locally |
95+
| **pecl** | PHP Extensions | PECL installer for PHP development |
96+
| **larasets** | Laravel tools | Laravel-specific development utilities |
97+
| **common-utils** | Shared utilities | Scripts used by other features |
98+
99+
### Key Configuration Files
100+
101+
- `package.json` - Main configuration with npm scripts, dependencies, prettier, commitlint
102+
- `install.sh` - Installation script (**has typo bug** - see workaround above)
103+
- `.github/workflows/` - CI/CD: `validate.yml`, `release.yaml`
104+
- `stubs/` - Template files for `.devcontainer/` and `.vscode/` configs
105+
106+
## Critical Issues & Workarounds
107+
108+
### 🐛 Install Script Typo (Line 9)
109+
**Problem**: Script references `_zz_logs.sh` but file is `_zz_log.sh`
110+
**Fix**: `ln -sf src/common-utils/_zz_log.sh src/common-utils/_zz_logs.sh`
111+
112+
### 📦 Missing Prettier Plugin
113+
**Problem**: Linting fails without `prettier-plugin-sh`
114+
**Fix**: `npm install prettier-plugin-sh` (included in setup commands above)
115+
116+
### 🔗 Broken Symlinks in common-utils
117+
**Problem**: Shell scripts not executable and symlinks missing
118+
**Fix**: Run the chmod and symlink commands from setup section above
119+
120+
### 🐳 Container vs Local Behavior
121+
- Features designed for **devcontainer environments**
122+
- Local installation shows "No writeable directory found" - **this is normal**
123+
- Some features require Docker/specific dependencies not available locally
124+
125+
## Common Workflows for Copilot Agents
126+
127+
### 🚀 First-time Repository Setup (Development/Testing Only)
128+
```bash
129+
# Run this exactly - all commands are required FOR TESTING ONLY
130+
# DO NOT COMMIT the resulting symlinks or package changes unless specifically requested
131+
cd /home/runner/work/devcontainer-features/devcontainer-features
132+
npm install
133+
npm install prettier-plugin-sh
134+
find src/common-utils/ -type f -name "_*.sh" -exec chmod +x {} \;
135+
find src/common-utils/ -type f -name "_*.sh" | while read file; do
136+
ln -sf $file src/common-utils/$(basename $file | sed 's/^_//;s/.sh$//');
137+
done
138+
ln -sf src/common-utils/_zz_log.sh src/common-utils/_zz_logs.sh
139+
```
140+
141+
### 🧪 Testing Changes
142+
```bash
143+
# 1. Create test environment
144+
mkdir /tmp/feature-test && cd /tmp/feature-test
145+
git init
146+
147+
# 2. Test installation
148+
/home/runner/work/devcontainer-features/devcontainer-features/install.sh -s
149+
150+
# 3. Verify results
151+
ls -la .devcontainer/ .vscode/
152+
cat .devcontainer/devcontainer.json # Should contain features array
153+
```
154+
155+
### ✅ Pre-commit Validation
156+
```bash
157+
git add . # Stage your changes
158+
npm run lint # Lint staged files (1-15 seconds)
159+
# Fix any linting issues, then commit
160+
```
161+
162+
### 📦 NPX Alternative Testing
163+
```bash
164+
# Test the NPX installation method
165+
mkdir /tmp/npx-test && cd /tmp/npx-test
166+
git init
167+
npx tomgrv/devcontainer-features -s
168+
# Should create same files as local installation
169+
```
170+
171+
## Performance Expectations
172+
173+
**Timing Reference** (all validated):
174+
175+
| Operation | Expected Duration | Timeout Setting |
176+
|-----------|------------------|-----------------|
177+
| `npm install` | 3 seconds | 5+ minutes |
178+
| `npm install prettier-plugin-sh` | 1 second | 2+ minutes |
179+
| `npm run lint` (no files) | 1-2 seconds | 2+ minutes |
180+
| `npm run lint` (with files) | up to 15 seconds | 2+ minutes |
181+
| `./install.sh -s` | 10-15 seconds | 2+ minutes |
182+
| `./install.sh -a` | 15-20 seconds | 3+ minutes |
183+
| `./install.sh <feature>` | 5-10 seconds | 2+ minutes |
184+
| `npx tomgrv/devcontainer-features` | 2 seconds (cached) | 2+ minutes |
185+
186+
⚠️ **CRITICAL**: Always set generous timeouts. Commands complete quickly but need buffer for system variations.
187+
188+
## Troubleshooting Guide
189+
190+
**❌ "No staged files found"** → Normal when running `npm run lint` with no staged changes
191+
**❌ "No writeable directory found"** → Normal for local installation, features designed for containers
192+
**❌ "_zz_logs.sh: No such file"** → Run the typo workaround: `ln -sf src/common-utils/_zz_log.sh src/common-utils/_zz_logs.sh`
193+
**❌ "prettier-plugin-sh not found"** → Run: `npm install prettier-plugin-sh`
194+
**❌ "Permission denied" on scripts** → Run: `find src/common-utils/ -type f -name "_*.sh" -exec chmod +x {} \;`
195+
>>>>>>> eb404c6 (Add validate-pr.yml workflow to larasets feature stubs (#21))
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# @format
2+
3+
name: Validate PR Title
4+
5+
on:
6+
pull_request:
7+
types: [opened, edited, reopened, synchronize]
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
13+
jobs:
14+
alidate-pr-title:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install dependencies
22+
run: npm ci && npm install -D $(jq -r '.commitlint.extends//""' 'package.json' | tr -d "'[]:,\"")
23+
24+
- name: Validate PR title
25+
run: echo "${{ github.event.pull_request.title }}" | npx commitlint

.github/workflows/validate.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*.cache
1313

1414
## Misc
15+
VERSION
1516
.history
1617
.version.json
1718
.mono

.vscode/tasks.json

100644100755
File mode changed.

CHANGELOG.md

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,96 @@
22

33
# Changelog
44

5-
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
5+
## v5.26.0 (2025-10-01)
6+
7+
_Commits from: v5.25.0..HEAD_
8+
9+
### 📂 Unscoped changes
10+
11+
#### Features
12+
13+
- ✨ add VERSION file update with gitversion semver on checkout (#11) ([1d08e6e](https://github.com/tomgrv/devcontainer-features/commit/1d08e6e4b1cb56bf106e9bab6aadc5610fc3b2fb))
14+
- ✨ update package.json to make them installable ([96e663e](https://github.com/tomgrv/devcontainer-features/commit/96e663e8c802db491bda593c76b90fbc2f09d686))
15+
16+
#### Other changes
17+
18+
- Add comprehensive GitHub Copilot instructions for devcontainer-features repository (#9) ([c3d40be](https://github.com/tomgrv/devcontainer-features/commit/c3d40be614546e9e27e37ec2ef83458fa120f9c5))
19+
- Add validate-pr.yml workflow to larasets feature stubs (#21) ([1c6ba09](https://github.com/tomgrv/devcontainer-features/commit/1c6ba0973262ac49b610b4f187e74ffdf023c00d))
20+
- Add validate-pr.yml workflow to larasets feature stubs (#21) ([bde381e](https://github.com/tomgrv/devcontainer-features/commit/bde381e7de5a0c3f3474cfd85fa7443385889dd4))
21+
- Correct filename reference from \_zz_logs.sh to \_zz_log.sh in install.sh (#17) ([594243b](https://github.com/tomgrv/devcontainer-features/commit/594243baef47d36eb35f59f7095f928b4eea73b2))
22+
- 📦️ ensure package.json are there ([ec38ffc](https://github.com/tomgrv/devcontainer-features/commit/ec38ffc234aaa48e0133a41025b26c51f9904dce))
23+
24+
### 📦 common-utils changes
25+
26+
#### Bug Fixes
27+
28+
- 🐛 improve argument handling and usage output formatting ([3aa56d4](https://github.com/tomgrv/devcontainer-features/commit/3aa56d410c3d19c5ec41c0b55f2ff1975eafc1de))
29+
30+
#### Features
31+
32+
- ✨ add dispatcher utility script ([38dfce8](https://github.com/tomgrv/devcontainer-features/commit/38dfce894a5f2603f16ba17574fee1a8374bcc50))
33+
- ✨ add zz_input util ([3c2cc9c](https://github.com/tomgrv/devcontainer-features/commit/3c2cc9cb1700e0e8a604dc068f0b858eb3edc1e4))
34+
35+
#### Other changes
36+
37+
- ♻️ rename zz_utility to zz_dispatch ([4ceb267](https://github.com/tomgrv/devcontainer-features/commit/4ceb26734f3af4db1dbf57c561a4d73282d2a852))
38+
39+
### 📦 githooks changes
40+
41+
#### Features
42+
43+
- ✨ add checkout version util ([d10c373](https://github.com/tomgrv/devcontainer-features/commit/d10c3737c5893362098b63ba37b4a78d584ee14e))
44+
- ✨ add sync-versions script and PR title validation workflow ([4e8a48d](https://github.com/tomgrv/devcontainer-features/commit/4e8a48de53ff643a8c159d4926b8572d1244777b))
45+
46+
### 📦 gitutils changes
47+
48+
#### Bug Fixes
49+
50+
- 🐛 add bumped files commit ([d944af2](https://github.com/tomgrv/devcontainer-features/commit/d944af2ba50f50e3a26c0edfe48e5fee065a8afe))
51+
- 🐛 ensure lock file presence ([97ee738](https://github.com/tomgrv/devcontainer-features/commit/97ee7386c232724913cb4cde894f875e7f541374))
52+
53+
#### Features
54+
55+
- ✨ add auto rebase script and enhance commit deletion logic ([971090e](https://github.com/tomgrv/devcontainer-features/commit/971090e6c04ffed8e4f1770f3dfed493b5b01889))
56+
- ✨ add clear command ([f038e51](https://github.com/tomgrv/devcontainer-features/commit/f038e51f54b5eed6c820262d2e7b7dd0083de193))
57+
- ✨ add git pn alias for push --no-verify (#13) ([ceb1fbe](https://github.com/tomgrv/devcontainer-features/commit/ceb1fbe38e3f739f2b1812c433a3c023386ea649))
58+
- ✨ add scripts for squash merging and production releases ([e9b103a](https://github.com/tomgrv/devcontainer-features/commit/e9b103a7822a843f045cd4ea6a80b7891aa0711e))
59+
- ✨ add scripts for squash merging and production releases ([fa52dec](https://github.com/tomgrv/devcontainer-features/commit/fa52dec3de4dfabd28347869aef9dfc99e8cb416))
60+
- ✨ migrate to gitversion utils ([426b923](https://github.com/tomgrv/devcontainer-features/commit/426b9233a515e61c964532709485f4177745f021))
61+
62+
#### Other changes
63+
64+
- ♻️ ✨ add scripts to fix author and edit last commit ([8780a2b](https://github.com/tomgrv/devcontainer-features/commit/8780a2b8c5baf68e0f30f10ffdd334da883ffeb7))
65+
- ♻️ move to zz_log ([b0bf13b](https://github.com/tomgrv/devcontainer-features/commit/b0bf13bedc981b62bf1931a5624b648987fd4c51))
66+
67+
### 📦 gitversion changes
68+
69+
#### Bug Fixes
70+
71+
- 🐛 improve version handling ([bdd74fc](https://github.com/tomgrv/devcontainer-features/commit/bdd74fc69e87a3a6d291a7d2184ce1821f9d6820))
72+
73+
#### Features
74+
75+
- ✨ add bump utilities ([8819028](https://github.com/tomgrv/devcontainer-features/commit/88190286546b1eefc42add9a8f0f73b0c7dbc49c))
76+
- ✨ enhance tag creation logic with force option handling ([193baf8](https://github.com/tomgrv/devcontainer-features/commit/193baf84f12e0daa0e99698501af0e817bea29b5))
77+
78+
### 📦 larasets changes
79+
80+
#### Bug Fixes
81+
82+
- 🐛 refine vendor directory exclusions for modules and packages ([e814109](https://github.com/tomgrv/devcontainer-features/commit/e814109816a70b744dbe05ce6ec8eff0b9ee9298))
83+
84+
#### Features
85+
86+
- ✨ update task labels and commands ([9456163](https://github.com/tomgrv/devcontainer-features/commit/9456163b5662c6b3f3d9c7abd0ff3d51a5060e8a))
687

788
## 1.1.0 (2024-06-22)
889

990
### Features
1091

11-
- ✨ add githook ([ab4c1fc](https://github.com/tomgrv/devcontainer-features/commit/ab4c1fc5eb4f712ed2009baf9a3cadb11097c7b5))
12-
- add features ([4b26d9d](https://github.com/tomgrv/devcontainer-features/commit/4b26d9d876caffb15078a6baaabf76d1a2707e6f))
92+
- ✨ add githook ([ab4c1fc](https://github.com/tomgrv/devcontainer-features/commit/ab4c1fc5eb4f712ed2009baf9a3cadb11097c7b5))
93+
- add features ([4b26d9d](https://github.com/tomgrv/devcontainer-features/commit/4b26d9d876caffb15078a6baaabf76d1a2707e6f))
94+
95+
---
96+
97+
_Generated on 2025-10-01 by [tomgrv/devcontainer-features](https://github.com/tomgrv/devcontainer-features)_

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ source=$(dirname $(readlink -f $0))
66
# Source the common utils
77
. $source/src/common-utils/_zz_colors.sh
88

9-
alias zz_log=$source/src/common-utils/_zz_logs.sh
9+
alias zz_log=$source/src/common-utils/_zz_log.sh
1010

1111
# Prepare for local installation by creating a temporary directory and linking common utils
1212
find $source/src/common-utils/ -type f -name "_*.sh" -exec echo {} \; -exec chmod +x {} \; | while read file; do

0 commit comments

Comments
 (0)