Skip to content

Commit

Permalink
feat(transform_conformance): add baseline for all TypeScript and jsx …
Browse files Browse the repository at this point in the history
…plugins
  • Loading branch information
Boshen committed Apr 13, 2024
1 parent e673550 commit 6561392
Show file tree
Hide file tree
Showing 2 changed files with 220 additions and 2 deletions.
217 changes: 216 additions & 1 deletion tasks/transform_conformance/babel.snap.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
Passed: 76/178
Passed: 83/392

# All Passed:
* babel-plugin-transform-react-jsx-source


# babel-preset-typescript (4/22)
* flow-compat/js-invalid/input.js
* flow-compat/js-valid/input.js
* flow-compat/ts-invalid/input.ts
* flow-compat/ts-valid/input.ts
* flow-compat/tsx-invalid/input.tsx
* flow-compat/tsx-valid/input.tsx
* jsx-compat/js-valid/input.js
* jsx-compat/ts-invalid/input.ts
* jsx-compat/tsx-valid/input.tsx
* node-extensions/import-in-cts/input.cts
* node-extensions/type-assertion-in-cts/input.cts
* node-extensions/type-assertion-in-mts/input.mts
* node-extensions/type-param-arrow-in-cts/input.mts
* node-extensions/type-param-arrow-in-mts/input.mts
* node-extensions/with-in-mts/input.mts
* opts/allowDeclareFields/input.ts
* opts/optimizeConstEnums/input.ts
* opts/rewriteImportExtensions/input.ts

# babel-plugin-transform-typescript (59/158)
* class/abstract-class-decorated/input.ts
* class/abstract-class-decorated-method/input.ts
Expand Down Expand Up @@ -105,10 +125,205 @@ Passed: 76/178
* regression/15768/input.ts
* variable-declaration/non-null-in-optional-chain/input.ts

# babel-preset-react (2/13)
* preset-options/development/input.js
* preset-options/development-runtime-automatic/input.js
* preset-options/development-runtime-automatic-windows/input.js
* preset-options/development-windows/input.js
* preset-options/empty-options/input.js
* preset-options/runtime-automatic/input.js
* preset-options/runtime-classic/input.js
* preset-options/runtime-classic-pragma-no-frag/input.js
* regression/11294/input.mjs
* regression/another-preset-with-custom-jsx-keep-source-self/input.mjs
* regression/runtime-classic-allow-multiple-source-self/input.mjs

