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

remark-cli no longer allows using multiple plugins via the --use parameter #1265

Closed
4 tasks done
Xunnamius opened this issue Nov 29, 2023 · 2 comments
Closed
4 tasks done
Labels
💪 phase/solved Post is done

Comments

@Xunnamius
Copy link
Contributor

Xunnamius commented Nov 29, 2023

Initial checklist

Affected packages and versions

12 (didn't seem to happen with version 11)

Link to runnable example

No response

Steps to reproduce

Using latest Node.js (20.9.0) and npm (10.2.3) via the CLI (no build tools or bundlers).

  1. Navigate to https://stackblitz.com/edit/github-r8bday?file=package.json

  2. Using the above stackblitz environment, the following will succeed (note the bad --use argument):

npx --no-install remark --use remark-gfm --use x README.md

Yet the following will fail:

npx --no-install remark --use x --use remark-gfm README.md

This seems to happen because only the very first appearance of --use is honored, confirmed by:

npx --no-install remark --use remark-remove-url-trailing-slash --use remark-gfm README.md

Which fails to properly parse the GitHub-flavored Markdown; compare that to:

npx --no-install remark --use remark-remove-url-trailing-slash --use remark-gfm README.md

Which fails to remove the trailing slash from the url. Further, debug output only ever says "1 plugin" loaded regardless of how many --use arguments I supply.

Expected behavior

Debug output should indicate that two plugins are being loaded, and the actual output should reflect that both plugins were loaded.

Actual behavior

Debug output indicates that one plugin was loaded regardless of how many --use arguments are provided. remark's actual output confirms that only the very first --use argument is acknowledged.

Runtime

Other (please specify in steps to reproduce)

Package manager

Other (please specify in steps to reproduce)

OS

Linux

Build and bundle tools

Other (please specify in steps to reproduce)


This issue cropped up while upgrading some remark packages: Xunnamius/unified-utils#96 (comment). Specifically, several of my integration tests started failing.

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Nov 29, 2023
@wooorm wooorm added the 💪 phase/solved Post is done label Nov 29, 2023
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Nov 29, 2023
@wooorm
Copy link
Member

wooorm commented Nov 29, 2023

Thanks Bernard! Released!

@Xunnamius
Copy link
Contributor Author

Confirmed it works. Thank you for the speedy resolution, as always :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done
Development

No branches or pull requests

2 participants