From c31094eaae0936d942752a7f8637b13f46687d47 Mon Sep 17 00:00:00 2001 From: Nick Cuthbert Date: Tue, 16 Jan 2018 22:49:49 +0200 Subject: [PATCH] Bumping the version number to mark release of logger --- .vscode/settings.json.orig | 21 --------------------- lib/actor.js | 27 +++++++++++---------------- package.json | 6 ++---- yarn.lock | 21 +-------------------- 4 files changed, 14 insertions(+), 61 deletions(-) delete mode 100644 .vscode/settings.json.orig diff --git a/.vscode/settings.json.orig b/.vscode/settings.json.orig deleted file mode 100644 index 37c092c..0000000 --- a/.vscode/settings.json.orig +++ /dev/null @@ -1,21 +0,0 @@ -{ - "editor.tabSize": 2, - "javascript.validate.enable": false, - "standard.semistandard": true, - "standard.enable": true, - "standard.autoFixOnSave": true, - "files.exclude": { - "**/.git": true, - "**/.svn": true, - "**/.hg": true, - "**/CVS": true, - "**/.DS_Store": true, - "**/coverage": true -<<<<<<< HEAD - } -} -======= - }, - "prettier.tabWidth": 2 - } ->>>>>>> d442b55b554200a9881c1bb59ecb530ffe555863 diff --git a/lib/actor.js b/lib/actor.js index 3c66604..d5a7fc6 100644 --- a/lib/actor.js +++ b/lib/actor.js @@ -10,9 +10,9 @@ const { stop } = require('./functions'); const { defaultSupervisionPolicy, SupervisionActions } = require('./supervision'); const { LoggingFacadeImpl } = require('./monitoring/logging-engine'); -const noopLoggingFacade = new LoggingFacadeImpl(() => {}); +const noopLoggingFacade = new LoggingFacadeImpl(() => { }); -const engineLoggingFacade = (engine, pathStr) => { +const createLoggingFacade = (engine, pathStr) => { const { dispatch } = require('./functions'); return new LoggingFacadeImpl(logEvent => dispatch(engine, logEvent)); }; @@ -133,7 +133,7 @@ class Actor { } get state$ () { - console.warn('nact deprecation notice: state$ is deprecated'); + console.error('nact deprecation notice: state$ is deprecated'); return this.subject.asObservable(); } @@ -194,24 +194,19 @@ class Actor { } createContext (sender) { - return this.prepareContextForLogging({ + const log = !this.system.loggingEngine + ? noopLoggingFacade + : createLoggingFacade(this.system.loggingEngine, this.path.toString()); + + return { parent: this.parent.reference, path: this.path, self: this.reference, name: this.name, children: new Map(this.childReferences), - sender - }); - } - - prepareContextForLogging (ctx) { - let engine = this.system.loggingEngine; - - let facade = !engine - ? noopLoggingFacade - : engineLoggingFacade(engine, this.path.toString()); - - return { ...ctx, log: facade }; + sender, + log + }; } handleMessage (message, sender) { diff --git a/package.json b/package.json index 427219b..1185687 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nact", - "version": "4.3.1", + "version": "4.4.0", "description": "nact ⇒ node.js + actors = your services have never been so µ", "main": "lib/index.js", "scripts": { @@ -38,8 +38,6 @@ "dependencies": { "deep-freeze-node": "^1.1.3", "denque": "^1.2.2", - "immutable": "^3.8.2", - "msgpack5": "^4.0.0", "rxjs": "^5.4.3" }, "devDependencies": { @@ -54,4 +52,4 @@ "sinon": "^4.1.4", "sinon-chai": "^2.14.0" } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 61494dd..c2808c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -238,12 +238,6 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -bl@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.1.tgz#cac328f7bee45730d404b692203fcb590e172d5e" - dependencies: - readable-stream "^2.0.5" - boom@4.x.x: version "4.3.1" resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" @@ -1260,10 +1254,6 @@ ignore@^3.0.11, ignore@^3.0.9, ignore@^3.2.0, ignore@^3.3.3: version "3.3.5" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.5.tgz#c4e715455f6073a8d7e5dae72d2fc9d71663dba6" -immutable@^3.8.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -1811,15 +1801,6 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -msgpack5@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/msgpack5/-/msgpack5-4.0.0.tgz#232a21f20edd26f91a24574016112157eec1f229" - dependencies: - bl "^1.2.1" - inherits "^2.0.3" - readable-stream "^2.3.3" - safe-buffer "^5.1.1" - mute-stream@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" @@ -2181,7 +2162,7 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" -readable-stream@^2.0.5, readable-stream@^2.2.2, readable-stream@^2.3.3: +readable-stream@^2.2.2: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: