Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
{
"plugins": ["transform-flow-comments", ["transform-object-rest-spread", { "useBuiltIns": true }]]
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
"@babel/preset-flow"
],
"plugins": [
"@babel/plugin-transform-flow-comments"
]
}
61 changes: 42 additions & 19 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,30 +1,53 @@
{
"parser": "babel-eslint",
"globals": {},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"ecmascript": 6,
"jsx": true,
"import/extensions": [".js", ".jsx"],
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
},
"extends": [
"eslint:recommended",
"prettier",
"prettier/flowtype",
"prettier/standard",
"plugin:flowtype/recommended"
],
"plugins": [
"prettier",
"flowtype",
"flowtype-errors"
],
"env": {
"node": true,
"browser": true,
"commonjs": true,
"worker": true,
"mongo": true,
"es6": true
},
"rules": {
"comma-dangle": [0],
"max-len": [0],
"strict": 0,
"camelcase": [0],
"class-methods-use-this": [0],
"quotes": [2, "double"],
"prefer-arrow-callback": [0],
"new-cap": [0],
"no-underscore-dangle": [0],
"arrow-body-style" : [0],
"no-param-reassign" : [0],
"no-console": [0],
"no-console": [1],
"eqeqeq": [1],
"spaced-comment": ["error", "always", { "markers": [":", "::"] }],
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
},
"extends": [
"airbnb-base",
"plugin:flowtype/recommended"
],
"plugins": [
"flowtype"
],
"new-cap": [1],
"no-param-reassign": [1],
"no-unused-vars": [1],
"prefer-arrow-callback": [1],
"prefer-destructuring": [1],
"flowtype-errors/show-errors": [2],
"no-use-before-define": ["error", { "classes": false }]
}
}
3 changes: 2 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[ignore]
.*/node_modules/documentation/.*
<PROJECT_ROOT>/lib/*.

[include]
Expand All @@ -9,4 +10,4 @@
all=warn

[options]
include_warnings=true
include_warnings=false
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# 0.14.0-beta.14
* babel 7
* update dependencies
* enforce prettier, lint and flow before commit
* remove `credsFromQueryMiddleware`. Use `Hull.connector()` instead
* added strong flow typing and input and response format validation
* Deprecated: `req.query` querystring parameter has been renamed from `ship` to `id`.
* added `yarn watch` that continuously rebuilds `/lib` so you can easily use hull-node in development with `yarn link`
* added Flow types to connectorOptions.queue and ConnectorOptions.cache
* allowed default Cache to be impacted by `CONNECTOR_CACHE_TTL` and `CONNECTOR_CACHE_MAX` vars;
* removed context middlewares exposed to customer, replaced with setting up with `Hull.Connector` which allows to do everything.
* New way to start connectors: `const opts: HullConnectorConfig = require("connector/main.js"); Hull.start(opts);`. Checkout `hull-node/src/types.js`
* middlewares passed in `connectorConfig` now run BEFORE every other middleware, including Hull's middleware so you can use them to pre-parse the request for instance and place the proper credentials in `req.hull`.
* removed `connector.use` -> pass middlewares in the `connectorConfig.middlewares[]` array
* req.query recognizes `organization`, `id`, `secret` now. `ship` is deprecated;
* Clarified and made more strict the token resolution strategy: req.hull.clientCredentialsToken -> req.hull.clientCredentials -> req.hull.query.token -> req.hull.query[id, organization, secret]
* Removed `currentUser` middleware
* startApp now returns the return value of `app.listen`

# 0.14.0-beta.13
* fix all tests
* Node JS 8.x is only supported version now
Expand Down
Loading