Commit graph

4 commits

Author SHA1 Message Date
Karishma Chadha
b808e7447f feat(schemas): add support for sprite files for 2.0 and 3.0
refactor schemas to support sprite2 and sprite3 files, while reusing rules in common with sb2 and
sb3 files

BREAKING CHANGE: Change to main API which now takes an additional boolean argument indicating
whether a sprite or project is being validated
2018-05-02 23:46:26 -04:00
Karishma Chadha
a74a97a906 feat($lib): Add sb3 schema for validation of Scratch 3.0 projects.
Added sb3 schema, renamed sb2 schema, and updated validate to check given input against both sb2 and
sb3 schemas. Validate appends a projectVersion to the given project with 2 or 3 if the given project
is valid against the corresponding schema. Validate now returns an object containing an error
message and both the sb2 and sb3 validation errors upon failure to validate against both schemas.

BREAKING CHANGE: Changes to validate API and what it returns (namely, error returned by validate is
no longer a string, but is now an object which contains an error message string as well as the sb2
errors and the sb3 errors). Users of this library function should expect to parse the given error to
figure out why validation failed.
2018-03-23 09:37:24 -04:00
Andrew Sliwinski
a0a03ef679 Initial functioning parser 2016-03-18 19:51:40 -04:00
Andrew Sliwinski
4642c66e08 Initial WIP commit with streaming parser 2016-03-15 10:31:35 -04:00