bredele / datastore

:hamster: Bloat free and flexible interface for data store and database access.
101 stars 9 forks source link

use datastore / wall with duo #38

Closed queckezz closed 8 years ago

queckezz commented 10 years ago

I'm guessing you already peeked at the successor of component: duo. They are directly fetching the project via git-tags. The Problem is that they are prefixed with a "v" and postfixed it with "-alpha". This breaks the whole semver resolution and the installation fails.

node_modules\duo-package\node_modules\semver\semver.js:273
    throw new TypeError('Invalid Version: ' + version);
          ^
TypeError: Invalid Version: v1.2-alpha

Is there a way to work around that or do we need to release versions without any post or prefix?

Thanks

queckezz commented 10 years ago

hmm, this is probably duo related.

If I use datastore directly, it works just as expected.

var store = require('bredele/datastore@1.0.6')

However when I try to require wall it fails.

var wall = require('bredele/wall@0.1.1')
// TypeError: Invalid Version: v1.2-alpha

this is most likely caused by a bug related with https://github.com/duojs/duo/issues/274

matthewmueller commented 10 years ago

@queckezz

Hmm... this seems like a bug, I wonder if we should just ignore invalid versions and move on to the next one. It's weird cause the * in https://github.com/bredele/wall/blob/master/component.json should accept anything.

Oh wait can you check that your Duo is using the latest gh-resolve? It should be 3.0.3

It'll be located in node_modules/duo/node_modules/duo-package/node_modules/gh-resolve haha

bredele commented 10 years ago

@MatthewMueller I have the same issue with:

  var store = require('bredele/datastore');

@queckezz thanks for giving a try to my components ;)

queckezz commented 10 years ago

Yes I'm using the newest version of gh-resolve:

λ npm ls | grep gh-res
│ │ ├─┬ gh-resolve@3.0.4

I also find it wierd that it doesn't fetch the latest tag with * which should be 1.0.6

bredele commented 10 years ago

@queckezz works for me now with 0.8.4