Skip to content

Update from upstream, remove deprecation notice + version checking #6

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

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
76 changes: 76 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 'Build & Test'

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: 'Build (${{ matrix.os }}, Node ${{ matrix.node }})'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
node:
- '16'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline
- name: Build
run: npm run build

integration:
name: 'Integration Tests (${{ matrix.os }}, Node ${{ matrix.node }})'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'
node:
- '16'
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline
# The integration tests are run with yarn, so we need to install it.
- name: Install yarn
run: npm i -g yarn
- name: Run integration tests
run: npm run test:integration

e2e-simple:
name: E2E Simple
uses: ./.github/workflows/e2e-base.yml
with:
testScript: 'tasks/e2e-simple.sh'

e2e-installs:
name: E2E Installs
uses: ./.github/workflows/e2e-base.yml
with:
testScript: 'tasks/e2e-installs.sh'

e2e-kitchensink:
name: E2E Kitchensink
uses: ./.github/workflows/e2e-base.yml
with:
testScript: 'tasks/e2e-kitchensink.sh'
19 changes: 0 additions & 19 deletions .github/workflows/build.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/e2e-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
workflow_call:
inputs:
testScript:
required: true
type: string

name: E2E

jobs:
test:
name: 'Test (${{ matrix.os }}, Node ${{ matrix.node }})'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
node:
- '16'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install
run: npm ci --prefer-offline
- name: Initialize Global Git config
run: |
git config --global core.autocrlf false
git config --global user.name "Create React App"
git config --global user.email "[email protected]"
- name: Run tests
run: ${{ inputs.testScript }}
32 changes: 0 additions & 32 deletions .github/workflows/integration.yml

This file was deleted.

10 changes: 3 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '16'
cache: 'npm'
- name: Install npm@8
run: npm i -g npm@8
- name: Install
run: npm ci --prefer-offline
- name: Build
run: npm run build
- name: Alex
run: npm run alex
- name: Prettier
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# 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)
## 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)

> [!CAUTION]
>
> ## Deprecated
>
> 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).
>
> 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.

<img alt="Logo" align="right" src="https://create-react-app.dev/img/logo.svg" width="20%" />

Expand Down
41 changes: 0 additions & 41 deletions azure-pipelines-test-job.yml

This file was deleted.

77 changes: 0 additions & 77 deletions azure-pipelines.yml

This file was deleted.

14 changes: 7 additions & 7 deletions docusaurus/docs/running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ Different projects choose different testing tradeoffs based on how often compone

```js
import React from 'react';
import ReactDOM from 'react-dom';
import ReactDOMClient from 'react-dom/client';
import App from './App';

it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
ReactDOMClient.createRoot(div).render(<App />);
});
```

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

```sh
npm install --save @testing-library/react @testing-library/jest-dom
npm install --save @testing-library/react @testing-library/dom @testing-library/jest-dom
```

Alternatively you may use `yarn`:

```sh
yarn add @testing-library/react @testing-library/jest-dom
yarn add @testing-library/react @testing-library/dom @testing-library/jest-dom
```

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

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.
1. Add a `.travis.yml` file to your git repository.
2. Add a `.travis.yml` file to your git repository.

```yaml
language: node_js
Expand All @@ -259,8 +259,8 @@ script:
- npm test
```

1. Trigger your first build with a git push.
1. [Customize your Travis CI Build](https://docs.travis-ci.com/user/customizing-the-build/) if needed.
3. Trigger your first build with a git push.
4. [Customize your Travis CI Build](https://docs.travis-ci.com/user/customizing-the-build/) if needed.

### CircleCI

Expand Down
8 changes: 4 additions & 4 deletions docusaurus/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

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