kraken-js v2.5.0 Released 2023-08-16
- Options can now be passed directly to confit via
{ confit: {} }
. This can be used to mitigate issue #470. Pull Request
kraken-js v2.4.0 Released: 2021-11-23
- Include process.cwd while resolving module for view engine. It is possible that kraken-js module is deployed outside application root. Pull Request
- Use confit@3x Pull Request
kraken-js v2.3.0 Released: 2020-02-04
- deprecate domains
- add onKrakenMount property; removed node v4, v6 and added node 10 in travis CI config (#514)
kraken-js v2.2.0 Released: 2017-23-10
-
Core:
- Allow config path to be configurable
- Updates dependencies
- Updates
lusca
dependency to 1.5.1
- Enables Lusca XSS protection by default
kraken-js v2.1.0 Released: 2016-01-04
-
Core:
- Add more robust error handler for both inside and outside of the middleware continuation
kraken-js v2.0.1 Released: 2015-12-04
-
Core:
- Set morgan option to log request even if server crashes
kraken-js v2.0.0 Released: 2015-10-07
-
Core:
- Fix occasional double close error on shutdown
-
Core:
- Add
shutdownHeaders
option to shutdown middleware
- Print deprecation warnings for the included 404 and 500 handlers.
- Add
-
Dependency: meddleware (v1 -> v3)
- Call registered middleware factories with a context set to the method owner. This helps in specific cases (e.g., Passport).
Previously: The factory was called with a context ofnull
.
Implementation, Issue, Pull Request
- Default middleware
enabled
totrue
. I.e., omitting theenabled
option will still enable the middleware.
Previously: middleware was defaultedenabled
tofalse
.
Implementation, Issue, Pull Request
- Remove the ability to toggle the
enabled
state of a middleware at arbitrary points during runtime. Now, a middleware that is notenabled
—by explicitly settingenabled
tofalse
, given breaking change No.1—will not berequire
d (i.e., not parsed), and cannot be enabled at a later time.
Previously: middleware could be toggled. Was by design, but largely unused and caused unanticipated behavior.
- Call registered middleware factories with a context set to the method owner. This helps in specific cases (e.g., Passport).
-
Dependency: confit (v1 -> v2)
- Resolve the
import
shortstop handler after mergingconfig.json
,[env].json
, and before the other shortstop handlers are resolved.
Previously:import
handler resolved only once, before the rest of the shortstop handlers.
implementation 1, implementation 2, Issue, Pull Request
{ "main": "import:main.json" } // config/config.json { "key": "value", "otherKey": "otherValue" } // config/main.json { "main": { "key": "devValue" } } // config/dev.json { "main": { "key": "devValue", "otherKey": "otherValue" } } // result
- Change source priority—from highest to lowest (higher overrides lower)— to: command line arguments, environment variables,
[env].json
,config.json
, convenience (environment normalization andenv:*
keys).
Previously: source priority order, from highest to lowest, was[env].json
,config.json
, convenience, environment variables, command line arguments.
// config/config.json { "KEY": "fromConfig", "OTHER_KEY": "fromConfig", "THIRD_KEY": "fromConfig" }
OTHER_KEY=fromEnv THIRD_KEY=fromEnv node myApp.js --THIRD_KEY=fromArgv
// result { "KEY": "fromConfig", "OTHER_KEY": "fromEnv", "THIRD_KEY": "fromArgv" }
- Resolve the