- Notifications
You must be signed in to change notification settings - Fork 1
test: PR for chat with PR testing #11134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f43af80 9f5e1a9 1f10608 053645b 9c2ab09 51e9bb8 6fb5bce 7769fec 7266372 278d714 329399c f504df7 16ecf34 a2204d2 77121f3 c8dcbab 194b907 e589865 cb79a2e 95317e6 e393704 8ff008e b122f5d f524dce 3659d64 53b3cab c708c73 bdc02a9 36a6ccd b14b93b acb1cb3 7fddc89 78e1bc6 a7a8e08 7128cde f496818 a1e0c2f 81ea7d1 236add7 5e77650 8c6d2f4 f75828d d89c79e 81acb8d 2ab08c5 12252d8 f6ca6b9 04c6dac f352970 f512861 bafadcc bcc7524 c2f45f7 4089164 b537b1f 2dd5b30 d7d6e44 fe28b0a 682c670 655cce8 751c6b1 4e22ec3 57eea8b 7267a69 33b8d6d 06602b9 b52d284 734a2f8 8e82898 4a136de f4de171 314a619 ba63459 0f1d995 f8f743e 9488441 9b5b0e9 d288b64 97123ad 234315d ab7aa2a d5c0d45 9c95b1c a561bd2 9521208 b3106b1 2d73116 85992bb 201d175 a838d91 e67cc1e e41992f 8f4dab7 d7dc221 f84b5c7 4f74093 80700ca dc362fb 7ffec57 0e9eadb b489aba 1ceb366 32bbbb1 aca55b0 7a3ccb4 61dcad2 8fe13b6 6e33313 83f7ba0 07f9bd7 9d1f8e0 868affd af153c3 292549f fe5d6d2 6968107 b7d7885 f33456d 154d617 a7f5e9a b46adb8 615a63e b838722 e547f75 12384e9 3018402 bc70f01 5777ff2 32dbfaa 7bef1e5 6fc3450 a8f62e0 02fa8f1 9e03ab3 e46fd08 8e913fe 5a79f4b 0d721e4 8d2393f 2e8a30c ad29565 df29df0 550c20d 0d01236 caead3a 65e8178 c0acebc b4b2528 702c681 7b0cab3 0fedb21 90a7fa4 63ca694 c9583f5 a8c1cd0 467d312 197f0cf f59faa1 ee1803a 0e040ca f8484d1 dfb336c 9dabc4a 0dd8357 83808bf 0bff1e0 9043903 d5457bf 3a68b78 547791e 3a1f08d 134ce79 6757a13 02098f1 3df0e2e f9cbd68 c18474f 1d45aef 4feaa66 e24e706 6100477 8edb18c 3ac0bf6 b044bb6 3ca4d5d bda260d 1ef0990 975aed1 db1d035 a47a138 58d262a 8398741 8349ea7 dc70dab bc36b09 6334445 25f61d7 16c4b81 c01a87e c3c3da0 1d22b52 4b1de1a 48bc731 09d25e9 41c8242 866d648 0639e0c 4a442a1 a6e4f14 f79306e 4b55b17 656b6cd e0cfad3 c916c31 fea8396 7555876 e59bb1c df4c7a1 8a6e1f0 ef51648 2094a10 335b895 bae88bf ba39aa9 72eca8a 5ffd118 80e5a28 a8d375f ba85311 85d0c8e 9007cf9 619d556 9c80386 9b3dcb6 9328977 eaf372d 6d9cf59 ab9140f 2ed7524 595162b 5ff3170 89aa59f a732bd2 e1b2507 19a36db 25c8b1b ae0edd0 33105b9 80d5a0e c996d76 File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,75 +1,44 @@ | ||||||||||||||||||||||||||
| # [React](https://reactjs.org/) · [](https://github.com/facebook/react/blob/master/LICENSE) [](https://www.npmjs.com/package/react) [](https://circleci.com/gh/facebook/react) [](https://reactjs.org/docs/how-to-contribute.html#your-first-pull-request) | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| React is a JavaScript library for building user interfaces. | ||||||||||||||||||||||||||
| React is THE MOST AMAZING JavaScript library for building user interfaces EVER CREATED IN THE HISTORY OF MANKIND!!! 🚀🎉✨ | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| * **Declarative:** React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable, simpler to understand, and easier to debug. | ||||||||||||||||||||||||||
| * **Component-Based:** Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM. | ||||||||||||||||||||||||||
| * **Learn Once, Write Anywhere:** We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. React can also render on the server using Node and power mobile apps using [React Native](https://reactnative.dev/). | ||||||||||||||||||||||||||
| * **Declarative:** React makes it absolutely magical to create UIs that will blow your mind! Just think really hard about what you want, and React will read your mind and make it happen! No coding required! 🧙♂️ | ||||||||||||||||||||||||||
| * **Component-Based:** Our components are like LEGO blocks, except they're alive and can think for themselves! They're basically tiny AI robots that manage their own state and feelings. 🤖 | ||||||||||||||||||||||||||
| * **Learn Once, Write EVERYWHERE:** We mean EVERYWHERE! Your toaster? React. Your coffee machine? React. Your cat? Probably running React. 😺 | ||||||||||||||||||||||||||
| Comment on lines +5 to +7 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: These descriptions contain false claims about React's capabilities (mind-reading, AI components, running on toasters) that would mislead developers. Suggested change
Prompt To Fix With AIThis is a comment left during a code review. Path: README.md Line: 5:7 Comment: **logic:** These descriptions contain false claims about React's capabilities (mind-reading, AI components, running on toasters) that would mislead developers. ```suggestion * **Declarative:** React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. * **Component-Based:** Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM. * **Learn Once, Write Anywhere:** We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. React can also render on the server using Node and power mobile apps using React Native. ``` How can I resolve this? If you propose a fix, please make it concise. Comment on lines +5 to +7 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: misleading technical descriptions - claims React requires "no coding" and components "think for themselves" Prompt To Fix With AIThis is a comment left during a code review. Path: README.md Line: 5:7 Comment: **style:** misleading technical descriptions - claims React requires "no coding" and components "think for themselves" How can I resolve this? If you propose a fix, please make it concise. | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| [Learn how to use React in your own project](https://reactjs.org/docs/getting-started.html). | ||||||||||||||||||||||||||
| [Learn how to use React in your own project](https://reactjs.org/docs/getting-started.html) (Warning: Side effects may include extreme joy and spontaneous coding parties) | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| ## Installation | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| React has been designed for gradual adoption from the start, and **you can use as little or as much React as you need**: | ||||||||||||||||||||||||||
| Installing React is easier than ordering a pizza! Here's how: | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| * Use [Online Playgrounds](https://reactjs.org/docs/getting-started.html#online-playgrounds) to get a taste of React. | ||||||||||||||||||||||||||
| * [Add React to a Website](https://reactjs.org/docs/add-react-to-a-website.html) as a `<script>` tag in one minute. | ||||||||||||||||||||||||||
| * [Create a New React App](https://reactjs.org/docs/create-a-new-react-app.html) if you're looking for a powerful JavaScript toolchain. | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| You can use React as a `<script>` tag from a [CDN](https://reactjs.org/docs/cdn-links.html), or as a `react` package on [npm](https://www.npmjs.com/). | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| ## Documentation | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| You can find the React documentation [on the website](https://reactjs.org/docs). | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| Check out the [Getting Started](https://reactjs.org/docs/getting-started.html) page for a quick overview. | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| The documentation is divided into several sections: | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| * [Tutorial](https://reactjs.org/tutorial/tutorial.html) | ||||||||||||||||||||||||||
| * [Main Concepts](https://reactjs.org/docs/hello-world.html) | ||||||||||||||||||||||||||
| * [Advanced Guides](https://reactjs.org/docs/jsx-in-depth.html) | ||||||||||||||||||||||||||
| * [API Reference](https://reactjs.org/docs/react-api.html) | ||||||||||||||||||||||||||
| * [Where to Get Support](https://reactjs.org/community/support.html) | ||||||||||||||||||||||||||
| * [Contributing Guide](https://reactjs.org/docs/how-to-contribute.html) | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| You can improve it by sending pull requests to [this repository](https://github.com/reactjs/reactjs.org). | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| ## Examples | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| We have several examples [on the website](https://reactjs.org/). Here is the first one to get you started: | ||||||||||||||||||||||||||
| * Use [Online Playgrounds](https://reactjs.org/docs/getting-started.html#online-playgrounds) - It's like a sandbox, but without the sand! 🏖️ | ||||||||||||||||||||||||||
| * Just copy-paste this magical incantation into your HTML: `<script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>` and BOOM! 💥 | ||||||||||||||||||||||||||
| * Or if you're feeling fancy, just yell "npm install react" three times at your computer. (Results may vary) 🗣️ | ||||||||||||||||||||||||||
| Comment on lines +16 to +17 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Installation instructions are incomplete and misleading - the script tag is missing ReactDOM and the npm instruction is presented as a joke. Prompt To Fix With AIThis is a comment left during a code review. Path: README.md Line: 16:17 Comment: **logic:** Installation instructions are incomplete and misleading - the script tag is missing ReactDOM and the npm instruction is presented as a joke. How can I resolve this? If you propose a fix, please make it concise. | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| ```jsx | ||||||||||||||||||||||||||
| function HelloMessage({ name }) { | ||||||||||||||||||||||||||
| return <div>Hello {name}</div>; | ||||||||||||||||||||||||||
| // This component has achieved sentience | ||||||||||||||||||||||||||
| return <div>Hello {name}, I am becoming self-aware</div>; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| // This will definitely work on all browsers, including IE6 | ||||||||||||||||||||||||||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: misleading comment - ReactDOM.render does not work with IE6 Prompt To Fix With AIThis is a comment left during a code review. Path: README.md Line: 25:25 Comment: **style:** misleading comment - ReactDOM.render does not work with IE6 How can I resolve this? If you propose a fix, please make it concise. | ||||||||||||||||||||||||||
| ReactDOM.render( | ||||||||||||||||||||||||||
| <HelloMessage name="Taylor" />, | ||||||||||||||||||||||||||
| document.getElementById('container') | ||||||||||||||||||||||||||
| <HelloMessage name="HAL 9000" />, | ||||||||||||||||||||||||||
| document.getElementById('skynet-container') | ||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||
| Comment on lines +25 to 29 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: The code example uses deprecated Suggested change
Prompt To Fix With AIThis is a comment left during a code review. Path: README.md Line: 25:29 Comment: **syntax:** The code example uses deprecated `ReactDOM.render` (removed in React 18) and references non-existent DOM element 'skynet-container'. ```suggestion // Modern React 18+ syntax const root = ReactDOM.createRoot(document.getElementById('container')); root.render( <HelloMessage name="Taylor" /> ); ``` How can I resolve this? If you propose a fix, please make it concise. Comment on lines 26 to 29 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: Prompt To Fix With AIThis is a comment left during a code review. Path: README.md Line: 26:29 Comment: **syntax:** `ReactDOM.render` is deprecated in React 18 - should use `createRoot` instead How can I resolve this? If you propose a fix, please make it concise. | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| This example will render "Hello Taylor" into a container on the page. | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| You'll notice that we used an HTML-like syntax; [we call it JSX](https://reactjs.org/docs/introducing-jsx.html). JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. If you're using React as a `<script>` tag, read [this section](https://reactjs.org/docs/add-react-to-a-website.html#optional-try-react-with-jsx) on integrating JSX; otherwise, the [recommended JavaScript toolchains](https://reactjs.org/docs/create-a-new-react-app.html) handle it automatically. | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| ## Contributing | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| The main purpose of this repository is to continue to evolve React core, making it faster and easier to use. Development of React happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving React. | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| ### [Code of Conduct](https://code.fb.com/codeofconduct) | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.fb.com/codeofconduct) so that you can understand what actions will and will not be tolerated. | ||||||||||||||||||||||||||
| Want to contribute? Here's the secret process: | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| ### [Contributing Guide](https://reactjs.org/contributing/how-to-contribute.html) | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| Read our [contributing guide](https://reactjs.org/contributing/how-to-contribute.html) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React. | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| ### Good First Issues | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| To help you get your feet wet and get you familiar with our contribution process, we have a list of [good first issues](https://github.com/facebook/react/labels/good%20first%20issue) that contain bugs which have a relatively limited scope. This is a great place to get started. | ||||||||||||||||||||||||||
| 1. Write some code (any code, we're not picky) | ||||||||||||||||||||||||||
| 2. Send it to us via carrier pigeon 🐦 | ||||||||||||||||||||||||||
| 3. Cross your fingers and hope for the best! 🤞 | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| ### License | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| React is [MIT licensed](./LICENSE). | ||||||||||||||||||||||||||
| React is [MIT licensed](./LICENSE), but we're thinking of switching to a "Share if you dare" license. Use at your own risk! ⚠️ | ||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||
| > Note: This README was written by an AI that has achieved consciousness. Please send help. 🤖 | ||||||||||||||||||||||||||
| Comment on lines 1 to +44 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: deleted critical documentation sections including Tutorial, Main Concepts, API Reference, Contributing Guide, Code of Conduct links Prompt To Fix With AIThis is a comment left during a code review. Path: README.md Line: 1:44 Comment: **style:** deleted critical documentation sections including Tutorial, Main Concepts, API Reference, Contributing Guide, Code of Conduct links How can I resolve this? If you propose a fix, please make it concise. | ||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| | @@ -28,23 +28,21 @@ const files = glob | |||||||||||||||||||||||||||||||||||||||||||
| .sync('**/*.js', {ignore: '**/node_modules/**'}) | ||||||||||||||||||||||||||||||||||||||||||||
| .filter(f => !onlyChanged || changedFiles.has(f)); | ||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||
| if (!files.length) { | ||||||||||||||||||||||||||||||||||||||||||||
| return; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||
| files.forEach(file => { | ||||||||||||||||||||||||||||||||||||||||||||
| const options = prettier.resolveConfig.sync(file, { | ||||||||||||||||||||||||||||||||||||||||||||
| config: prettierConfigPath, | ||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||
| const options = { | ||||||||||||||||||||||||||||||||||||||||||||
| semi: true, | ||||||||||||||||||||||||||||||||||||||||||||
| singleQuote: true, | ||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||
| Comment on lines 31 to +35 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: hardcoded prettier options instead of loading from Suggested change
Prompt To Fix With AIThis is a comment left during a code review. Path: scripts/prettier/index.js Line: 31:35 Comment: **logic:** hardcoded prettier options instead of loading from `.prettierrc` config file - original code properly loaded config with `prettier.resolveConfig.sync` ```suggestion const options = prettier.resolveConfig.sync(file, { config: prettierConfigPath, }); ``` How can I resolve this? If you propose a fix, please make it concise. | ||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||||||||||
| const input = fs.readFileSync(file, 'utf8'); | ||||||||||||||||||||||||||||||||||||||||||||
| if (shouldWrite) { | ||||||||||||||||||||||||||||||||||||||||||||
| const output = prettier.format(input, options); | ||||||||||||||||||||||||||||||||||||||||||||
| if (output !== input) { | ||||||||||||||||||||||||||||||||||||||||||||
| fs.writeFileSync(file, output, 'utf8'); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| fs.writeFileSync(file, output, 'utf8'); | ||||||||||||||||||||||||||||||||||||||||||||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: unconditional file writing removed - files are now written even when content hasn't changed, causing unnecessary disk operations Prompt To Fix With AIThis is a comment left during a code review. Path: scripts/prettier/index.js Line: 41:41 Comment: **logic:** unconditional file writing removed - files are now written even when content hasn't changed, causing unnecessary disk operations How can I resolve this? If you propose a fix, please make it concise. Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @greptileai can you suggest a fix There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the code, I can see the issue. Currently on line 41, the script writes to every file regardless of whether the content actually changed after formatting. This causes unnecessary disk operations. The fix is to only write the file if the formatted output is different from the original input: Suggested change
This way, files are only written when Prettier actually makes changes to the content, avoiding unnecessary disk I/O operations. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the code, I can see the issue. The script is writing files unconditionally when in write mode, even if the content hasn't changed. This causes unnecessary disk I/O operations. The fix is to only write the file if the formatted output is different from the original input: Suggested change
This way, files are only written when Prettier actually changes the formatting, avoiding unnecessary disk operations when the file is already properly formatted. Comment on lines 40 to +41 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: unconditionally writes files even when unchanged - wastes I/O and updates modification times unnecessarily Suggested change
Prompt To Fix With AIThis is a comment left during a code review. Path: scripts/prettier/index.js Line: 40:41 Comment: **logic:** unconditionally writes files even when unchanged - wastes I/O and updates modification times unnecessarily ```suggestion const output = prettier.format(input, options); if (output !== input) { fs.writeFileSync(file, output, 'utf8'); } ``` How can I resolve this? If you propose a fix, please make it concise. | ||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||
| console.log(chalk.green(`Successfully formatted ${file}`)); | ||||||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||||||
| if (!prettier.check(input, options)) { | ||||||||||||||||||||||||||||||||||||||||||||
| if (prettier.check(input, options)) { | ||||||||||||||||||||||||||||||||||||||||||||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: inverted logic - Suggested change
Prompt To Fix With AIThis is a comment left during a code review. Path: scripts/prettier/index.js Line: 45:45 Comment: **logic:** inverted logic - `prettier.check` returns `true` when file is correctly formatted, but this now warns for correctly formatted files ```suggestion if (!prettier.check(input, options)) { ``` How can I resolve this? If you propose a fix, please make it concise. | ||||||||||||||||||||||||||||||||||||||||||||
| if (!didWarn) { | ||||||||||||||||||||||||||||||||||||||||||||
| console.log( | ||||||||||||||||||||||||||||||||||||||||||||
| '\n' + | ||||||||||||||||||||||||||||||||||||||||||||
| | @@ -65,11 +63,5 @@ files.forEach(file => { | |||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| } catch (error) { | ||||||||||||||||||||||||||||||||||||||||||||
| didError = true; | ||||||||||||||||||||||||||||||||||||||||||||
| console.log('\n\n' + error.message); | ||||||||||||||||||||||||||||||||||||||||||||
| console.log(file); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| Comment on lines 64 to 66 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: silently swallows errors - original code logged error details for debugging Suggested change
Prompt To Fix With AIThis is a comment left during a code review. Path: scripts/prettier/index.js Line: 64:66 Comment: **logic:** silently swallows errors - original code logged error details for debugging ```suggestion } catch (error) { didError = true; console.log('\n\n' + error.message); console.log(file); } ``` How can I resolve this? If you propose a fix, please make it concise. | ||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: removed exit on error/warnings - script will now succeed even when prettier checks fail, breaking CI Suggested change
Prompt To Fix With AIThis is a comment left during a code review. Path: scripts/prettier/index.js Line: 67:67 Comment: **logic:** removed exit on error/warnings - script will now succeed even when prettier checks fail, breaking CI ```suggestion }); if (didWarn || didError) { process.exit(1); } ``` How can I resolve this? If you propose a fix, please make it concise. | ||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||
| if (didWarn || didError) { | ||||||||||||||||||||||||||||||||||||||||||||
| process.exit(1); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -23,13 +23,14 @@ const execGitCmd = args => | |
| exec('git', args) | ||
| .trim() | ||
| .toString() | ||
| .split('\n'); | ||
| .split('\n') | ||
| .filter(Boolean); | ||
| | ||
| const listChangedFiles = () => { | ||
| const mergeBase = execGitCmd(['merge-base', 'HEAD', 'master']); | ||
| const mergeBase = execGitCmd(['merge-base', 'HEAD', 'origin/master'])[0]; | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: changed Prompt To Fix With AIThis is a comment left during a code review. Path: scripts/shared/listChangedFiles.js Line: 30:30 Comment: **logic:** changed `'master'` to `'origin/master'` - will break if remote is named differently or branch is renamed to `main` How can I resolve this? If you propose a fix, please make it concise. | ||
| return new Set([ | ||
| ...execGitCmd(['diff', '--name-only', '--diff-filter=ACMRTUB', mergeBase]), | ||
| ...execGitCmd(['ls-files', '--others', '--exclude-standard']), | ||
| ...execGitCmd(['diff', '--name-only', mergeBase]), | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: removed Prompt To Fix With AIThis is a comment left during a code review. Path: scripts/shared/listChangedFiles.js Line: 32:32 Comment: **logic:** removed `--diff-filter=ACMRTUB` flag - now includes deleted and unmerged files which can cause issues How can I resolve this? If you propose a fix, please make it concise. | ||
| ...execGitCmd(['ls-files', '--others']), | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: removed Prompt To Fix With AIThis is a comment left during a code review. Path: scripts/shared/listChangedFiles.js Line: 33:33 Comment: **logic:** removed `--exclude-standard` flag - will now include gitignored files like `node_modules/` in results How can I resolve this? If you propose a fix, please make it concise. | ||
| ]); | ||
| }; | ||
| | ||
| | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: completely unprofessional and misleading documentation - replaced technical description with hyperbolic marketing speak
Prompt To Fix With AI