@certik/skynet 0.9.5 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/log.js +7 -3
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.6
4
+
5
+ - Updated `inline` method in `log` library to print a timestamp in front of each log line
6
+
3
7
  ## 0.9.5
4
8
 
5
9
  - Fixed deploy issue when selector value contains special characters
package/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  function getLine(params) {
2
- let line = `${new Date().toISOString()}\t`;
2
+ let line = "";
3
3
 
4
4
  // Convert to string and filter out newline to tabs (AWS Athena)
5
5
  for (let i = 0, l = params.length; i < l; i++) {
@@ -11,12 +11,16 @@ function getLine(params) {
11
11
  return line.trim();
12
12
  }
13
13
 
14
+ function timestamp() {
15
+ return new Date().toISOString();
16
+ }
17
+
14
18
  const inline = {
15
19
  log: function (...args) {
16
- console.log(getLine(args));
20
+ console.log(`${timestamp()} ${getLine(args)}`);
17
21
  },
18
22
  error: function (...args) {
19
- console.error(getLine(args));
23
+ console.error(`${timestamp()} ${getLine(args)}`);
20
24
  },
21
25
  };
22
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "Skynet Shared JS library",
5
5
  "main": "index.js",
6
6
  "author": "CertiK Engineering",