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

API Broken Semver Not Respected #19

Closed
ALMaclaine opened this issue Apr 24, 2020 · 8 comments
Closed

API Broken Semver Not Respected #19

ALMaclaine opened this issue Apr 24, 2020 · 8 comments

Comments

@ALMaclaine
Copy link
Owner

If you came here to report this:

Yes, I know, I'm sorry.

There was a security vulnerability in yarg. Replace was updated. The API Broke. It was reverted.

But I've chosen security over the 1 test the api breaks for (single quotes in replacement string on command line).

That's not an excuse to break semver, but it's going to require a re-write to fix, something I can't do right away, and I don't want to bump a new version over something that should be patchable.

Please report any other breaking issues so I can mull over how to resolve the problem.

@ljharb
Copy link

ljharb commented Feb 2, 2021

Which version did this breakage occur in?

Updating replace from v0.x to v1 latest is breaking my one command-line usage of it: https://github.com/nvm-sh/nvm/pull/2428/checks?check_run_id=1810967042 https://github.com/nvm-sh/nvm/blob/master/Makefile#L83 - but i can't figure out why it'd not be working.

@ALMaclaine
Copy link
Owner Author

@ljharb In either 1.1.5 or 1.2.0

@ljharb
Copy link

ljharb commented Feb 2, 2021

k, that wasn't it - v0.x works and any v1.x breaks :-(

update: figured it out. in v0.x, replace a b -- paths/to/files works, but in v1.x, replace a b paths/to/files is required.

@ALMaclaine
Copy link
Owner Author

@ljharb

Yeah, unfortunately I had to switch from nomnom to yargs for security reasons and yargs doesn't respect the --. I filed an issue years ago, and it was never followed up on.

I don't have a solution for this, you'll need to update your code or propose a solution for the package.

@ALMaclaine ALMaclaine reopened this Feb 2, 2021
@ljharb
Copy link

ljharb commented Feb 2, 2021

I've updated my code to unblock myself. I'm reasonably sure yargs does support -- tho, altho you might need to manually process those args.

@ALMaclaine
Copy link
Owner Author

If you can point me towards any information that indicates that I will attempt to support it, however multiple other people in the issue thread seemed to think it wasn't possible.

@ljharb
Copy link

ljharb commented Feb 2, 2021

yargs/yargs-parser#177 suggests it was fixed in yargs v13.something?

@ALMaclaine
Copy link
Owner Author

I'll take a look, thank you.

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

No branches or pull requests

2 participants