Conversation
📝 WalkthroughWalkthroughUpdates Yorkie JS SDK dependency to version 0.6.49 across environment variables and package configuration. Adds or exposes FILE_INFO metadata constants of type DirectoryInfo in multiple example projects, describing their directory structures and file contents. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (6)
examples/nextjs-scheduler/fileInfo.ts (1)
2-2: Same leading-indentation issue as flagged inexamples/react-tldraw/fileInfo.ts.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/nextjs-scheduler/fileInfo.ts` at line 2, The exported constant FILE_INFO has unintended leading indentation in its JSON/string value (same problem as react-tldraw); update the definition of FILE_INFO in examples/nextjs-scheduler/fileInfo.ts so the JSON object/string has no extra leading spaces at the start (normalize/trim leading indentation), ensuring the exported symbol FILE_INFO contains correctly-formatted JSON/serializable structure that matches the project convention.examples/vanilla-prosemirror/fileInfo.ts (1)
2-2: Same leading-indentation issue as flagged inexamples/react-tldraw/fileInfo.ts.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/vanilla-prosemirror/fileInfo.ts` at line 2, The exported FILE_INFO constant in examples/vanilla-prosemirror/fileInfo.ts has the same unwanted leading indentation as flagged earlier; remove the extra leading spaces so the file begins with the export at column zero (i.e., change the top of the file to start with export const FILE_INFO: DirectoryInfo = { ... } with no preceding spaces/newline), ensuring the symbol FILE_INFO (and its large JSON payload) is left-aligned and consistent with other examples; update only the indentation/whitespace — do not change the JSON content or the FILE_INFO identifier.examples/vanilla-quill/fileInfo.ts (1)
2-2: Same leading-indentation issue as flagged inexamples/react-tldraw/fileInfo.ts.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/vanilla-quill/fileInfo.ts` at line 2, The FILE_INFO export contains file content strings with unwanted leading indentation (same problem as the react-tldraw example); locate the FILE_INFO constant and strip the common leading whitespace from each file's "content" values (e.g., the long TypeScript strings under children[].children[].content like main.ts, network.ts, utils.ts, etc.) so source files have proper left-aligned code; ensure you only remove the shared leading margin (not internal indentation) and keep the original line breaks and relative indentation within each file.examples/vanilla-document-limit/fileInfo.ts (1)
2-2: Same leading-indentation issue as flagged inexamples/react-tldraw/fileInfo.ts.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/vanilla-document-limit/fileInfo.ts` at line 2, The FILE_INFO export has extra leading indentation that breaks tooling/parsing; update the exported constant FILE_INFO (type DirectoryInfo) so the declaration and its object literal start at column 0 with no extra leading spaces, and ensure the contained file/child entries inside that object are not prefixed by the same unwanted indentation so the JSON-like structure matches other examples (fix the exported FILE_INFO object literal formatting).examples/nextjs-todolist/fileInfo.ts (1)
2-2: Same leading-indentation issue as flagged inexamples/react-tldraw/fileInfo.ts.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/nextjs-todolist/fileInfo.ts` at line 2, The FILE_INFO constant contains file "content" strings with extra/common leading indentation that causes formatting/parse issues; update the FILE_INFO object (the exported FILE_INFO) to strip the common leading indentation from all multi-line "content" values (e.g., entries under children like the component files such as utils.ts, button.tsx, TodoList.tsx) so each file's content starts at column 0 and preserves intended internal indentation; locate and normalize the "content" fields within FILE_INFO to remove the duplicated leading spaces.examples/react-flow/fileInfo.ts (1)
2-2: Same leading-indentation issue as flagged inexamples/react-tldraw/fileInfo.ts.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/react-flow/fileInfo.ts` at line 2, The file has extra leading indentation before the generated export (the exported constant FILE_INFO) causing inconsistent/incorrect leading spaces in the source snapshot; fix by removing the leading indentation so the export line begins at column 0 and ensure the JSON/objects assigned to FILE_INFO are emitted without extra leading spaces (trim any common leading whitespace in the generated multi-line content strings or regenerate the file snapshot without the extra prefix). Locate the symbol FILE_INFO in the diff and update the generator/output so the top-level "export const FILE_INFO" and the contained file content strings have no unintended leading indentation.
🧹 Nitpick comments (2)
examples/react-tldraw/fileInfo.ts (1)
2-2: Spurious 8-space indentation on top-levelexport(applies to allfileInfo.tsfiles in this PR).Line 2 begins with 8 leading spaces before
export const FILE_INFO, which is a top-level module declaration and should have no indentation. The same issue is present in everyfileInfo.tsfile changed in this PR (examples/nextjs-todolist/fileInfo.ts,examples/nextjs-scheduler/fileInfo.ts,examples/react-flow/fileInfo.ts,examples/vanilla-quill/fileInfo.ts,examples/vanilla-prosemirror/fileInfo.ts,examples/vanilla-document-limit/fileInfo.ts).Since these files are auto-generated by the fetch-examples script pulling from the
yorkie-js-sdkrepo, the fix belongs in the upstream generator rather than these files directly.As per coding guidelines, Prettier is configured with 2-space indentation; top-level declarations should carry no leading whitespace.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/react-tldraw/fileInfo.ts` at line 2, The top-level export in fileInfo.ts is indented (leading 8 spaces) — remove the leading whitespace so the module-level declaration starts at column 0 (e.g., change "export const FILE_INFO" to have no leading spaces) in every generated examples/*/fileInfo.ts (reference symbol: export const FILE_INFO); fix the upstream fetch-examples generator that produces these files so it emits top-level declarations with no indentation and run Prettier (2-space config) on generated output to enforce formatting before committing.examples/profile-stack/fileInfo.ts (1)
2-2: Spurious leading whitespace on theexportline.Line 2 has 8 spaces of indentation before
export const FILE_INFO, but this is a top-level export. This appears consistently across allfileInfo.tsfiles in this PR, so it's likely a generation artifact. Consider trimming it in the generator if feasible.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/profile-stack/fileInfo.ts` at line 2, The FILE_INFO top-level export in fileInfo.ts is indented with spurious leading spaces; remove the leading whitespace so the "export const FILE_INFO" line (and any other top-level exported declarations in this file) starts at column 0, and update the generator/template that produces fileInfo.ts to emit top-level exports without indentation to prevent this recurring artifact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/react-document-limit/fileInfo.ts`:
- Line 2: The FILE_INFO export is a minified single-line object that breaks the
repo TS formatting rules; update the export named FILE_INFO (typed as
DirectoryInfo) in fileInfo.ts to be pretty-printed with Prettier-style
formatting: 2-space indentation, wrapped lines, single quotes, trailing commas
where valid, and 120-char line length, preserving the existing type annotation
and object structure (isFile, name, path, children, etc.) so the value is
identical but formatted across multiple lines.
---
Duplicate comments:
In `@examples/nextjs-scheduler/fileInfo.ts`:
- Line 2: The exported constant FILE_INFO has unintended leading indentation in
its JSON/string value (same problem as react-tldraw); update the definition of
FILE_INFO in examples/nextjs-scheduler/fileInfo.ts so the JSON object/string has
no extra leading spaces at the start (normalize/trim leading indentation),
ensuring the exported symbol FILE_INFO contains correctly-formatted
JSON/serializable structure that matches the project convention.
In `@examples/nextjs-todolist/fileInfo.ts`:
- Line 2: The FILE_INFO constant contains file "content" strings with
extra/common leading indentation that causes formatting/parse issues; update the
FILE_INFO object (the exported FILE_INFO) to strip the common leading
indentation from all multi-line "content" values (e.g., entries under children
like the component files such as utils.ts, button.tsx, TodoList.tsx) so each
file's content starts at column 0 and preserves intended internal indentation;
locate and normalize the "content" fields within FILE_INFO to remove the
duplicated leading spaces.
In `@examples/react-flow/fileInfo.ts`:
- Line 2: The file has extra leading indentation before the generated export
(the exported constant FILE_INFO) causing inconsistent/incorrect leading spaces
in the source snapshot; fix by removing the leading indentation so the export
line begins at column 0 and ensure the JSON/objects assigned to FILE_INFO are
emitted without extra leading spaces (trim any common leading whitespace in the
generated multi-line content strings or regenerate the file snapshot without the
extra prefix). Locate the symbol FILE_INFO in the diff and update the
generator/output so the top-level "export const FILE_INFO" and the contained
file content strings have no unintended leading indentation.
In `@examples/vanilla-document-limit/fileInfo.ts`:
- Line 2: The FILE_INFO export has extra leading indentation that breaks
tooling/parsing; update the exported constant FILE_INFO (type DirectoryInfo) so
the declaration and its object literal start at column 0 with no extra leading
spaces, and ensure the contained file/child entries inside that object are not
prefixed by the same unwanted indentation so the JSON-like structure matches
other examples (fix the exported FILE_INFO object literal formatting).
In `@examples/vanilla-prosemirror/fileInfo.ts`:
- Line 2: The exported FILE_INFO constant in
examples/vanilla-prosemirror/fileInfo.ts has the same unwanted leading
indentation as flagged earlier; remove the extra leading spaces so the file
begins with the export at column zero (i.e., change the top of the file to start
with export const FILE_INFO: DirectoryInfo = { ... } with no preceding
spaces/newline), ensuring the symbol FILE_INFO (and its large JSON payload) is
left-aligned and consistent with other examples; update only the
indentation/whitespace — do not change the JSON content or the FILE_INFO
identifier.
In `@examples/vanilla-quill/fileInfo.ts`:
- Line 2: The FILE_INFO export contains file content strings with unwanted
leading indentation (same problem as the react-tldraw example); locate the
FILE_INFO constant and strip the common leading whitespace from each file's
"content" values (e.g., the long TypeScript strings under
children[].children[].content like main.ts, network.ts, utils.ts, etc.) so
source files have proper left-aligned code; ensure you only remove the shared
leading margin (not internal indentation) and keep the original line breaks and
relative indentation within each file.
---
Nitpick comments:
In `@examples/profile-stack/fileInfo.ts`:
- Line 2: The FILE_INFO top-level export in fileInfo.ts is indented with
spurious leading spaces; remove the leading whitespace so the "export const
FILE_INFO" line (and any other top-level exported declarations in this file)
starts at column 0, and update the generator/template that produces fileInfo.ts
to emit top-level exports without indentation to prevent this recurring
artifact.
In `@examples/react-tldraw/fileInfo.ts`:
- Line 2: The top-level export in fileInfo.ts is indented (leading 8 spaces) —
remove the leading whitespace so the module-level declaration starts at column 0
(e.g., change "export const FILE_INFO" to have no leading spaces) in every
generated examples/*/fileInfo.ts (reference symbol: export const FILE_INFO); fix
the upstream fetch-examples generator that produces these files so it emits
top-level declarations with no indentation and run Prettier (2-space config) on
generated output to enforce formatting before committing.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (18)
.envexamples/nextjs-presence/fileInfo.tsexamples/nextjs-scheduler/fileInfo.tsexamples/nextjs-todolist/fileInfo.tsexamples/profile-stack/fileInfo.tsexamples/react-document-limit/fileInfo.tsexamples/react-flow/fileInfo.tsexamples/react-presence/fileInfo.tsexamples/react-revision/fileInfo.tsexamples/react-tldraw/fileInfo.tsexamples/react-todomvc/fileInfo.tsexamples/simultaneous-cursors/fileInfo.tsexamples/vanilla-codemirror6/fileInfo.tsexamples/vanilla-document-limit/fileInfo.tsexamples/vanilla-prosemirror/fileInfo.tsexamples/vanilla-quill/fileInfo.tsexamples/vuejs-kanban/fileInfo.tspackage.json
hackerwins
left a comment
There was a problem hiding this comment.
Thanks for your contribution.
What this PR does / why we need it?
Bump up Yorkie to v0.6.49
Any background context you want to provide?
What are the relevant tickets?
Fixes #
Checklist
Summary by CodeRabbit