Skip to content

Accept changes solely due to _jsxFileName#3186

Open
jakebailey wants to merge 1 commit intomainfrom
jabaile/jsx-file-name-accept
Open

Accept changes solely due to _jsxFileName#3186
jakebailey wants to merge 1 commit intomainfrom
jabaile/jsx-file-name-accept

Conversation

@jakebailey
Copy link
Member

The old test harness didn't consistently use an absolute path, so these differ.

There's also:

--- old.commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=legacy).js
+++ new.commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=legacy).js
@@= skipped -23, +23 lines =@@

 //// [commentsOnJSXExpressionsArePreserved.js]
 "use strict";
-const _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx";
+const _jsxFileName = "/.src/commentsOnJSXExpressionsArePreserved.tsx";
 class Component {
     render() {
-        return (0, _a.jsxDEV)("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 16 }, this);
+        return _jsxDEV("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 16 }, this);
     }
 }

Which is missing an indirect call, but this is actually erroring code, and what Strada did was wrong (note _a is not declared!).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository’s “accepted submodule diffs” list and reference diff artifacts to account for baseline changes where _jsxFileName is now emitted as an absolute /.src/... path (and aligns one legacy script emit with the upstream baseline).

Changes:

  • Add a new “_jsxFileName path” section to testdata/submoduleAccepted.txt and list the newly accepted .js.diff baselines.
  • Add/record accepted baseline diffs for react-jsxdev outputs where _jsxFileName changes from a bare filename to an absolute /.src/... path.
  • Align commentsOnJSXExpressionsArePreserved(...moduledetection=legacy) emit diff with the upstream baseline (script emit uses _jsxDEV and is intentionally not a module).

Reviewed changes

Copilot reviewed 1 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
testdata/submoduleAccepted.txt Adds an accepted-diffs section for _jsxFileName absolute-path baseline deltas.
testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=auto).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=legacy).js.diff Accepts _jsxFileName absolute-path change and reflects upstream script emit shape.
testdata/baselines/reference/submoduleAccepted/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/compiler/jsxRuntimePragma(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change in multiple emitted sections.
testdata/baselines/reference/submoduleAccepted/compiler/reactImportUnusedInNewJSXEmit(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/conformance/jsxJsxsCjsTransformChildren(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/conformance/jsxJsxsCjsTransformCustomImport(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/conformance/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/conformance/jsxJsxsCjsTransformKeyProp(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/conformance/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/conformance/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/conformance/jsxJsxsCjsTransformNestedSelfClosingChild(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/conformance/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/conformance/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.
testdata/baselines/reference/submoduleAccepted/conformance/tsxReactEmit8(jsx=react-jsxdev).js.diff Accepts _jsxFileName absolute-path baseline change.

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.

2 participants