Skip to content

Commit

Permalink
Upgrade to Docusaurus v3.2 (#4072)
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber authored Apr 5, 2024
1 parent 716e531 commit 9ceb051
Show file tree
Hide file tree
Showing 16 changed files with 2,166 additions and 1,427 deletions.
2 changes: 1 addition & 1 deletion docs/profile-hermes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can visualize JavaScript's performance in a React Native app using [Hermes](
In this section, you will learn how to profile your React Native app running on Hermes and how to visualize the profile using [the Performance tab on Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference)

:::caution
Be sure to [enable Hermes in your app](Hermes) before you get started!
Be sure to [enable Hermes in your app](hermes) before you get started!
:::

Follow the instructions below to get started profiling:
Expand Down
2 changes: 2 additions & 0 deletions docs/shadow-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ export default App;
</TabItem>
</Tabs>

---

# Reference

## Props
Expand Down
12 changes: 6 additions & 6 deletions website/blog/2023-01-27-71rc1-android-outage-postmortem.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ The contributors who helped tackle the incident recently attended a post-mortem

<!--truncate-->

# What happened
## What happened

On November 4th 2022, we published the version `0.71.0-rc0` of React Native, the first release candidate for 0.71, on several public repositories.

A major change made in this release candidate helped to improve build times by publishing artifacts to Maven Central, instead of building them from source. More details on how this was done are available in [RFC#508](https://github.com/react-native-community/discussions-and-proposals/pull/508) and [related discussions](https://github.com/reactwg/react-native-new-architecture/discussions/105).

Unfortunately, because of the way we scaffolded new projects from the template, this caused build failures for any Android user on older versions because they would start downloading new artifacts for `0.71.0-rc0` instead of the version they were using in their project (like `0.68.0`).

# Why this happened
## Why this happened

The React Native template provides a `build.gradle` file to build Android apps. This file contains a dependency on the React Native Android library as follows:
`implementation("com.facebook.react:react-native:+")`.
Expand All @@ -32,7 +32,7 @@ This caused builds with React Native versions before `0.71.0-rc.0` to query all

Further technical details on this event area are also available [on this GitHub issue](https://github.com/facebook/react-native/issues/35210).

# How we mitigated & resolved
## How we mitigated & resolved

As soon as we identified the issue on November 4th, the community found and shared a manual workaround to fix the issue which would pin React Native to a specific, correcting the mistake.

Expand All @@ -42,7 +42,7 @@ At the same time, we [reached out to Sonatype](https://issues.sonatype.org/brows

The issue was fully resolved on November 8th when the artifacts were fully removed from Maven Central.

# Timeline of events
## Timeline of events

_This section contains a brief timeline of the events. All times are GMT/UTC +0_

Expand All @@ -58,7 +58,7 @@ _This section contains a brief timeline of the events. All times are GMT/UTC +0_
- Nov 8th - 08:04 PM: Artifacts on Maven Central are [fully removed](https://issues.sonatype.org/browse/OSSRH-86006?focusedCommentId=1216303&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1216303).
- Nov 10th - 11:51 AM: Issue about the [incident is closed](https://github.com/facebook/react-native/issues/35210#issuecomment-1310170361).

# Lessons Learned
## Lessons Learned

While in many ways the conditions to trigger this incident has existed since React Native 0.12.0, we want to ensure that the foundations on which we develop and release React Native moving forward are stronger. Here are some of the lessons learned and the actionables on how we’ll adapt our processes and infrastructure to respond faster and stronger in the future.

Expand Down Expand Up @@ -94,7 +94,7 @@ Specifically, we are now encouraging and supporting 3rd party library testing as

On top of this, we started a closer collaboration with Callstack, the maintainers of [create-react-native-library](https://github.com/callstack/react-native-builder-bob/tree/main/packages/create-react-native-library), to improve the library template and make sure it follows all the necessary best practices to integrate with React Native projects. The newer version of `create-react-native-library` is now fully compatible with 0.71 projects while still offering backward compatibility.

# Conclusions
## Conclusions

We want to apologize for the disruption this caused to the workflows of developers all around the world. As highlighted above, we have already started taking action to strengthen our foundation - and more work is due.

Expand Down
4 changes: 2 additions & 2 deletions website/contributing/how-to-contribute-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Now you are set up to run several commands:
- `yarn test-typescript` runs the [TypeScript](https://www.typescriptlang.org/) typechecks.
- `yarn test-ios` runs the iOS test suite (macOS required).
- `yarn build` builds all configured packages — in general, this command only needs to be run by CI ahead of publishing.
- Packages which require a build are configured in [scripts/build/config.js](https://github.com/facebook/react-native/blob/main/scripts/build/config.js).
- Packages which require a build are configured in [scripts/build/config.js](https://github.com/facebook/react-native/blob/main/scripts/build/config.js).

## Testing your Changes

Expand Down Expand Up @@ -78,7 +78,7 @@ Code-level contributions to React Native generally come in the form of [a pull r

If all goes well, your pull request will be merged. If it is not merged, maintainers will do their best to explain their reasoning.

If this is your first time sending a pull request, we have created a [step-by-step guide to help you get started](/contributing/how-to-open-a-pull-request). For more detailed information on how pull requests are handled, see the [Managing Pull Requests page](Managing-Pull-Requests).
If this is your first time sending a pull request, we have created a [step-by-step guide to help you get started](/contributing/how-to-open-a-pull-request). For more detailed information on how pull requests are handled, see the [Managing Pull Requests page](managing-pull-requests).

### Contributor License Agreement

Expand Down
3 changes: 3 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ module.exports = {
defaultLanguage: 'jsx',
theme: require('./core/PrismTheme'),
additionalLanguages: [
'diff',
'bash',
'json',
'java',
'kotlin',
'objectivec',
Expand Down
10 changes: 5 additions & 5 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
]
},
"dependencies": {
"@docusaurus/core": "3.0.0-beta.0",
"@docusaurus/plugin-google-gtag": "3.0.0-beta.0",
"@docusaurus/plugin-pwa": "3.0.0-beta.0",
"@docusaurus/preset-classic": "3.0.0-beta.0",
"@docusaurus/core": "3.2.0",
"@docusaurus/plugin-google-gtag": "3.2.0",
"@docusaurus/plugin-pwa": "3.2.0",
"@docusaurus/preset-classic": "3.2.0",
"docusaurus-plugin-sass": "^0.2.5",
"esbuild-loader": "^2.21.0",
"react": "^18.2.0",
Expand All @@ -60,7 +60,7 @@
"sass": "^1.68.0"
},
"devDependencies": {
"@docusaurus/types": "3.0.0-beta.0",
"@docusaurus/types": "3.2.0",
"@react-native-website/lint-examples": "0.0.0",
"@react-native-website/update-redirects": "0.0.0",
"alex": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion website/src/css/customTheme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ a[class*="tagRegular"] {
}
}

.navbar__items div[class^="searchBox"] {
.navbar__items div[class^="navbarSearchContainer"] {
padding-left: 14px;
}

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-0.70/profile-hermes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can visualize JavaScript's performance in a React Native app using [Hermes](
In this section, you will learn how to profile your React Native app running on Hermes and how to visualize the profile using [the Performance tab on Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference)

:::caution
Be sure to [enable Hermes in your app](Hermes) before you get started!
Be sure to [enable Hermes in your app](hermes) before you get started!
:::

Follow the instructions below to get started profiling:
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-0.70/shadow-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ const styles = StyleSheet.create({
export default App;
```

---

# Reference

## Props
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-0.71/profile-hermes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can visualize JavaScript's performance in a React Native app using [Hermes](
In this section, you will learn how to profile your React Native app running on Hermes and how to visualize the profile using [the Performance tab on Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference)

:::caution
Be sure to [enable Hermes in your app](Hermes) before you get started!
Be sure to [enable Hermes in your app](hermes) before you get started!
:::

Follow the instructions below to get started profiling:
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-0.71/shadow-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ export default App;
</TabItem>
</Tabs>

---

# Reference

## Props
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-0.72/profile-hermes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can visualize JavaScript's performance in a React Native app using [Hermes](
In this section, you will learn how to profile your React Native app running on Hermes and how to visualize the profile using [the Performance tab on Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference)

:::caution
Be sure to [enable Hermes in your app](Hermes) before you get started!
Be sure to [enable Hermes in your app](hermes) before you get started!
:::

Follow the instructions below to get started profiling:
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-0.72/shadow-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ export default App;
</TabItem>
</Tabs>

---

# Reference

## Props
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-0.73/profile-hermes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can visualize JavaScript's performance in a React Native app using [Hermes](
In this section, you will learn how to profile your React Native app running on Hermes and how to visualize the profile using [the Performance tab on Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference)

:::caution
Be sure to [enable Hermes in your app](Hermes) before you get started!
Be sure to [enable Hermes in your app](hermes) before you get started!
:::

Follow the instructions below to get started profiling:
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-0.73/shadow-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ export default App;
</TabItem>
</Tabs>

---

# Reference

## Props
Expand Down
Loading

0 comments on commit 9ceb051

Please sign in to comment.