starlight-mega-menu 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,40 @@
1
+ ---
2
+ version: 2
3
+ updates:
4
+ # --- GitHub Actions ---
5
+ - package-ecosystem: "github-actions"
6
+ directory: "/"
7
+ schedule:
8
+ interval: "weekly"
9
+ day: "monday"
10
+ commit-message:
11
+ prefix: "chore(deps):"
12
+ labels:
13
+ - "dependencies"
14
+ assignees:
15
+ - "robinmordasiewicz"
16
+ open-pull-requests-limit: 10
17
+ groups:
18
+ actions-minor-patch:
19
+ update-types:
20
+ - "minor"
21
+ - "patch"
22
+
23
+ # --- npm ---
24
+ - package-ecosystem: "npm"
25
+ directory: "/"
26
+ schedule:
27
+ interval: "weekly"
28
+ day: "monday"
29
+ commit-message:
30
+ prefix: "chore(deps):"
31
+ labels:
32
+ - "dependencies"
33
+ assignees:
34
+ - "robinmordasiewicz"
35
+ open-pull-requests-limit: 10
36
+ groups:
37
+ npm-minor-patch:
38
+ update-types:
39
+ - "minor"
40
+ - "patch"
@@ -27,12 +27,12 @@ jobs:
27
27
  if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, 'chore(release):')"
28
28
  steps:
29
29
  - name: Checkout
30
- uses: actions/checkout@v4
30
+ uses: actions/checkout@v6
31
31
  with:
32
32
  fetch-depth: 0
33
33
 
34
34
  - name: Setup Node.js
35
- uses: actions/setup-node@v4
35
+ uses: actions/setup-node@v6
36
36
  with:
37
37
  node-version: 'lts/*'
38
38
  registry-url: 'https://registry.npmjs.org'
@@ -0,0 +1,58 @@
1
+ ---
2
+ repos:
3
+ - repo: local
4
+ hooks:
5
+ - id: local-hooks
6
+ name: Repository-specific hooks
7
+ entry: bash -c 'if [ -x scripts/pre-commit-local.sh ]; then scripts/pre-commit-local.sh; fi'
8
+ language: system
9
+ always_run: true
10
+ pass_filenames: false
11
+
12
+ - repo: https://github.com/pre-commit/pre-commit-hooks
13
+ rev: v6.0.0
14
+ hooks:
15
+ - id: no-commit-to-branch
16
+ args: ["--branch", "main"]
17
+ - id: trailing-whitespace
18
+ - id: end-of-file-fixer
19
+ - id: mixed-line-ending
20
+ args: ["--fix=lf"]
21
+ - id: check-yaml
22
+ args: ["--allow-multiple-documents"]
23
+ - id: check-json
24
+ - id: check-added-large-files
25
+ args: ["--maxkb=1024"]
26
+ - id: check-merge-conflict
27
+ - id: detect-private-key
28
+
29
+ - repo: https://github.com/gitleaks/gitleaks
30
+ rev: v8.30.0
31
+ hooks:
32
+ - id: gitleaks
33
+
34
+ - repo: https://github.com/adrienverge/yamllint
35
+ rev: v1.38.0
36
+ hooks:
37
+ - id: yamllint
38
+
39
+ - repo: https://github.com/igorshubovych/markdownlint-cli
40
+ rev: v0.47.0
41
+ hooks:
42
+ - id: markdownlint
43
+ args: ["--fix"]
44
+
45
+ - repo: https://github.com/shellcheck-py/shellcheck-py
46
+ rev: v0.11.0.1
47
+ hooks:
48
+ - id: shellcheck
49
+
50
+ - repo: https://github.com/rhysd/actionlint
51
+ rev: v1.7.10
52
+ hooks:
53
+ - id: actionlint
54
+
55
+ ci:
56
+ autofix_prs: true
57
+ autoupdate_schedule: weekly
58
+ skip: [local-hooks, gitleaks]
package/CLAUDE.md CHANGED
@@ -2,17 +2,102 @@
2
2
 
3
3
  ## Repository Workflow
4
4
 
5
- This repo enforces a strict governance workflow. Follow it exactly:
5
+ This repo enforces a strict governance workflow.
6
+ **DO NOT STOP after creating a PR** — the task is
7
+ not complete until the PR is merged, all post-merge
8
+ workflows succeed, and local branches are cleaned.
6
9
 
7
- 1. **Create a GitHub issue** before making any changes
8
- 2. **Create a feature branch** from `main` — never commit to `main` directly
9
- 3. **Open a PR** that links to the issue using `Closes #N`
10
- 4. **CI must pass** — the "Check linked issues" check blocks PRs without a linked issue
11
- 5. **Merge** — squash merge preferred, branch auto-deletes after merge
10
+ ### Making Changes (Steps 1-5)
12
11
 
