This change is marked as containing breaking changes because prior commits did not get parsed
correctly with semantic-release. This change should issue a new version of scratch-parser containing
changes to the sb2 and sb3 schemas, added support for gzipped file, and corresponding tests.
BREAKING CHANGE: changes to sb2 validation, sb3 validation (block serialization is more compact),
added support for gzipped json files
Update validation of sb3 projects to account for new block serialization that includes
precompression of primitives like the math_number or text blocks.
BREAKING CHANGE: Changes to the unzip library function. It takes an extra argument describing
whether the given input should be unpacked as a gzip file. Otherwise unpacks as a zip file.
Merges in changes from upstream and resolves issues with both the removal of the analysis library as
well as issues with lint rules and integration tests.
Removes the ./lib/analysis module from the scope of this project along with all related
documentation and test coverage.
BREAKING CHANGE: Module no longer provides a _meta object with returned project object.
Refactors library to use latest scratch eslint rules. Updates all dependencies to latest versions
which requires minor changes to the JSON schema, tests, and supported engine (8+)
BREAKING CHANGE: Module no longer supports less than Node 8
Recorded sounds were not being validated properly in sb3 because they were missing previously
required properties like 'rate' and 'sampleCount'. Removing these requirements.
Added unit tests for unzip and added a user-friendly error message for unzip being unable to perform
its duties of extracting a project.json from the given input (zip).
Field and input values can be strings or numbers. TopLevel property is not required of blocks. VM
version property should be more permissive and follow semantic release convention.
Refactor unpack and main exported function to return optional zip, if originally provided, in
addition to the validated project.
BREAKING CHANGE: Change to main api to return originally provided zip (or null if string was
provided) along with validated project, in a 2-element array.
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.