-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9.0.0 Release Notes #2682
Comments
@hueniverse Thanks a lot for this release! I would like to ask you to not use the issue tracker for release notes. I first notice that a dependency of mine has a breaking change when my badges turn yellow or red. I then turn over to your repository and can neither find a CHANGELOG.md or any release notes attached to the tag you created on GitHub. From then on it could just be anywhere: an issue, a closed issue, a blogpost, hidden in the commits, no release notes at all, etc. Please make it easier for everyone to upgrade by posting the release notes at common places like a changelog file, or much better, the GitHub release page. Thank you, Stephan |
@boennemann sorry but I am not going to change how we work. You can always find the changelog here: http://hapijs.com/updates |
we can go all crazy and try to link issues with |
Has something been missed for route handlers? Getting
Don't see anything in the 8 or 9 notes about this changing, but now breaking in 8 -> 9 release |
@tanepiper Inert has been removed which was responsible for serving files and directories. You need to manually register it now. |
If others are seeing the var Hapi = require('hapi');
var Inert = require('inert');
var Path = require('path');
var server = new Hapi.Server();
var port = process.env.PORT || 8000;
server.register(Inert, function () {
server.connection({ port: port });
server.route( {
method: 'GET',
path: '/{param*}',
handler: {
directory: { path: Path.normalize(__dirname + '/') }
}
});
server.start(function() { console.log('Visit: http://127.0.0.1:' +port) });
}); // requires a callback function but can be blank done. |
… in this release. see: hapijs/hapi#2682 (comment) closes #83
@nelsonic you should really do the connection, route and start in the callback of register |
Submitted a PR to fix documentation: hapijs/inert#37 |
@AdriVanHoudt I've updated the code block in the comment above. Thanks. 👍 |
Code in PR looks good |
This may just be a documentation issue on the release notes (or maybe I'm understanding it wrong) so not opening an issue yet, but I'm noticing that setting generateTimeout to server.method('cached', internals.getCached, {
cache: {
expiresIn: Moment.duration(1, 'months').asMilliseconds(),
generateTimeout: false
}
}); |
@jrmce open an issue |
As of Node 6, crypto.pbkdf emits a deprecation warning when the digest isn't explicily set. Under certain conditions we are seeing this warning from Hapi's dependency Iron. Iron resolved this issue as of 4.0.4, which was introduced into Hapi as of 14.0.0. Node deprecation: nodejs/node@8e8959d Iron's resolution: hapijs/iron@9e0a1ef As of Hapi v9, they have removed three build-in plugins from the core which we rely on inert (files and directories), vision (view templates), and h2o2 (proxy). hapijs/hapi#2682 Signed-off-by: Tyler Smalley <[email protected]>
--------- **Commit 1:** Upgrades Hapi to 14.2.0 As of Node 6, crypto.pbkdf emits a deprecation warning when the digest isn't explicily set. Under certain conditions we are seeing this warning from Hapi's dependency Iron. Iron resolved this issue as of 4.0.4, which was introduced into Hapi as of 14.0.0. Node deprecation: nodejs/node@8e8959d Iron's resolution: hapijs/iron@9e0a1ef As of Hapi v9, they have removed three build-in plugins from the core which we rely on inert (files and directories), vision (view templates), and h2o2 (proxy). hapijs/hapi#2682 Signed-off-by: Tyler Smalley <[email protected]> * Original sha: 4feeff1 * Authored by Tyler Smalley <[email protected]> on 2016-09-13T19:20:22Z
--------- **Commit 1:** Upgrades Hapi to 14.2.0 As of Node 6, crypto.pbkdf emits a deprecation warning when the digest isn't explicily set. Under certain conditions we are seeing this warning from Hapi's dependency Iron. Iron resolved this issue as of 4.0.4, which was introduced into Hapi as of 14.0.0. Node deprecation: nodejs/node@8e8959d Iron's resolution: hapijs/iron@9e0a1ef As of Hapi v9, they have removed three build-in plugins from the core which we rely on inert (files and directories), vision (view templates), and h2o2 (proxy). hapijs/hapi#2682 Signed-off-by: Tyler Smalley <[email protected]> * Original sha: 4feeff1 * Authored by Tyler Smalley <[email protected]> on 2016-09-13T19:20:22Z
--------- **Commit 1:** Upgrades Hapi to 14.2.0 As of Node 6, crypto.pbkdf emits a deprecation warning when the digest isn't explicily set. Under certain conditions we are seeing this warning from Hapi's dependency Iron. Iron resolved this issue as of 4.0.4, which was introduced into Hapi as of 14.0.0. Node deprecation: nodejs/node@8e8959d Iron's resolution: hapijs/iron@9e0a1ef As of Hapi v9, they have removed three build-in plugins from the core which we rely on inert (files and directories), vision (view templates), and h2o2 (proxy). hapijs/hapi#2682 Signed-off-by: Tyler Smalley <[email protected]> * Original sha: 4feeff1 * Authored by Tyler Smalley <[email protected]> on 2016-09-13T19:20:22Z
As of Node 6, crypto.pbkdf emits a deprecation warning when the digest isn't explicily set. Under certain conditions we are seeing this warning from Hapi's dependency Iron. Iron resolved this issue as of 4.0.4, which was introduced into Hapi as of 14.0.0. Node deprecation: nodejs/node@8e8959d Iron's resolution: hapijs/iron@9e0a1ef As of Hapi v9, they have removed three build-in plugins from the core which we rely on inert (files and directories), vision (view templates), and h2o2 (proxy). hapijs/hapi#2682 Signed-off-by: Tyler Smalley <[email protected]>
As of Node 6, crypto.pbkdf emits a deprecation warning when the digest isn't explicily set. Under certain conditions we are seeing this warning from Hapi's dependency Iron. Iron resolved this issue as of 4.0.4, which was introduced into Hapi as of 14.0.0. Node deprecation: nodejs/node@8e8959d Iron's resolution: hapijs/iron@9e0a1ef As of Hapi v9, they have removed three build-in plugins from the core which we rely on inert (files and directories), vision (view templates), and h2o2 (proxy). hapijs/hapi#2682 Signed-off-by: Tyler Smalley <[email protected]>
--------- **Commit 1:** Upgrades Hapi to 14.2.0 As of Node 6, crypto.pbkdf emits a deprecation warning when the digest isn't explicily set. Under certain conditions we are seeing this warning from Hapi's dependency Iron. Iron resolved this issue as of 4.0.4, which was introduced into Hapi as of 14.0.0. Node deprecation: nodejs/node@8e8959d Iron's resolution: hapijs/iron@9e0a1ef As of Hapi v9, they have removed three build-in plugins from the core which we rely on inert (files and directories), vision (view templates), and h2o2 (proxy). hapijs/hapi#2682 Signed-off-by: Tyler Smalley <[email protected]> * Original sha: b7e158d8ce37c2e2fd34bf19b98287500ce324aa [formerly 4feeff1] * Authored by Tyler Smalley <[email protected]> on 2016-09-13T19:20:22Z Former-commit-id: 853c62e
Summary
hapi v9.0.0 is a small collection of changes meant to streamline the development process of plugins within the hapi.js community. The main change removes the three built-in plugins from the core distribution: inert (files and directories), vision (view templates), and h2o2 (proxy). By removing this functionality, the community can more rapidly innovate on these features as well as open the door for competing implementations based on new use cases.
Sponsor
The v9.0.0 major release is sponsored by Sideway.
Breaking Changes
minimal
option.files
andfiles.etagsCacheMaxSize
configuration option (moved to an inert plugin optionetagsCacheMaxSize
in version 3.0.0).server.method()
withcache
enabled requires thecache.generateTimeout
option.server.start()
is called beforeserver.register()
is completed.server.start()
andserver.stop()
.null
from{}
''
from{}
null
fromBuffer
New Features
server.inject()
can setremoteAddress
.server.method()
reports invalid arguments.server.cache()
cache object supports newcache.stats
information.generateOnReadError
to abort calling the generate function when the upstream cache read operation fails and thegenerateIgnoreWriteError
to pass write errors back (defaults to ignore cache errors).onPreStart
,onPostStart
,onPreStop
,onPostStop
.server.initialize()
starts the cache and finalizes plugin registration without listening on the ports.defaultContentType
payload option.compression
configuration option.clientError
events are emitted via the serverlog
event.Bug fixes
vary
response header wheneveraccept-encoding
is received.etag
fixes.Updated dependencies
Migration Checklist
Removal of built-in plugins
Check your code for
view
,render
,views
,file
,directory
, andproxy
. If you used any of these features you will need to manually load the required plugins to access these features.If you are already loading plugins, simply add the ones from the list that you want to your plugin list. If you are not, use the
server.register()
method to load these. Remember to add the plugins you need to yourpackage.json
file.If you have plugins that depend on these features, make sure to specify it using the
server.dependency()
method. Note that this will break compatibility with hapi 8.x.x because the three plugins are loaded before connections are set up and will show us as missing.The server
minimal
option is now the default and no longer supported.If you used the static file features, the server
files
andfiles.etagsCacheMaxSize
configuration option have been moved to the inert plugin under optionetagsCacheMaxSize
in v3.0.0.Caching
Previous versions had a potential critical problem if a server method or cache using the
generateFunc
option got stuck. This makes every request toget()
to get stuck and it will never release. To solve this, catbox included thegenerateTimeout
option.The
generateTimeout
option is now required. If you are usingserver.cache()
orserver.method()
with thecache
option, you will need to add thecache.generateTimeout
option. Set tofalse
to keep the previous v8.x.x behavior.Empty payload
Check your code for payload assumptions when the client sends an empty payload (zero bytes). The following changed when handling an incoming empty payload request:
null
(previously{}
)''
(previously{}
)null
(previously an emptyBuffer
)Miscellaneous
server.register()
callback to return before callingserver.start()
.server.start()
andserver.stop()
.{ allowDots: false }
query qs option.The text was updated successfully, but these errors were encountered: