Repository navigation
fix: reject minification of implicit simple output - #2182
Open
ryanchou1994 wants to merge 1 commit into
Open
ryanchou1994 wants to merge 1 commit into
ryanchou1994 wants to merge 1 commit into
Conversation
Author
|
Hi @jaylinski, friendly ping: the workflows on this PR are still waiting for approval to run. Happy to adjust anything if needed. Thanks! |
This branch has not been deployed
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
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.
Running
echo test | handlebars -m -i-currently exits successfully and printsundefined. An unnamed template implicitly enables simple output, but that happens after the existing simple-output/minification check.Apply the same check to a single unnamed template before compiling. This reports
Unable to minimize simple outputwith exit status 1 and no stdout, matching explicit--simple --minbehavior. Named inline and stdin templates still produce executable minimized output. Existing error precedence is preserved.Adds real CLI regressions for both input forms, named-minification rendering controls, and a guard-precedence test. The two new rejection tests fail on the original code.
Validation: Linux build, lint and default test suite pass (655 passed, 27 skipped; coverage thresholds pass). The Mac suite also passes with command-scoped
init.defaultBranch=masterto match existing Git test fixtures; lint passes. Separate integration/browser/Windows matrices were not run locally.Refs #1525. This does not add minification support for unnamed simple output.
Before creating a pull-request, please check https://github.com/handlebars-lang/handlebars.js/blob/master/CONTRIBUTING.md first.
Generally we like to see pull requests that
masterbranch in the PR.