# babel-plugin-transform-react-jsx (1/156)
* autoImport/after-polyfills/input.mjs
* autoImport/after-polyfills-2/input.mjs
* autoImport/after-polyfills-compiled-to-cjs/input.mjs
* autoImport/after-polyfills-script-not-supported/input.js
* autoImport/auto-import-react-source-type-module/input.js
* autoImport/auto-import-react-source-type-script/input.js
* autoImport/complicated-scope-module/input.js
* autoImport/complicated-scope-script/input.js
* autoImport/import-source/input.js
* autoImport/import-source-pragma/input.js
* autoImport/react-defined/input.js
* pure/false-default-pragma-automatic-runtime/input.js
* pure/false-default-pragma-classic-runtime/input.js
* pure/false-pragma-comment-automatic-runtime/input.js
* pure/false-pragma-comment-classic-runtime/input.js
* pure/false-pragma-option-automatic-runtime/input.js
* pure/false-pragma-option-classic-runtime/input.js
* pure/true-default-pragma-automatic-runtime/input.js
* pure/true-default-pragma-classic-runtime/input.js
* pure/true-pragma-comment-automatic-runtime/input.js
* pure/true-pragma-comment-classic-runtime/input.js
* pure/true-pragma-option-automatic-runtime/input.js
* pure/true-pragma-option-classic-runtime/input.js
* pure/unset-default-pragma-automatic-runtime/input.js
* pure/unset-default-pragma-classic-runtime/input.js
* pure/unset-pragma-comment-automatic-runtime/input.js
* pure/unset-pragma-comment-classic-runtime/input.js
* pure/unset-pragma-option-automatic-runtime/input.js
* pure/unset-pragma-option-classic-runtime/input.js
* react/adds-appropriate-newlines-when-using-spread-attribute/input.js
* react/arrow-functions/input.js
* react/assignment/input.js
* react/concatenates-adjacent-string-literals/input.js
* react/does-not-add-source-self/input.mjs
* react/dont-coerce-expression-containers/input.js
* react/duplicate-props/input.js
* react/flattens-spread/input.js
* react/handle-spread-with-proto/input.js
* react/honor-custom-jsx-comment/input.js
* react/honor-custom-jsx-comment-if-jsx-pragma-option-set/input.js
* react/honor-custom-jsx-pragma-option/input.js
* react/jsx-with-retainlines-option/input.js
* react/jsx-without-retainlines-option/input.js
* react/optimisation.react.constant-elements/input.js
* react/pragma-works-with-no-space-at-the-end/input.js
* react/proto-in-jsx-attribute/input.js
* react/should-add-quotes-es3/input.js
* react/should-allow-constructor-as-prop/input.js
* react/should-allow-deeper-js-namespacing/input.js
* react/should-allow-elements-as-attributes/input.js
* react/should-allow-js-namespacing/input.js
* react/should-allow-jsx-docs-comment-with-pragma/input.js
* react/should-allow-nested-fragments/input.js
* react/should-allow-no-pragmafrag-if-frag-unused/input.js
* react/should-allow-pragmafrag-and-frag/input.js
* react/should-avoid-wrapping-in-extra-parens-if-not-needed/input.js
* react/should-convert-simple-tags/input.js
* react/should-convert-simple-text/input.js
* react/should-disallow-spread-children/input.js
* react/should-disallow-valueless-key/input.js
* react/should-disallow-xml-namespacing/input.js
* react/should-escape-xhtml-jsxattribute/input.js
* react/should-escape-xhtml-jsxtext/input.js
* react/should-handle-attributed-elements/input.js
* react/should-handle-has-own-property-correctly/input.js
* react/should-have-correct-comma-in-nested-children/input.js
* react/should-insert-commas-after-expressions-before-whitespace/input.js
* react/should-not-add-quotes-to-identifier-names/input.js
* react/should-not-allow-jsx-pragma-to-be-anywhere-in-comment/input.js
* react/should-not-mangle-expressioncontainer-attribute-values/input.js
* react/should-not-strip-nbsp-even-coupled-with-other-whitespace/input.js
* react/should-not-strip-tags-with-a-single-child-of-nbsp/input.js
* react/should-properly-handle-comments-between-props/input.js
* react/should-quote-jsx-attributes/input.js
* react/should-support-xml-namespaces-if-flag/input.js
* react/should-throw-error-namespaces-if-not-flag/input.js
* react/should-transform-known-hyphenated-tags/input.js
* react/should-warn-when-importSource-is-set/input.js
* react/should-warn-when-importSource-pragma-is-set/input.js
* react/this-tag-name/input.js
* react/weird-symbols/input.js
* react/wraps-props-in-react-spread-for-first-spread-attributes/input.js
* react/wraps-props-in-react-spread-for-last-spread-attributes/input.js
* react/wraps-props-in-react-spread-for-middle-spread-attributes/input.js
* react-automatic/adds-appropriate-newlines-when-using-spread-attribute/input.js
* react-automatic/arrow-functions/input.js
* react-automatic/assignment/input.js
* react-automatic/concatenates-adjacent-string-literals/input.js
* react-automatic/does-not-add-source-self-automatic/input.mjs
* react-automatic/dont-coerce-expression-containers/input.js
* react-automatic/duplicate-props/input.js
* react-automatic/flattens-spread/input.js
* react-automatic/handle-fragments/input.js
* react-automatic/handle-fragments-with-key/input.js
* react-automatic/handle-fragments-with-no-children/input.js
* react-automatic/handle-nonstatic-children/input.js
* react-automatic/handle-spread-with-proto/input.js
* react-automatic/handle-static-children/input.js
* react-automatic/jsx-with-retainlines-option/input.js
* react-automatic/jsx-without-retainlines-option/input.js
* react-automatic/key-undefined-works/input.js
* react-automatic/optimisation.react.constant-elements/input.js
* react-automatic/pragma-works-with-no-space-at-the-end/input.js
* react-automatic/should-add-quotes-es3/input.js
* react-automatic/should-allow-constructor-as-prop/input.js
* react-automatic/should-allow-deeper-js-namespacing/input.js
* react-automatic/should-allow-elements-as-attributes/input.js
* react-automatic/should-allow-js-namespacing/input.js
* react-automatic/should-allow-nested-fragments/input.js
* react-automatic/should-avoid-wrapping-in-extra-parens-if-not-needed/input.js
* react-automatic/should-convert-simple-tags/input.js
* react-automatic/should-convert-simple-text/input.js
* react-automatic/should-disallow-spread-children/input.js
* react-automatic/should-disallow-valueless-key/input.js
* react-automatic/should-disallow-xml-namespacing/input.js
* react-automatic/should-escape-xhtml-jsxattribute/input.js
* react-automatic/should-escape-xhtml-jsxtext/input.js
* react-automatic/should-handle-attributed-elements/input.js
* react-automatic/should-handle-has-own-property-correctly/input.js
* react-automatic/should-have-correct-comma-in-nested-children/input.js
* react-automatic/should-insert-commas-after-expressions-before-whitespace/input.js
* react-automatic/should-not-add-quotes-to-identifier-names/input.js
* react-automatic/should-not-mangle-expressioncontainer-attribute-values/input.js
* react-automatic/should-not-strip-nbsp-even-coupled-with-other-whitespace/input.js
* react-automatic/should-not-strip-tags-with-a-single-child-of-nbsp/input.js
* react-automatic/should-properly-handle-comments-between-props/input.js
* react-automatic/should-properly-handle-keys/input.js
* react-automatic/should-properly-handle-null-prop-spread/input.js
* react-automatic/should-quote-jsx-attributes/input.js
* react-automatic/should-support-xml-namespaces-if-flag/input.js
* react-automatic/should-throw-error-namespaces-if-not-flag/input.js
* react-automatic/should-throw-when-filter-is-specified/input.js
* react-automatic/should-transform-known-hyphenated-tags/input.js
* react-automatic/should-use-createElement-when-key-comes-after-spread/input.js
* react-automatic/should-use-jsx-when-key-comes-before-spread/input.js
* react-automatic/should-warn-when-pragma-or-pragmaFrag-is-set/input.js
* react-automatic/this-tag-name/input.js
* react-automatic/weird-symbols/input.js
* react-automatic/wraps-props-in-react-spread-for-last-spread-attributes/input.js
* react-automatic/wraps-props-in-react-spread-for-middle-spread-attributes/input.js
* regression/issue-12478-automatic/input.js
* regression/issue-12478-classic/input.js
* regression/pragma-frag-set-default-classic-runtime/input.js
* removed-options/invalid-use-builtins-false/input.js
* removed-options/invalid-use-builtins-true/input.js
* removed-options/invalid-use-spread-false/input.js
* removed-options/invalid-use-spread-true/input.js
* runtime/classic/input.js
* runtime/defaults-to-automatic/input.js
* runtime/invalid-runtime/input.js
* runtime/pragma-runtime-classsic/input.js
* runtime/runtime-automatic/input.js
* sourcemaps/JSXText/input.js
* spread-transform/transform-to-babel-extend/input.js
* spread-transform/transform-to-object-assign/input.js

