GithubHelp home page GithubHelp logo

Comments (17)

lloydbenson avatar lloydbenson commented on September 26, 2024

Doesn't the || clause say that you CAN use the new one but the old one is still valid?

from glue.

rodfernandez avatar rodfernandez commented on September 26, 2024

Hi LLoyd! After a fresh npm install, I see hapi 11 there. Of course, no damage if the application has a shrikwrap.json targeting hapi < 10 , but you know... 😉

BTW, this will impact rejoice's versioning.

from glue.

lloydbenson avatar lloydbenson commented on September 26, 2024

of course but if you have hapi < 10 in your app, and have this glue version it should still install fine?

from glue.

lkptrzk avatar lkptrzk commented on September 26, 2024

i got bit by this as well. might not be the intended usage, but i wasn't including hapi in the package.json, only glue.

from glue.

lloydbenson avatar lloydbenson commented on September 26, 2024

I personally think we should have a major breaking change for hapi 10.x anyway so we can start using es6. But I am just trying to explain why the maintainer may not consider this a breaking change.

from glue.

lloydbenson avatar lloydbenson commented on September 26, 2024

You could fix that by including hapi in your package.json file right?

from glue.

rodfernandez avatar rodfernandez commented on September 26, 2024

Correct, but it feels like a workaround. I will never understand semver...

from glue.

lkptrzk avatar lkptrzk commented on September 26, 2024

perhaps, i just switched the dep to be explicitly 2.2.0 (instead of ^2.2.0 or whatever i had it), haven't had time to circle back on how that behaves (instead i'm just working on upgrading node + npm etc).

if i'm supposed to be explicitly including hapi in the package.json, then the problem is my incorrect understanding of how to use glue, and it'd be awesome to get some context on why that is. if you're supposed to be able to use glue without specifying hapi in the package.json, then i'd consider this a breaking change.

from glue.

lloydbenson avatar lloydbenson commented on September 26, 2024

fair point.

from glue.

lloydbenson avatar lloydbenson commented on September 26, 2024

hopefully the maintainer will address these questions.

from glue.

gergoerdosi avatar gergoerdosi commented on September 26, 2024

@rodfernandez, @lkptrzk: I recommend using http://semver.npmjs.com/:

screen shot 2015-11-06 at 23 59 34

screen shot 2015-11-07 at 00 00 26

from glue.

lkptrzk avatar lkptrzk commented on September 26, 2024

i think a concrete example will help -

using this server.js file:

var Glue = require('glue');

var manifest = {
  server: {},
  connections: [ { port: 3000 } ]
};

Glue.compose(manifest, {}, function (err, server) {

  if (err) {
    throw err;
  }

  console.log(server.version);
});

and this package.json:

{
  "name": "glue-bug",
  "version": "1.0.0",
  "dependencies": {
    "glue": "2.2.0"
  }
}

if you npm install && node server.js, the output is 9.3.1.

with this package.json:

{
  "name": "glue-bug",
  "version": "1.0.0",
  "dependencies": {
    "glue": "2.3.0"
  }
}

the output from the same script is 10.5.0.

a minor bump in glue caused a major bump in hapi

from glue.

lkptrzk avatar lkptrzk commented on September 26, 2024

that specific example used npm 3.3.8 and node v0.10.40

from glue.

csrl avatar csrl commented on September 26, 2024

Yes, if you haven't explicitly called out the version of Hapi you want to use, then glue will pull in the latest. To that effect, glue 2.2.0 which allowed Hapi 9 would also be a breaking change. Basically any time Hapi major version is bumped, would require a major version bump of Glue if we took that approach. I've always considered that one should explicitly require a Hapi version in their project.

The README should get updated with this expectation.

I'm open to alternate approaches and suggestions. But I'm not inclined to bump Glue's major version just to add support for the next major version of Hapi. I do expect to move to requiring Node 4+ and Hapi 11 (or whatever the version of the week is) in Glue 3.0 as part of issue 31.

from glue.

rodfernandez avatar rodfernandez commented on September 26, 2024

A warn in the documentation is a great solution!

from glue.

csrl avatar csrl commented on September 26, 2024

Commit db5cf3a resolves this.

from glue.

lock avatar lock commented on September 26, 2024

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

from glue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.