Skip to content

[docs] Running docs:api on windows causes differences on new lines #23577

Description

@mnajdova

When running yarn docs:api on Windows there are differences in the generated docs/pages/api-docs/*.json files regarding new lines: Example:

diff --git a/docs/pages/api-docs/badge.json b/docs/pages/api-docs/badge.json
index ff098c8330..5ccd01cc11 100644
--- a/docs/pages/api-docs/badge.json
+++ b/docs/pages/api-docs/badge.json
@@ -5,7 +5,7 @@
         "name": "shape",
         "description": "{ horizontal: 'left'<br>&#124;&nbsp;'right', vertical: 'bottom'<br>&#124;&nbsp;'top' }"
       },
-      "default": "{\n  vertical: 'top',\n  horizontal: 'right',\n}"
+      "default": "{\r\n  vertical: 'top',\r\n  horizontal: 'right',\r\n}"
     },
     "badgeContent": { "type": { "name": "node" } },
     "children": { "type": { "name": "node" } },

Current Behavior 😯

Around 30+ files are affected.

Expected Behavior 🤔

No changes should be generated if there is no code change.

Steps to Reproduce 🕹

Run yarn docs:api on current next on Windows.

Metadata

Metadata

Assignees

Labels

docsImprovements or additions to the documentation.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions