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(npm2yarn): use forked npm-to-yarn; fix a few conversion bugs #6005

Closed
wants to merge 7 commits into from

Conversation

armano2
Copy link
Contributor

@armano2 armano2 commented Nov 25, 2021

Motivation

I decided to fork npm-to-yarn package and add support for missing commands,

  • yarn create name -> npm init name and yarn init name -> npm create name
  • npm run x -- --args -> yarn x --args or yarn run x --args
  • npm ls abc bcd -> yarn list --pattern "abc|bcd"
  • npm test/start/stop -> yarn test/start/stop

see:

fixes #5861

Note

There is pr for original package at nebrelbug/npm-to-yarn#22

i did more small fixes at https://github.com/armano2/npm-to-yarn/commits/main, mainly armano2/npm-to-yarn@2b91983

Test plans

https://deploy-preview-6005--docusaurus-2.netlify.app/docs/next/i18n/tutorial
https://deploy-preview-6005--docusaurus-2.netlify.app/docs/i18n/crowdin
https://deploy-preview-6005--docusaurus-2.netlify.app/docs/i18n/git/#initialize-the-i18n-folder

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 25, 2021
@netlify
Copy link

netlify bot commented Nov 25, 2021

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 342e043
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6276d21cf49edf00088e1180
😎 Deploy Preview https://deploy-preview-6005--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 Nov 25, 2021

⚡️ Lighthouse report for the deploy preview of this PR

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

@Josh-Cena Josh-Cena added the pr: bug fix This PR fixes a bug in a past release. label Nov 25, 2021
@Josh-Cena Josh-Cena changed the title deps: update npm-to-yarn to fork fix(npm2yarn): use forked npm-to-yarn; fix a few conversion bugs Nov 25, 2021
README.md Outdated Show resolved Hide resolved
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

Thanks for these useful contributions 💯

FYI I'll more likely merge it as part of my own fork (as we'll likely move it to a docusaurus-core org someday) and publish it under @docusaurus npm org.

Will do that soon, for now I'm focusing on category indexes

@armano2
Copy link
Contributor Author

armano2 commented Apr 24, 2022

do we have any updates?

@Josh-Cena
Copy link
Collaborator

Josh-Cena commented Apr 24, 2022

@armano2 Could you rebase first? We are in a pretty awkward situation right now because the @Docusaurus organization is there but neither @slorber nor I have member access to it. Maybe we need to wait a bit more. No idea what FB politics is going on, but accepting forked code into our repo is very complicated as well (unlike two years ago).

@slorber
Copy link
Collaborator

slorber commented Apr 27, 2022

I don't forget, but waiting for @zpao to give me member access.

Will figure out if we should take temporary actions immediately (ie use a fork) until the org is set up properly

@bradzacher
Copy link

Is this something that we could just rewrite internally rather than forking externally?

If @armano2 has ideas for how the package can be rewritten entirely - it would save having to go through any hoops at all and could just be integrated into the plugin directly.

@Josh-Cena
Copy link
Collaborator

Josh-Cena commented May 5, 2022

I don't know what's all the business around it, but I think we basically can't do anything meaningful about it😅

  1. We can't copy the code to our own repo (although we used to do that a lot)
  2. We can fork the package under @slorber's account but he'd rather not at this stage

@bradzacher If TS-ESLint is open to forking the npm2yarn remark plugin, I can help facilitate that.

@armano2
Copy link
Contributor Author

armano2 commented May 7, 2022

@armano2 Could you rebase first?

rebased

@Josh-Cena
Copy link
Collaborator

Thanks @armano2 Sorry for stalling this PR longer than it should have😞 Not in my will

@armano2
Copy link
Contributor Author

armano2 commented Feb 19, 2023

suppressed by #8650

@armano2 armano2 closed this Feb 19, 2023
@armano2 armano2 deleted the npm-to-yarn branch February 19, 2023 13:39
@@ -35,7 +35,7 @@ The command also installs all necessary dependencies you need to run Docusaurus.

Run the development server:

```bash
```bash npm2yarn
Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe we should mvoe this change to #8650

@@ -23,7 +23,7 @@ Generate a new Docusaurus site using the **classic template**.

The classic template will automatically be added to your project after you run the command:

```bash
```bash npm2yarn
Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe we should mvoe this change to #8650

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.

[npm2yarn]: npm init => yarn create
5 participants