13
- ## Use the `/ship` Skill
12
+ 1. **Create a GitHub issue** before making any
13
+ changes
14
+ 2. **Create a feature branch** from `main` — never
15
+ commit to `main` directly
16
+ 3. **Commit changes** with conventional format
17
+ (`feat:`, `fix:`, `docs:`) and push to remote
18
+ 4. **Open a PR** that links to the issue using
19
+ `Closes #N` — fill out the PR template completely
20
+ 5. **Fix any CI failures** — monitor checks with
21
+ `gh pr checks <NUMBER>`, fix locally, push to
22
+ trigger re-runs
14
23
 
15
- When available, use `/ship` to handle the full workflow (issue creation, branch, commit, PR) in one step.
24
+ ### Waiting for Auto-Merge (Step 6)
25
+
26
+ 6. **Wait for auto-merge** — PRs merge automatically
27
+ (squash) once all CI checks pass. Poll until the
28
+ PR state is `MERGED`:
29
+
30
+ ```
31
+ gh pr view <NUMBER> --json state --jq '.state'
32
+ ```
33
+
34
+ If the PR is not merging, check for issues:
35
+
36
+ ```
37
+ gh pr view <NUMBER> --json mergeable,mergeStateStatus
38
+ ```
39
+
40
+ ### Post-Merge Monitoring (Steps 7-8)
41
+
42
+ 7. **Monitor post-merge workflows** — merging to
43
+ `main` triggers additional workflows (docs
44
+ builds, governance sync, etc.). Discover and
45
+ watch them:
46
+
47
+ ```
48
+ git checkout main && git pull origin main
49
+ MERGE_SHA=$(git rev-parse HEAD)
50
+ sleep 10
51
+ gh run list --branch main --commit $MERGE_SHA
52
+ gh run watch <RUN-ID> --exit-status
53
+ ```
54
+
55
+ 8. **Iterate on failures** — if any workflow fails:
56
+ - View logs: `gh run view <RUN-ID> --log-failed`
57
+ - Analyze the root cause
58
+ - Fix the code locally
59
+ - Create a new issue, branch, and PR with the fix
60
+ - Return to Step 5 and repeat until all workflows
61
+ pass
62
+ - For pre-existing failures unrelated to your
63
+ changes: create a GitHub issue (per CI
64
+ Monitoring rules below) and continue
65
+
66
+ ### Cleanup (Steps 9-10)
67
+
68
+ 9. **Clean up branches** — only after all workflows
69
+ succeed. Delete your feature branch and any other
70
+ stale local branches already merged to `main`:
71
+
72
+ ```
73
+ git branch -d <branch-name>
74
+ git branch --merged main | grep -v '^\*\|main' | xargs -r git branch -d
75
+ ```
76
+
77
+ 10. **Verify completion** — confirm clean state:
78
+
79
+ ```
80
+ git status
81
+ git branch
82
+ gh run list --branch main --limit 5
83
+ ```
84
+
85
+ ## Task Completion Criteria
86
+
87
+ A task is **not complete** until ALL of the
88
+ following are true:
89
+
90
+ - GitHub issue created and linked to PR
91
+ - PR merged to `main` via auto-merge
92
+ - All workflows triggered by the merge completed
93
+ successfully
94
+ - Local feature branch deleted
95
+ - No stale merged branches remain locally
96
+ - Current branch is `main` with clean working tree
97
+
98
+ If any post-merge workflow fails due to your
99
+ changes, fix and resubmit. Do not clean up branches
100
+ until all workflows are green.
16
101
 
17
102
  ## Branch Naming
18
103
 
@@ -29,6 +114,156 @@ Use the format `<prefix>/<issue-number>-short-description`:
29
114
  - Every PR must link to an issue
30
115
  - Fill out the PR template completely
31
116
  - Follow conventional commit messages (`feat:`, `fix:`, `docs:`)
