Skip to content

Sync with reactjs.org @ 5e9d673c #485

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

Merged
merged 158 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
7a6a628
Add Link to React Conf 2021 Playlist (#4207)
sbaljeet13 Jan 6, 2022
569949e
Fix jsx example for string attributes (#4204)
Jan 7, 2022
b9c33a0
Add React Miami to conferences.md (#4191)
joshunger Jan 10, 2022
d321ff4
React Live 2022 Amsterdam (#4222)
lxmarinkovic Jan 18, 2022
af768b4
FIXED: broken 'translated' link (#4223)
mr-vaibh Jan 18, 2022
5a3576a
Update outdated link to avoid redirect (#4218)
miltosdoul Jan 18, 2022
0b21acb
Added hook to validate if headings are present or not (#4143)
Jan 18, 2022
e0aed3f
Update react-router examples to use v6 version (#4199)
jonatasoc Jan 18, 2022
cd1b0df
Changed the version generation script to update vercel.json instead o…
Jan 18, 2022
45aba8b
Delete _redirects (#3951)
gaearon Jan 18, 2022
9ed29b0
fix: "…" spread syntax is not an "operator" but document saying that …
Juyeong-Byeon Jan 18, 2022
3143db5
Updates deployment in readme from netlify to vercel (#4225)
Jan 21, 2022
b1f91c9
Analytics for Beta (#4224)
rachelnabors Jan 21, 2022
d84b740
Bump next (#4228)
Jan 22, 2022
5110597
Removed google analytics for dev (#4233)
Jan 23, 2022
69bd27a
Add Reactathon 2022 to conferences.md (#4234)
dunphyben Jan 23, 2022
d80ef56
Sandpack: upgrade dependencies and adds ReactDevtools (#4161)
danilowoz Jan 24, 2022
f062ee2
[docs]: Updated CodePen links (#4232)
Aniruddha-Shriwant Jan 27, 2022
ec65cc0
Add "click to copy" to TerminalBlock (#4025)
markflorkowski Jan 27, 2022
53d279e
fix: challenges navigation (#4123)
Jan 27, 2022
4451e5b
Make line highlight full width (#4246)
gaearon Jan 28, 2022
2b2ac5c
Fix download label
gaearon Jan 28, 2022
b22c3d6
[Beta] Rewrite Quick Start (#4245)
gaearon Jan 28, 2022
1c355ab
[Beta] Change "You will learn" for chapters (#4239)
gaearon Jan 28, 2022
3564e69
Introduce lint staged (#4240)
Jan 28, 2022
43dae71
Adds linting for main branch too (#4252)
Jan 28, 2022
e347b73
Removed circle CI (#4236)
Jan 28, 2022
e1dcbff
bump next to latest (#4251)
Jan 28, 2022
4e20db7
Revert "Removed circle CI (#4236)" (#4253)
gaearon Jan 28, 2022
9ff30d6
Revert "Revert "Removed circle CI (#4236)" (#4253)" (#4254)
gaearon Jan 28, 2022
5f0549c
chore: fix typo (#4255)
brennon Jan 30, 2022
3805790
[Beta] Reorder useState page (#4265)
gaearon Jan 31, 2022
17e91d8
[Beta] Address Quick Start review nits (#4264)
gaearon Feb 1, 2022
58d6f3f
Prevent nav context re-renders (#4266)
gaearon Feb 1, 2022
abca1f4
Use MDXContext directly (#4267)
gaearon Feb 1, 2022
7d1e054
Remove unused patch
gaearon Feb 1, 2022
c8ad67d
Fix deps
gaearon Feb 1, 2022
626f957
fix(sandpack): improve memory usage (#4126)
danilowoz Feb 2, 2022
42576e0
Bump workflow versions (#4270)
gaearon Feb 2, 2022
75db8f2
[Beta] Rename TaskBoard -> TaskApp in examples (#4271)
gaearon Feb 2, 2022
84742f0
Fix typo
gaearon Feb 2, 2022
e6b843b
[Beta] Change useState structure, add examples (#4276)
gaearon Feb 3, 2022
5479670
fix: typo (#4279)
jersonzc Feb 3, 2022
eb0ae24
Update courses.md (#4282)
johnlinatoc Feb 3, 2022
001b1f0
[Beta] useState API: Best of the both words? Haha just kidding... Unl…
gaearon Feb 4, 2022
52393da
fix(useMediaQuery): adds fallback to matchMedia (#4289)
danilowoz Feb 4, 2022
4d005ad
fix(sandpack): disable init-mode (#4278)
danilowoz Feb 4, 2022
fd58500
React-Global-2022 (#4291)
lxmarinkovic Feb 4, 2022
caffe3d
React-Meetup-Stockholm (#4292)
lxmarinkovic Feb 4, 2022
73d7d13
[Beta] Move /reference -> /apis (#4294)
gaearon Feb 4, 2022
1e79ed6
Removes readme and contributing.md from generate heading lint (#4295)
Feb 4, 2022
881e0a0
[Beta] Document derived state (#4297)
gaearon Feb 4, 2022
b174aec
Tweak
gaearon Feb 4, 2022
12ca0d4
Mention loops
gaearon Feb 4, 2022
b06f632
Clarify
gaearon Feb 4, 2022
77af71e
tweak
gaearon Feb 4, 2022
6ebae12
Rm unused
gaearon Feb 4, 2022
5d2a4e3
[beta] Push people away more from setting state in render (#4299)
sophiebits Feb 4, 2022
b86f35d
docs: fix typo in useState Adjusting derived state section (#4300)
HumbertoL Feb 5, 2022
a4796b7
[beta] Don't call it "derived state" (#4301)
sophiebits Feb 5, 2022
ea824c6
More tweaks
gaearon Feb 5, 2022
55b4754
Updated code-splitting.md (#4303)
abrahym-sharfeldden Feb 6, 2022
20f0fe2
Update React India 2022 Conference Dates 🌴 (#4305)
apherio Feb 6, 2022
cd1717b
Sandpack error icon overlapping issue fix (#4302)
Feb 7, 2022
e2b2ebf
Improve font display (#4308)
shamwela Feb 7, 2022
71b743a
Generate Ids when there are none in local development (#4304)
Feb 7, 2022
7d615ad
[Beta] useState Troubleshooting (#4309)
gaearon Feb 7, 2022
c089fbc
docs: phrasing a sentence (#4185)
stuymedova Feb 7, 2022
cb6e1d0
docs: phrasing a sentence (#4182)
stuymedova Feb 7, 2022
466809e
docs: fix a grammatical error (#4183)
stuymedova Feb 7, 2022
4be33b8
Change "return statement" to "return keyword" (#4137)
smikitky Feb 7, 2022
cfa3670
small fixes to stopwatch codesandbox (#4110)
aayush-k Feb 7, 2022
edac143
[beta] Tweak usestate.md (#4310)
sophiebits Feb 8, 2022
d7dfc5d
Fix typo (#4311)
Feb 8, 2022
03f2323
[Beta] Use "Parameters" as titles? (#4314)
Huxpro Feb 9, 2022
c7d5aac
Fix broken MDN E4X links (#4316)
kidonng Feb 9, 2022
b8b26e5
Simplify wording
gaearon Feb 10, 2022
f20da4c
removed old "early time for hooks" note (#4321)
uulaal Feb 11, 2022
fc644cd
Revert "Sandpack error icon overlapping issue fix (#4302)" (#4325)
gaearon Feb 12, 2022
3ccb538
[Beta] Fix layout shift from previews (#4322)
gaearon Feb 12, 2022
4f764b2
[Beta] Change render() API page format (#4319)
gaearon Feb 12, 2022
2695799
[Beta] Mention batching in useState (#4318)
gaearon Feb 12, 2022
85e3fcf
More separators
gaearon Feb 12, 2022
0a76bf4
Fix typo (#4326)
Feb 12, 2022
a06d860
Fix broken link in render-and-commit.md (#4327)
mayank99 Feb 12, 2022
71cc6be
[beta] Reword "action = what happened" advice for useReducer (#4331)
sophiebits Feb 13, 2022
fa15160
Fix - Sandpack error icon overlapping issue (#4332)
imanpalsingh Feb 14, 2022
b677012
Add App.js Conf 2022 to the conferences page (#4336)
tsapeta Feb 15, 2022
b10ae60
sandpack: bring back init mode (#4337)
danilowoz Feb 15, 2022
b4de700
[Beta] Add ARIA labels (#4335)
shamwela Feb 15, 2022
0209e1b
[Beta] Reorder API sections (#4328)
gaearon Feb 16, 2022
2979d0c
Splitting sandpack from main bundle (#4256)
Feb 16, 2022
a2138f2
Nitpicks for code splitting (#4346)
gaearon Feb 16, 2022
4ed4fb7
[Beta] Change highlight styles (#4348)
gaearon Feb 17, 2022
93fdfb2
[Beta] useRef API (#4345)
gaearon Feb 17, 2022
3d6eba7
[beta] fix typo in useref.md (#4352)
mayank99 Feb 17, 2022
aa4bb41
Cache a font file (#4350)
shamwela Feb 17, 2022
3d6081f
[Beta] Add aria-label and title to permalinks (#4344)
shamwela Feb 18, 2022
a48ba9c
Link to how to set up syntax in Sublime
gaearon Feb 18, 2022
c8ec9d8
[Beta] Replace Hotjar with GA buttons (#4275)
gaearon Feb 18, 2022
45ac43a
Never use local font
gaearon Feb 18, 2022
81f772e
Switch from GA4 to UA to track feedback
gaearon Feb 18, 2022
8ca0215
Fix pageview collection for UA
gaearon Feb 18, 2022
9ac33ff
Fix TS
gaearon Feb 18, 2022
0883863
[Beta] Use a light GA client (#4355)
gaearon Feb 18, 2022
8def749
Try caching the font
gaearon Feb 18, 2022
753c4fc
Delete dead code
gaearon Feb 18, 2022
855c26a
Ignore TSC build file
gaearon Feb 18, 2022
f3f580a
Don't use unload on modern browsers
gaearon Feb 18, 2022
ab648df
Consolidate and preload fonts
gaearon Feb 18, 2022
6c855f7
Remember whether downloads are supported
gaearon Feb 18, 2022
3ae0eb6
Fix white flash when loading
gaearon Feb 18, 2022
7d55f61
Initial Commit (#4357)
Feb 18, 2022
5b8a720
Initial Commit (#4358)
Feb 18, 2022
2310e15
Add ARIA labels on the navigation buttons (#4363)
shamwela Feb 19, 2022
aeb1788
add the current LTS Node version (#4367)
nathansom Feb 21, 2022
9bcbe7b
[beta] bump tailwind to v3 and update config (#4366)
dammy001 Feb 21, 2022
275d03f
Upgrade sandpack to fix code cutting issue in view only editor (#4371)
Feb 22, 2022
508b427
Improve ESLint (#4372)
shamwela Feb 22, 2022
1b05b11
Remove `transform` (#4375)
shamwela Feb 23, 2022
b6a181c
Fix editable code blocks
gaearon Feb 23, 2022
8314493
Fix focus rings
gaearon Feb 23, 2022
ac9a984
Add diagrams to Quick Start (#4377)
rickhanlonii Feb 24, 2022
299dad8
[Beta] useContext API (#4378)
gaearon Feb 24, 2022
31304b8
Oops
gaearon Feb 25, 2022
6bd09fe
Bump url-parse from 1.5.3 to 1.5.10 (#4391)
dependabot[bot] Feb 27, 2022
6c95de9
[Beta] Delete unused variables (#4379)
shamwela Mar 1, 2022
d90fd21
docs: Adding Social Banner in Support of Ukraine (#4397)
dmitryvinn-fb Mar 2, 2022
a08e1fd
Fixes for banner on beta (#4435)
rickhanlonii Mar 6, 2022
8b5ce4d
Fix mobile layout on beta
gaearon Mar 7, 2022
c64b202
Add linebreak
gaearon Mar 7, 2022
05177ff
React 18 RC - Upgrade Guide (#4384)
rickhanlonii Mar 8, 2022
4b7843a
Bump urijs from 1.19.7 to 1.19.10 (#4446)
dependabot[bot] Mar 11, 2022
d3b66f5
Fixes linting issues (#4452)
Mar 11, 2022
3c3d8ac
Add Xuan to team page (#4454)
Huxpro Mar 12, 2022
7994045
Fixes survey (#4451)
Mar 12, 2022
dbbb097
Update invalid-aria-prop.md (#4457)
DeltaZN Mar 14, 2022
9525c06
Updated Render-Atlanta 2022 (#4343)
ThugDebugger Mar 14, 2022
90ae846
Add diagrams for "Putting markup into JavaScript" (#4390)
rickhanlonii Mar 14, 2022
b13640a
fix: use `globalThis` over `global` (#4448)
SimenB Mar 14, 2022
0ff869f
Add diagrams for passing props with context (#4394)
rickhanlonii Mar 14, 2022
2f05f3f
Add diagram to Reacting to Input with State (#4434)
rickhanlonii Mar 14, 2022
f7f92b8
[Beta] useReducer API (#4441)
gaearon Mar 16, 2022
c0b6e0b
Add more exports
gaearon Mar 16, 2022
7cf3cc1
Update tutorial.md (#4461)
jmcscript Mar 16, 2022
972f177
Update conferences.md (#4459)
Mar 16, 2022
69f90d2
[Beta] createContext API (#4467)
gaearon Mar 16, 2022
a55219d
Add React Native EU to upcoming conferences (#4465)
jaworek Mar 17, 2022
67f0bba
Moved older conference to past conference and standardised dates (#4463)
Mar 17, 2022
105fb79
update code sandboxes (#4466)
salazarm Mar 17, 2022
1e3b023
Add diagrams for Preserving and Resetting State (#4439)
rickhanlonii Mar 19, 2022
61a6cd7
Bump prismjs from 1.25.0 to 1.27.0 (#4386)
dependabot[bot] Mar 22, 2022
335417a
fix typo on page (#4490)
DavidKessel Mar 24, 2022
9b5505e
updated egghead url (#4494)
immanu10 Mar 25, 2022
7200653
Update conditional-rendering.md to fix formatting (#4493)
jherdman Mar 26, 2022
5e9d673
Add React Alicante (#4496)
VictoriaQ Mar 26, 2022
99d3eec
merging all conflicts
react-translations-bot Mar 28, 2022
e81a541
Resolve conflicts
smikitky Mar 31, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
node-version: "14.x"

- name: Install dependencies
uses: bahmutov/npm-install@v1.6.0
uses: bahmutov/npm-install@v1.7.10
with:
working-directory: 'beta'

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/beta_site_lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Beta Site Lint
name: Beta Site Lint / Heading ID check

on:
push:
branches:
- main # change this if your default branch is named differently
pull_request:
types: [opened, synchronize, reopened]

Expand All @@ -18,7 +21,7 @@ jobs:
node-version: 12.x

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1.6.0
uses: bahmutov/npm-install@v1.7.10
with:
working-directory: 'beta'

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build
name: Lint / Flow check

on:
push:
branches:
- main # change this if your default branch is named differently
pull_request:
types: [opened, synchronize, reopened]

Expand All @@ -18,7 +21,7 @@ jobs:
node-version: 12.x

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1.6.0
uses: bahmutov/npm-install@v1.7.10

- name: Lint codebase
run: yarn ci-check
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The documentation is divided into several sections with a different tone and pur
1. `git push my-fork-name the-name-of-my-branch`
1. Go to the [ja.reactjs.org repo](https://github.com/reactjs/ja.reactjs.org) and you should see recently pushed branches.
1. Follow GitHub's instructions.
1. If possible, include screenshots of visual changes. A [Netlify](https://www.netlify.com/) build will also be automatically created once you make your PR so other people can see your change.
1. If possible, include screenshots of visual changes. A preview build is triggered after your changes are pushed to GitHub.

## Translation

Expand Down
2 changes: 0 additions & 2 deletions beta/.env.development
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
NEXT_PUBLIC_HJ_SITE_ID = 2411683
NEXT_PUBLIC_HJ_SITE_V = 6
3 changes: 1 addition & 2 deletions beta/.env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
NEXT_PUBLIC_HJ_SITE_ID = 2411651
NEXT_PUBLIC_HJ_SITE_V = 6
NEXT_PUBLIC_GA_TRACKING_ID = 'UA-41298772-4'
7 changes: 5 additions & 2 deletions beta/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"root": true,
"extends": "next",
"extends": "next/core-web-vitals",
"rules": {
"no-unused-vars": "warn"
},
"env": {
"node": true,
"commonjs": true,
"browser": true,
"es6": true
}
}
}
1 change: 1 addition & 0 deletions beta/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# misc
.DS_Store
*.pem
tsconfig.tsbuildinfo

# debug
npm-debug.log*
Expand Down
5 changes: 1 addition & 4 deletions beta/.husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

cd beta
# yarn generate-ids
# git add -u src/pages/**/*.md
yarn prettier
yarn lint:fix
yarn lint-staged
16 changes: 15 additions & 1 deletion beta/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,19 @@
"singleQuote": true,
"bracketSameLine": true,
"trailingComma": "es5",
"printWidth": 80
"printWidth": 80,
"overrides": [
{
"files": "*.css",
"options": {
"parser": "css"
}
},
{
"files": "*.md",
"options": {
"parser": "mdx"
}
}
]
}
2 changes: 1 addition & 1 deletion beta/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The documentation is divided into sections to cater to different learning styles

**[Learn React](https://beta.reactjs.org/learn)** is designed to introduce fundamental concepts in a step-by-step way. Each individual article in Learn React builds on the knowledge from the previous ones, so make sure not to add any "cyclical dependencies" between them. It is important that the reader can start with the first article and work their way to the last Learn React article without ever having to "look ahead" for a definition. This explains some ordering choices (e.g. that state is explained before events, or that "thinking in React" doesn't use refs). Learn React also serves as a reference manual for React concepts, so it is important to be very strict about their definitions and relationships between them.

**[API Reference](https://reactjs.org/reference)** is organized by APIs rather than concepts. It is intended to be exhaustive. Any corner cases or recommendations that were skipped for brevity in Learn React should be mentioned in the reference documentation for the corresponding APIs.
**[API Reference](https://reactjs.org/apis)** is organized by APIs rather than concepts. It is intended to be exhaustive. Any corner cases or recommendations that were skipped for brevity in Learn React should be mentioned in the reference documentation for the corresponding APIs.

**Try to follow your own instructions.**

Expand Down
2 changes: 1 addition & 1 deletion beta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The documentation is divided into several sections with a different tone and pur
1. `git push my-fork-name the-name-of-my-branch`
1. Go to the [reactjs.org repo](https://github.com/reactjs/reactjs.org) and you should see recently pushed branches.
1. Follow GitHub's instructions.
1. If possible, include screenshots of visual changes. A [Netlify](https://www.netlify.com/) build will also be automatically created once you make your PR so other people can see your change.
1. If possible, include screenshots of visual changes. A preview build is triggered after your changes are pushed to GitHub.

## Translation

Expand Down
1 change: 0 additions & 1 deletion beta/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
Expand Down
9 changes: 2 additions & 7 deletions beta/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,12 @@ module.exports = {
experimental: {
plugins: true,
// TODO: this doesn't work because https://github.com/vercel/next.js/issues/30714
// concurrentFeatures: true,
concurrentFeatures: false,
scrollRestoration: true,
},
async redirects() {
return redirects.redirects;
},
env: {
// @todo Remove when https://github.com/vercel/next.js/pull/16529 lands
GA_TRACKING_ID: 'XXXX',
NEXT_PUBLIC_GA_TRACKING_ID: 'XXX',
},
rewrites() {
return [
{
Expand All @@ -32,7 +27,7 @@ module.exports = {
},
webpack: (config, {dev, isServer, ...options}) => {
if (process.env.ANALYZE) {
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer');
config.plugins.push(
new BundleAnalyzerPlugin({
analyzerMode: 'static',
Expand Down
36 changes: 21 additions & 15 deletions beta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,38 @@
"scripts": {
"analyze": "ANALYZE=true next build",
"dev": "next",
"build": "next build && node ./scripts/generateRSS.js",
"build": "next build && node ./scripts/generateRSS.js && node ./scripts/generateRedirects.js",
"lint": "next lint",
"lint:fix": "next lint --fix",
"format:source": "prettier --config .prettierrc --write \"{plugins,src}/**/*.{js,ts,jsx,tsx}\"",
"nit:source": "prettier --config .prettierrc --list-different \"{plugins,src}/**/*.{js,ts,jsx,tsx}\"",
"format:source": "prettier --config .prettierrc --write \"{plugins,src}/**/*.{js,ts,jsx,tsx,css}\"",
"nit:source": "prettier --config .prettierrc --list-different \"{plugins,src}/**/*.{js,ts,jsx,tsx,css}\"",
"prettier": "yarn format:source",
"prettier:diff": "yarn nit:source",
"generate-ids": "node scripts/generateHeadingIDs.js src/pages/",
"ci-check": "npm-run-all prettier:diff --parallel lint tsc",
"lint-heading-ids": "node scripts/headingIdLinter.js",
"fix-headings": "node scripts/headingIdLinter.js --fix",
"ci-check": "npm-run-all prettier:diff --parallel lint tsc lint-heading-ids",
"tsc": "tsc --noEmit",
"start": "next start",
"postinstall": "is-ci || (cd .. && husky install beta/.husky)",
"postinstall": "patch-package && (is-ci || (cd .. && husky install beta/.husky))",
"check-all": "npm-run-all prettier lint:fix tsc"
},
"dependencies": {
"@codesandbox/sandpack-react": "^0.1.20",
"@codesandbox/sandpack-react": "v0.14.3-experimental.1",
"@docsearch/css": "3.0.0-alpha.41",
"@docsearch/react": "3.0.0-alpha.41",
"@headlessui/react": "^1.3.0",
"@mdx-js/react": "^1.6.16",
"@next/plugin-google-analytics": "^10.0.6",
"body-scroll-lock": "^3.1.3",
"classnames": "^2.2.6",
"date-fns": "^2.16.1",
"debounce": "^1.2.1",
"ga-lite": "^2.1.4",
"github-slugger": "^1.3.0",
"next": "^12.0.3-canary.2",
"next": "^12.0.10",
"parse-numeric-range": "^1.2.0",
"react": "18.0.0-alpha-930c9e7ee-20211015",
"react": "experimental",
"react-collapsed": "3.1.0",
"react-dom": "18.0.0-alpha-930c9e7ee-20211015",
"react-dom": "experimental",
"scroll-into-view-if-needed": "^2.2.25"
},
"devDependencies": {
Expand All @@ -52,7 +53,7 @@
"@typescript-eslint/eslint-plugin": "2.x",
"@typescript-eslint/parser": "2.x",
"asyncro": "^3.0.0",
"autoprefixer": "^10.3.1",
"autoprefixer": "^10.4.2",
"babel-eslint": "10.x",
"eslint": "7.x",
"eslint-config-next": "12.0.3",
Expand All @@ -67,13 +68,14 @@
"gray-matter": "^4.0.2",
"husky": "^7.0.4",
"is-ci": "^3.0.1",
"lint-staged": ">=10",
"mdast-util-to-string": "^1.1.0",
"npm-run-all": "^4.1.5",
"patch-package": "^6.2.2",
"postcss": "^8.3.6",
"postcss": "^8.4.5",
"postcss-flexbugs-fixes": "4.2.1",
"postcss-preset-env": "^6.7.0",
"prettier": "^2.1.1",
"prettier": "^2.5.1",
"reading-time": "^1.2.0",
"remark": "^12.0.1",
"remark-external-links": "^7.0.0",
Expand All @@ -84,7 +86,7 @@
"retext": "^7.0.1",
"retext-smartypants": "^4.0.0",
"rss": "^1.2.2",
"tailwindcss": "^2.2.7",
"tailwindcss": "^3.0.22",
"typescript": "^4.0.2",
"unist-util-visit": "^2.0.3",
"webpack-bundle-analyzer": "^4.5.0"
Expand All @@ -96,5 +98,9 @@
"budget": null,
"budgetPercentIncreaseRed": 10,
"showDetails": true
},
"lint-staged": {
"*.{js,ts,jsx,tsx,css}": "yarn prettier",
"src/**/*.md": "yarn fix-headings"
}
}
35 changes: 0 additions & 35 deletions beta/patches/@next+plugin-google-analytics+9.5.2.patch

This file was deleted.

2 changes: 1 addition & 1 deletion beta/plugins/md-layout-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = async function (src) {
const layoutMap = {
blog: 'Post',
learn: 'Learn',
reference: 'API',
apis: 'API',
};
const layout = layoutMap[pageParentDir] || 'Home';
const code =
Expand Down
42 changes: 18 additions & 24 deletions beta/plugins/remark-header-custom-ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,26 @@ module.exports = ({
visit(tree, 'heading', (node) => {
const children = node.children;
let tail = children[children.length - 1];

// A bit weird: this is to support MDX 2 comments in expressions,
// while we’re still on MDX 1, which doesn’t support them.
if (!tail || tail.type !== 'text' || tail.value !== '/}') {
return;
// Generate slugs on the fly (even if not specified in markdown)
// so that it's possible to copy anchor links in newly written content.
let id = slugs.slug(toString(node), maintainCase);
// However, for committed docs, we'll extract slug from the headers.
if (tail && tail.type === 'text' && tail.value === '/}') {
tail = children[children.length - 2];
if (tail && tail.type === 'emphasis') {
// Use custom ID instead.
id = toString(tail);
// Until we're on MDX 2, we need to "cut off" the comment syntax.
tail = children[children.length - 3];
if (tail && tail.type === 'text' && tail.value.endsWith('{/')) {
// Remove the emphasis and trailing `/}`
children.splice(children.length - 2, 2);
// Remove the `{/`
tail.value = tail.value.replace(/[ \t]*\{\/$/, '');
}
}
}

tail = children[children.length - 2];

if (!tail && tail.type !== 'emphasis') {
return;
}

const id = toString(tail);

tail = children[children.length - 3];

if (!tail || tail.type !== 'text' || !tail.value.endsWith('{/')) {
return;
}

// Remove the emphasis and trailing `/}`
children.splice(children.length - 2, 2);
// Remove the `{/`
tail.value = tail.value.replace(/[ \t]*\{\/$/, '');

const data = patch(node, 'data', {});

patch(data, 'id', id);
Expand Down
Binary file added beta/public/fonts/Source-Code-Pro-Regular.woff2
Binary file not shown.
Binary file removed beta/public/fonts/SourceCodePro-Regular.ttf
Binary file not shown.
Loading