Skip to content

Commit

Permalink
v3.26.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrodger committed Apr 18, 2022
1 parent 8e4d9a6 commit e69394e
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -19,3 +19,4 @@ docs/coverage.html
test/coverage.html
*.csv
package-lock.json
yarn.lock
10 changes: 8 additions & 2 deletions CHANGES.md
@@ -1,7 +1,13 @@
## 3.26.0

* Plugin definition can be async: https://github.com/senecajs/seneca/pull/891 - thanks https://github.com/lilsweetcaligula !
## 3.26.1 2022-04-18

* Allow Plugin definition array in options.


## 3.26.0 2022-04-08

* Plugin defaults validated using https://github.com/rjrodger/gubu
* Plugin definition can be async: https://github.com/senecajs/seneca/pull/891 - thanks https://github.com/lilsweetcaligula !


## 3.25.0 2021-11-03
Expand Down
12 changes: 6 additions & 6 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "seneca",
"description": "A Microservices Framework for Node.js",
"version": "3.26.0",
"version": "3.26.1",
"license": "MIT",
"homepage": "http://senecajs.org",
"keywords": [
Expand Down Expand Up @@ -89,7 +89,7 @@
"eraro": "^2.1.0",
"fast-safe-stringify": "^2.1.1",
"gate-executor": "^3.1.1",
"gubu": "^2.0.0",
"gubu": "^2.0.1",
"jsonic": "^1.0.1",
"lodash.defaultsdeep": "^4.6.1",
"lodash.flatten": "^4.4.0",
Expand All @@ -103,14 +103,14 @@
"qs": "^6.10.3",
"rolling-stats": "^0.2.1",
"seneca-transport": "^7.1.0",
"use-plugin": "^9.0.0"
"use-plugin": "^9.1.0"
},
"devDependencies": {
"@hapi/code": "^8.0.7",
"@hapi/hoek": "^9.2.1",
"@hapi/lab": "^24.6.0",
"@seneca/test-plugin": "0.0.1",
"@types/node": "^17.0.23",
"@seneca/test-plugin": "0.1.0",
"@types/node": "^17.0.24",
"async": "^3.2.3",
"bench": "^0.3.6",
"coveralls": "^3.1.1",
Expand All @@ -122,7 +122,7 @@
"seneca-entity": "^16.1.0",
"seneca-error-test": "^0.2.2",
"seneca-joi": "^7.0.2",
"seneca-promisify": "^2.0.0",
"seneca-promisify": "^2.2.2",
"typescript": "^4.6.3"
}
}
2 changes: 1 addition & 1 deletion seneca.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion seneca.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion seneca.ts
Expand Up @@ -206,7 +206,7 @@ const option_defaults = {
plugin: {},

// Plugins to load (will be passed to .use)
plugins: One({}, null),
plugins: One({}, [], null),

// System wide functionality.
system: {
Expand Down
2 changes: 0 additions & 2 deletions test/act.test.js
Expand Up @@ -20,7 +20,6 @@ const Act = require('../lib/act.js')

const intern = Act.intern


describe('act', function () {
it('make_actmsg', function (fin) {
var origmsg = {
Expand Down Expand Up @@ -110,4 +109,3 @@ describe('act', function () {
fin()
})
})

2 changes: 0 additions & 2 deletions test/intern.test.js
Expand Up @@ -15,10 +15,8 @@ const expect = Code.expect
const Shared = require('./shared')
const it = Shared.make_it(lab)


const { Outward } = require('../lib/outward')


const intern = {
outward: Outward.test$.intern,
}
Expand Down
5 changes: 4 additions & 1 deletion test/inward.test.js
Expand Up @@ -27,7 +27,10 @@ describe('inward', function () {
fin()
})

Inward.inward_announce({ ctx: { seneca: seneca }, data: { msg: { a: 1 } } })
Inward.inward_announce({
ctx: { seneca: seneca },
data: { msg: { a: 1 } },
})
Inward.inward_announce({
ctx: { seneca: seneca, actdef: {} },
data: { msg: { a: 2 } },
Expand Down
9 changes: 6 additions & 3 deletions test/outward.test.js
Expand Up @@ -16,20 +16,23 @@ var it = Shared.make_it(lab)
var { Outward } = require('../lib/outward')
var { API } = require('../lib/api')


describe('outward', function () {
it('make_error', function (fin) {
var err = { message: 'foo', meta$: { err: true } }
var data = { meta: { error: true }, res: err }

Outward.outward_make_error({
ctx: { options: { legacy: { error: false } } }, data })
ctx: { options: { legacy: { error: false } } },
data,
})
expect(data.res.message).equal('foo')
expect(Util.isError(data.res)).false()

data = { res: err }
Outward.outward_make_error({
ctx: { options: { legacy: { error: true } } }, data })
ctx: { options: { legacy: { error: true } } },
data,
})
expect(data.res.message).equal('foo')
expect(!Util.isError(data.res)).true()

Expand Down

0 comments on commit e69394e

Please sign in to comment.