docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

fix(npm2yarn): use forked npm-to-yarn; fix a few conversion bugs

Open armano2 opened this issue 3 years ago β€’ 9 comments

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:

  • https://typescript-eslint.io/docs/linting/troubleshooting#how-do-i-check-to-see-what-versions-are-installed
  • https://www.electronjs.org/docs/latest/tutorial/quick-start#create-your-application

fixes #5861

Note

There is pr for original package at https://github.com/nebrelbug/npm-to-yarn/pull/22

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

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

armano2 avatar Nov 25 '21 02:11 armano2

[V2]

Built without sensitive environment variables

Name Link
Latest commit 342e043cd3a34714b4998c7bb1cc68b30627906b
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.

netlify[bot] avatar Nov 25 '21 03:11 netlify[bot]

⚑️ 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

github-actions[bot] avatar Nov 25 '21 03:11 github-actions[bot]

do we have any updates?

armano2 avatar Apr 24 '22 00:04 armano2

@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).

Josh-Cena avatar Apr 24 '22 02:04 Josh-Cena

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

slorber avatar Apr 27 '22 10:04 slorber

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.

bradzacher avatar May 05 '22 06:05 bradzacher

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.

Josh-Cena avatar May 05 '22 08:05 Josh-Cena

@armano2 Could you rebase first?

rebased

armano2 avatar May 07 '22 20:05 armano2

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

Josh-Cena avatar May 08 '22 05:05 Josh-Cena

suppressed by #8650

armano2 avatar Feb 19 '23 13:02 armano2