Skip to content

Commit 4aef151

Browse files
karlhorkyeventualbuddhazpaoOlexandr88eaviles
authored
Update from upstream, remove deprecation notice + version checking (#7)
* fix(babel-preset-react-app): add missing dependency (facebook#12364) In facebook#11318 a change was made to `babel-preset-react-app` to require `@babel/plugin-proposal-private-property-in-object`, but no such dependency was added to `package.json`. This fixes that mistake by adding the dependency. * Migrate from Azure Pipelines to GitHub Actions (facebook#13222) Beyond just a pure migration, this also: - Drops Node 14 usage from CI (which also removes the need for explicit npm 8 installs) - Removes the "old node" test, which just checked that installing on old node failed. We shouldn't need to test that - Consolidates the build & test workflows so we don't end up with a proliferation of workflows. * Update running-tests.md Update running-tests * chore: upgrade RTL version to avoid peer-deps mismatch * Update types from facebook#13725 Co-authored-by: Rajhans Jadhao <[email protected]> * Fix tests * Fix e2e tests * Add act * try this instead * update react-scripts react devDep * idk * Update tests * skip svg component test * Deprecate Create React App officially by changing the README, and adding a message on init (facebook#17003) It's probably time to make this project document its status as being deprecated and not recommended for production usage. To change it: - I opted to add a header to the README saying its over and you should go look at https://react.dev/learn/start-a-new-react-project - I left a note saying that if you are following, it is maybe worth carrying on. While I hear react 19 doesn't work with CRA, I wouldn't be surprised that a good chunk of tutorials would still work. Open to being a bit more hard-lined there but there was a lot of great resources for learning react in that era and it seems like a waste to be making people stop early? - I added a message inside the CLI, it shows once and says "don't use this, use the stuff in https://react.dev/learn/start-a-new-react-project" --------- Co-authored-by: Ricky <[email protected]> Co-authored-by: Rick Hanlon <[email protected]> * Update deprecation link (facebook#17015) Updates to a shortlink that we can redirect as needed for old versions. Currently 404 * Add deprecation to website (facebook#17008) - Adds a banner with deprecation notice - Adds a noindex meta tag to home page to remove from search - Add og meta info for when noindex is ignored * Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * Migrate from Azure Pipelines to GitHub Actions (facebook#13222) Beyond just a pure migration, this also: - Drops Node 14 usage from CI (which also removes the need for explicit npm 8 installs) - Removes the "old node" test, which just checked that installing on old node failed. We shouldn't need to test that - Consolidates the build & test workflows so we don't end up with a proliferation of workflows. * Update running-tests.md Update running-tests * chore: upgrade RTL version to avoid peer-deps mismatch * Update types from facebook#13725 Co-authored-by: Rajhans Jadhao <[email protected]> * Fix tests * Fix e2e tests * Add act * try this instead * update react-scripts react devDep * idk * Update tests * skip svg component test * Deprecate Create React App officially by changing the README, and adding a message on init (facebook#17003) It's probably time to make this project document its status as being deprecated and not recommended for production usage. To change it: - I opted to add a header to the README saying its over and you should go look at https://react.dev/learn/start-a-new-react-project - I left a note saying that if you are following, it is maybe worth carrying on. While I hear react 19 doesn't work with CRA, I wouldn't be surprised that a good chunk of tutorials would still work. Open to being a bit more hard-lined there but there was a lot of great resources for learning react in that era and it seems like a waste to be making people stop early? - I added a message inside the CLI, it shows once and says "don't use this, use the stuff in https://react.dev/learn/start-a-new-react-project" --------- Co-authored-by: Ricky <[email protected]> Co-authored-by: Rick Hanlon <[email protected]> * Update deprecation link (facebook#17015) Updates to a shortlink that we can redirect as needed for old versions. Currently 404 * Add deprecation to website (facebook#17008) - Adds a banner with deprecation notice - Adds a noindex meta tag to home page to remove from search - Add og meta info for when noindex is ignored * Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * Disable deprecation warning and version check * Bump version * Disable deleting folder after error * Fix babel-plugin-named-asset-import version number * Bump @upleveled/create-react-app to 5.1.2 * Bump version of @upleveled/react-scripts to 5.1.1 * Add back call to createApp() * Bump version of @upleveled/create-react-app to 5.1.3 * Revert to published versions of react-scripts dependencies * Bump version of @upleveled/react-scripts to 5.1.2 * Allow pnpm to build @parcel/watcher, ignore core-js builds * Bump version of @upleveled/cra-template to 1.3.1 * Remove pnpm config from package.json, bump to @upleveled/[email protected] * Add pnpm built packages configuration in `package.json` * Bump @upleveled/create-react-app to 5.1.4 --------- Co-authored-by: Brian Donovan <[email protected]> Co-authored-by: Paul O’Shannessy <[email protected]> Co-authored-by: Olexandr Radovenchyk <[email protected]> Co-authored-by: Edgardo Avilés-López <[email protected]> Co-authored-by: Matan Borenkraout <[email protected]> Co-authored-by: Rick Hanlon <[email protected]> Co-authored-by: Rajhans Jadhao <[email protected]> Co-authored-by: Ricky <[email protected]> Co-authored-by: Orta Therox <[email protected]>
1 parent bb1f7b5 commit 4aef151

File tree

63 files changed

+845
-734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+845
-734
lines changed

.github/workflows/build-and-test.yml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: 'Build & Test'
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: 'Build (${{ matrix.os }}, Node ${{ matrix.node }})'
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os:
19+
- 'ubuntu-latest'
20+
node:
21+
- '16'
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node }}
27+
cache: 'npm'
28+
- name: Install dependencies
29+
run: npm ci --prefer-offline
30+
- name: Build
31+
run: npm run build
32+
33+
integration:
34+
name: 'Integration Tests (${{ matrix.os }}, Node ${{ matrix.node }})'
35+
runs-on: ${{ matrix.os }}
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
os:
40+
- 'ubuntu-latest'
41+
- 'macos-latest'
42+
- 'windows-latest'
43+
node:
44+
- '16'
45+
steps:
46+
- uses: actions/checkout@v3
47+
- name: Setup node
48+
uses: actions/setup-node@v3
49+
with:
50+
node-version: ${{ matrix.node }}
51+
cache: 'npm'
52+
- name: Install dependencies
53+
run: npm ci --prefer-offline
54+
# The integration tests are run with yarn, so we need to install it.
55+
- name: Install yarn
56+
run: npm i -g yarn
57+
- name: Run integration tests
58+
run: npm run test:integration
59+
60+
e2e-simple:
61+
name: E2E Simple
62+
uses: ./.github/workflows/e2e-base.yml
63+
with:
64+
testScript: 'tasks/e2e-simple.sh'
65+
66+
e2e-installs:
67+
name: E2E Installs
68+
uses: ./.github/workflows/e2e-base.yml
69+
with:
70+
testScript: 'tasks/e2e-installs.sh'
71+
72+
e2e-kitchensink:
73+
name: E2E Kitchensink
74+
uses: ./.github/workflows/e2e-base.yml
75+
with:
76+
testScript: 'tasks/e2e-kitchensink.sh'

