cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10986) Unable to install npm scoped plugin with cordova-cli@6.1.0
Date Wed, 13 Apr 2016 07:25:25 GMT

    [ https://issues.apache.org/jira/browse/CB-10986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15238750#comment-15238750
] 

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_r59503458
  
    --- Diff: cordova-lib/src/cordova/plugin_spec_parser.js ---
    @@ -0,0 +1,61 @@
    +/**
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +    http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +*/
    +
    +// npm packages follow the pattern of (@scope/)?package(@spec)? where scope and tag are
optional
    +var NPM_SPEC_REGEX = /^(@[^\/]+\/)?([^@\/]+)(?:@(.+))?$/;
    +
    +module.exports.parse = parse;
    +
    +/**
    + * Represents a parsed specification for a plugin
    + * @class
    + * @param {String} raw      The raw specification (i.e. provided by the user)
    + * @param {String} scope    The scope of the package if this is an npm package
    + * @param {String} id       The id of the package if this is an npm package
    + * @param {String} version  The version specified for the package if this is an npm package
    + */
    +function PluginSpec(raw, scope, id, version) {
    +    /** @member {String|null} The npm scope of the plugin spec or null if it does not
have one */
    +    this.scope = scope || null;
    +
    +    /** @member {String|null} The id of the plugin or the raw plugin spec if it is not
an npm package */
    +    this.id = id || raw;
    +
    +    /** @member {String|null} The specified version of the plugin or null if no version
was specified */
    +    this.version = version || null;
    +
    +    /** @member {String|null} The npm package of the plugin (with scope) or null if this
is not a spec for an npm package */
    +    this.package = (scope ? scope + id : id) || null;
    +}
    +
    +/**
    + * Tries to parse the given string as an npm-style package specification of
    + * the form (@scope/)?package(@version)? and return the various parts.
    + *
    + * @param {String} raw  The string to be parsed
    + * @param {PluginSpec}  The parsed plugin spec
    --- End diff --
    
    Probably a copy/paste typo: `@param` -> `@return`


> Unable to install npm scoped plugin with cordova-cli@6.1.0
> ----------------------------------------------------------
>
>                 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 cordova@6.0.0.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message