Closed ModyQyW closed 2 months ago
The updates enhance dependency versions, integrate new features for file formatting, and extend testing capabilities. Major improvements include updating package versions in package.json
files across the project and ensuring JSON file formatting consistency using detect-indent
and detect-newline
. These adjustments resolve issues with newline characters in JSON files post-update, streamlining development workflows.
File(s) | Change Summary |
---|---|
package.json |
Updated packageManager and several devDependencies versions. |
packages/core/package.json |
Updated dependencies and added new ones (detect-indent , detect-newline ). |
packages/core/src/context.ts |
Introduced logic for handling JSON file formatting, including indent and newline detection. |
test/files.spec.ts |
Extended imports to include it from 'vitest', enhancing test capabilities. |
sequenceDiagram
participant Editor as Editor
participant PageContext as PageContext
participant detectIndent as detectIndent
participant detectNewline as detectNewline
participant JSON as JSON
Editor->>PageContext: Update pages.json
PageContext->>detectIndent: Detect indent in pages.json
detectIndent-->>PageContext: Return indent
PageContext->>detectNewline: Detect newline in pages.json
detectNewline-->>PageContext: Return newline style
PageContext->>JSON: Stringify with detected indent & newline
JSON-->>PageContext: Formatted JSON string
PageContext->>Editor: Save formatted pages.json
Objective | Addressed | Explanation |
---|---|---|
Ensure pages.json maintains consistent file formatting including newline characters on save (#133) |
✅ |
In the realm of JSON's delight,
Where files gain structure, pure and bright,
Indents detected, newlines aligned,
Our code's now flawless, well-defined.
Withpnpm
andpnpm
anew,
A coder's dreams do come true! ✨🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
LGTM
我打算在两到三天内合并发布这个
Description 描述
Close https://github.com/uni-helper/vite-plugin-uni-pages/issues/133.
Linked Issues 关联的 Issues
https://github.com/uni-helper/vite-plugin-uni-pages/issues/133
Additional context 额外上下文
As a feature, we don't have to rush for it.
I also want to find a way to handle https://github.com/uni-helper/vite-plugin-uni-pages/issues/133#issuecomment-1987318138. I think we can try to detect if
pages.json
ormanifest.json
exists and generate one if not in the constructor in the next PR. What do you think?Summary by CodeRabbit
Chores
packageManager
, dependencies, and devDependencies versions inpackage.json
.detect-indent
anddetect-newline
dependencies inpackages/core/package.json
.New Features
PageContext
class, including indent and newline detection.Tests
it
function import intest/files.spec.ts
.