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

[npm2yarn]: npm init => yarn create #5861

Closed
7 tasks done
christian-bromann opened this issue Nov 3, 2021 · 8 comments · Fixed by #8690
Closed
7 tasks done

[npm2yarn]: npm init => yarn create #5861

christian-bromann opened this issue Nov 3, 2021 · 8 comments · Fixed by #8690
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.

Comments

@christian-bromann
Copy link
Contributor

christian-bromann commented Nov 3, 2021

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

See demo here: https://du0ui.sse.codesandbox.io/docs/intro

If you use @docusaurus/remark-plugin-npm2yarn and your code snippet is set like this:

```sh npm2yarn
npm init wdio ./foo
```

I would expect that it would transform the yarn version to yarn create wdio ./foo.

Steps to reproduce

  1. create a standard docusarus page
  2. add @docusaurus/remark-plugin-npm2yarn plugin
  3. add example as mention above

Expected behavior

I would expect that it would transform the yarn version to yarn create wdio ./foo.

Actual behavior

It displays npm init wdio ./foo and yarn init wdio ./foo which results in the attempt of creating a new yarn package rather than running the create-wdio starter package.

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used:
  • Environment name and version (e.g. Chrome 89, Node.js 16.4):
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS):

Reproducible demo

https://codesandbox.io/s/nice-fire-du0ui?file=/docusaurus.config.js

Self-service

  • I'd be willing to fix this bug myself.
@christian-bromann christian-bromann added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Nov 3, 2021
@Josh-Cena
Copy link
Collaborator

We are aware of this: #5635 (comment)

However, we use a 3rd party dep under the hood which is currently unmaintained. I'm discussing with others about what's the best option. I would prefer forking npm2yarn considering it's quite lightweight.

@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Nov 3, 2021
@Josh-Cena Josh-Cena changed the title [npm2yarn]: npm init vs yarn create [npm2yarn]: npm init => yarn create Nov 3, 2021
christian-bromann added a commit to webdriverio/webdriverio that referenced this issue Nov 8, 2021
@Josh-Cena
Copy link
Collaborator

Just realized this package was developed in the first place to be used by our plugin🤷‍♂️ #2428

In the future we should discourage this and make everything live on our own repo / our org. Saves a lot of trouble of maintenance

@slorber
Copy link
Collaborator

slorber commented Nov 12, 2021

agree 👍

@mrienstra
Copy link

Re: unmaintained 3rd-party dep (nebrelbug/npm-to-yarn): how can this conversation be moved toward a resolution?

A) Move npm-to-yarn code inside of this repo
B) Fork npm-to-yarn and put under https://github.com/facebook organization umbrella
C) Fork npm-to-yarn and owned by...? Random or active contributor?

Sounds like maybe (A) and (B) have both already been rejected as solutions? If so, does anyone have strong feelings about exactly how (C) looks?

CC @endiliey @lex111 @yangshun @JoelMarcey @deltice

@armano2
Copy link
Contributor

armano2 commented Nov 25, 2021

for time being i created fork, with all know issues for this library

@Josh-Cena
Copy link
Collaborator

A) Move npm-to-yarn code inside of this repo
B) Fork npm-to-yarn and put under https://github.com/facebook organization umbrella
C) Fork npm-to-yarn and owned by...? Random or active contributor?

We have discussed this ourselves and indeed (A) and (B) are not in the interest of FB (I personally like (A) the most). @slorber said he would do the forking himself, but since @armano2 offered to take this over, I do think we would take that courtesy. I would see if Sebastien is happy with that, but he'll be occupied with #5830 at the moment.

We already have a lot of forked dependencies owned by Sebastien, so there are precedents.

@armano2
Copy link
Contributor

armano2 commented Nov 25, 2021

i don't mind passing ownership, moving it to him... i just care about fixing issues 😸

@slorber
Copy link
Collaborator

slorber commented Dec 8, 2021

Thanks 👍

Will maintain the fork under my own name (easier to transfer later to a potential docusaurus-core org that I'm asking for) and publish under @docusaurus org (also a security concern).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.
Projects
None yet
5 participants