Skip to content

Fixture: Legacy JSX Runtimes (#20012) * Fixture: Legacy JSX Runtimes * Add more comments - #6

Open
Menkalian wants to merge 1 commit into
ne_34-fromfrom
ne_34-to
Open

Fixture: Legacy JSX Runtimes (#20012) * Fixture: Legacy JSX Runtimes * Add more comments#6
Menkalian wants to merge 1 commit into
ne_34-fromfrom
ne_34-to

Conversation

@Menkalian

Copy link
Copy Markdown
Owner

No description provided.

* Fixture: Legacy JSX Runtimes

* Add more comments
Copilot AI review requested due to automatic review settings December 25, 2025 18:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a new fixture for testing legacy JSX runtimes. The main changes include excluding CJS directories from Prettier formatting, adding comprehensive test utilities, and creating fixture directories for React versions 15, 16, and 17 with their respective JSX runtime implementations.

  • Prettier configuration updated to ignore CJS directories
  • Test setup utilities added for handling console warnings/errors
  • Fixture directories created for React 15, 16, and 17 with JSX runtime polyfills

Reviewed changes

Copilot reviewed 30 out of 43 changed files in this pull request and generated 75 comments.

Show a summary per file
File Description
scripts/prettier/index.js Adds exclusion pattern for CJS directories from Prettier formatting
fixtures/legacy-jsx-runtimes/yarn.lock Complete dependency lockfile for the fixture
fixtures/legacy-jsx-runtimes/setupTests.js Test matchers for console warnings and errors
fixtures/legacy-jsx-runtimes/react-17/* React 17 fixture with JSX runtime implementations
fixtures/legacy-jsx-runtimes/react-16/* React 16 fixture with JSX runtime implementations
fixtures/legacy-jsx-runtimes/react-15/* React 15 fixture with JSX runtime implementations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
// TODO: Drop this when these are no longer allowed as the type argument.

if (element == null) {

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard always evaluates to false.

Copilot uses AI. Check for mistakes.
Comment on lines +821 to +823
if (element == null) {
return element;
} // Skip key warning if the type isn't valid since our key validation logic

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard always evaluates to false.

Suggested change
if (element == null) {
return element;
} // Skip key warning if the type isn't valid since our key validation logic
// Skip key warning if the type isn't valid since our key validation logic

Copilot uses AI. Check for mistakes.
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
// TODO: Drop this when these are no longer allowed as the type argument.

if (element == null) {

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard always evaluates to false.

Copilot uses AI. Check for mistakes.
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
// TODO: Drop this when these are no longer allowed as the type argument.

if (element == null) {

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard always evaluates to false.

Copilot uses AI. Check for mistakes.
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
// TODO: Drop this when these are no longer allowed as the type argument.

if (element == null) {

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This guard always evaluates to false.

Copilot uses AI. Check for mistakes.
REACT_BLOCK_TYPE = symbolFor('react.block');
REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
REACT_SCOPE_TYPE = symbolFor('react.scope');

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value assigned to REACT_SCOPE_TYPE here is unused.

Copilot uses AI. Check for mistakes.
REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
REACT_SCOPE_TYPE = symbolFor('react.scope');
REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value assigned to REACT_OPAQUE_ID_TYPE here is unused.

Copilot uses AI. Check for mistakes.
REACT_SCOPE_TYPE = symbolFor('react.scope');
REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value assigned to REACT_OFFSCREEN_TYPE here is unused.

Copilot uses AI. Check for mistakes.
} // Fallback to just using the name if we couldn't make it throw.


var name = fn ? fn.displayName || fn.name : '';

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This use of variable 'fn' always evaluates to true.

Copilot uses AI. Check for mistakes.
} // Fallback to just using the name if we couldn't make it throw.


var name = fn ? fn.displayName || fn.name : '';

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This use of variable 'fn' always evaluates to true.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants