Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scratch-parser

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scratch-parser - npm Package Compare versions

Comparing version 4.3.2 to 4.3.3

test/fixtures/data/_spriteNamedStage.sb3

2

lib/sb3_definitions.json

@@ -351,3 +351,3 @@ {

"type": "string",
"not": {"enum": ["Stage", "stage"]}
"not": {"enum": ["_stage_"]}
},

@@ -354,0 +354,0 @@ "isStage": {

@@ -29,5 +29,5 @@ {

"devDependencies": {
"@commitlint/cli": "6.1.0",
"@commitlint/config-conventional": "6.1.0",
"@commitlint/travis-cli": "6.1.0",
"@commitlint/cli": "7.2.1",
"@commitlint/config-conventional": "7.1.2",
"@commitlint/travis-cli": "7.2.1",
"babel-eslint": "8.2.2",

@@ -51,3 +51,3 @@ "benchmark": "^2.1.1",

},
"version": "4.3.2"
"version": "4.3.3"
}

@@ -57,3 +57,5 @@ var fs = require('fs');

invalidStageLayerSB3Json: fs.readFileSync(path.resolve(__dirname, './data/invalid/_invalid_stage_layer.json')),
invalidSpriteLayerSB3Json: fs.readFileSync(path.resolve(__dirname, './data/invalid/_invalid_sprite_layer.json'))
invalidSpriteLayerSB3Json: fs.readFileSync(path.resolve(__dirname, './data/invalid/_invalid_sprite_layer.json')),
invalidSpriteNameSB3Json: fs.readFileSync(
path.resolve(__dirname, './data/invalid/_invalid_spriteNamed_stage_.json'))
};

@@ -33,2 +33,18 @@ var test = require('tap').test;

test('sb3', function (t) {
var set = data.sb3;
t.plan(set.length * 5);
for (var i in data.sb3) {
parser(data.sb3[i], false, function (err, result) {
t.equal(err, null);
t.equal(Array.isArray(result), true);
var res = result[0];
var possibleZip = result[1];
t.type(res, 'object');
t.type(res.targets, 'object');
t.equal(possibleZip instanceof JSZip, true);
});
}
});
test('json', function (t) {

@@ -35,0 +51,0 @@ var set = data.json;

@@ -100,1 +100,10 @@ var test = require('tap').test;

});
// Sprites should not be named _stage_
test('sb3 json with invalid sprite name', function (t) {
validate(false, JSON.parse(data.invalidSpriteNameSB3Json), function (err, res) {
t.type(err, 'object');
t.type(res, 'undefined');
t.end();
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc