[
https://issues.apache.org/jira/browse/CB-10986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15236820#comment-15236820
]
ASF GitHub Bot commented on CB-10986:
-------------------------------------
Github user vladimir-kotikov commented on a diff in the pull request:
https://github.com/apache/cordova-lib/pull/425#discussion_r59339185
--- Diff: cordova-lib/src/cordova/util.js ---
@@ -401,3 +407,48 @@ function getAvailableNpmVersions(module_name) {
});
});
}
+
+/**
+ * Extracts the name and spec from an npm style package spec that follows
the
+ * format of (@scope/)?package(@spec)?
+ * @param {String} raw The raw npm style package spec
+ * @returns {String[]} An array containing the package name with optional
scope
--- End diff --
IMO returning an array is not very convenient to use. This leads to
guessing, what is the 0th item of the result in the expressions like
`cordova_util.parseRegistryPluginSpec(target)[0]`. I'd prefer to use structured
result. something like `npm-package-arg` returns
(https://github.com/npm/npm-package-arg#examples)
> Unable to install npm scoped plugin with [email protected]
> ----------------------------------------------------------
>
> Key: CB-10986
> URL: https://issues.apache.org/jira/browse/CB-10986
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaLib
> Affects Versions: 6.1.0
> Reporter: Darryl Pogue
> Assignee: Richard B Knoll
> Labels: regression, reproduced, triaged
>
> {code}
> $ cordova create MyProject
> $ cd ./MyProject
> $ cordova platform add android
> $ cordova plugin add @dpogue/cordova-plugin-crosswalk-webview
> Error: Cannot find plugin.xml for plugin 'plugins'. Please try adding it
> again.
> {code}
> This works as expected with [email protected].
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]