New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

codacy-coverage

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codacy-coverage - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

11

lib/reporter.js

@@ -5,3 +5,3 @@ (function (request, Joi, Promise, util, logger) {

var optionsValidation = Joi.object({
endpoint: Joi.string().min(1).optional().example('https://codacy.com/coverage/:token/:commitId')
endpoint: Joi.string().min(1).optional().example('https://codacy.com/api/2.0/coverage/:commitId/:language')
});

@@ -30,3 +30,3 @@ var tokenValidation = Joi.string().required().min(1).example('1234567890');//TODO: Revisit this validation to see if we can better validate the values

var endpoint = options.endpoint || 'https://www.codacy.com/api/coverage/:token/:commitId';
var endpoint = options.endpoint || 'https://www.codacy.com/api/2.0/coverage/:commitId/javascript';
logger.debug('Setting up reporter communicating to: ' + endpoint);

@@ -50,3 +50,3 @@

var url = endpoint.replace(':token', token).replace(':commitId', commitId);
var url = endpoint.replace(':commitId', commitId);
logger.trace(util.format('Sending POST to %s', url));

@@ -58,2 +58,7 @@

json: data,
headers: {
// jscs:disable
'project_token': token
// jscs:enable
},
resolveWithFullResponse: true

@@ -60,0 +65,0 @@ }).then(function (res) {

{
"name": "codacy-coverage",
"version": "1.1.1",
"version": "1.1.2",
"description": "Code Coverage reporter for Codacy.com",

@@ -5,0 +5,0 @@ "keywords": [

@@ -43,3 +43,3 @@ (function (handleInput, helper, Joi, request, fs, path) {

return expect(request({
url: 'https://www.codacy.com/api/coverage/1234/4321',
url: 'https://www.codacy.com/api/2.0/coverage/4321/javascript',
method: 'POST',

@@ -46,0 +46,0 @@ json: sampleCoverageData,

@@ -20,3 +20,3 @@ (function (nock, chai, Promise) {

return resolve(nock('https://www.codacy.com')
.post('/api/coverage/' + token + '/' + commitId, function (body) {
.post('/api/2.0/coverage/' + commitId + '/javascript', function (body) {
var result = bodyValidator.validate(body);

@@ -23,0 +23,0 @@ return result.error ? false : true;

@@ -42,3 +42,3 @@ (function (Joi, request, reporter, helper) {

return expect(request({
url: 'https://www.codacy.com/api/coverage/1234/4321',
url: 'https://www.codacy.com/api/2.0/coverage/4321/javascript',
method: 'POST',

@@ -45,0 +45,0 @@ json: sampleCoverageData,

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