Lorenzo Sciandra
e509007f57
fix(internal, dangerfile): fix changelog entries for dangerfiles and PR template ( #35541 )
...
Summary:
A few days back leotm pointed out how the dangerfile was disaligned with the docs around the valid changelog entries for categories and types here: https://github.com/facebook/react-native/pull/35443#issuecomment-1327449113
I dug a bit deeper into the whole thing and went to the source of truth, which is the changelog generator, in particular here: https://github.com/microsoft/rnx-kit/blob/main/incubator/rn-changelog-generator/src/utils/getChangeDimensions.ts
So I've updated the dangerfile to respect the options listed there. Also did a parallel PR on the website side: https://github.com/facebook/react-native-website/pull/3447
So now all comms will be aligned.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[INTERNAL] [FIXED] - fix changelog entries for dangerfiles and PR template
Pull Request resolved: https://github.com/facebook/react-native/pull/35541
Test Plan: N/A
Reviewed By: sammy-SC
Differential Revision: D41686913
Pulled By: cortinico
fbshipit-source-id: 2297b4a3209188bda4a609b60860de35c5e7e6df
2022-12-05 02:38:42 -08:00
Lorenzo Sciandra
cd25fb3240
chore(deps): add wanted dependencies to remove yarn warnings ( #35122 )
...
Summary:
This is take 2 of this https://github.com/facebook/react-native/pull/35088 , see this comment for why https://github.com/facebook/react-native/pull/35088#issuecomment-1295091902
I wanted to start working on a thing but this barrage of warnings was very annoying so ended up doing this instead: a very small PR to take care of some warnings during yarn install.
It doesn't change anything (the versions are the ones already used all around the repo), just makes yarn happier.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Fixed] - add wanted dependencies to remove yarn warnings
Pull Request resolved: https://github.com/facebook/react-native/pull/35122
Test Plan:
### Before
<img width="1920" alt="Screenshot 2022-10-26 at 10 53 32" src="https://user-images.githubusercontent.com/16104054/197996489-f463be29-b35b-45cc-9d9c-2d176579fb7d.png ">
### After
<img width="947" alt="Screenshot 2022-10-26 at 10 52 19" src="https://user-images.githubusercontent.com/16104054/197996505-3d60b319-006b-45ab-83bf-2f431272fdcd.png ">
Reviewed By: cortinico
Differential Revision: D40804260
Pulled By: rshest
fbshipit-source-id: 86af14c885d6d63a0d60bb85f204d17d8757f72a
2022-10-28 13:01:48 -07:00
Benny Singer
cf5addf423
Revert D40716713: chore(deps): add wanted dependencies to remove yarn warnings
...
Differential Revision:
D40716713 (https://github.com/facebook/react-native/commit/8422c5315caf5cf696791a5ad49ed0fbd37ef9df )
Original commit changeset: eeb95a91c6cd
Original Phabricator Diff: D40716713 (https://github.com/facebook/react-native/commit/8422c5315caf5cf696791a5ad49ed0fbd37ef9df )
fbshipit-source-id: e85f111e7da0381e09f8a23d3bd0d553b3a7c4a9
2022-10-26 07:22:28 -07:00
Lorenzo Sciandra
8422c5315c
chore(deps): add wanted dependencies to remove yarn warnings ( #35088 )
...
Summary:
I wanted to start working on a thing but this barrage of warnings was very annoying so ended up doing this instead: a very small PR to take care of some warnings during yarn install.
It doesn't change anything (the versions are the ones already used all around the repo), just makes yarn happier.
Also, while doing that I found a dependency that was lying there unused for 2 years so took care of it.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Fixed] - add wanted dependencies to remove yarn warnings
Pull Request resolved: https://github.com/facebook/react-native/pull/35088
Test Plan:
### Before
<img width="1920" alt="Screenshot 2022-10-26 at 10 53 32" src="https://user-images.githubusercontent.com/16104054/197996489-f463be29-b35b-45cc-9d9c-2d176579fb7d.png ">
### After
<img width="947" alt="Screenshot 2022-10-26 at 10 52 19" src="https://user-images.githubusercontent.com/16104054/197996505-3d60b319-006b-45ab-83bf-2f431272fdcd.png ">
Reviewed By: jacdebug
Differential Revision: D40716713
Pulled By: robhogan
fbshipit-source-id: eeb95a91c6cdf37edfe868fefe4ba04aebe500ec
2022-10-26 06:42:50 -07:00
Gabriel Donadel Dall'Agnol
55b09da62a
fix: Eslint on Danger not matching project config ( #34980 )
...
Summary:
I've been noticing this for a while now, every time that someone changes a file inside rn-tester Danger comments a bunch of warnings regarding inline styles, e.g. https://github.com/facebook/react-native/pull/34567#issuecomment-1257956893 , even though that is disabled inside .eslintrc https://github.com/facebook/react-native/blob/8edf4e9e3adcc85743e3c86a25ab3748b276a3da/packages/rn-tester/.eslintrc#L3
After some investigation, I realized that the problem was that the Eslint Node.js API used by [seadub/danger-plugin-eslint](https://www.npmjs.com/package/seadub/danger-plugin-eslint ) was not able to locate any `.eslintrc` files due to the location of the directory where danger is invoked. By using `process.chdir` we can ensure that eslint will run from the root folder and that it will be able to find all .eslintrc files
## Changelog
[Internal] [Fixed] - fix eslint config when running Danger
Pull Request resolved: https://github.com/facebook/react-native/pull/34980
Test Plan:
run `yarn danger pr https://github.com/facebook/react-native/pull/34976 `
After

Before

Reviewed By: cortinico
Differential Revision: D40384300
Pulled By: yungsters
fbshipit-source-id: e68eeafc42567dc9d7297dde3709a989cc70f4e2
2022-10-14 10:01:25 -07:00
Luna Wei
767f8e0249
Add bots as a yarn workspace and update danger action ( #34652 )
...
Summary:
allow-large-files
When working on https://github.com/facebook/react-native/pull/34614 , danger is failing because it doesn't share `node_modules` with the root directory where `typescript` is installed as we added it as a parser in our eslint config.
By setting `bots` as a yarn workspace, dependencies are all installed under the root `node_modules` folder and in local testing (detailed in test section) we no longer have the `typescript module not found` error. However, danger will continue to fail on https://github.com/facebook/react-native/pull/34614 as the `danger_pr` Github action runs from what's defined on `main`.
Once these changes land, I can rebase https://github.com/facebook/react-native/pull/34614 on it and danger's eslint should pass.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal][Fixed] - Add `bots` directory as a yarn workspace and update `danger_pr` Github action
Pull Request resolved: https://github.com/facebook/react-native/pull/34652
Test Plan:
To verify this fix I had to run:
```
react-native $ yarn && cd bots
react-native/bots$ yarn run danger pr https://github.com/facebook/react-native/pull/34614
```
which resulted in
```
❯ yarn run danger pr https://github.com/facebook/react-native/pull/34614
yarn run v1.22.19
$ lunaleaps/react-native/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/34614
Starting Danger PR on facebook/react-native#34614
Danger: ✓ found only warnings, not failing the build
## Warnings
🔒 package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>
✨ Done in 12.78s.
```
Verified this also on another PR:
```
yarn run danger pr https://github.com/facebook/react-native/pull/34650
```
Reviewed By: NickGerleman
Differential Revision: D39435286
Pulled By: lunaleaps
fbshipit-source-id: 8c82f49facf162f4fc0918e3abd95eb7e4ad1e37
2022-09-12 22:03:34 -07:00