@azure/avocado
Advanced tools
Comparing version 0.4.7 to 0.4.8
# Changelog | ||
## 0.4.8 | ||
- Replaced jsonStructuralDiff for structuralDiff. | ||
## 0.4.7 | ||
@@ -4,0 +8,0 @@ |
@@ -18,2 +18,3 @@ "use strict"; | ||
*/ | ||
// tslint:disable-next-line:no-async-without-await | ||
exports.run = async (tool, | ||
@@ -20,0 +21,0 @@ // tslint:disable-next-line:no-console no-unbound-method |
@@ -42,3 +42,3 @@ import * as cli from './cli'; | ||
*/ | ||
readonly jsonStructuralDiff: () => asyncIt.AsyncIterableEx<string>; | ||
readonly structuralDiff: () => asyncIt.AsyncIterableEx<string>; | ||
}; | ||
@@ -45,0 +45,0 @@ /** |
@@ -80,6 +80,7 @@ "use strict"; | ||
diff, | ||
jsonStructuralDiff: () => asyncIt.iterable(async function* () { | ||
const result = (await diff()).map(x => x.path).filter(filePath => filePath.endsWith('.json')); | ||
structuralDiff: () => asyncIt.iterable(async function* () { | ||
const result = (await diff()).map(x => x.path); | ||
for (const filePath of result) { | ||
if ((await getJsonString(filePath, sourceBranch)) !== (await getJsonString(filePath, targetBranch))) { | ||
if (!filePath.endsWith('.json') || | ||
(await getJsonString(filePath, sourceBranch)) !== (await getJsonString(filePath, targetBranch))) { | ||
yield filePath; | ||
@@ -86,0 +87,0 @@ } |
{ | ||
"name": "@azure/avocado", | ||
"version": "0.4.7", | ||
"version": "0.4.8", | ||
"description": "A validator of OpenAPI configurations", | ||
@@ -29,4 +29,4 @@ "main": "dist/index.js", | ||
"prettier": "prettier ./src/**/*.ts", | ||
"tslint": "tslint --project ./", | ||
"test": "tsc && tslint --project ./ && jest", | ||
"tslint": "tslint -t verbose --project ./", | ||
"test": "tsc && tslint -t verbose --project ./ && jest", | ||
"standard": "standard src/**/*.ts", | ||
@@ -105,4 +105,4 @@ "prepack": "npm install && tsc" | ||
"tslint-plugin-prettier": "^2.0.1", | ||
"typescript": "^3.4.5" | ||
"typescript": "^3.5.2" | ||
} | ||
} |
@@ -42,2 +42,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
*/ | ||
// tslint:disable-next-line:no-async-without-await | ||
export const run = async <T>( | ||
@@ -44,0 +45,0 @@ tool: (config: Config) => AsyncIterable<T>, |
@@ -56,3 +56,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
*/ | ||
readonly jsonStructuralDiff: () => asyncIt.AsyncIterableEx<string> | ||
readonly structuralDiff: () => asyncIt.AsyncIterableEx<string> | ||
} | ||
@@ -135,7 +135,10 @@ | ||
diff, | ||
jsonStructuralDiff: (): asyncIt.AsyncIterableEx<string> => | ||
structuralDiff: (): asyncIt.AsyncIterableEx<string> => | ||
asyncIt.iterable<string>(async function*() { | ||
const result = (await diff()).map(x => x.path).filter(filePath => filePath.endsWith('.json')) | ||
const result = (await diff()).map(x => x.path) | ||
for (const filePath of result) { | ||
if ((await getJsonString(filePath, sourceBranch)) !== (await getJsonString(filePath, targetBranch))) { | ||
if ( | ||
!filePath.endsWith('.json') || | ||
(await getJsonString(filePath, sourceBranch)) !== (await getJsonString(filePath, targetBranch)) | ||
) { | ||
yield filePath | ||
@@ -142,0 +145,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60868
1105