Skip to content

Commit

Permalink
Bumping the version number to mark release of logger
Browse files Browse the repository at this point in the history
  • Loading branch information
ncthbrt committed Jan 16, 2018
1 parent ea57d98 commit c31094e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 61 deletions.
21 changes: 0 additions & 21 deletions .vscode/settings.json.orig

This file was deleted.

27 changes: 11 additions & 16 deletions lib/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
};
Expand Down Expand Up @@ -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();
}

Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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": {
Expand All @@ -54,4 +52,4 @@
"sinon": "^4.1.4",
"sinon-chai": "^2.14.0"
}
}
}
21 changes: 1 addition & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"

[email protected]:
version "4.3.1"
resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -1811,15 +1801,6 @@ [email protected]:
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"

[email protected]:
version "0.0.5"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c31094e

Please sign in to comment.