Skip to content

Commit

Permalink
chore: upgrade @asyncapi/parser to v3.4.0
Browse files Browse the repository at this point in the history
Upgrade @asyncapi/parser to version 3.4.0 to fix CVE-2024-21534.

Fix: #68
  • Loading branch information
pebo committed Feb 6, 2025
1 parent ce1fb58 commit 2953393
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 47 deletions.
121 changes: 79 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"homepage": "https://github.com/WaleedAshraf/asyncapi-validator#readme",
"dependencies": {
"@asyncapi/openapi-schema-parser": "3.0.24",
"@asyncapi/parser": "3.1.0",
"@asyncapi/parser": "3.4.0",
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1"
},
Expand All @@ -42,4 +42,4 @@
"eslint-plugin-standard": "^4.0.1",
"jest": "^28.0.1"
}
}
}
6 changes: 3 additions & 3 deletions test/src/AsyncApiValidatorFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('AsyncApiValidator', () => {

it('should throw error if unable to parse file', async () => {
const validator = AsyncApiValidator.fromSource(mocks.htmlFile)
await expect(validator).rejects.toThrowError(/Error thrown during AsyncAPI document parsing/)
await expect(validator).rejects.toThrowError(/This is not an AsyncAPI document./)
})

it('should throw error if schema body is broken', async () => {
Expand All @@ -32,8 +32,8 @@ describe('AsyncApiValidator', () => {
severity: 0,
source: 'test/schemas/invalid.yml',
range: {
start: {line: 17, character: 13},
end: {line: 17, character: 17}
start: {line: 14, character: 8},
end: {line: 14, character: 8}
}
})
}
Expand Down

0 comments on commit 2953393

Please sign in to comment.