-
-
Notifications
You must be signed in to change notification settings - Fork 18
Add integration tests & misc improvements #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b102c45 to
f40f838
Compare
…ents Performance improvements
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is huge (wayy to big - I should have split it). It adds several improvements to Sandstone.
New formatter
I removed ESLint + Prettier in favor of BiomeJS. It's much faster, handles all rules gracefully, and sorts imports.
Integration tests
This PR adds a new integration tests framework for Sandstone, that allows us to compare the actual & expected results of Sandstone commands.
The following tests are currently implemented:
Relative MCFunction names
MCFunctions can now have a "relative" name, if their name starts with
./:_.if conditions
This re-implements the previously existing
_.conditions:_.block,_.blocks,_.biome,_.dimension...Improved commands JSDoc with examples
This PR adds documentation with real-life examples for all commands. This should hopefully help people get the hang of how all commands work.
More exports
This adds several missing exports to the top
sandstoneexport (missing commands, some useful arguments)Lazy MCMetaCache & Smithed
MCMetaCache&Smithedproperties ofSandstoneCorewere doing HTTP calls, which should not IMO happen on a pure build process. The previous getters have been transformed to cached functions - the HTTP calls will only happen if the user explicitly calls them.Removed: namespaced objectives
Objectives were forcefully namespaced, a decision I understand but disagree with. IMO we should add a 3d argument to
Objective.create(& a 2nd toObjective.get) to enable/disable namespacing.In the meantime, I removed this feature.
Bug fixes
This PR fixes a lot of bugs:
_.ordid not work when created outside a MCFunction => this was solved by introducing a dedicatedVisitor