Skip to content

Commit f933b26

Browse files
committed
chore(deps): WIP upgrade dependencies (issue #45)
1 parent 49ab3e3 commit f933b26

50 files changed

Lines changed: 3973 additions & 3494 deletions

Some content is hidden

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

.changeset/config.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3-
"changelog": "@changesets/cli/changelog",
4-
"commit": false,
5-
"fixed": [],
6-
"linked": [],
7-
"access": "restricted",
8-
"baseBranch": "main",
9-
"updateInternalDependencies": "patch",
10-
"ignore": []
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
1111
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
description: When changing deps, scripts, e2e, release, or issue format, update the matching project skills and note it in the response
3+
alwaysApply: true
4+
---
5+
6+
# Skill maintenance
7+
8+
When you change any of the following, update the corresponding skill(s) in `.cursor/skills/` and briefly mention in your response that skills were updated.
9+
10+
| Change | Update these skills |
11+
|--------|----------------------|
12+
| Key dependencies (WXT, Svelte, Playwright, changesets, oxlint, dprint) or build/config (wxt.config.ts, .oxlintrc.json) | wxt-svelte-extension (SKILL.md; reference.md if a new known issue) |
13+
| package.json scripts (dev/build/zip) or new build targets | wxt-svelte-extension, releases-changesets if release steps change |
14+
| E2E layout (e2e/tests, e2e/pages, fixture file path or name) | e2e-playwright-extension |
15+
| Release workflow (.changeset/, release steps, workflow_dispatch) | releases-changesets |
16+
| Issue refinement format or label set (docs/ISSUE_REFINEMENTS.md) | issue-refinement-triage |
17+
| New recurring “known issue” that should guide extension code | wxt-svelte-extension/reference.md |
18+
19+
Read the current skill file before editing so the update stays consistent with existing structure and wording.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: e2e-playwright-extension
3+
description: Adds or updates extension E2E tests using the project Playwright setup and fixture (load unpacked extension, popup/background). Use when adding e2e for a feature, fixing failing e2e, or when changing popup/options/background flows.
4+
---
5+
6+
# E2E with Playwright (extension)
7+
8+
## Layout
9+
10+
- Tests in [e2e/tests/](e2e/tests/)
11+
- Shared fixture in [e2e/fixutes.ts](e2e/fixutes.ts) (note: filename typo in repo)
12+
- Page helpers in [e2e/pages/](e2e/pages/) (e.g. [e2e/pages/popup.ts](e2e/pages/popup.ts))
13+
14+
## Fixture
15+
16+
The fixture extends Playwright with:
17+
18+
- **context:** Firefox persistent context that loads the unpacked extension from `dist/firefox-mv3`
19+
- **extensionId:** Resolved from the service worker (MV3) or background page otherwise
20+
21+
Use `context` and `extensionId` in tests. Import the extended `test` and `expect` from the fixture.
22+
23+
## Popup
24+
25+
Navigate to `chrome-extension://${extensionId}/popup.html`. Use helpers like `openPopup(page, extensionId)` from [e2e/pages/popup.ts](e2e/pages/popup.ts) for consistent setup.
26+
27+
## Run
28+
29+
- `pnpm test:e2e`
30+
- Build the extension first so `dist/` exists: `pnpm build:firefox` or `pnpm build`
31+
32+
## Note
33+
34+
`playwright-webextext` is in devDependencies for potential future use; current tests use the custom fixture in `fixutes.ts`.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: issue-refinement-triage
3+
description: Refines GitHub issues into the ISSUE_REFINEMENTS format and keeps docs/ISSUE_REFINEMENTS.md in sync. Use when triaging issues, refining a new issue, updating the refinements doc, or when the user asks to refine an issue or add to refinements.
4+
---
5+
6+
# Issue Refinement and Triage
7+
8+
## Canonical source
9+
10+
Read [docs/ISSUE_REFINEMENTS.md](docs/ISSUE_REFINEMENTS.md) for the current open/closed list and label table before editing.
11+
12+
## Issue block template
13+
14+
Each refined issue uses this format. Separate blocks with `---`.
15+
16+
```markdown
17+
### #N — Title
18+
19+
**Labels:** `label1` `label2`
20+
**Context:** Raw description or user report.
21+
**Refined:** One-line actionable scope or decision.
22+
**My comments:** _(add notes here)_
23+
```
24+
25+
## Labels (only these)
26+
27+
| Label | Use for |
28+
| ------------------ | -------------------------------------- |
29+
| `bug` | Something broken or incorrect behavior |
30+
| `documentation` | Docs, README, FAQ, browser support |
31+
| `enhancement` | New feature or improvement |
32+
| `good first issue` | Clear, scoped tasks for contributors |
33+
| `question` | Open questions, naming, investigation |
34+
| `UI/UX` | User-facing behavior, flows, layout |
35+
| `Brainstorm` | Ideas, naming, long-running discussion |
36+
| `infrastructure` | CI/CD, release, monitoring, tooling |
37+
38+
Suggest only these labels; use space-separated list in the block.
39+
40+
## Workflow
41+
42+
1. **New or raw issue:** Propose labels (from the table) and a one-line **Refined** that scopes or clarifies the issue.
43+
2. **Updating ISSUE_REFINEMENTS:** Add new refined issues under "Open issues (refined)". When an issue is closed, move its block to "Closed issues (reference)" and keep the same format.
44+
3. **My comments:** Reserved for maintainer notes (priority, blockers, batching). Leave as `*(add notes here)*` if no note.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: jj-bookmark-push
3+
description: Uses jj (Jujutsu VCS) to create or update bookmarks and push to the Git remote. Use when creating a branch/bookmark, moving a bookmark to the current revision, or pushing changes with jj instead of git.
4+
---
5+
6+
# jj bookmark and push
7+
8+
Use jj for version control in this project (not git) when creating branches, updating bookmarks, or pushing.
9+
10+
## Create or update a bookmark
11+
12+
Bookmarks are named pointers (like Git branches). Set or move a bookmark to the current revision:
13+
14+
```bash
15+
jj bookmark set <name>
16+
```
17+
18+
Set to a specific revision:
19+
20+
```bash
21+
jj bookmark set <name> -r <rev>
22+
```
23+
24+
Short form: `jj b s <name>`. Use `-B`/`--allow-backwards` to move a bookmark backwards. New commits do not move bookmarks automatically; set the bookmark after committing if you want it to point at the new commit.
25+
26+
## Push to remote
27+
28+
Push one bookmark (maps to same-named Git branch on remote):
29+
30+
```bash
31+
jj git push -b <name>
32+
```
33+
34+
Push all bookmarks: `jj git push --all`. Push only tracked: `jj git push --tracked`. Specify remote: `jj git push --remote <remote>` (default is origin).
35+
36+
Push performs safety checks (similar to `git push --force-with-lease`). If the remote bookmark moved, run `jj git fetch` and resolve any bookmark conflict, then push again.
37+
38+
## Quick workflow
39+
40+
1. Make changes; commit with `jj commit` / `jj new` etc.
41+
2. `jj bookmark set <branch-name>` so the bookmark points at the revision to publish.
42+
3. `jj git push -b <branch-name>`.
43+
44+
List bookmarks: `jj bookmark list` or `jj b l`. List with remotes: `jj bookmark list --all`.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: releases-changesets
3+
description: Uses changesets for versioning and changelog; avoids manual version bumps; aligns with build/zip and workflow_dispatch. Use when cutting a release, adding a changeset, preparing for publish, or when touching version or changelog.
4+
---
5+
6+
# Releases and Versioning (changesets)
7+
8+
## Rule
9+
10+
All user-facing or notable changes get a changeset in [.changeset/](.changeset/). Do not edit `package.json` version manually for releases.
11+
12+
## Adding a changeset
13+
14+
- Run `pnpm changeset`, or add a new `.md` file in `.changeset/` with the standard format: semver type (major/minor/patch) and a short summary for the changelog.
15+
16+
## Config
17+
18+
[.changeset/config.json](.changeset/config.json): `changelog: "@changesets/cli/changelog"`, `commit: false`, `baseBranch: "main"`.
19+
20+
## Release steps
21+
22+
1. Build both targets: `pnpm build:all`
23+
2. Create zips: `pnpm zip:all`
24+
3. workflow_dispatch (e.g. issue #27) is the intended automation when available; document in README when in place.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: skill-hygiene
3+
description: Checklist for updating project skills when the codebase or workflow changes. Use when applying the skill-maintenance rule, after dependency upgrades or script/e2e/release/issue-format changes, or when the user asks how to keep skills up to date.
4+
---
5+
6+
# Skill hygiene
7+
8+
When updating a skill (see `.cursor/rules/skill-maintenance.mdc` for when to do so), read the current skill file first and then apply the checks below for the relevant skill(s).
9+
10+
## issue-refinement-triage
11+
12+
- Issue block template still matches `docs/ISSUE_REFINEMENTS.md`.
13+
- Label table matches the "Label usage summary" in ISSUE_REFINEMENTS (same labels and "Use for" text).
14+
- Workflow steps still reflect how open/closed issues and "My comments" are used.
15+
16+
## wxt-svelte-extension
17+
18+
- **Stack:** Entrypoints, config path, srcDir/outDir match current layout.
19+
- **Scripts table:** Commands and purpose match `package.json` (dev, build, zip; Chrome vs Firefox).
20+
- **Constraints:** No new dev data, storage prefix, shadow DOM isolation still accurate; wording matches current issues if referenced.
21+
- **reference.md:** Known-issues list (e.g. #36, #17, #25) is current; add new recurring issues that should guide code, remove or note when an issue is closed.
22+
23+
## releases-changesets
24+
25+
- Rule and "Add a changeset" steps match `.changeset/config.json` and how the repo uses changesets.
26+
- Release steps (build:all, zip:all, workflow_dispatch) match current process; update when CI or release automation changes.
27+
28+
## e2e-playwright-extension
29+
30+
- **Layout:** Paths (e2e/tests, e2e/pages, fixture file) match repo; fix fixture filename in skill if the typo is ever fixed in repo.
31+
- **Fixture:** context/extensionId and MV3 vs background page still match [e2e/fixutes.ts](e2e/fixutes.ts).
32+
- **Run:** `pnpm test:e2e` and build-before-test still correct.
33+
34+
## After editing
35+
36+
- Keep SKILL.md under 500 lines; move long detail to reference.md if needed.
37+
- Descriptions (frontmatter) stay third-person and include WHAT and WHEN.
38+
- Links stay one level deep (no deep nesting from SKILL.md).
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: wxt-svelte-extension
3+
description: Provides project context for the amgiflol WXT + Svelte 5 browser extension. Use when adding or editing extension code, adding entrypoints, fixing extension bugs, or when working in src/entrypoints or wxt.config.ts.
4+
---
5+
6+
# WXT + Svelte Extension (amgiflol)
7+
8+
## Stack
9+
10+
- WXT, Svelte 5 (runes), UnoCSS
11+
- Entrypoints in [src/entrypoints/](src/entrypoints/) (e.g. background.ts, content.ts)
12+
- Config in [wxt.config.ts](wxt.config.ts); srcDir `src`, outDir `dist`
13+
14+
## Scripts
15+
16+
| Command | Purpose |
17+
| --------------------------- | ------------------------ |
18+
| `pnpm dev` | Chrome dev (MV3) |
19+
| `pnpm dev:firefox` | Firefox dev (MV2 in dev) |
20+
| `pnpm build` | Chrome build (MV3) |
21+
| `pnpm build:firefox` | Firefox build (MV3) |
22+
| `pnpm build:all` | Both targets |
23+
| `pnpm zip` / `pnpm zip:all` | Distribution zips |
24+
25+
## Constraints
26+
27+
- Do not create new data in dev; it breaks seeding.
28+
- Storage keys: use a fixed prefix (e.g. `amgiflol_`) for all extension storage to avoid collisions with host page (see [reference.md](reference.md)).
29+
- Extension UI in shadow DOM: isolate from host page styles (e.g. WXT ShadowRootContentScriptUiOptions) so host root font/CSS vars do not affect the UI.
30+
31+
## Lint and format
32+
33+
- `pnpm lint` (oxlint); import order and sort-imports per [.oxlintrc.json](.oxlintrc.json)
34+
- `pnpm fmt` (oxfmt); `pnpm fmt:check` to check only
35+
36+
## Additional context
37+
38+
For known issues and when to apply them (storage prefix, shadow root isolation, Firefox quirks), see [reference.md](reference.md).
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Known issues (reference)
2+
3+
When touching related code, consider these tracked issues:
4+
5+
- **#36 — Prefix local storage keys:** Use a fixed prefix (e.g. `amgiflol_`) for all extension storage keys to avoid collisions with host page storage.
6+
- **#17 — Shadow root UI isolation:** Host page root font size / CSS vars can affect extension shadow root UI. Use WXT ShadowRootContentScriptUiOptions (e.g. inheritStyles) or isolate so extension UI is not affected by site globals.
7+
- **#25 — Style tags removed on firefox.com:** Firefox-specific behavior on some sites; shadow root styles removed. Reproduce and narrow (extension injection vs site CSP vs browser quirk) before changing code.

.oxfmtrc.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 80,
4+
"useTabs": true,
5+
"tabWidth": 4,
6+
"semi": true,
7+
"singleQuote": false,
8+
"trailingComma": "all",
9+
"ignorePatterns": [
10+
"**/node_modules/**",
11+
"**/*-lock.yaml",
12+
"**/*-workspace.yaml",
13+
"dist/**",
14+
".wxt/**",
15+
".vscode/**"
16+
],
17+
"overrides": [
18+
{
19+
"files": ["*.json", "*.jsonc"],
20+
"options": {
21+
"useTabs": false,
22+
"tabWidth": 2
23+
}
24+
},
25+
{
26+
"files": ["*.md", "*.yml", "*.yaml"],
27+
"options": {
28+
"tabWidth": 2
29+
}
30+
}
31+
]
32+
}

0 commit comments

Comments
 (0)