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

@asyncapi/converter

Package Overview
Dependencies
Maintainers
3
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asyncapi/converter - npm Package Compare versions

Comparing version 0.6.2 to 0.7.0

test/input/2.2.0/streetlights.yml

2

cli.js

@@ -35,3 +35,3 @@ #!/usr/bin/env node

if (!version) {
version = '2.2.0';
version = '2.3.0';
}

@@ -38,0 +38,0 @@

@@ -25,2 +25,3 @@ const yaml = require('js-yaml');

'2.2.0': from__2_1_0__to__2_2_0,
'2.3.0': from__2_2_0__to__2_3_0,
}

@@ -196,12 +197,15 @@ const conversionVersions = Object.keys(conversions);

function from__2_0_0__to__2_1_0(asyncapi2) {
const result = asyncapi2;
result.asyncapi = '2.1.0';
return result;
function from__2_0_0__to__2_1_0(asyncapi) {
asyncapi.asyncapi = '2.1.0';
return asyncapi;
}
function from__2_1_0__to__2_2_0(asyncapi2) {
const result = asyncapi2;
result.asyncapi = '2.2.0';
return result;
function from__2_1_0__to__2_2_0(asyncapi) {
asyncapi.asyncapi = '2.2.0';
return asyncapi;
}
function from__2_2_0__to__2_3_0(asyncapi) {
asyncapi.asyncapi = '2.3.0';
return asyncapi;
}
{
"name": "@asyncapi/converter",
"version": "0.6.2",
"version": "0.7.0",
"description": "Convert AsyncAPI documents from older to newer versions.",

@@ -5,0 +5,0 @@ "bin": {

@@ -182,2 +182,16 @@ const assert = require('assert');

});
it('should convert from 2.1.0 to 2.3.0', () => {
const input = fs.readFileSync(path.resolve(__dirname, 'input', '2.1.0', 'streetlights.yml'), 'utf8');
const output = fs.readFileSync(path.resolve(__dirname, 'output', '2.3.0', 'streetlights.yml'), 'utf8');
const result = convert(input, '2.3.0');
assertResults(output, result);
});
it('should convert from 2.2.0 to 2.3.0', () => {
const input = fs.readFileSync(path.resolve(__dirname, 'input', '2.2.0', 'streetlights.yml'), 'utf8');
const output = fs.readFileSync(path.resolve(__dirname, 'output', '2.3.0', 'streetlights.yml'), 'utf8');
const result = convert(input, '2.3.0');
assertResults(output, result);
});
});

@@ -184,0 +198,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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