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

hapi-raml

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-raml - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

package.json
{
"name": "hapi-raml",
"version": "1.1.0",
"version": "1.2.0",
"description": "Create HAPI bindings from RAML specs automatically",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -35,14 +35,8 @@ 'use strict';

return new Promise((resolve, reject) => {
this.fs.readFile(this.resolvedRamlPath, (err, data) => {
if (err) {
reject(err);
} else {
this.parser.load(data)
.then((parsedData) => {
resolve(parsedData);
})
.catch((parseErr) => {
reject(new Error('Parsing error: ' + parseErr));
});
}
this.parser.loadFile(this.resolvedRamlPath)
.then((parsedData) => {
resolve(parsedData);
})
.catch((parseErr) => {
reject(new Error('Parsing error: ' + parseErr));
});

@@ -49,0 +43,0 @@ });

@@ -76,3 +76,3 @@ /*eslint-env mocha */

mockParser = {
load: () => {
loadFile: () => {
return new Promise((resolve) => {});

@@ -90,3 +90,3 @@ }

it('should load the file content and pass it to the parser', () => {
let loadStub = sinon.stub(mockParser, 'load', () => {
let loadStub = sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve, reject) => {

@@ -105,3 +105,3 @@ resolve();

let expectedAST = 'parsed';
let loadStub = sinon.stub(mockParser, 'load', () => {
let loadStub = sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve, reject) => {

@@ -116,3 +116,3 @@ resolve(expectedAST);

it('should reject if the raml fails to parse', () => {
let loadStub = sinon.stub(mockParser, 'load', () => {
let loadStub = sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve, reject) => {

@@ -138,3 +138,3 @@ reject();

mockParser = {
load: () => {
loadFile: () => {
return new Promise((resolve) => {

@@ -162,3 +162,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -179,3 +179,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -202,3 +202,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -224,3 +224,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -250,3 +250,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -278,3 +278,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -305,3 +305,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -333,3 +333,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -361,3 +361,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -389,3 +389,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -416,3 +416,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -444,3 +444,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -479,3 +479,3 @@ resolve({

sinon.stub(mockParser, 'load', () => {
sinon.stub(mockParser, 'loadFile', () => {
return new Promise((resolve) => {

@@ -482,0 +482,0 @@ resolve({

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