Skip to content

Commit 81e9886

Browse files
authored
Merge pull request #85 from techdiary-dev/kingrayhan/gist
Kingrayhan/gist
2 parents f10e27e + 04729fd commit 81e9886

26 files changed

Lines changed: 1799 additions & 87 deletions

File tree

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
name: release-note
3+
description: Generate a semver-compliant release note from git history
4+
user-invocable: true
5+
---
6+
7+
Generate a release note for this project following https://semver.org/.
8+
9+
## Steps
10+
11+
### 1. Gather git history
12+
13+
```bash
14+
git tag --sort=-version:refname | head -5
15+
```
16+
17+
Then get commits since the last tag (or last 30 if no tags exist):
18+
19+
```bash
20+
# with tags:
21+
git log <last-tag>..HEAD --oneline --no-merges
22+
# no tags:
23+
git log --oneline --no-merges -30
24+
```
25+
26+
### 2. Determine current version
27+
28+
- If a version tag exists (e.g. `v1.2.3`) → that is the **current version**
29+
- If no tags exist → current version is `v0.0.0`
30+
31+
### 3. Categorize commits
32+
33+
| Category | Bump | Signals |
34+
|---|---|---|
35+
| **Breaking Changes** | MAJOR | `BREAKING CHANGE:`, `!` after type (e.g. `feat!:`), words "breaking", "incompatible" |
36+
| **Features** | MINOR | `feat:`, `feature:`, "add ", "new ", "implement" |
37+
| **Bug Fixes** | PATCH | `fix:`, `bugfix:`, "fix ", "resolve ", "correct " |
38+
| **Other** | PATCH | `refactor`, `chore`, `docs`, `style`, `test`, `perf`, `ci`, `build` |
39+
40+
Use [Conventional Commits](https://www.conventionalcommits.org/) prefixes when present; otherwise classify by message keywords.
41+
42+
### 4. Calculate next version
43+
44+
Apply the **highest** bump found:
45+
- Any BREAKING CHANGE → bump MAJOR, reset minor + patch to 0
46+
- Any feat (no breaking) → bump MINOR, reset patch to 0
47+
- Only fixes/other → bump PATCH
48+
49+
> **Pre-1.0 rule:** If current major is `0`, treat BREAKING as MINOR (semver §4).
50+
51+
### 5. Print draft release note
52+
53+
```
54+
## Release v<next> — <YYYY-MM-DD>
55+
56+
> Suggested bump: <MAJOR|MINOR|PATCH> (v<current> → v<next>)
57+
58+
### 💥 Breaking Changes
59+
- <message> (<sha>)
60+
61+
### ✨ Features
62+
- <message> (<sha>)
63+
64+
### 🐛 Bug Fixes
65+
- <message> (<sha>)
66+
67+
### 🔧 Other Changes
68+
- <message> (<sha>)
69+
```
70+
71+
Omit empty sections.
72+
73+
### 6. Ask for confirmation
74+
75+
After the draft, ask the user:
76+
77+
> **Does `v<next>` look right?**
78+
> - Confirm → finalize and print the clean release note
79+
> - Provide a different version (e.g. `v2.0.0`) → reformat with that version
80+
> - Cancel → discard
81+
82+
Once confirmed:
83+
84+
1. **Update `package.json`** — read the file, set `"version"` to the confirmed version (without the `v` prefix, e.g. `"1.3.0"`), and write it back.
85+
86+
2. **Update `CHANGELOG.md`** — prepend the new release section (without the `> Suggested bump:` line) to the top of the entries in `CHANGELOG.md`. If the file doesn't exist, create it with a standard header:
87+
```markdown
88+
# Changelog
89+
90+
All notable changes to this project will be documented in this file.
91+
92+
This project adheres to [Semantic Versioning](https://semver.org/).
93+
94+
---
95+
```
96+
Then append the release section below the `---` separator.
97+
98+
3. **Output the final release note** ready to paste into a GitHub Release or PR description.

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
This project adheres to [Semantic Versioning](https://semver.org/).
6+
7+
---
8+
9+
## v1.1.0 — 2026-03-29
10+
11+
### ✨ Features
12+
- feat: enhance GistViewer with improved code and markdown rendering (81551e0)
13+
- feat: enhance Gist functionality and navigation (9bd333c)
14+
- feat: enable Partial Prerendering and ISR via cacheComponents (ecf3a6f)
15+
- feat: configure Next.js for standalone output (de04b18)
16+
- feat: enhance HomeLeftSidebar with dynamic tag fetching and user session handling (dde7f7a)
17+
- feat: improve SEO across metadata, sitemaps, and structured data (e8a0f0b)
18+
- feat: integrate WorkOS authentication and update user model to include auth_id (90ab3c6)
19+
- feat: make article title optional and generate unique untitled-{random} fallback (cd33107)
20+
- feat: add LivecodeTag component for interactive code examples and integrate Sandpack support (508a013)
21+
- feat: add gallery image support in ArticleCard and extract image URLs from markdown (eb01f71)
22+
23+
### 🐛 Bug Fixes
24+
- fix: handle edge case for bookmark status retrieval when user is authenticated (40b26f3)
25+
- fix: return bookmarked false for unauthenticated users in bookmarkStatus (6b3068f)
26+
- fix: update link text in ProfileNavigation from "My articles" to "Articles" (7b47c3e)
27+
- fix: limit gallery images to a maximum of 4 in ArticleFeed component (a1db74c)
28+
- fix: update avatar placeholder URL to use initials instead of personas (7cb7210)
29+
- fix: update avatar utility function for consistency (f70e1bb)
30+
31+
### 🔧 Other Changes
32+
- refactor: remove next.config.mjs and update file path handling in opengraph-image.tsx (5be4650)
33+
- chore: update dependencies and improve TypeScript configuration (517e709)
34+
- chore: update next dependency to ^16.1.6 (5051235)
35+
- refactor: update authentication links and streamline logout process in Navbar (56926e9)
36+
- chore: update zod to 3.25.0 and refactor imports to zod/v4 (434d72e)
37+
- refactor: replace AlertDialog with Dialog component (25a5804 / c0f89c0)

migrations/0001_tiny_lilith.sql

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CREATE TABLE "gist_files" (
2+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
3+
"gist_id" uuid NOT NULL,
4+
"filename" varchar NOT NULL,
5+
"content" text NOT NULL,
6+
"language" varchar,
7+
"created_at" timestamp DEFAULT now(),
8+
"updated_at" timestamp DEFAULT now()
9+
);
10+
--> statement-breakpoint
11+
CREATE TABLE "gists" (
12+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
13+
"title" varchar NOT NULL,
14+
"description" text,
15+
"is_public" boolean DEFAULT true,
16+
"owner_id" uuid NOT NULL,
17+
"created_at" timestamp DEFAULT now(),
18+
"updated_at" timestamp DEFAULT now()
19+
);
20+
--> statement-breakpoint
21+
ALTER TABLE "gist_files" ADD CONSTRAINT "gist_files_gist_id_gists_id_fk" FOREIGN KEY ("gist_id") REFERENCES "public"."gists"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
22+
ALTER TABLE "gists" ADD CONSTRAINT "gists_owner_id_users_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;

migrations/meta/0001_snapshot.json

Lines changed: 29 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535
"kv_key_unique": {
3636
"name": "kv_key_unique",
3737
"nullsNotDistinct": false,
38-
"columns": [
39-
"key"
40-
]
38+
"columns": ["key"]
4139
}
4240
},
4341
"policies": {},
@@ -86,25 +84,17 @@
8684
"name": "article_tag_article_id_articles_id_fk",
8785
"tableFrom": "article_tag",
8886
"tableTo": "articles",
89-
"columnsFrom": [
90-
"article_id"
91-
],
92-
"columnsTo": [
93-
"id"
94-
],
87+
"columnsFrom": ["article_id"],
88+
"columnsTo": ["id"],
9589
"onDelete": "cascade",
9690
"onUpdate": "no action"
9791
},
9892
"article_tag_tag_id_tags_id_fk": {
9993
"name": "article_tag_tag_id_tags_id_fk",
10094
"tableFrom": "article_tag",
10195
"tableTo": "tags",
102-
"columnsFrom": [
103-
"tag_id"
104-
],
105-
"columnsTo": [
106-
"id"
107-
],
96+
"columnsFrom": ["tag_id"],
97+
"columnsTo": ["id"],
10898
"onDelete": "cascade",
10999
"onUpdate": "no action"
110100
}
@@ -205,12 +195,8 @@
205195
"name": "articles_author_id_users_id_fk",
206196
"tableFrom": "articles",
207197
"tableTo": "users",
208-
"columnsFrom": [
209-
"author_id"
210-
],
211-
"columnsTo": [
212-
"id"
213-
],
198+
"columnsFrom": ["author_id"],
199+
"columnsTo": ["id"],
214200
"onDelete": "cascade",
215201
"onUpdate": "no action"
216202
}
@@ -269,12 +255,8 @@
269255
"name": "bookmarks_user_id_users_id_fk",
270256
"tableFrom": "bookmarks",
271257
"tableTo": "users",
272-
"columnsFrom": [
273-
"user_id"
274-
],
275-
"columnsTo": [
276-
"id"
277-
],
258+
"columnsFrom": ["user_id"],
259+
"columnsTo": ["id"],
278260
"onDelete": "cascade",
279261
"onUpdate": "no action"
280262
}
@@ -341,12 +323,8 @@
341323
"name": "comments_user_id_users_id_fk",
342324
"tableFrom": "comments",
343325
"tableTo": "users",
344-
"columnsFrom": [
345-
"user_id"
346-
],
347-
"columnsTo": [
348-
"id"
349-
],
326+
"columnsFrom": ["user_id"],
327+
"columnsTo": ["id"],
350328
"onDelete": "cascade",
351329
"onUpdate": "no action"
352330
}
@@ -411,12 +389,8 @@
411389
"name": "reactions_user_id_users_id_fk",
412390
"tableFrom": "reactions",
413391
"tableTo": "users",
414-
"columnsFrom": [
415-
"user_id"
416-
],
417-
"columnsTo": [
418-
"id"
419-
],
392+
"columnsFrom": ["user_id"],
393+
"columnsTo": ["id"],
420394
"onDelete": "cascade",
421395
"onUpdate": "no action"
422396
}
@@ -488,25 +462,17 @@
488462
"name": "series_items_series_id_series_id_fk",
489463
"tableFrom": "series_items",
490464
"tableTo": "series",
491-
"columnsFrom": [
492-
"series_id"
493-
],
494-
"columnsTo": [
495-
"id"
496-
],
465+
"columnsFrom": ["series_id"],
466+
"columnsTo": ["id"],
497467
"onDelete": "cascade",
498468
"onUpdate": "no action"
499469
},
500470
"series_items_article_id_articles_id_fk": {
501471
"name": "series_items_article_id_articles_id_fk",
502472
"tableFrom": "series_items",
503473
"tableTo": "articles",
504-
"columnsFrom": [
505-
"article_id"
506-
],
507-
"columnsTo": [
508-
"id"
509-
],
474+
"columnsFrom": ["article_id"],
475+
"columnsTo": ["id"],
510476
"onDelete": "cascade",
511477
"onUpdate": "no action"
512478
}
@@ -571,12 +537,8 @@
571537
"name": "series_owner_id_users_id_fk",
572538
"tableFrom": "series",
573539
"tableTo": "users",
574-
"columnsFrom": [
575-
"owner_id"
576-
],
577-
"columnsTo": [
578-
"id"
579-
],
540+
"columnsFrom": ["owner_id"],
541+
"columnsTo": ["id"],
580542
"onDelete": "cascade",
581543
"onUpdate": "no action"
582544
}
@@ -685,25 +647,17 @@
685647
"name": "user_follows_follower_id_users_id_fk",
686648
"tableFrom": "user_follows",
687649
"tableTo": "users",
688-
"columnsFrom": [
689-
"follower_id"
690-
],
691-
"columnsTo": [
692-
"id"
693-
],
650+
"columnsFrom": ["follower_id"],
651+
"columnsTo": ["id"],
694652
"onDelete": "cascade",
695653
"onUpdate": "no action"
696654
},
697655
"user_follows_followee_id_users_id_fk": {
698656
"name": "user_follows_followee_id_users_id_fk",
699657
"tableFrom": "user_follows",
700658
"tableTo": "users",
701-
"columnsFrom": [
702-
"followee_id"
703-
],
704-
"columnsTo": [
705-
"id"
706-
],
659+
"columnsFrom": ["followee_id"],
660+
"columnsTo": ["id"],
707661
"onDelete": "cascade",
708662
"onUpdate": "no action"
709663
}
@@ -774,12 +728,8 @@
774728
"name": "user_sessions_user_id_users_id_fk",
775729
"tableFrom": "user_sessions",
776730
"tableTo": "users",
777-
"columnsFrom": [
778-
"user_id"
779-
],
780-
"columnsTo": [
781-
"id"
782-
],
731+
"columnsFrom": ["user_id"],
732+
"columnsTo": ["id"],
783733
"onDelete": "cascade",
784734
"onUpdate": "no action"
785735
}
@@ -838,12 +788,8 @@
838788
"name": "user_socials_user_id_users_id_fk",
839789
"tableFrom": "user_socials",
840790
"tableTo": "users",
841-
"columnsFrom": [
842-
"user_id"
843-
],
844-
"columnsTo": [
845-
"id"
846-
],
791+
"columnsFrom": ["user_id"],
792+
"columnsTo": ["id"],
847793
"onDelete": "cascade",
848794
"onUpdate": "no action"
849795
}
@@ -976,9 +922,7 @@
976922
"users_auth_id_unique": {
977923
"name": "users_auth_id_unique",
978924
"nullsNotDistinct": false,
979-
"columns": [
980-
"auth_id"
981-
]
925+
"columns": ["auth_id"]
982926
}
983927
},
984928
"policies": {},
@@ -997,4 +941,4 @@
997941
"schemas": {},
998942
"tables": {}
999943
}
1000-
}
944+
}

migrations/meta/_journal.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"breakpoints": true
1818
}
1919
]
20-
}
20+
}

0 commit comments

Comments
 (0)