Commit graph

21 commits

Author SHA1 Message Date
apple502j
ca764efb0f
fix(parse): do not remove backslashes followed by b 2021-02-07 15:44:00 +09:00
Karishma Chadha
da7c3d12c1 refactor(unzip): remove support for gzip files
remove gzip dependency and support for gzip files as that was an unused code path

BREAKING CHANGE: Gzipped files are no longer supported as input to the parser.
2019-03-15 12:23:40 -04:00
Karishma Chadha
f73ef51038 fix(parse): remove backspace control characters from input to be parsed 2019-02-25 17:02:30 -05:00
chrisgarrity
750e866444 fix(unzip): handle sb2 files zipped with a folder
Uses a pattern to find the sprite or project json in a zipped folder or flat list of files.

Added tests for
* loading a sprite or project with a nested folder
* loading a file without a json

Fixes 
2019-02-07 11:24:33 +01:00
Karishma Chadha
bea66d6c2d fix(sb3_definitions): prevent sprites from being named _stage_
add test fixture and unit test for this change
2018-12-19 11:09:06 -05:00
Karishma Chadha
72437ce6c0 test(integration): add test for sb3 file with sprite named 'stage'
run sb3 files in the fixtures directory when running integration stress test
2018-12-18 18:25:35 -05:00
Karishma Chadha
d2fe285a8c feat: add layerOrder informaiton to stage and sprites
Validates the new layerOrder property for the stage and the sprites, adds tests for validation.
2018-07-24 17:00:38 -04:00
Karishma Chadha
97f6ef5bed test(tests): add tests for sb3 projects with comments 2018-06-15 10:55:28 -04:00
Karishma Chadha
af53ae2ef2 fix(sprite2): sprite2 validation should allow sprites without sounds 2018-05-07 10:24:12 -04:00
Karishma Chadha
78ce54e69f test: add new sprite2 test fixtures and integration tests
provide test coverage for sprite2 validation, and update sprite2_schema
2018-05-02 23:46:26 -04:00
Karishma Chadha
b0d1e46cd8 test(tests): fix up tests to accommodate new apis 2018-05-02 23:46:26 -04:00
Karishma Chadha
36b90ce8c6 test($test): Add tests for new gzip support. 2018-04-05 13:34:56 -04:00
Andrew Sliwinski
0fe264a05b refactor: Merge changes from upstream and resolve issues with interface and test coverage
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.
2018-03-24 11:36:17 -04:00
Andrew Sliwinski
f7cb29dff6 refactor: Extricates analysis from the scope of this project
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.
2018-03-24 11:19:01 -04:00
Andrew Sliwinski
e8369be7f5 refactor: Refactor library to use latest scratch eslint rules and update all dependencies
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
2018-03-24 11:09:43 -04:00
Karishma Chadha
663d6ee8e6 test($test): Rename zip to unzip for clarity. Add descriptive error message to
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).
2018-03-23 09:38:14 -04:00
Karishma Chadha
f767d6d4cb test($test): Fix up and add to existing tests.
Fixed up existing test coverage to accommodate the recent breaking changes.
2018-03-23 09:38:14 -04:00
Karishma Chadha
7e6cb8327a feat(unpack): Unpacker can now take string as input.
Allow unpacker to properly handle string as input, so that project json string (loaded from
scratch-storage) can be fed into scratch-parser.
2018-02-26 15:42:12 -05:00
Andrew Sliwinski
9322967b5c fix($schema): Removes 'sounds' from required array in JSON schema
Removes 'sounds' from required array in JSON schema as to resolve edge case discovered in GH-13

GH-13
2017-09-01 19:53:17 -03:00
Andrew Sliwinski
bf56efd280 fix(analyze): Resolve issues with block and sprite counts
Resolves issue where sprite counts were inflated due to global variables and lists as well as an
issue where block counts were deflated due to improper handling of nested block structures

GH-10
2017-05-12 16:31:33 -04:00
Andrew Sliwinski
a0a03ef679 Initial functioning parser 2016-03-18 19:51:40 -04:00