mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
refactor[scripts/prettier]: respect .prettierignore when resolving js files via glob (#27627)
This script is used on CI in `yarn_lint` job. With current `glob` call settings, it includes a bunch of build files, which are actually ignored by listing them in `.prettierignore`. This check is not failing only because there is no build step before it. If you run `node ./scripts/prettier/index` with build files present, you will see a bunch of files listed as non-formatted. These changes add a simple logic to include all paths listed in `.prettierignore` to ignore list of `glob` call with transforming them from gitignore-style to glob-style. This should unblock CI for https://github.com/facebook/react/pull/27612, where `flow-typed` directory will be added, turned out that including it in `.prettierignore` is not enough. DiffTrain build for commit https://github.com/facebook/react/commit/0c6348758f89be250070560972e736171201f82d.
This commit is contained in:
+1
-1
@@ -24887,7 +24887,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-canary-0965fbcab-20231030";
|
||||
var ReactVersion = "18.3.0-canary-0c6348758-20231030";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
+2
-2
@@ -9025,7 +9025,7 @@ var devToolsConfig$jscomp$inline_1032 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-0965fbcab-20231030",
|
||||
version: "18.3.0-canary-0c6348758-20231030",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1225 = {
|
||||
@@ -9056,7 +9056,7 @@ var internals$jscomp$inline_1225 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-0965fbcab-20231030"
|
||||
reconcilerVersion: "18.3.0-canary-0c6348758-20231030"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1226 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+2
-2
@@ -9451,7 +9451,7 @@ var devToolsConfig$jscomp$inline_1074 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-0965fbcab-20231030",
|
||||
version: "18.3.0-canary-0c6348758-20231030",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1266 = {
|
||||
@@ -9482,7 +9482,7 @@ var internals$jscomp$inline_1266 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-0965fbcab-20231030"
|
||||
reconcilerVersion: "18.3.0-canary-0c6348758-20231030"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1267 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ if (
|
||||
}
|
||||
"use strict";
|
||||
|
||||
var ReactVersion = "18.3.0-canary-0965fbcab-20231030";
|
||||
var ReactVersion = "18.3.0-canary-0c6348758-20231030";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
|
||||
+1
-1
@@ -580,4 +580,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-canary-0965fbcab-20231030";
|
||||
exports.version = "18.3.0-canary-0c6348758-20231030";
|
||||
|
||||
+1
-1
@@ -583,7 +583,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-canary-0965fbcab-20231030";
|
||||
exports.version = "18.3.0-canary-0c6348758-20231030";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0965fbcab3616523086d05c1069492cc171cbb80
|
||||
0c6348758f89be250070560972e736171201f82d
|
||||
|
||||
Reference in New Issue
Block a user