Skip to content

V3.0.0

Compare
Choose a tag to compare
@mcdonnelldean mcdonnelldean released this 26 Aug 21:24

Summary

This release focuses on making the core smaller and more stable. All default plugins, except for seneca-transport have been removed. The head-line feature for 3.0 is the ability to add logging adaptors to Seneca and defaulting to JSON output instead of pretty logging.

CHANGELOG

The Change Log below can be found in /CHANGES.md.

  • Refactored 'old' logging into it's own external plugin; seneca-legacy-logger.
  • Added new adaptor based JSON logging. External loggers can now be used with Seneca.
  • Created new 'built-in' logger which is used as the default logger if none are provided.
  • Corrected bug in Seneca.util.deepextend via Lodash version bump.
  • Updated gate-executor plugin to fix issues in load determinism and generally improve perf.
  • Replaced large swathes custom code with Lodash to improve speed and reliability.
  • Exposed parsepattern function via seneca.util.parsepattern as required by seneca-chain to function.
  • Removed 'dead' code marked legacy. Updated other parts of codebase with legacy notes for v.next.
  • Removed default settings for seneca-admin as it is not a default loaded plugin.
  • Set options.actcache.active to be false by default. Disables actcache feature by default.
  • Moved close_signals from options.internal to options.system.
  • Moved catchall from options.internal to options.system.
  • Removed options.schema as it was only partially checking and needs a rethink.
  • Removed mem-store as a required dependency in the package.
  • Devolved store logic in 'store.js' fully to seneca-entity. Entites are now 'fully removed'.
  • Devolved chain functionality into seneca-chain and removed from library. Moved all related tests.
  • Devolved pin functionality into seneca-pin and removed from library. Moved all related tests.
  • Removed seneca-web as a default loaded plugin. Removed related tests. Removed from package.
  • Removed seneca-cluster as a default loaded plugin. Removed related tests. Removed from package.
  • Removed seneca-seneca as a default loaded plugin. Removed related tests. Removed from package.
  • Removed seneca-echo as a default loaded plugin. Removed related tests. Removed from package.
  • Removed seneca-basic as a default loaded plugin. Removed related tests. Removed from package.
  • Removed seneca-repl as a default loaded plugin. Removed related tests. Removed from package.
  • Removed seneca-parambulator as a default loaded plugin. Removed related tests, etc.
  • Removed parambulator as a default loaded plugin. Removed related tests. Removed from package.
  • Removed joi as a default loaded plugin. Removed related tests. Removed from package.
  • Moved min required version of Node to greater than 4.0. 0.10 and 0.12 are no longer supported.
  • Added support for Node 6.x with minimal changes to account for api differences.
  • Removed LTS doc as it gives the wrong information. Website update to follow.
  • Updated all dependencies. Locked deps because of 0.x support have been updated too.
  • Modified tests to account for breaking changes in both lab and code after updating to latest.
  • Updated eslint-config-seneca with local rules and removed.
  • Corrected peer dependency issues around linting plugins.
  • Annotations are no longer stored in the repo and must be generated locally.
  • Annotations are now found in docs/annotated
  • Annotations now work for the whole library, not just seneca.js
  • Coverage report now generates as /docs/coverage.html and is not stored in the repo.
  • Coverage and Annotations can now be generated via npm run coverage & npm run annotate.
  • Paired back and updated travis file. Plugins are now tested via seneca-test-rig instead of with Seneca.
  • Moved old examples into folders & added 5 examples showing more concepts see docs/examples
  • Removed ALL redundant code files from test,stubs in test/stubs folder. All tests are now in the root.
  • Added test for exportmap in plugins to export values and functions; see /test/plugin.test.js:L23
  • Removed old release scripts in favour of docs/examples/create-a-release.md
  • Now using seneca-test-rig for plugin testing.

Important

Plugins in the /senecajs org are being updated to support 3.x. Modules that support this release will be marked as such in their README's.

We are having issues modules listed below. If you are using any of these modules we recommend you not upgrade until the next point release of each module.

  • seneca-web
  • seneca-auth

Node support is now as follows:

  • 4.x, 6.x

Support has been dropped for,

  • 0.10, 0.12, 5.x

Logging adaptor examples

Documentation will come soon after release, for now we have a bunch of example adaptors to give you an idea how to use the feature for your own needs.

  • The new default log adaptor: here
  • A simple example log adaptor: here
  • Legacy log adaptor: here

Plus,

Upgrade Steps

Adding back in removed modules

The following packages have been removed as defaults,

  • seneca-web
  • seneca-cluster
  • seneca-echo
  • seneca-basic
  • seneca-parambulator

In order to keep using these modules you will need to npm install them and require them into your services as seen below. Replace module-name with the name of the module(s) you wish to load

const Seneca = require('seneca')

const seneca = Seneca()
seneca.use(require('module-name'))
...

New plugins for old functionality

New plugins have been created to support old, devolved, functionality,

  • Chaining functionality devolved to seneca-chain
  • Pin functionality devolved to seneca-pin
  • Pretty logging functionality devolved to seneca-legacy-logger

In order to keep using these features you will need to npm install them and require them into your services as seen below. Replace devolved-module_name with the name of the module(s) you wish to load

const Seneca = require('seneca')

const seneca = Seneca()
seneca.use(require('devolved-module-name'))
...

Settings changes

The following default settings have been changed or removed.

  • options.admin removed (seneca-admin related)
  • options.actcache.active to be false by default. Disables actcache feature by default.
  • options.internals.close_signals from options.internal to options.system.
  • options.internals.close_signals from options.internal to options.system.
  • options.schema removed.

Special Thanks

Please visit http://senecajs.org/ for more information on support and how to contribute.