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

pnpm conversion should remove extra -- used to pass npm args #44

Closed
slorber opened this issue Feb 9, 2024 · 1 comment · Fixed by #45
Closed

pnpm conversion should remove extra -- used to pass npm args #44

slorber opened this issue Feb 9, 2024 · 1 comment · Fixed by #45

Comments

@slorber
Copy link
Collaborator

slorber commented Feb 9, 2024

Describe the bug

Related issue: facebook/docusaurus#9761

npm run swizzle @docusaurus/theme-classic Footer -- --typescript

This is a valid npm command, although afaik -- isn't required by the newest npm versions, older ones still require it.

Unfortunately, the extra -- is not supported by yarn and pnpm

The yarn conversion already removes the extra -- but not the pnpm one:

CleanShot 2024-02-09 at 23 50 47@2x

CleanShot 2024-02-09 at 23 51 10@2x

CleanShot 2024-02-09 at 23 51 22@2x

To Reproduce

On any docusaurus v3.1.1 (latest version) site:

```bash npm2yarn
npm run swizzle @docusaurus/theme-classic Footer -- --typescript
```

Expected behavior

Convert to:

pnpm run swizzle @docusaurus/theme-classic Footer --typescript

Instead of:

pnpm run swizzle @docusaurus/theme-classic Footer -- --typescript

Package & Environment Details

  • Environment: macOS, Node 18, npm 10
@slorber slorber changed the title Conversion to pnpm does not remove the extra -- used to pass extra arguments pnpm conversion should remove extra -- used to pass npm args Feb 9, 2024
@nebrelbug
Copy link
Owner

Just fixed in npm-to-yarn@2.2.0.

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

Successfully merging a pull request may close this issue.

2 participants