Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: a huge update #25

Merged
merged 11 commits into from
May 5, 2024
Merged

refactor: a huge update #25

merged 11 commits into from
May 5, 2024

Conversation

ModyQyW
Copy link
Member

@ModyQyW ModyQyW commented Apr 30, 2024

Description 描述

这个 PR 相当大,做了以下的工作:

  1. 更新了依赖,包括包依赖和 playground 依赖
  2. 调整了项目结构,现在是一个 monorepo
  3. 增加了一个包 @uni-helper/manifest-json-schema,该包将用于 uni-app-schema-vscode
  4. 修复了类型定义,现在 manifest 相关类型定义都已经被更新

Linked Issues 关联的 Issues

uni-helper/uni-app-schemas-vscode#20

Additional context 额外上下文

我不认为存在对外的破坏性更新,但存在对内的破坏性更新,该 PR 仍然需要仔细审查。

Summary by CodeRabbit

  • New Features

    • Introduced a Vite plugin for file system-based routing in uni-app applications.
    • Added new configuration interfaces for various mini programs and H5 applications.
    • Updated app configuration settings in manifest.json for the "uni-helper" Uni-app.
    • Added a JSON schema for pages.json in uni-app.
  • Enhancements

    • Updated package manager to [email protected].
    • Enhanced ESLint and Prettier settings for better code styling and validation.
    • Upgraded dependencies and devDependencies for improved performance and security.
  • Documentation

    • Added READMEs detailing new plugins and JSON schemas for uni-app.
  • Bug Fixes

    • Removed manifest.json from .gitignore to ensure it is tracked and updated.
  • Chores

    • Modified pnpm-workspace.yaml to include all packages in the packages directory.
    • Updated Node.js version to 20 in .nvmrc.

@ModyQyW ModyQyW requested review from KeJunMao and nei1ee April 30, 2024 04:10
Copy link

coderabbitai bot commented Apr 30, 2024

Walkthrough

The updates in this set aim to enhance tooling and dependency management across the project. Changes include upgrading GitHub actions, adjusting ignored files, updating dependencies, improving ESLint and Prettier settings, introducing new configuration files, and adding configurations and types across various packages. These updates collectively streamline development processes and ensure compatibility with the latest tools and libraries.

Changes

Files Summary of Changes
.github/workflows/release.yml Updated versions of GitHub actions and modified pnpm publish command.
.gitignore, pnpm-workspace.yaml Adjusted ignored files and package configurations.
.nvmrc, package.json Updated Node.js and pnpm versions, removed and updated dependencies.
.vscode/settings.json Enhanced ESLint and Prettier settings for improved code quality.
bump.config.ts, tsconfig.json Introduced new configuration files for version bumping and TypeScript paths.
packages/.../package.json Various updates in dependencies and scripts across multiple package.json files.
packages/core/..., packages/schema/... Added new configurations, types, and READMEs for different aspects of the project.

Possibly related issues

Poem

🐇💻
In the burrow of code, under moon's glow,
A rabbit tinkers, with lines in a row.
Bugs flee, features align, under starlit decree,
With each commit and push, a brighter path we see.
Hop, hop, hurray! On this coding spree! 🌟📦


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 1e1c294 and 51a4a2a.
Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !pnpm-lock.yaml
Files selected for processing (7)
  • package.json (2 hunks)
  • packages/core/package.json (1 hunks)
  • packages/core/src/config/types/appPlus.ts (1 hunks)
  • packages/core/src/config/types/mpQq.ts (1 hunks)
  • packages/core/src/config/types/mpWeixin.ts (1 hunks)
  • packages/core/src/config/types/quickappWebview.ts (1 hunks)
  • packages/playground/package.json (2 hunks)
Files not summarized due to errors (1)
  • packages/core/src/config/types/appPlus.ts: Error: Message exceeds token limit
Files skipped from review as they are similar to previous changes (6)
  • package.json
  • packages/core/package.json
  • packages/core/src/config/types/mpQq.ts
  • packages/core/src/config/types/mpWeixin.ts
  • packages/core/src/config/types/quickappWebview.ts
  • packages/playground/package.json
Additional comments not posted (9)
packages/core/src/config/types/appPlus.ts (9)

76-76: Provide guidance on what to use instead of the deprecated event property or why it's deprecated.


85-85: Clarify the replacement or rationale for the deprecated target property to assist developers in transitioning away from it.


92-92: Explain the reason for deprecating the delay property or provide a replacement strategy to guide developers.


368-368: Provide alternatives or reasons for the deprecation of the jsEngine property to guide developers in choosing or migrating to other options.


486-486: Provide guidance on what to use instead of the deprecated frameworks property or why it's deprecated.


589-589: Consider making CFBundleName a required configuration without a default or clearly document how to change it.


