svelte-rtf-editor 0.1.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.
Files changed (2) hide show
  1. package/README.md +58 -0
  2. package/package.json +6 -2
package/README.md CHANGED
@@ -196,6 +196,64 @@ The components use CSS custom properties with sensible fallbacks, so they work o
196
196
 
197
197
  ---
198
198
 
199
+ ## Contributing & releasing
200
+
201
+ This project uses [Changesets](https://github.com/changesets/changesets) for versioning and changelog generation.
202
+
203
+ ### Making changes
204
+
205
+ After making code changes, describe them with a changeset:
206
+
207
+ ```bash
208
+ npm run changeset
209
+ # → interactive prompt: pick patch / minor / major, write a short description
210
+ ```
211
+
212
+ Commit both your code and the generated `.changeset/*.md` file together.
213
+
214
+ ### Publishing a new version
215
+
216
+ When ready to cut a release:
217
+
218
+ ```bash
219
+ # 1. Consume pending changesets — bumps package.json and updates CHANGELOG.md
220
+ npm run version
221
+
222
+ # 2. Commit the version bump
223
+ git add .
224
+ git commit -m "chore: release v$(node -p "require('./package.json').version")"
225
+ git push
226
+
227
+ # 3. Create a GitHub release — this triggers CI to build and publish to npm
228
+ VERSION=$(node -p "require('./package.json').version")
229
+ gh release create "v$VERSION" --title "v$VERSION" --generate-notes
230
+ ```
231
+
232
+ Requires the [GitHub CLI](https://cli.github.com/) (`brew install gh`, then `gh auth login` once).
233
+ The `--generate-notes` flag has GitHub auto-generate release notes from commits since the last tag.
234
+
235
+ ### Version bump rules
236
+
237
+ | Change type | Bump |
238
+ |---|---|
239
+ | Bug fix | `patch` — 0.1.0 → 0.1.1 |
240
+ | New feature (backwards compatible) | `minor` — 0.1.0 → 0.2.0 |
241
+ | Breaking change | `major` — 0.1.0 → 1.0.0 |
242
+
243
+ ### First-time npm publish
244
+
245
+ The npm Trusted Publisher (OIDC) setup requires the package to exist on npm before it can be configured. For the very first publish, run locally:
246
+
247
+ ```bash
248
+ npm login
249
+ npm run prepack
250
+ npm publish --access public
251
+ ```
252
+
253
+ Then go to `npmjs.com/package/svelte-rtf-editor` → **Settings** → **Trusted Publishers** and add the GitHub Actions publisher pointing at this repo's `publish.yml`. All subsequent releases will go through CI automatically.
254
+
255
+ ---
256
+
199
257
  ## Local development
200
258
 
201
259
  Clone this repo and link it to your project for instant iteration without publishing:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-rtf-editor",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "RTF viewer and rich-text editor components for Svelte 5",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/jfc76/svelte-rtf-editor#readme",
@@ -16,7 +16,10 @@
16
16
  "prepare": "svelte-kit sync || echo ''",
17
17
  "prepack": "svelte-kit sync && svelte-package && publint",
18
18
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
19
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
19
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
20
+ "changeset": "changeset",
21
+ "version": "changeset version",
22
+ "release": "npm run prepack && changeset publish"
20
23
  },
21
24
  "files": [
22
25
  "dist",
@@ -39,6 +42,7 @@
39
42
  "svelte": "^5.0.0"
40
43
  },
41
44
  "devDependencies": {
45
+ "@changesets/cli": "^2.30.0",
42
46
  "@sveltejs/adapter-auto": "^7.0.0",
43
47
  "@sveltejs/kit": "^2.50.2",
44
48
  "@sveltejs/package": "^2.5.7",