.github/workflows/build.yml

-19
This file was deleted.

.github/workflows/e2e-base.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
testScript:
5+
required: true
6+
type: string
7+
8+
name: E2E
9+
10+
jobs:
11+
test:
12+
name: 'Test (${{ matrix.os }}, Node ${{ matrix.node }})'
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os:
18+
- 'ubuntu-latest'
19+
node:
20+
- '16'
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.node }}
26+
cache: 'npm'
27+
- name: Install
28+
run: npm ci --prefer-offline
29+
- name: Initialize Global Git config
30+
run: |
31+
git config --global core.autocrlf false
32+
git config --global user.name "Create React App"
33+
git config --global user.email "[email protected]"
34+
- name: Run tests
35+
run: ${{ inputs.testScript }}

.github/workflows/integration.yml

-32
This file was deleted.

.github/workflows/lint.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@ jobs:
66
lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- uses: actions/setup-node@v2
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-node@v3
1111
with:
12-
node-version: '14'
12+
node-version: '16'
1313
cache: 'npm'
14-
- name: Install npm@8
15-
run: npm i -g npm@8
1614
- name: Install
1715
run: npm ci --prefer-offline
18-
- name: Build
19-
run: npm run build
2016
- name: Alex
2117
run: npm run alex
2218
- name: Prettier

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# Create React App [![Build Status](https://dev.azure.com/facebook/create-react-app/_apis/build/status/facebook.create-react-app?branchName=main)](https://dev.azure.com/facebook/create-react-app/_build/latest?definitionId=1&branchName=main) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://github.com/facebook/create-react-app/blob/main/CONTRIBUTING.md)
1+
## Create React App [![Build & Test](https://github.com/facebook/create-react-app/actions/workflows/build-and-test.yml/badge.svg?branch=main)](https://github.com/facebook/create-react-app/actions/workflows/build-and-test.yml) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://github.com/facebook/create-react-app/blob/main/CONTRIBUTING.md)
2+
3+
> [!CAUTION]
4+
>
5+
> ## Deprecated
6+
>
7+
> Create React App was one of the key tools for getting a React project up-and-running in 2017-2021, it is now in long-term stasis and we recommend that you migrate to one of React frameworks documented on [Start a New React Project](https://react.dev/learn/start-a-new-react-project).
8+
>
9+
> If you are following a tutorial to learn React, there is still value in continuing your tutorial, but we do not recommend starting production apps based on Create React App.
210
311
<img alt="Logo" align="right" src="https://create-react-app.dev/img/logo.svg" width="20%" />
412

azure-pipelines-test-job.yml

-41
This file was deleted.

azure-pipelines.yml

-77
This file was deleted.

docusaurus/docs/running-tests.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ Different projects choose different testing tradeoffs based on how often compone
7272

7373
```js
7474
import React from 'react';
75-
import ReactDOM from 'react-dom';
75+
import ReactDOMClient from 'react-dom/client';
7676
import App from './App';
7777

7878
it('renders without crashing', () => {
7979
const div = document.createElement('div');
80-
ReactDOM.render(<App />, div);
80+
ReactDOMClient.createRoot(div).render(<App />);
8181
});
8282
```
8383

@@ -92,13 +92,13 @@ If you’d like to test components in isolation from the child components they r
9292
To install `react-testing-library` and `jest-dom`, you can run:
9393

9494
```sh
95-
npm install --save @testing-library/react @testing-library/jest-dom
95+
npm install --save @testing-library/react @testing-library/dom @testing-library/jest-dom
9696
```
9797

9898
Alternatively you may use `yarn`:
9999

100100
```sh
101-
yarn add @testing-library/react @testing-library/jest-dom
101+
yarn add @testing-library/react @testing-library/dom @testing-library/jest-dom
102102
```
103103

104104
If you want to avoid boilerplate in your test files, you can create a [`src/setupTests.js`](#initializing-test-environment) file:
@@ -245,7 +245,7 @@ Popular CI servers already set the environment variable `CI` by default but you
245245
### Travis CI
246246

247247
1. Following the [Travis Getting started](https://docs.travis-ci.com/user/getting-started/) guide for syncing your GitHub repository with Travis. You may need to initialize some settings manually in your [profile](https://travis-ci.org/profile) page.
248-
1. Add a `.travis.yml` file to your git repository.
248+
2. Add a `.travis.yml` file to your git repository.
249249

250250
```yaml
251251
language: node_js
@@ -259,8 +259,8 @@ script:
259259
- npm test
260260
```
261261
262-
1. Trigger your first build with a git push.
263-
1. [Customize your Travis CI Build](https://docs.travis-ci.com/user/customizing-the-build/) if needed.
262+
3. Trigger your first build with a git push.
263+
4. [Customize your Travis CI Build](https://docs.travis-ci.com/user/customizing-the-build/) if needed.
264264
265265
### CircleCI
266266

docusaurus/website/docusaurus.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
const siteConfig = {
1010
title: 'Create React App',
11-
tagline: 'Set up a modern web app by running one command.',
11+
tagline:
12+
'Create React App has been deprecated. Please visit react.dev for modern options.',
1213
url: 'https://create-react-app.dev',
1314
baseUrl: '/',
1415
projectName: 'create-react-app',
@@ -35,10 +36,9 @@ const siteConfig = {
3536
themeConfig: {
3637
image: 'img/logo-og.png',
3738
announcementBar: {
38-
id: 'support_ukraine',
39+
id: 'deprecated',
3940
content:
40-
'Support Ukraine 🇺🇦 <a target="_blank" rel="noopener noreferrer" \
41-
href="https://opensource.facebook.com/support-ukraine"> Help Provide Humanitarian Aid to Ukraine</a>.',
41+
'Create React App is deprecated. <a target="_blank" rel="noopener noreferrer" href="https://react.dev/link/cra">Read more here</a>.',
4242
backgroundColor: '#20232a',
4343
textColor: '#fff',
4444
isCloseable: false,

0 commit comments

Comments
 (0)