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

fix(cli): output correct path when swizzling bare-file component in subfolder #7369

Merged
merged 2 commits into from
May 8, 2022

Conversation

Josh-Cena
Copy link
Collaborator

@Josh-Cena Josh-Cena commented May 8, 2022

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Currently, when running yarn swizzle @docusaurus/theme-classic NavbarItem/DropdownNavbarItem --eject --danger, it outputs src/theme/DropdownNavbarItem.js without the NavbarItem folder. This PR fixes it.

Test Plan

Added a test case

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

@Josh-Cena Josh-Cena added the pr: bug fix This PR fixes a bug in a past release. label May 8, 2022
@Josh-Cena Josh-Cena requested review from slorber and lex111 as code owners May 8, 2022 04:56
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label May 8, 2022
@Josh-Cena Josh-Cena changed the title fix(cli): output correct path when swizzling bare-file component in s… fix(cli): output correct path when swizzling bare-file component in subfolder May 8, 2022
@netlify
Copy link

netlify bot commented May 8, 2022

[V2]

Name Link
🔨 Latest commit 8627d9e
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62774d86fbfabf00087dbc28
😎 Deploy Preview https://deploy-preview-7369--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented May 8, 2022

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🔴 47 🟢 100 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 89 🟢 99 🟢 100 🟢 100 🟢 90 Report

@@ -162,14 +162,14 @@ exports[`swizzle eject ComponentInFolder/ComponentInSubFolder TS: theme dir tree
└── styles.module.css"
`;

exports[`swizzle eject ComponentInFolder/Sibling JS: Sibling.css 1`] = `
exports[`swizzle eject ComponentInFolder/Sibling JS: ComponentInFolder/Sibling.css 1`] = `
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dang, we had incorrect snapshots previously...

@netlify
Copy link

netlify bot commented May 8, 2022

[V2]

Name Link
🔨 Latest commit 98c6f9c
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62774e4930dd7e00086be5f6
😎 Deploy Preview https://deploy-preview-7369--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented May 8, 2022

[V2]

Name Link
🔨 Latest commit 462cd24
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62774f9d39eaf300097e5ff2
😎 Deploy Preview https://deploy-preview-7369--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented May 8, 2022

Size Change: 0 B

Total Size: 811 kB

ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 52.3 kB
website/build/assets/css/styles.********.css 105 kB
website/build/assets/js/main.********.js 615 kB
website/build/index.html 38.8 kB

compressed-size-action

@Josh-Cena Josh-Cena merged commit 87c7639 into main May 8, 2022
@Josh-Cena Josh-Cena deleted the jc/fix-swizzle branch May 8, 2022 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants