Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
27985a2
convert mocha tests to jest
Jun 2, 2018
a53f4fb
jest 23
Jun 2, 2018
4408910
add jest configs
Jun 2, 2018
08c7b6b
use material css
Jun 3, 2018
c9e1e75
fix windows
Jun 3, 2018
c445b93
forceExit jest test
Jun 3, 2018
411e016
force exit eject
Jun 4, 2018
737ba13
test
Jun 4, 2018
236c779
Merge pull request #2 from facebook/next
Jun 4, 2018
152d059
test
Jun 4, 2018
230931f
retrigger test
Jun 10, 2018
9d6e0cf
remove appveyor comment
Jun 10, 2018
bd6bc73
try to remove pretendToBeVisual option
Jun 10, 2018
d27b1c1
use jsdom env
Jun 10, 2018
a3b37ef
test environment
Jun 10, 2018
987df9e
no cache
Jun 10, 2018
3f881c6
test no close
Jun 10, 2018
8da4061
bring back raf
Jun 10, 2018
a872f0c
test revert all broken changes
Jun 10, 2018
7cba08e
add back jsdom
Jun 10, 2018
bed3ec3
remove jsdom
Jun 10, 2018
511b163
node test environment
Jun 10, 2018
59584c0
use latest change
Jun 10, 2018
3295054
runInBand
Jun 10, 2018
b5da335
runInBand
Jun 10, 2018
a99d693
comment test run
Jun 10, 2018
7601f1b
try different jest option
Jun 11, 2018
42200e3
standardize jest test options
Jun 11, 2018
ff8507d
increase heap size
Jun 11, 2018
5c4f644
remove heap size config
Jun 11, 2018
0acaa44
Merge pull request #3 from facebook/next
Jun 24, 2018
f554fa9
support scoped packages for cra --scripts-version option
Jun 24, 2018
90d5f0b
Merge pull request #4 from facebook/next
Jun 30, 2018
4083468
upgrade jest version
Jul 6, 2018
dbbe691
fix windows
Jul 6, 2018
7ddd298
fix windows again
Jul 6, 2018
e7ecaae
jest 23.4.1
Jul 14, 2018
793e419
babel-jest
Jul 14, 2018
3750164
babel-jest
Jul 14, 2018
08d233d
split out kitchhensink
Jul 14, 2018
9ced58c
travis node 6
Jul 14, 2018
0f9347d
travis node 6 config
Jul 14, 2018
b33442a
node 6 travis eject
Jul 14, 2018
51568d6
cache yarn
Jul 17, 2018
d63790d
only cache yarn
Jul 17, 2018
123a75e
Merge pull request #6 from facebook/next
Jul 17, 2018
fd126ae
Merge branch 'yarn-cache' into next
Jul 17, 2018
9c568a6
Merge pull request #8 from facebook/next
Sep 21, 2018
31ae6af
Merge branch 'next' into jest
Sep 21, 2018
3fea1cd
remove unrelated changes
Sep 21, 2018
6c1c10e
typo
Sep 21, 2018
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
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"singleQuote": true,
"semi": true
}
19 changes: 6 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,25 @@ dist: trusty
language: node_js
node_js:
- 8
- 9
cache:
directories:
- node_modules
- packages/create-react-app/node_modules
- packages/react-scripts/node_modules
- 10
cache: yarn
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
install: true
script:
- 'if [ $TEST_SUITE = "simple" ]; then tasks/e2e-simple.sh; fi'
- 'if [ $TEST_SUITE = "installs" ]; then tasks/e2e-installs.sh; fi'
- 'if [ $TEST_SUITE = "kitchensink" ]; then tasks/e2e-kitchensink.sh; fi'
- 'if [ $TEST_SUITE = "kitchensink-eject" ]; then tasks/e2e-kitchensink-eject.sh; fi'
- 'if [ $TEST_SUITE = "old-node" ]; then tasks/e2e-old-node.sh; fi'
- 'if [ $TEST_SUITE = "monorepos" ]; then tasks/e2e-monorepos.sh; fi'
env:
matrix:
- TEST_SUITE=simple
- TEST_SUITE=installs
- TEST_SUITE=kitchensink
- TEST_SUITE=kitchensink-eject
- TEST_SUITE=monorepos
matrix:
include:
- node_js: 0.10
- node_js: 4
env: TEST_SUITE=old-node
- node_js: 6
env: TEST_SUITE=kitchensink
- node_js: 6
env: TEST_SUITE=kitchensink-eject
3 changes: 0 additions & 3 deletions .yarnrc

This file was deleted.

28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## 1.1.5 (August 24, 2018)

* `react-scripts`

* Update the `webpack-dev-server` dependency

* `react-dev-utils`

* [#4866](https://github.com/facebook/create-react-app/pull/4866) Fix a Windows-only vulnerability (`CVE-2018-6342`) in the development server ([@acdlite](https://github.com/acdlite))
* Update the `sockjs-client` dependency

#### Committers: 1
- Andrew Clark ([acdlite](https://github.com/acdlite))

### Migrating from 1.1.4 to 1.1.5

Inside any created project that has not been ejected, run:

```
npm install --save --save-exact [email protected]
```

or

```
yarn add --exact [email protected]
```

## 1.1.4 (April 3, 2018)

#### :bug: Bug Fix
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated.
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.fb.com/codeofconduct/) so that you can understand what actions will and will not be tolerated.
34 changes: 25 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,30 @@ Just create a project, and you’re good to go.

**You’ll need to have Node >= 6 on your local development machine** (but it’s not required on the server). You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to easily switch Node versions between different projects.

To create a new app, run a single command:
To create a new app, you may choose one of the following methods:

### npx

```sh
npx create-react-app my-app
```

*([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))*

### npm

```sh
npm init react-app my-app
```
*`npm init <initializer>` is available in npm 6+*

### Yarn

```sh
yarn create react-app my-app
```
*`yarn create` is available in Yarn 0.25+*

It will create a directory called `my-app` inside the current folder.<br>
Inside that directory, it will generate the initial project structure and install the transitive dependencies:

Expand All @@ -54,16 +70,16 @@ my-app
├── package.json
├── .gitignore
├── public
── favicon.ico
── index.html
── favicon.ico
── index.html
│ └── manifest.json
└── src
── App.css
── App.js
── App.test.js
── index.css
── index.js
── logo.svg
── App.css
── App.js
── App.test.js
── index.css
── index.js
── logo.svg
└── registerServiceWorker.js
```

Expand Down
1 change: 1 addition & 0 deletions appveyor.cleanup-cache.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ http://help.appveyor.com/discussions/questions/1310-delete-cache
----

bump
cya
22 changes: 11 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@ image: Visual Studio 2017

environment:
matrix:
- nodejs_version: 8
- nodejs_version: 10
test_suite: "simple"
- nodejs_version: 8
- nodejs_version: 10
test_suite: "installs"
- nodejs_version: 8
- nodejs_version: 10
test_suite: "kitchensink"
- nodejs_version: 8
- nodejs_version: 10
test_suite: "kitchensink-eject"
- nodejs_version: 8
test_suite: "monorepos"
- nodejs_version: 6
test_suite: "simple"
- nodejs_version: 6
- nodejs_version: 8
test_suite: "installs"
- nodejs_version: 6
- nodejs_version: 8
test_suite: "kitchensink"
- nodejs_version: 6
- nodejs_version: 8
test_suite: "kitchensink-eject"
- nodejs_version: 6
test_suite: "monorepos"
cache:
- node_modules -> appveyor.cleanup-cache.txt
- packages\react-scripts\node_modules -> appveyor.cleanup-cache.txt
Expand All @@ -36,6 +32,9 @@ platform:

install:
- ps: Install-Product node $env:nodejs_version $env:platform
- ps: |
(New-Object Net.WebClient).DownloadFile("https://yarnpkg.com/latest.msi", "$env:temp\yarn.msi")
cmd /c start /wait msiexec.exe /i $env:temp\yarn.msi /quiet /qn /norestart

build: off

Expand All @@ -46,4 +45,5 @@ skip_commits:
test_script:
- node --version
- npm --version
- yarn --version
- bash tasks/e2e-%test_suite%.sh
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
},
"devDependencies": {
"eslint": "4.19.1",
"execa": "^0.10.0",
"execa": "1.0.0",
"husky": "^0.14.3",
"lerna": "2.9.1",
"lerna-changelog": "^0.7.0",
"lerna-changelog": "^0.8.0",
"lint-staged": "^7.0.5",
"meow": "^4.0.0",
"meow": "^5.0.0",
"multimatch": "^2.1.0",
"prettier": "1.12.1",
"prettier": "1.14.3",
"svg-term-cli": "^2.1.1",
"tempy": "^0.2.1"
},
Expand Down
7 changes: 6 additions & 1 deletion packages/babel-plugin-named-asset-import/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ function namedAssetImportPlugin({ types: t }) {

return {
visitor: {
ImportDeclaration(path, { opts: { loaderMap } }) {
ImportDeclaration(
path,
{
opts: { loaderMap },
}
) {
const sourcePath = path.node.source.value;
const ext = extname(sourcePath).substr(1);

Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-named-asset-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"index.js"
],
"peerDependencies": {
"@babel/core": "7.0.0-beta.46"
"@babel/core": "7.1.0"
}
}
146 changes: 146 additions & 0 deletions packages/babel-preset-react-app/create.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';

const validateBoolOption = (name, value, defaultValue) => {
if (typeof value === 'undefined') {
value = defaultValue;
}

if (typeof value !== 'boolean') {
throw new Error(`Preset react-app: '${name}' option must be a boolean.`);
}

return value;
};

module.exports = function(api, opts, env) {
if (!opts) {
opts = {};
}

var isEnvDevelopment = env === 'development';
var isEnvProduction = env === 'production';
var isEnvTest = env === 'test';
var isFlowEnabled = validateBoolOption('flow', opts.flow, true);

if (!isEnvDevelopment && !isEnvProduction && !isEnvTest) {
throw new Error(
'Using `babel-preset-react-app` requires that you specify `NODE_ENV` or ' +
'`BABEL_ENV` environment variables. Valid values are "development", ' +
'"test", and "production". Instead, received: ' +
JSON.stringify(env) +
'.'
);
}

return {
presets: [
isEnvTest && [
// ES features necessary for user's Node version
require('@babel/preset-env').default,
{
targets: {
node: 'current',
},
},
],
(isEnvProduction || isEnvDevelopment) && [
// Latest stable ECMAScript features
require('@babel/preset-env').default,
{
// We want Create React App to be IE 9 compatible until React itself
// no longer works with IE 9
targets: {
ie: 9,
},
// Users cannot override this behavior because this Babel
// configuration is highly tuned for ES5 support
ignoreBrowserslistConfig: true,
// If users import all core-js they're probably not concerned with
// bundle size. We shouldn't rely on magic to try and shrink it.
useBuiltIns: false,
// Do not transform modules to CJS
modules: false,
},
],
[
require('@babel/preset-react').default,
{
// Adds component stack to warning messages
// Adds __self attribute to JSX which React will use for some warnings
development: isEnvDevelopment || isEnvTest,
// Will use the native built-in instead of trying to polyfill
// behavior for any plugins that require one.
useBuiltIns: true,
},
],
isFlowEnabled && [require('@babel/preset-flow').default],
].filter(Boolean),
plugins: [
// Experimental macros support. Will be documented after it's had some time
// in the wild.
require('babel-plugin-macros'),
// Necessary to include regardless of the environment because
// in practice some other transforms (such as object-rest-spread)
// don't work without it: https://github.com/babel/babel/issues/7215
require('@babel/plugin-transform-destructuring').default,
// class { handleClick = () => { } }
// Enable loose mode to use assignment instead of defineProperty
// See discussion in https://github.com/facebook/create-react-app/issues/4263
[
require('@babel/plugin-proposal-class-properties').default,
{
loose: true,
},
],
// The following two plugins use Object.assign directly, instead of Babel's
// extends helper. Note that this assumes `Object.assign` is available.
// { ...todo, completed: true }
[
require('@babel/plugin-proposal-object-rest-spread').default,
{
useBuiltIns: true,
},
],
// Polyfills the runtime needed for async/await, generators, and friends
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
[
require('@babel/plugin-transform-runtime').default,
{
corejs: false,
helpers: false,
regenerator: true,
// https://babeljs.io/docs/en/babel-plugin-transform-runtime#useesmodules
// We should turn this on once the lowest version of Node LTS
// supports ES Modules.
useESModules: isEnvDevelopment || isEnvProduction,
},
],
isEnvProduction && [
// Remove PropTypes from production build
require('babel-plugin-transform-react-remove-prop-types').default,
{
removeImport: true,
},
],
// function* () { yield 42; yield 43; }
!isEnvTest && [
require('@babel/plugin-transform-regenerator').default,
{
// Async functions are converted to generators by @babel/preset-env
async: false,
},
],
// Adds syntax support for import()
require('@babel/plugin-syntax-dynamic-import').default,
isEnvTest &&
// Transform dynamic import to require
require('babel-plugin-transform-dynamic-import').default,
].filter(Boolean),
};
};
Loading