Repository navigation
Version Packages - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@graficos/nuxt-comments@0.5.0
Minor Changes
179b8b9: Add a user PII-erasure primitive and erase all personal data on user deletion.
DELETE /api/_comments/users/:userId. It erases the targetuser's comments-domain personal data. Authorization is server-side: the caller
must be the user themself, or a moderator whose Better Auth session role
matches the new server-only
comments.auth.adminRoleoption (default'admin'). The role is read from the server session only — never from therequest — and the check fails closed when no role is configured.
deleteCommentsUser(server-only utility) now erases everything too.replies are hard-deleted, and comments with replies become tombstones with
user_id,author_name,author_imageandbodyall set toNULL—including comments the user had already soft-deleted. No user id, name,
avatar, body or reaction survives.
migrations/0002_user_id_nullable.sqlmakescomments.user_idnullable. Copy the new file (or re-pointmigrations_dir)and re-run
wrangler d1 migrations apply.users/is now reserved alongsidethreads/; a resourceid beginning with
users/is rejected. If you used such a resource id, renameit before upgrading.
the two-step account-deletion recipe, and the consumer's controller duties.
0d663cb: Server-render the comment list; hydrate reactions client-side.
useCommentsnow fetches the top-level page withuseAsyncData, so commentsare present in the SSR HTML and payload instead of rendering client-only.
useCommentskeeps the same public API.content responses.
resource.get/replies.getreturn comments withoutreactionCounts/viewerReactions; the client fetches them in one batchfrom
GET /api/_comments/threads/reactions?ids=...after hydration and mergesthem in. This keeps the SSR payload cacheable and free of viewer state.
useComments' list is safe to use outside<ClientOnly>now.the server fetch is skipped there (
server: !import.meta.prerender); the clientloads the first page after hydration and the prerendered HTML shows the loading
state. Runtime SSR pages still server-render the list.
Also fixes the server session helper:
getUserSessionis imported by name from#importsinstead of a namespace import, which resolved toundefinedin thereal Nitro server build (it worked only in the isolated test mock).
Patch Changes
0d663cb: Hide actions and reactions on deleted comments, and reflect edits in place.
reaction buttons cannot be clicked. Reacting to a deleted comment previously
failed server-side (
not_found) and replaced the whole list with the errorstate. A deleted comment's reply-thread toggle still renders when it has replies.
useComments.updateCommentnow patches the edited comment — top-level or anested reply — in place, so an edit shows immediately without a refetch.