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

change(docs): use pnpm workspaces #157

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

enzonotario
Copy link
Owner

No description provided.

Copy link

vercel bot commented Jan 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vitepress-openapi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 20, 2025 2:09pm

Copy link
Contributor

coderabbitai bot commented Jan 20, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • main
  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This pull request involves a series of configuration and styling updates across multiple files in the documentation project. The changes primarily focus on VitePress configuration, adding Tailwind CSS support, updating import statements, and reorganizing project structure. Key modifications include removing the vite property from the configuration, adding CSS imports, introducing Tailwind CSS directives, and updating package dependencies and workspace settings.

Changes

File Change Summary
docs/.vitepress/config.mts Removed resolve import, updated defineConfigWithTheme import, removed vite property
docs/.vitepress/theme/components/sandbox/* Re-added useData import, added SandboxData type import in various components
docs/.vitepress/theme/index.ts Added CSS imports from vitepress-openapi and local stylesheet
docs/.vitepress/theme/style.css Added Tailwind CSS directives
docs/package.json New package configuration with dependencies and scripts
docs/pages.ts Updated file paths for specification files
docs/tailwind.config.js New Tailwind CSS configuration with custom colors and animations
package.json Added type declarations for exports, updated development scripts
pnpm-workspace.yaml Added docs package to workspace
tailwind.config.js Removed specific content paths for Tailwind CSS processing

Possibly related PRs


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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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

pkg-pr-new bot commented Jan 20, 2025

Open in Stackblitz

npm i https://pkg.pr.new/vitepress-openapi@157

commit: 60e5af4

@enzonotario
Copy link
Owner Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Jan 20, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@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: 4

🔭 Outside diff range comments (1)
docs/.vitepress/theme/components/sandbox/Sandbox.vue (1)

Line range hint 18-18: Consider memoizing the useData values.

For better performance, consider memoizing the destructured values from useData().

-const { isDark, hash } = useData()
+import { computed } from 'vue'
+const data = useData()
+const isDark = computed(() => data.isDark.value)
+const hash = computed(() => data.hash.value)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6d884c3 and 17735dc.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • docs/.vitepress/config.mts (1 hunks)
  • docs/.vitepress/theme/components/sandbox/Sandbox.vue (1 hunks)
  • docs/.vitepress/theme/components/sandbox/SandboxEditor.vue (1 hunks)
  • docs/.vitepress/theme/components/sandbox/SandboxPreview.vue (1 hunks)
  • docs/.vitepress/theme/components/sandbox/SandboxPreviewSidebar.vue (1 hunks)
  • docs/.vitepress/theme/components/vitepress/VPDocAsideOutline.vue (1 hunks)
  • docs/.vitepress/theme/components/vitepress/VPSwitchAppearance.vue (1 hunks)
  • docs/.vitepress/theme/index.ts (1 hunks)
  • docs/.vitepress/theme/style.css (1 hunks)
  • docs/package.json (1 hunks)
  • docs/pages.ts (1 hunks)
  • docs/tailwind.config.js (1 hunks)
  • package.json (2 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • tailwind.config.js (0 hunks)
💤 Files with no reviewable changes (1)
  • tailwind.config.js
🔇 Additional comments (15)
docs/.vitepress/theme/components/vitepress/VPDocAsideOutline.vue (1)

10-10: LGTM! Type safety improvement

The addition of explicit type import for SandboxData enhances type safety and code maintainability.

docs/.vitepress/theme/components/sandbox/SandboxEditor.vue (1)

5-5: LGTM! Type safety improvement

The addition of explicit type import for SandboxData enhances type safety and code maintainability.

pnpm-workspace.yaml (1)

1-2: LGTM! Workspace configuration is correctly set up.

The PNPM workspace configuration properly includes the docs directory as a workspace package.

docs/.vitepress/config.mts (1)

1-2: Verify path resolution after removing vite config.

The removal of the vite property and resolve import might affect path resolution. Please ensure that all paths are still correctly resolved in the project.

✅ Verification successful

Path resolution remains intact after config changes

The removal of the vite property and resolve import is safe. The codebase uses Node.js's native path resolution for build configuration, and no Vite-specific path resolutions were found that would be affected by this change.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any hardcoded paths in the codebase that might have relied on vite's path resolution
rg -g '!{node_modules,dist}' -l "(?:\.\.\/|\.\/)[^'\"]+" --type ts --type vue

Length of output: 176


Script:

#!/bin/bash
# Search for relative path imports and file references
echo "=== Checking relative paths in imports and requires ==="
rg -g '!{node_modules,dist}' "from ['\"]\.\.?/" --type ts --type vue

echo -e "\n=== Checking VitePress config files for path configurations ==="
fd -e ts -e mts "config" --exec cat {} \; | rg "(?:resolve|path|root|base|public)"

echo -e "\n=== Checking for Node.js path operations ==="
rg -g '!{node_modules,dist}' "path\.(resolve|join)" --type ts

Length of output: 758

docs/tailwind.config.js (2)

9-12: LGTM! Content paths are correctly configured.

The content paths are properly set up to scan Vue components and Markdown files for Tailwind classes.


15-50: Well-structured color system integration with VitePress.

The color configuration effectively bridges Tailwind with VitePress's CSS variables, ensuring consistent theming across the application.

docs/.vitepress/theme/components/sandbox/Sandbox.vue (1)

6-6: LGTM! Correctly reintroduced VitePress useData.

The reintroduction of useData from VitePress is the proper way to access theme and hash data.

docs/.vitepress/theme/style.css (1)

1-3: LGTM! Tailwind CSS directives are properly configured.

The three essential Tailwind CSS layers are correctly imported in the proper order.

docs/.vitepress/theme/index.ts (1)

6-7: LGTM! CSS imports are properly ordered.

External package styles are imported before local styles, following best practices.

docs/.vitepress/theme/components/vitepress/VPSwitchAppearance.vue (1)

4-4: LGTM! VPSwitch component import is properly restored.

The import statement correctly references the required component that is used in the template.

docs/pages.ts (1)

4-24: LGTM! File paths are consistently updated.

The paths have been properly standardized to use the ./public/ directory, following VitePress conventions.

package.json (3)

20-20: LGTM: Type declarations properly configured.

The addition of type declarations for both main and client modules improves TypeScript support.

Also applies to: 25-25


45-46: LGTM: Scripts updated for pnpm workspace structure.

The scripts have been correctly modified to work with the new workspace structure:

  • dev script now runs from the docs directory
  • docs:build properly chains the build steps

Line range hint 53-95: Verify dependency versions for potential updates and security issues.

Several dependencies have specific versions that might need verification for:

  • Latest stable versions
  • Security vulnerabilities
  • Compatibility with the project
docs/.vitepress/theme/components/sandbox/SandboxPreview.vue (1)

4-5: LGTM: VitePress imports properly configured.

The imports for useData and getHeaders are correctly specified from their respective modules.

@enzonotario enzonotario force-pushed the feature/pnpm-workspaces branch from f5b731d to 60e5af4 Compare January 20, 2025 14:08
@enzonotario enzonotario merged commit 1230a27 into feature/client-node-entries Jan 20, 2025
6 checks passed
enzonotario added a commit that referenced this pull request Jan 20, 2025
@enzonotario enzonotario deleted the feature/pnpm-workspaces branch January 23, 2025 13:59
@coderabbitai coderabbitai bot mentioned this pull request Jan 28, 2025
@coderabbitai coderabbitai bot mentioned this pull request Feb 16, 2025
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.

1 participant