scratch-analysis
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -241,4 +241,7 @@ const utility = require('./utility'); | ||
// Metadata is only in sb3s so just fill in an empty object. | ||
meta.meta = {}; | ||
// Return all metadata | ||
return callback(null, meta); | ||
}; |
@@ -128,2 +128,10 @@ const utility = require('./utility'); | ||
const metadata = function (meta) { | ||
let obj = {}; | ||
if (meta.origin) { | ||
obj.origin = meta.origin; | ||
} | ||
return obj; | ||
}; | ||
module.exports = function (project, callback) { | ||
@@ -140,3 +148,4 @@ const meta = { | ||
blocks: blocks(project.targets), | ||
extensions: extensions(project.extensions) | ||
extensions: extensions(project.extensions), | ||
meta: metadata(project.meta) | ||
}; | ||
@@ -143,0 +152,0 @@ |
{ | ||
"name": "scratch-analysis", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Analysis tool for summarizing the structure, composition, and complexity of Scratch programs.", | ||
@@ -20,3 +20,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"scratch-parser": "4.3.6" | ||
"scratch-parser": "5.0.0" | ||
}, | ||
@@ -23,0 +23,0 @@ "devDependencies": { |
@@ -101,4 +101,5 @@ { | ||
"vm": "0.2.0-prerelease.20181217191056", | ||
"agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36" | ||
"agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", | ||
"origin": "test.scratch.mit.edu" | ||
} | ||
} |
@@ -72,2 +72,5 @@ const fs = require('fs'); | ||
t.type(result.meta, 'object'); | ||
t.deepEqual(result.meta, {}); | ||
t.end(); | ||
@@ -74,0 +77,0 @@ }); |
@@ -78,2 +78,4 @@ const fs = require('fs'); | ||
t.type(result.meta, 'object'); | ||
t.equal(result.meta.origin, 'test.scratch.mit.edu'); | ||
t.end(); | ||
@@ -141,2 +143,5 @@ }); | ||
t.type(result.meta, 'object'); | ||
t.deepEqual({}, result.meta); | ||
t.end(); | ||
@@ -143,0 +148,0 @@ }); |
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
4262847
1194
+ Addedscratch-parser@5.0.0(transitive)
- Removedcrc32@0.2.2(transitive)
- Removeddeflate-js@0.2.3(transitive)
- Removedgzip-js@0.3.2(transitive)
- Removedscratch-parser@4.3.6(transitive)
Updatedscratch-parser@5.0.0