Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@remirror/core-helpers

Package Overview
Dependencies
Maintainers
1
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remirror/core-helpers - npm Package Compare versions

Comparing version 1.0.0-next.37 to 1.0.0-next.38

13

CHANGELOG.md
# @remirror/core-helpers
## 1.0.0-next.38
> 2020-09-16
### Major Changes
- [`6855ee77`](https://github.com/remirror/remirror/commit/6855ee773bf25a4b30d45a7e09eeab78d6b3f67a) [#689](https://github.com/remirror/remirror/pull/689) Thanks [@ifiokjr](https://github.com/ifiokjr)! - Remove `logError` method from the `RemirrorError`. Add `disableLogging` as a property instead.
### Patch Changes
- Updated dependencies []:
- @remirror/core-types@1.0.0-next.38
## 1.0.0-next.37

@@ -4,0 +17,0 @@

21

dist/core-helpers.browser.cjs.js

@@ -1101,3 +1101,5 @@ 'use strict';

code = _ref.code,
message = _ref.message;
message = _ref.message,
_ref$disableLogging = _ref.disableLogging,
disableLogging = _ref$disableLogging === void 0 ? false : _ref$disableLogging;

@@ -1116,12 +1118,7 @@ var errorCode;

this.url = "".concat(ERROR_INFORMATION_URL, "#").concat(errorCode.toLowerCase());
}
/**
* Log the error message and return the instance of the error.
*/
logError() {
// Log the error.
console.error(this.message);
return this;
if (!disableLogging) {
// Log the error.
console.error(this.message);
}
}

@@ -1144,3 +1141,3 @@

code: coreConstants.ErrorConstant.PROD
}).logError();
});
} // When not in production we allow the message to pass through

@@ -1150,3 +1147,3 @@ // **This is never called in production builds.**

throw RemirrorError.create(options).logError();
throw RemirrorError.create(options);
}

@@ -1153,0 +1150,0 @@ /**

@@ -1088,3 +1088,5 @@ import { BaseError } from 'make-error';

code = _ref.code,
message = _ref.message;
message = _ref.message,
_ref$disableLogging = _ref.disableLogging,
disableLogging = _ref$disableLogging === void 0 ? false : _ref$disableLogging;

@@ -1103,12 +1105,7 @@ var errorCode;

this.url = "".concat(ERROR_INFORMATION_URL, "#").concat(errorCode.toLowerCase());
}
/**
* Log the error message and return the instance of the error.
*/
logError() {
// Log the error.
console.error(this.message);
return this;
if (!disableLogging) {
// Log the error.
console.error(this.message);
}
}

@@ -1131,3 +1128,3 @@

code: ErrorConstant.PROD
}).logError();
});
} // When not in production we allow the message to pass through

@@ -1137,3 +1134,3 @@ // **This is never called in production builds.**

throw RemirrorError.create(options).logError();
throw RemirrorError.create(options);
}

@@ -1140,0 +1137,0 @@ /**

@@ -1101,3 +1101,5 @@ 'use strict';

code = _ref.code,
message = _ref.message;
message = _ref.message,
_ref$disableLogging = _ref.disableLogging,
disableLogging = _ref$disableLogging === void 0 ? false : _ref$disableLogging;

@@ -1116,12 +1118,7 @@ var errorCode;

this.url = "".concat(ERROR_INFORMATION_URL, "#").concat(errorCode.toLowerCase());
}
/**
* Log the error message and return the instance of the error.
*/
logError() {
// Log the error.
console.error(this.message);
return this;
if (!disableLogging) {
// Log the error.
console.error(this.message);
}
}

@@ -1144,3 +1141,3 @@

code: coreConstants.ErrorConstant.PROD
}).logError();
});
} // When not in production we allow the message to pass through

@@ -1150,3 +1147,3 @@ // **This is never called in production builds.**

throw RemirrorError.create(options).logError();
throw RemirrorError.create(options);
}

@@ -1153,0 +1150,0 @@ /**

@@ -388,9 +388,7 @@ "use strict";

constructor() {
var errorCode, _ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, code = _ref.code, message = _ref.message;
var errorCode, _ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, code = _ref.code, message = _ref.message, _ref$disableLogging = _ref.disableLogging, disableLogging = void 0 !== _ref$disableLogging && _ref$disableLogging;
isErrorConstant(code) ? super(createErrorMessage(errorCode = code, message)) : super(createErrorMessage(errorCode = coreConstants.ErrorConstant.CUSTOM, message)),
this.errorCode = errorCode, this.url = "".concat(ERROR_INFORMATION_URL, "#").concat(errorCode.toLowerCase());
this.errorCode = errorCode, this.url = "".concat(ERROR_INFORMATION_URL, "#").concat(errorCode.toLowerCase()),
disableLogging || console.error(this.message);
}
logError() {
return console.error(this.message), this;
}
}

@@ -401,3 +399,3 @@

code: coreConstants.ErrorConstant.PROD
}).logError();
});
}

@@ -404,0 +402,0 @@

@@ -1088,3 +1088,5 @@ import { BaseError } from 'make-error';

code = _ref.code,
message = _ref.message;
message = _ref.message,
_ref$disableLogging = _ref.disableLogging,
disableLogging = _ref$disableLogging === void 0 ? false : _ref$disableLogging;

@@ -1103,12 +1105,7 @@ var errorCode;

this.url = "".concat(ERROR_INFORMATION_URL, "#").concat(errorCode.toLowerCase());
}
/**
* Log the error message and return the instance of the error.
*/
logError() {
// Log the error.
console.error(this.message);
return this;
if (!disableLogging) {
// Log the error.
console.error(this.message);
}
}

@@ -1131,3 +1128,3 @@

code: ErrorConstant.PROD
}).logError();
});
} // When not in production we allow the message to pass through

@@ -1137,3 +1134,3 @@ // **This is never called in production builds.**

throw RemirrorError.create(options).logError();
throw RemirrorError.create(options);
}

@@ -1140,0 +1137,0 @@ /**

@@ -29,6 +29,2 @@ import { BaseError } from 'make-error';

private constructor();
/**
* Log the error message and return the instance of the error.
*/
logError(): this;
}

@@ -52,2 +48,8 @@ /**

message?: string;
/**
* When true logging to the console is disabled.
*
* @default false
*/
disableLogging?: boolean;
}
{
"name": "@remirror/core-helpers",
"version": "1.0.0-next.37",
"version": "1.0.0-next.38",
"description": "Provide helper functions for the remirror codebase, kinda like a tiny lodash",

@@ -25,3 +25,3 @@ "homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/@remirror/core-helpers",

"@remirror/core-constants": "1.0.0-next.35",
"@remirror/core-types": "1.0.0-next.37",
"@remirror/core-types": "1.0.0-next.38",
"@types/object.omit": "^3.0.0",

@@ -28,0 +28,0 @@ "@types/object.pick": "^1.3.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc