Comparing version 0.0.62 to 0.0.63
@@ -103,25 +103,28 @@ /** | ||
try { | ||
jsdom.env(data, function(errors, window) { | ||
if(errors && errors.length > 0) { | ||
return callback({ | ||
message: 'DOM Errors:', | ||
errors: errors, | ||
url: loc | ||
}); | ||
} | ||
jsdom.env({ | ||
html: data, | ||
done: function(errors, window) { | ||
if(errors && errors.length > 0) { | ||
return callback({ | ||
message: 'DOM Errors:', | ||
errors: errors, | ||
url: loc | ||
}); | ||
} | ||
try { | ||
// extract JSON-LD from RDFa | ||
RDFa.attach(window.document); | ||
jsonld.fromRDF(window.document.data, | ||
{format: 'rdfa-api'}, callback); | ||
try { | ||
// extract JSON-LD from RDFa | ||
RDFa.attach(window.document); | ||
jsonld.fromRDF(window.document.data, | ||
{format: 'rdfa-api'}, callback); | ||
} | ||
catch(ex) { | ||
// FIXME: expose RDFa/jsonld ex? | ||
callback({ | ||
message: 'RDFa extraction error.', | ||
contentType: type, | ||
url: loc | ||
}); | ||
} | ||
} | ||
catch(ex) { | ||
// FIXME: expose RDFa/jsonld ex? | ||
callback({ | ||
message: 'RDFa extraction error.', | ||
contentType: type, | ||
url: loc | ||
}); | ||
} | ||
}); | ||
@@ -128,0 +131,0 @@ } |
{ | ||
"name": "jsonld", | ||
"version": "0.0.62", | ||
"version": "0.0.63", | ||
"description": "A JSON-LD Processor and API implementation in JavaScript.", | ||
@@ -26,10 +26,10 @@ "homepage": "http://github.com/digitalbazaar/jsonld.js", | ||
"async": "~0.2.6", | ||
"commander": "~1.1.0", | ||
"jsdom": "~0.6.5", | ||
"pkginfo": "~0.2.3", | ||
"request": "~2.21.0", | ||
"commander": "~1.3.0", | ||
"jsdom": "~0.7.0", | ||
"pkginfo": "~0.3.0", | ||
"request": "~2.22.0", | ||
"xmldom": "0.1.16" | ||
}, | ||
"devDependencies": { | ||
"mocha": "~1.10.0", | ||
"mocha": "~1.12.0", | ||
"visionmedia-jscoverage": "~1.0.0" | ||
@@ -36,0 +36,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
311445
8737
2
+ Addedassert-plus@0.1.5(transitive)
+ Addedcommander@1.3.2(transitive)
+ Addedctype@0.5.3(transitive)
+ Addedhttp-signature@0.10.1(transitive)
+ Addedjsdom@0.7.0(transitive)
+ Addedpkginfo@0.3.1(transitive)
+ Addedrequest@2.22.0(transitive)
- Removedassert-plus@0.1.2(transitive)
- Removedcommander@1.1.1(transitive)
- Removedctype@0.5.2(transitive)
- Removedhttp-signature@0.9.11(transitive)
- Removedjsdom@0.6.5(transitive)
- Removedpkginfo@0.2.3(transitive)
- Removedrequest@2.21.0(transitive)
Updatedcommander@~1.3.0
Updatedjsdom@~0.7.0
Updatedpkginfo@~0.3.0
Updatedrequest@~2.22.0