From 3b6683da3671b965218c74e701f20d5b8d636bf9 Mon Sep 17 00:00:00 2001 From: Prashant Goel Date: Mon, 1 May 2017 02:23:13 +0530 Subject: [PATCH] Release 1.3.3 * Added readonly attribute for clogy levels in typescript declaration file --- CHANGELOG.md | 4 ++++ README.md | 8 ++++---- index.d.ts | 17 ++++++++--------- lib/clogy.js | 2 +- lib/clogy.min.js | 2 +- package.json | 2 +- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a834d6..930ae7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # clogy changelog +## 1.3.3 + +- Added readonly attribute for clogy levels in typescript declaration file + ## 1.3.2 - Refactored index.d.ts diff --git a/README.md b/README.md index 48da4e7..bbe4383 100644 --- a/README.md +++ b/README.md @@ -44,19 +44,19 @@ Installation * ```Development```: -**rawgit**: ```//rawgit.com/pgmanutd/clogy/1.3.2/lib/clogy.js``` +**rawgit**: ```//rawgit.com/pgmanutd/clogy/1.3.3/lib/clogy.js``` or -**unpkg**: ```//unpkg.com/clogy@1.3.2/lib/clogy.js``` +**unpkg**: ```//unpkg.com/clogy@1.3.3/lib/clogy.js``` * ```Production```: -**rawgit**: ```//cdn.rawgit.com/pgmanutd/clogy/1.3.2/lib/clogy.min.js``` +**rawgit**: ```//cdn.rawgit.com/pgmanutd/clogy/1.3.3/lib/clogy.min.js``` or -**unpkg**: ```//unpkg.com/clogy@1.3.2/lib/clogy.min.js``` +**unpkg**: ```//unpkg.com/clogy@1.3.3/lib/clogy.min.js``` Usage diff --git a/index.d.ts b/index.d.ts index 82b5d9a..115c7fe 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,6 @@ // Type definitions for clogy // Project: https://github.com/pgmanutd/clogy // Definitions by: Prashant Goel -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped type ClogyOptionsT = { showDateTime?: boolean, @@ -9,13 +8,13 @@ type ClogyOptionsT = { }; type ClogyLevelsT = { - log: number, - trace: number, - debug: number, - info: number, - warn: number, - error: number, - none: number + readonly log: number, + readonly trace: number, + readonly debug: number, + readonly info: number, + readonly warn: number, + readonly error: number, + readonly none: number }; interface IClogyLogger { @@ -26,7 +25,7 @@ interface IClogyLogger { stringifyAllowedLoggers(): string; enableAllLevels(): void; disableAllLevels(): void; - LEVELS: ClogyLevelsT; + readonly LEVELS: ClogyLevelsT; log(...args: Array): void; trace(...args: Array): void; debug(...args: Array): void; diff --git a/lib/clogy.js b/lib/clogy.js index 8157c2b..8f4e9ac 100644 --- a/lib/clogy.js +++ b/lib/clogy.js @@ -1,4 +1,4 @@ -/*! clogy - v1.3.2 * https://github.com/pgmanutd/clogy * (c) 2017 pgmanutd * licensed MIT */ +/*! clogy - v1.3.3 * https://github.com/pgmanutd/clogy * (c) 2017 pgmanutd * licensed MIT */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); diff --git a/lib/clogy.min.js b/lib/clogy.min.js index d6fb37f..ac72384 100644 --- a/lib/clogy.min.js +++ b/lib/clogy.min.js @@ -1,3 +1,3 @@ -/*! clogy - v1.3.2 * https://github.com/pgmanutd/clogy * (c) 2017 pgmanutd * licensed MIT */ +/*! clogy - v1.3.3 * https://github.com/pgmanutd/clogy * (c) 2017 pgmanutd * licensed MIT */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.clogy=t():e.clogy=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(7)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.LOGGING_METHODS=t.LOGGING_LEVELS=t.LOGGING_DEFAULT_OPTIONS=void 0;var r=n(4),i=o(r),u=n(5),l=o(u),s=n(6),f=o(s);t.LOGGING_DEFAULT_OPTIONS=i.default,t.LOGGING_LEVELS=l.default,t.LOGGING_METHODS=f.default},function(e,t,n){"use strict";function o(){return"undefined"!=typeof console}function r(e){return!!(e&&e>=s.LOGGING_LEVELS.range.min&&e<=s.LOGGING_LEVELS.range.max)}function i(e){return e===s.LOGGING_LEVELS.types.none}function u(e,t){return s.LOGGING_LEVELS.types[t]>=e}function l(){var e=new Date,t=e.toDateString(),n=e.toTimeString().match(/^([0-9]{2}:[0-9]{2}:[0-9]{2})/),o=n&&n.length?n[0]:"",r=("00"+e.getMilliseconds()).slice(-3);return t+" "+o+"."+r}t.__esModule=!0;var s=n(1);t.default={isConsoleDefined:o,isLogLevelValid:r,isNoneLogLevel:i,isLoggingAllowed:u,getDateTime:l}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.singleton=t.logging=t.common=void 0;var r=n(2),i=o(r),u=n(10),l=o(u),s=n(11),f=o(s);t.common=i.default,t.logging=l.default,t.singleton=f.default},function(e,t){"use strict";t.__esModule=!0,t.default=Object.freeze({showDateTime:!1,prefix:""})},function(e,t){"use strict";t.__esModule=!0,t.default=Object.freeze({get types(){return{log:1,trace:2,debug:3,info:4,warn:5,error:6,none:7}},get range(){return{min:this.types.log,max:this.types.none}}})},function(e,t){"use strict";t.__esModule=!0,t.default=["log","trace","debug","info","warn","error"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(8),i=o(r),u=new i.default;t.default=u,e.exports=u},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=n(3),s=n(9),f=o(s),c=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return u(t,e),t.prototype.noConflict=function(){return"undefined"!=typeof window&&window.clogy&&delete window.clogy,this},t.prototype.decorator=function(e){if("function"!=typeof e)throw new TypeError("Decorator should be a function");e(l.singleton.getInstance(this))},t}(f.default);t.default=c},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.currentLogLevel,n=e.loggingType,o=e.options,u=void 0===o?l.LOGGING_DEFAULT_OPTIONS:o,s=arguments[1];if(f.default.isConsoleDefined()){if(!f.default.isLogLevelValid(t))throw new RangeError("Invalid LogLevel set, Please set a valid LogLevel");!f.default.isNoneLogLevel(t)&&f.default.isLoggingAllowed(t,n)&&i(n,[].concat(r(u),s))}}t.__esModule=!0;var l=n(1),s=n(2),f=o(s),c="log";t.default={logToConsole:u}},function(e,t){"use strict";function n(e){var t=Object.getPrototypeOf;return t(t(e))}function o(e){return r||(r=n(e)),r}t.__esModule=!0;var r=void 0;t.default={getInstance:o}}])}); //# sourceMappingURL=clogy.min.js.map \ No newline at end of file diff --git a/package.json b/package.json index b24081e..373697a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clogy", - "version": "1.3.2", + "version": "1.3.3", "description": "A logging library for browsers and nodejs environment", "homepage": "https://github.com/pgmanutd/clogy", "author": {