117
+ - Never consider a task complete until post-merge workflows pass
118
+ - Always delete local feature branches after successful merge
119
+ - Always clean up stale merged branches and workspace clutter when noticed
120
+
121
+ ## CI Monitoring and Problem Reporting
122
+
123
+ When monitoring CI workflows, **never ignore
124
+ failures** — even pre-existing or unrelated ones.
125
+ You are authorized to create GitHub issues without
126
+ asking for confirmation. This is a standing
127
+ instruction, not a suggestion.
128
+
129
+ For every problem observed:
130
+
131
+ 1. **Immediately create a GitHub issue** — do not
132
+ ask whether to create it, just create it
133
+ - Use a clear, descriptive title
134
+ - Include the workflow run URL or relevant logs
135
+ - Note it was discovered during CI monitoring
136
+ - Apply the `bug` label
137
+ 2. **Continue with your primary task** — issue
138
+ creation must not block your current work
139
+ 3. **Report to the user** what issues you created
140
+
141
+ Do not ask "Want me to create an issue?" — the
142
+ answer is always yes. See a problem, file an issue,
143
+ move on.
144
+
145
+ ## Workspace Hygiene
146
+
147
+ Apply the same proactive approach as CI monitoring
148
+ to local workspace cleanliness. Do not ignore
149
+ problems just because they predate your current
150
+ task.
151
+
152
+ When you notice stale local branches, leftover
153
+ files, or other workspace issues:
154
+
155
+ 1. **Fix it immediately** — delete merged branches,
156
+ remove temp files, clean up artifacts
157
+ 2. **Report what you cleaned** — tell the user what
158
+ housekeeping you performed
159
+ 3. **Do not skip cleanup because "it's not my
160
+ task"** — a clean workspace is everyone's
161
+ responsibility
162
+
163
+ Stale branch cleanup command:
164
+
165
+ ```
166
+ git branch --merged main | grep -v '^\*\|main' | xargs -r git branch -d
167
+ ```
168
+
169
+ ## Documentation Pipeline
170
+
171
+ All repos publish docs to GitHub Pages using a
172
+ shared pipeline:
173
+
174
+ | Repo | Role |
175
+ | ---- | ---- |
176
+ | `f5xc-docs-theme` | Astro/Starlight config, CSS, logos, layout |
177
+ | `f5xc-docs-builder` | Dockerfile, npm deps, build scripts |
178
+ | `f5xc-template` | CI workflow, governance files |
179
+
180
+ Content repos only need a `docs/` directory — the
181
+ build container and workflow handle everything else.
182
+ CI builds trigger when files in `docs/` change on
183
+ `main`.
184
+
185
+ ### Where to make changes
186
+
187
+ - **Site appearance, navigation, or Astro config** —
188
+ change `f5xc-docs-theme` (owns
189
+ `astro.config.mjs`, `content.config.ts`,
190
+ CSS, and logos)
191
+ - **Build process, Docker image, or npm deps** —
192
+ change `f5xc-docs-builder` (owns the
193
+ Dockerfile and dependency set)
194
+ - **CI workflow or governance files** —
195
+ change `f5xc-template`
196
+ - **Page content and images** —
197
+ change the `docs/` directory in the content
198
+ repo itself
199
+ - **Never** add `astro.config.mjs`,
200
+ `package.json`, or build config to a content
201
+ repo — the pipeline provides these
202
+
203
+ ## Content Authoring
204
+
205
+ ### Structure
206
+
207
+ - Place `.md` or `.mdx` files in the `docs/`
208
+ directory
209
+ - `docs/index.mdx` is required — include YAML
210
+ frontmatter with at least a `title:` field
211
+ - Static assets (images, diagrams) go in
212
+ subdirectories like `docs/images/` — folders
213
+ with no `.md`/`.mdx` files are auto-mounted
214
+ as public assets
215
+ - Reference assets with root-relative paths:
216
+ `![alt](/images/diagram.png)`
217
+
218
+ ### MDX Rules
219
+
220
+ - Bare `<` is treated as a JSX tag — use `&lt;`
221
+ or wrap in backtick inline code
222
+ - `{` and `}` are JSX expressions — use `\{`
223
+ and `\}` or wrap in backtick inline code
224
+ - Never use curly braces in `.mdx` filenames
225
+
226
+ ### Local Preview
227
+
228
+ Run the live dev server (restart to pick up
229
+ changes):
230
+
231
+ ```bash
232
+ docker run --rm -it \
233
+ -v "$(pwd)/docs:/content/docs" \
234
+ -p 4321:4321 \
235
+ --entrypoint sh \
236
+ ghcr.io/robinmordasiewicz/f5xc-docs-builder:latest \
237
+ -c '
238
+ npm install --legacy-peer-deps && \
239
+ npm update --legacy-peer-deps && \
240
+ cp /app/node_modules/f5xc-docs-theme/astro.config.mjs \
241
+ /app/astro.config.mjs && \
242
+ cp /app/node_modules/f5xc-docs-theme/src/content.config.ts \
243
+ /app/src/content.config.ts && \
244
+ cp -r /content/docs/* /app/src/content/docs/ && \
245
+ npx astro dev --host
246
+ '
247
+ ```
248
+
249
+ Open `http://localhost:4321`. File changes on the
250
+ host require restarting the container.
251
+
252
+ For a full production build:
253
+
254
+ ```bash
255
+ docker run --rm \
256
+ -v "$(pwd)/docs:/content/docs:ro" \
257
+ -v "$(pwd)/output:/output" \
258
+ -e GITHUB_REPOSITORY="<owner>/<repo>" \
259
+ ghcr.io/robinmordasiewicz/f5xc-docs-builder:latest
260
+ ```
261
+
262
+ Serve with `npx serve output/ -l 8080` and open
263
+ `http://localhost:8080/<repo>/`.
264
+
265
+ Full content authoring guide:
266
+ <https://robinmordasiewicz.github.io/f5xc-docs-builder/06-content-authors/>
32
267
 
33
268
  ## Reference
34
269
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-mega-menu",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A HashiCorp-style mega-menu navigation plugin for Astro Starlight",
5
5
  "type": "module",
6
6
  "license": "MIT",