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

docs: fix typo in script command of typescript-support.mdx #9761

Closed
wants to merge 1 commit into from

Conversation

brightzoe
Copy link

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

Test Plan

This is not a code change,only fix typo.

Test links

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

Related issues/PRs

@facebook-github-bot
Copy link
Contributor

Hi @brightzoe!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Copy link

netlify bot commented Jan 19, 2024

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit b860c2a
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/65aa066d7475f00008637500
😎 Deploy Preview https://deploy-preview-9761--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 configuration.

Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 65 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/installation 🟠 86 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/category/getting-started 🟠 74 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog 🟠 71 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 65 🟢 97 🟢 100 🟢 100 🟠 89 Report
/blog/tags/release 🟠 70 🟢 100 🟢 100 🟠 80 🟠 89 Report
/blog/tags 🟠 76 🟢 100 🟢 100 🟢 90 🟠 89 Report

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jan 19, 2024
@Josh-Cena
Copy link
Collaborator

npm run requires the extra -- to pass extra arguments. Has this changed? This isn't required for Yarn though.

@brightzoe
Copy link
Author

npm run requires the extra -- to pass extra arguments. Has this changed? This isn't required for Yarn though.

Yes, you're right about the behavior of npm run and yarn run; that was my oversight.

But I'm useing pnpm. As for pnpm, after further testing, I can confirm that it behaves like yarn: there's no need for an extra -- to pass additional arguments. Just place the arguments directly after the command.

References: pnpm run docs

image

image

On inspecting the code, I traced the issue back to a third-party package npm-to-yarn.

The specific problem seems to be located in the path https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-remark-plugin-npm2yarn/src/index.ts, related to the npm-to-yarn package.

so the issue is with npm-to-yarn ,not the a typo in docusaurus. This pr should be closed.

@OzakIOne
Copy link
Collaborator

Indeed the old command fails on my end with pnpm and doesn't fail with the new syntax, npm and yarn seems to be working with both syntax

image

@slorber
Copy link
Collaborator

slorber commented Jan 19, 2024

hmmm

I thought this had been fixed in npm-to-yarn by @armano2 a while ago, first in a fork and then in the official repo.

Hasn't this been backported in npm-to-yarn @armano2 ? (#6005)

Or maybe there it has but there is a bug?

Note we are using v2.0, and could try v2.1 to see if it improves.

@armano2
Copy link
Contributor

armano2 commented Feb 9, 2024

this change is present in yarn but has not been added to pnpm, i missed that when i added support for it in nebrelbug/npm-to-yarn#37

npmToYarn.ts, npmToPnpm.ts

@slorber
Copy link
Collaborator

slorber commented Feb 9, 2024

Thanks

I created the npm-to-yarn bug report, let me know if anyone wants to contribute a fix:
nebrelbug/npm-to-yarn#44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants