Skip to content

Semver is translated in an invalid #tag #29

@Pictor13

Description

@Pictor13

I tried to run bower-away on a bower package and got some @namepaced dependencies that cannot resolve the correct #tag, in the peerDependencies of package.json (when running npm install).

{
  "dependencies": {
    "jquery": ">=1.7.0",
    "microplugin": "0.0.x",
    "sifter": "0.5.x"
  },
  "devDependencies": {
    "bootstrap2": "bootstrap#2",
    "bootstrap3": "bootstrap#3.2"
  }
}

becomes

"dependencies": {
    "@bower_components/bootstrap2": "twbs/bootstrap#2",
    "@bower_components/bootstrap3": "twbs/bootstrap#3.2",
    "@bower_components/jquery": "jquery/jquery-dist#>=1.8.0 <2.1.0",
    "@bower_components/microplugin": "brianreavis/microplugin.js#0.0.x",
    "@bower_components/sifter": "brianreavis/sifter.js#0.5.x",
  },

and generates a

npm ERR! git rev-list -n1 0.0.x: fatal: ambiguous argument '0.0.x': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 %3E=1.8.0%20%3C2.1.0: fatal: ambiguous argument '%3E=1.8.0%20%3C2.1.0': unknown revision or path not in the working tree.

Example:
In the case of "@bower_components/sifter":"brianreavis/sifter.js#0.5.1" the correct tag to resolve would be pointed by "brianreavis/sifter.js#v0.5.1".

Is it a naming problem of the libraries, over the bower registry/manifest, or is bower-away missing from checking the existence of that #tag on the repositories that are being required?

While digging I've found this #322 and I am wondering if it makes sense to use the ver.si.on in order to generate a #tag (is it the case?).

I dunno much of node.js so am not sure where the _target, in the script, is coming from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions