Skip to content

fix: Plugin remove command fails in case plugin name has dot #3459

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

Merged
merged 1 commit into from
Mar 15, 2018

Conversation

rosen-vladimirov
Copy link
Contributor

In case plugin name has dot (.) in its name, the plugin remove command fails.
The reason is the way we are trying to remove plugin related data from the nativescript key of application's package.json.
We are using . to concatenate the keys inside nativescript key and later we are trying to split by . in order to find which key should be deleted.
This works in most of the cases, but when the plugin name has . in it, our logic fails as the split operation finds the dot.
Fix this by using some symbols that are not allowed in npm for plugins names. Use symbols that will rarely be used in the same sequence.

Fixes #3451

In case plugin name has dot (`.`) in its name, the `plugin remove` command fails.
The reason is the way we are trying to remove plugin related data from the `nativescript` key of application's package.json.
We are using `.` to concatenate the keys inside nativescript key and later we are trying to split by `.` in order to find which key should be deleted.
This works in most of the cases, but when the plugin name has `.` in it, our logic fails as the split operation finds the dot.
Fix this by using some symbols that are not allowed in npm for plugins names. Use symbols that will rarely be used in the same sequence.
@rosen-vladimirov
Copy link
Contributor Author

run ci

Copy link
Contributor

@Mitko-Kerezov Mitko-Kerezov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I especially like the slender **|__** figure

@rosen-vladimirov rosen-vladimirov merged commit d18bfb9 into release Mar 15, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-plugin-remove branch March 15, 2018 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants