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

react-cimpress-comment

Package Overview
Dependencies
Maintainers
6
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cimpress-comment - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

14

lib/clients/CommentClient.js

@@ -13,8 +13,2 @@ 'use strict';

var _httpErrors = require('http-errors');
var createError = _interopRequireWildcard(_httpErrors);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -51,5 +45,5 @@

} else if (response.status === 401) {
throw createError.Unauthorized();
throw new Error('Unauthorized');
} else if (response.status === 403) {
throw createError.Forbidden();
throw new Error('Forbidden');
} else {

@@ -76,5 +70,5 @@ throw new Error('Unable to fetch comment: ' + _this2.commentUri + ' (Status code: ' + response.status + ')');

} else if (response.status === 401) {
throw createError.Unauthorized();
throw new Error('Unauthorized');
} else if (response.status === 403) {
throw createError.Forbidden();
throw new Error('Forbidden');
} else {

@@ -81,0 +75,0 @@ throw new Error('Unable to update comment: ' + _this3.commentUri + ' (Status code: ' + response.status + ')');

@@ -13,8 +13,2 @@ 'use strict';

var _httpErrors = require('http-errors');
var createError = _interopRequireWildcard(_httpErrors);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -71,5 +65,5 @@

} else if (response.status === 401) {
throw createError.Unauthorized();
throw new Error('Unauthorized');
} else if (response.status === 403) {
throw createError.Forbidden();
throw new Error('Forbidden');
} else if (response.status === 404) {

@@ -99,5 +93,5 @@ return _this2.createResource().then(function (responseJson) {

} else if (response.status === 401) {
throw createError.Unauthorized();
throw new Error('Unauthorized');
} else if (response.status === 403) {
throw createError.Forbidden();
throw new Error('Forbidden');
} else {

@@ -120,9 +114,8 @@ throw new Error('Unable to create resource (Status code: ' + response.status + ')');

return fetch(url, init).then(function (response) {
throw createError.Forbidden();
if (response.status === 201) {
return response.json();
} else if (response.status === 401) {
throw createError.Unauthorized();
throw new Error('Unauthorized');
} else if (response.status === 403) {
throw createError.Forbidden();
throw new Error('Forbidden');
} else {

@@ -129,0 +122,0 @@ throw new Error('Unable to create comment for: ' + _this3.resourceUri + ' Status code: ' + response.status + ')');

{
"name": "react-cimpress-comment",
"version": "0.5.1",
"version": "0.5.2",
"description": "Visualizes comment(s) for a particular platform resource",

@@ -54,3 +54,2 @@ "main": "./lib/index.js",

"deepmerge": "^2.1.1",
"http-errors": "^1.6.3",
"i18next": "^11.3.2",

@@ -57,0 +56,0 @@ "react-i18next": "^7.6.1",

Sorry, the diff of this file is not supported yet

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