Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@weave-md/validate

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@weave-md/validate - npm Package Compare versions

Comparing version
0.3.1-alpha.0
to
0.5.0
+0
-38
dist/blocks/index.js

@@ -38,5 +38,2 @@ import { parse } from 'yaml';

break;
case 'voiceover':
diagnostics.push(...validateVoiceoverBlock(block, filePath));
break;
case 'math':

@@ -353,37 +350,2 @@ diagnostics.push(...validateMathBlock(block, filePath));

}
function validateVoiceoverBlock(block, filePath) {
const diagnostics = [];
try {
const data = parse(block.content);
if (!data || typeof data !== 'object') {
diagnostics.push({
severity: 'error',
message: 'Voiceover block must contain YAML data',
filePath,
position: { line: block.line, character: 1 },
code: 'invalid-voiceover-block'
});
return diagnostics;
}
if (!data.file) {
diagnostics.push({
severity: 'error',
message: 'Voiceover block must have a "file" field',
filePath,
position: { line: block.line, character: 1 },
code: 'missing-voiceover-file'
});
}
}
catch (error) {
diagnostics.push({
severity: 'error',
message: `Failed to parse voiceover block YAML: ${error instanceof Error ? error.message : String(error)}`,
filePath,
position: { line: block.line, character: 1 },
code: 'invalid-voiceover-yaml'
});
}
return diagnostics;
}
function validateMathBlock(block, filePath) {

@@ -390,0 +352,0 @@ const diagnostics = [];

+3
-3
{
"name": "@weave-md/validate",
"version": "0.3.1-alpha.0",
"version": "0.5.0",
"description": "Reference validation for Weave Markdown",

@@ -31,3 +31,3 @@ "type": "module",

"peerDependencies": {
"@weave-md/core": "^0.3.1-alpha.0"
"@weave-md/core": "^0.5.0"
},

@@ -40,3 +40,3 @@ "dependencies": {

"typescript": "^5.7.0",
"@weave-md/core": "^0.3.1-alpha.0"
"@weave-md/core": "^0.5.0"
},

@@ -43,0 +43,0 @@ "scripts": {

@@ -17,3 +17,2 @@ # @weave-md/validate

- `embed` blocks (requires `url`)
- `voiceover` blocks (requires `file`)
- `math` blocks (validates non-empty content)

@@ -20,0 +19,0 @@ - `pre` blocks (warns about empty content)