dillon1000/react

Commit

[rust] Use hermes parser for Forget fixture tests

Replaces the use of SWC parser in the Forget fixture tests with Hermes Parser. 
This includes aligning on a single type to represent JS Values and numbers 
(combining semi-duplicated code from forget_hir and forget_estree) and adding 
support for lowering babel-style 
NumericLiteral/BooleanLiteral/StringLiteral/NullLiteral node types (since Hermes 
Parser produces a mix of estree/babel node types)
Browse files
Changed paths150 files
First-parent comparison
M compiler/forget/Cargo.lock ModifiedM compiler/forget/crates/forget_build_hir/src/build.rs ModifiedM compiler/forget/crates/forget_estree/src/js_value.rs ModifiedM compiler/forget/crates/forget_estree/src/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_estree/src/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_estree/src/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_estree_swc/src/lib.rs ModifiedM compiler/forget/crates/forget_fixtures/Cargo.toml ModifiedM compiler/forget/crates/forget_fixtures/tests/fixtures_test.rs ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allocating-primitive-as-dep-nested-scope.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations-complex-lvalue-array.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations-complex-lvalue.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@babel-existing-react-kitchensink-import.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture_mutate-across-fns.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-2.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-3.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-4.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-load-primitive-as-dependency.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@const-propagation-into-function-expression-primitive.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-into-function-expressions.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@declare-reassign-variable-in-function-declaration.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.babel-existing-react-namespace-import.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.bug-validate-no-set-state-not-all-mutable-range-extensions-are-bad.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-capture-func-passed-to-jsx.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-computed-store-to-frozen-value.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-unconditional-set-state-in-render.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.mutate-global-increment-op-invalid-react.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo-unconditional-set-state-lambda.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.while-with-assignment-in-test.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-if-else-with-alias.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-nested-if-else-with-alias.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-reactive-via-mutation-of-computed-load.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-reactive-via-mutation-of-property-load.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassigned-phi-in-returned-function-expression.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch-missing-case.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch-missing-default.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sequentially-constant-progagatable-if-test-conditions.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hir/src/instruction.rs ModifiedM compiler/forget/crates/forget_hir/src/print.rs ModifiedM compiler/forget/crates/forget_optimization/src/constant_propagation.rs Modified
Patch

Files changed

Rendering syntax-highlighted changes…