@mushi-mushi/svelte 0.9.0 → 1.0.0
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.
- package/CONTRIBUTING.md +23 -12
- package/README.md +38 -6
- package/package.json +3 -3
package/CONTRIBUTING.md
CHANGED
|
@@ -63,7 +63,7 @@ packages/
|
|
|
63
63
|
verify/ Fix verification (BSL)
|
|
64
64
|
apps/
|
|
65
65
|
admin/ Admin dashboard (React + Tailwind)
|
|
66
|
-
docs/ Documentation site (
|
|
66
|
+
docs/ Documentation site (Nextra — apps/docs)
|
|
67
67
|
tooling/
|
|
68
68
|
eslint-config/ Shared ESLint flat config
|
|
69
69
|
tsconfig/ Shared TypeScript configs
|
|
@@ -81,6 +81,28 @@ tooling/
|
|
|
81
81
|
```
|
|
82
82
|
6. Open a pull request
|
|
83
83
|
|
|
84
|
+
### Documentation (docs-as-code)
|
|
85
|
+
|
|
86
|
+
If your PR changes **user-visible SDK or CLI behavior**, update docs in the **same PR**:
|
|
87
|
+
|
|
88
|
+
| Surface | When to update |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `packages/*/README.md` | npm-facing install/API/config changes for that package |
|
|
91
|
+
| `apps/docs/content/**/*.mdx` | Long-form guides, quickstarts, admin console docs |
|
|
92
|
+
| Root `README.md` | Marketing stats only when counts change — run `pnpm check:docs-stats` |
|
|
93
|
+
|
|
94
|
+
Guardrails (run locally before pushing):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
pnpm check:docs-stats # root README stat badges
|
|
98
|
+
pnpm check:sdk-version-matrix # apps/docs/content/sdks/index.mdx versions
|
|
99
|
+
pnpm check:internal-doc-links # dead /foo links in MDX
|
|
100
|
+
pnpm check:bundle-docs # @mushi-mushi/web size-limit vs README
|
|
101
|
+
pnpm gen:llms-txt # regenerate apps/docs/public/llms.txt after nav changes
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
README changes on npm packages only appear on [npmjs.com](https://www.npmjs.com) after the next **Changesets publish**.
|
|
105
|
+
|
|
84
106
|
## Changesets
|
|
85
107
|
|
|
86
108
|
We use [Changesets](https://github.com/changesets/changesets) for versioning. If your PR modifies a published package (`core`, `web`, `react`, `vue`, `svelte`, `angular`, `react-native`, `cli`, `mcp`), add a changeset:
|
|
@@ -101,17 +123,6 @@ Releases are fully automated. Maintainers don't run `npm publish` by hand.
|
|
|
101
123
|
|
|
102
124
|
If GitHub's anti-loop protection suppresses the auto re-fire (the squash merge can be attributed to `github-actions[bot]`), trigger the workflow manually: **Actions → release → Run workflow → master**.
|
|
103
125
|
|
|
104
|
-
### Known CI/CD quirks and their automatic safeguards
|
|
105
|
-
|
|
106
|
-
A handful of GitHub-Actions × Changesets edge cases have caused release-pipeline stalls in the past. Each is now caught automatically — keep these in mind when you see the symptom:
|
|
107
|
-
|
|
108
|
-
| Symptom | Root cause | Automatic safeguard |
|
|
109
|
-
| --- | --- | --- |
|
|
110
|
-
| The `Build & Test` required check never registers on the `chore: version packages` PR — the PR stays "Required check missing" forever | `changeset-release/master` is pushed by `github-actions[bot]`. GitHub silently drops the downstream `pull_request` event to prevent bot loops (observed on PR #45, #102, #124). | `ci.yml` now also triggers on `push` to `changeset-release/master`, so `Build & Test` reports against the head commit directly. No empty-commit nudge needed. |
|
|
111
|
-
| Release workflow fails with `No commits between master and changeset-release/master` after merging a PR with a new changeset. | A `.changeset/*.md` file whose YAML frontmatter only targets packages listed in `.changeset/config.json#ignore` (e.g. `@mushi-mushi/server`, `@mushi-mushi/admin`). `changeset version` produces no bumps, the version PR is empty, the next push errors (PR #102 / #121, 2026-05-19). | `pnpm check:changeset-orphans` runs in both `ci.yml` and `release.yml`. PR CI fails with an actionable message naming the orphan file *before* it can reach master. If you legitimately need to record an internal-only change, omit the changeset entirely — the diff lives in git history. |
|
|
112
|
-
| Release workflow's `Audit signatures of installed dependencies` step fails with `npm ETARGET / No matching version found for @mushi-mushi/<pkg>@<ver>` seconds after the publish step succeeded. | npm's registry CDN can take up to ~30s to propagate a freshly-published manifest. The audit step shells out to `npm install` against the just-published version and races the CDN (observed 2026-05-20, run 26149167393). | The audit step retries with exponential backoff (1, 2, 4, 8, 16, 32s — 63s total) before failing. Sigstore signatures are written at publish time, so a one-off audit failure never indicates a corrupted package — `pnpm view <pkg> version` is the ground truth. |
|
|
113
|
-
| Push to `master` after merging a PR doesn't fire the `Release` workflow. | Same anti-loop protection: when a squash merge is attributed to `github-actions[bot]`, GitHub may suppress the downstream `push` trigger. Sporadic — observed twice in the last 60 days. | `release.yml` keeps `workflow_dispatch` as the manual fallback. Recovery: **Actions → Release → Run workflow → master**. The `Build & Verify` job re-runs identically to the auto-fired path. |
|
|
114
|
-
|
|
115
126
|
### Adding a brand-new publishable package
|
|
116
127
|
|
|
117
128
|
Trusted Publisher bindings are configured **per package** on `npmjs.com` and require the package to already exist on the registry. New packages therefore need a one-time bootstrap before OIDC can take over.
|
package/README.md
CHANGED
|
@@ -6,26 +6,50 @@ Svelte SDK for Mushi Mushi bug reporting. **API-only** — captures errors and s
|
|
|
6
6
|
>
|
|
7
7
|
> **Other frameworks:** [`@mushi-mushi/react`](https://npmjs.com/package/@mushi-mushi/react) · [`@mushi-mushi/vue`](https://npmjs.com/package/@mushi-mushi/vue) · [`@mushi-mushi/angular`](https://npmjs.com/package/@mushi-mushi/angular) · [`@mushi-mushi/react-native`](https://npmjs.com/package/@mushi-mushi/react-native) · [`@mushi-mushi/capacitor`](https://npmjs.com/package/@mushi-mushi/capacitor) · [`@mushi-mushi/web`](https://npmjs.com/package/@mushi-mushi/web) (vanilla JS)
|
|
8
8
|
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @mushi-mushi/svelte @mushi-mushi/web
|
|
13
|
+
# or: npx mushi-mushi
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Environment variables
|
|
17
|
+
|
|
18
|
+
| Stack | Project ID | API key |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| Vite / SvelteKit | `VITE_MUSHI_PROJECT_ID` | `VITE_MUSHI_API_KEY` |
|
|
21
|
+
|
|
22
|
+
See [Project ID & API keys](https://docs.mushimushi.dev/concepts/credentials).
|
|
23
|
+
|
|
9
24
|
## Usage
|
|
10
25
|
|
|
11
26
|
```ts
|
|
12
27
|
import { initMushi, getMushi } from '@mushi-mushi/svelte'
|
|
13
28
|
|
|
14
|
-
initMushi({
|
|
29
|
+
initMushi({
|
|
30
|
+
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
31
|
+
apiKey: import.meta.env.VITE_MUSHI_API_KEY,
|
|
32
|
+
})
|
|
15
33
|
|
|
16
|
-
// Later
|
|
17
34
|
const mushi = getMushi()
|
|
18
35
|
mushi.submitReport({ title: 'broken', description: '...' })
|
|
19
36
|
```
|
|
20
37
|
|
|
21
|
-
### With
|
|
38
|
+
### With widget UI
|
|
22
39
|
|
|
23
40
|
```ts
|
|
24
41
|
import { initMushi } from '@mushi-mushi/svelte'
|
|
25
42
|
import { Mushi } from '@mushi-mushi/web'
|
|
26
43
|
|
|
27
|
-
initMushi({
|
|
28
|
-
|
|
44
|
+
initMushi({
|
|
45
|
+
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
46
|
+
apiKey: import.meta.env.VITE_MUSHI_API_KEY,
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
Mushi.init({
|
|
50
|
+
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
51
|
+
apiKey: import.meta.env.VITE_MUSHI_API_KEY,
|
|
52
|
+
})
|
|
29
53
|
```
|
|
30
54
|
|
|
31
55
|
### SvelteKit error handler
|
|
@@ -36,7 +60,15 @@ import { createMushiErrorHandler } from '@mushi-mushi/svelte'
|
|
|
36
60
|
export const handleError = createMushiErrorHandler()
|
|
37
61
|
```
|
|
38
62
|
|
|
39
|
-
##
|
|
63
|
+
## API
|
|
64
|
+
|
|
65
|
+
| Export | Purpose |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `initMushi(config)` | Initialize once at app startup |
|
|
68
|
+
| `getMushi()` | Access the SDK instance |
|
|
69
|
+
| `createMushiErrorHandler()` | SvelteKit `handleError` integration |
|
|
70
|
+
|
|
71
|
+
## Peer dependencies
|
|
40
72
|
|
|
41
73
|
- `svelte` >= 4
|
|
42
74
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mushi-mushi/svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Svelte SDK for Mushi Mushi — context-based init, SvelteKit error hook integration",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"svelte": ">=4"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@mushi-mushi/core": "^1.
|
|
14
|
-
"@mushi-mushi/web": "^1.
|
|
13
|
+
"@mushi-mushi/core": "^1.15.0",
|
|
14
|
+
"@mushi-mushi/web": "^1.14.1"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"eslint": "^10.3.0",
|