Comments (17)
Doesn't the || clause say that you CAN use the new one but the old one is still valid?
from glue.
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.
of course but if you have hapi < 10 in your app, and have this glue version it should still install fine?
from glue.
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.
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.
You could fix that by including hapi in your package.json file right?
from glue.
Correct, but it feels like a workaround. I will never understand semver
...
from glue.
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.
fair point.
from glue.
hopefully the maintainer will address these questions.
from glue.
@rodfernandez, @lkptrzk: I recommend using http://semver.npmjs.com/:
from glue.
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.
that specific example used npm 3.3.8 and node v0.10.40
from glue.
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.
A warn in the documentation is a great solution!
from glue.
Commit db5cf3a resolves this.
from glue.
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)
- how do you pass in concurrent option to hapi? HOT 4
- Should we have a "ISSUE_TEMPLATE.md" for Glue? HOT 1
- How should I use routes in server config (failAction). HOT 3
- Add hook to transform plugin list before registration HOT 17
- Integration with webpack - dynamic import issue HOT 4
- Make hapi a peer dependency HOT 7
- Error: Cannot start server before plugins finished registration HOT 4
- Using glue with hapi-mongoose HOT 5
- server.events is undefined after glue compose HOT 5
- Server options load support? Migrating from hapi 16 -> 17 HOT 6
- Change module namespace HOT 1
- Change module namespace for v5 branch HOT 1
- Server cache options in hapi 18 cannot be passed HOT 3
- Action required: Greenkeeper could not be activated 🚨 HOT 1
- Update deps HOT 1
- Update joi HOT 1
- Add typescript type definitions HOT 2
- Only node 12
- No way of passing default route validator to glue HOT 1
- plugin.name is required
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glue.