# babel-plugin-transform-react-display-name (15/16)
* display-name/nested/input.js

# babel-plugin-transform-react-jsx-self (1/3)
* react-source/arrow-function/input.js
* react-source/disable-with-super/input.js

# babel-plugin-transform-react-jsx-development (0/23)
* cross-platform/disallow-__self-as-jsx-attribute/input.js
* cross-platform/disallow-__source-as-jsx-attribute/input.js
* cross-platform/generated-jsx/input.js
* linux/auto-import-dev/input.js
* linux/classic-runtime/input.js
* linux/fragments/input.js
* linux/handle-fragments-with-key/input.js
* linux/handle-nonstatic-children/input.js
* linux/handle-static-children/input.js
* linux/self-inside-arrow/input.mjs
* linux/source-and-self-defined/input.js
* linux/within-derived-classes-constructor/input.js
* linux/within-ts-module-block/input.ts
* windows/auto-import-dev-windows/input.js
* windows/classic-runtime-windows/input.js
* windows/fragments-windows/input.js
* windows/handle-fragments-with-key-windows/input.js
* windows/handle-nonstatic-children-windows/input.js
* windows/handle-static-children-windows/input.js
* windows/self-inside-arrow-windows/input.mjs
* windows/source-and-self-defined-windows/input.js
* windows/within-derived-classes-constructor-windows/input.js
* windows/within-ts-module-block/input.ts

5 changes: 4 additions & 1 deletion tasks/transform_conformance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,15 @@ const CASES: &[&str] = &[
// // ES3
// "babel-plugin-transform-property-literals",
// TypeScript
"babel-preset-typescript",
"babel-plugin-transform-typescript",
// React
// "babel-plugin-transform-react-jsx",
"babel-preset-react",
"babel-plugin-transform-react-jsx",
"babel-plugin-transform-react-display-name",
"babel-plugin-transform-react-jsx-self",
"babel-plugin-transform-react-jsx-source",
"babel-plugin-transform-react-jsx-development",
// // Proposal
// "babel-plugin-proposal-decorators",
];
Expand Down

0 comments on commit 6561392

Please sign in to comment.