1461-1475: Update the codebase to use the new screenOrientation property instead of the deprecated orientation property to avoid future compatibility issues.


1542-1550: Ensure that 'app-plus.runmode' is set to 'liberate' when using sub-packages.


1660-1660: Consider changing the default value of checkPermissionDenied to true to respect user choices and improve the user experience.


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

Out of diff range and nitpick comments (10)
packages/core/src/config/types/mpKuaishou.ts (1)

3-29: Ensure consistent documentation and interface structure.

  • Consider adding a description for the MpKuaishou interface itself to provide context.
  • The property appid could use a more detailed comment, especially about its optional nature and where one might find this appid.
  • For the optimization object, consider specifying what types of optimizations are possible or expected.
  • The scopedSlotsCompiler property's comment is clear, but ensure that the versions mentioned are accurate and supported.
.github/workflows/release.yml (1)

Line range hint 12-38: Review and optimize the GitHub Actions workflow.

  • The fetch-depth: 0 in the checkout step retrieves the entire commit history, which might not be necessary and could slow down the workflow. Consider using a limited fetch depth if the full history is not required.
  • The pnpm -r publish command includes --no-git-checks. Ensure that this is intentional and understand the implications, as it bypasses checks that might prevent publishing errors.
packages/core/src/config/types/mpBaidu.ts (1)

3-39: Ensure consistent documentation and interface structure for MpBaidu.

  • Similar to MpKuaishou, add a description for the MpBaidu interface to provide context.
  • The requiredBackgroundModes property is well-documented. Ensure that the array type is correctly used and that the possible values are validated.
  • Review the scopedSlotsCompiler and slotMultipleInstance properties for accuracy in version support and functionality description.
packages/core/src/config/types/mpLark.ts (1)

3-52: Ensure consistent documentation and interface structure for MpLark.

  • Add a description for the MpLark interface to provide context.
  • The setting object includes several properties like es6, minified, and postcss. Ensure that these properties are clearly explained and that their default values are accurately represented.
  • Review the scopedSlotsCompiler and slotMultipleInstance properties for accuracy in version support and functionality description.
packages/core/src/config/types/mpToutiao.ts (1)

3-61: Ensure consistent documentation and interface structure for MpToutiao.

  • Add a description for the MpToutiao interface to provide context.
  • The setting object includes several properties like es6, urlCheck, and postcss. Ensure that these properties are clearly explained and that their default values are accurately represented.
  • Review the scopedSlotsCompiler and slotMultipleInstance properties for accuracy in version support and functionality description.
packages/core/src/config/types/appPlus.ts (5)

18-18: Consider providing more context or examples in the documentation for ignoreVersion. It's unclear what "running environment" and "compiling environment" refer to.


23-23: The runtimeVersion property should specify the format expected for version strings, especially since multiple versions can be specified.


38-38: The compilerVersion property should clarify what the numbers 2 and 3 signify. Are these version numbers, and if so, what do they correspond to?


1564-1564: The runmode property offers 'normal' and 'liberate' as options, which can significantly affect how resources are managed. Document the implications of each mode thoroughly to aid developers in making an informed choice.


1610-1610: The x5.showTipsWithoutWifi property is set to false by default, which could affect user experience on mobile data. Consider the implications of this setting and possibly offer a configuration option to the user.

packages/core/src/config/types/mpQq.ts Outdated Show resolved Hide resolved
packages/core/src/config/types/mpQq.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
packages/core/README.md Outdated Show resolved Hide resolved
packages/core/README.md Outdated Show resolved Hide resolved
packages/core/src/config/types/appPlus.ts Show resolved Hide resolved
packages/core/src/config/types/appPlus.ts Show resolved Hide resolved
packages/core/src/config/types/appPlus.ts Show resolved Hide resolved
packages/core/src/config/types/appPlus.ts Show resolved Hide resolved
packages/core/src/config/types/appPlus.ts Outdated Show resolved Hide resolved
@ModyQyW
Copy link
Member Author

ModyQyW commented Apr 30, 2024

@coderabbitai review

@nei1ee
Copy link
Member

nei1ee commented Apr 30, 2024

牛牛牛,明天看一看

@ModyQyW
Copy link
Member Author

ModyQyW commented May 2, 2024

如果没有进一步的评论,我可能会在两天内合并 🙏

packages/core/src/config/types/mpWeixin.ts Show resolved Hide resolved
packages/core/src/config/types/appPlus.ts Outdated Show resolved Hide resolved
packages/core/src/config/types/appPlus.ts Outdated Show resolved Hide resolved
@ModyQyW ModyQyW merged commit bf82929 into main May 5, 2024
@ModyQyW ModyQyW deleted the refactor branch May 5, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants