Skip to content

Master #1

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 10 commits into from
May 1, 2018
Merged
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
86 changes: 84 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,85 @@
## 1.1.4 (April 3, 2018)

#### :bug: Bug Fix

* `react-dev-utils`

* [#4250](https://github.com/facebook/create-react-app/pull/4250) Upgrade `detect-port-alt` to fix [#4189](https://github.com/facebook/create-react-app/issues/4189). ([@Timer](https://github.com/Timer))

#### Committers: 1
- Joe Haddad ([Timer](https://github.com/Timer))

### Migrating from 1.1.3 to 1.1.4

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.3 (April 3, 2018)

#### :bug: Bug Fix

* `react-scripts`

* [#4247](https://github.com/facebook/create-react-app/pull/4247) Fix `environment.dispose is not a function` error caused by a Jest bug. ([@gaearon](https://github.com/gaearon))

#### Committers: 1
- Dan Abramov ([gaearon](https://github.com/gaearon))

### Migrating from 1.1.2 to 1.1.3

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.2 (April 3, 2018)

#### :bug: Bug Fix

* `react-scripts`

* [#4085](https://github.com/facebook/create-react-app/pull/4085) Resolve `.js` before `.mjs` files to unbreak dependencies with native ESM support. ([@leebyron](https://github.com/leebyron))

#### :memo: Documentation

* `react-scripts`

* [#4197](https://github.com/facebook/create-react-app/pull/4197) Add troubleshooting for Github Pages. ([@xnt](https://github.com/xnt))

#### Committers: 2
- Lee Byron ([leebyron](https://github.com/leebyron))
- Vicente Plata ([xnt](https://github.com/xnt))

### Migrating from 1.1.1 to 1.1.2

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.1 (February 2, 2018)

#### :bug: Bug Fix
Expand Down Expand Up @@ -49,7 +131,7 @@ yarn add --exact [email protected]
* `react-error-overlay`

* [#3474](https://github.com/facebookincubator/create-react-app/pull/3474) Allow the error overlay to be unregistered. ([@Timer](https://github.com/Timer))

* `create-react-app`

* [#3408](https://github.com/facebookincubator/create-react-app/pull/3408) Add `--info` flag to help gather bug reports. ([@tabrindle](https://github.com/tabrindle))
Expand All @@ -75,7 +157,7 @@ yarn add --exact [email protected]
* `create-react-app`

* [#3320](https://github.com/facebookincubator/create-react-app/pull/3320) Fix offline installation to respect proxy from `.npmrc`. ([@mdogadailo](https://github.com/mdogadailo))

* `react-scripts`

* [#3537](https://github.com/facebookincubator/create-react-app/pull/3537) Add `mjs` and `jsx` filename extensions to `file-loader` exclude pattern. ([@iansu](https://github.com/iansu))
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dev-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-dev-utils",
"version": "5.0.0",
"version": "5.0.1",
"description": "Webpack utilities used by Create React App",
"repository": "facebookincubator/create-react-app",
"license": "MIT",
Expand Down Expand Up @@ -40,7 +40,7 @@
"babel-code-frame": "6.26.0",
"chalk": "1.1.3",
"cross-spawn": "5.1.0",
"detect-port-alt": "1.1.5",
"detect-port-alt": "1.1.6",
"escape-string-regexp": "1.0.5",
"filesize": "3.5.11",
"global-modules": "1.0.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-scripts",
"version": "1.1.1",
"version": "1.1.4",
"description": "Configuration and scripts for Create React App.",
"repository": "facebookincubator/create-react-app",
"license": "MIT",
Expand Down Expand Up @@ -50,7 +50,8 @@
"postcss-loader": "2.0.8",
"promise": "8.0.1",
"raf": "3.4.0",
"react-dev-utils": "^5.0.0",
"react-dev-utils": "^5.0.1",
"resolve": "1.6.0",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
"url-loader": "0.6.2",
Expand Down
56 changes: 55 additions & 1 deletion packages/react-scripts/scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ process.on('unhandledRejection', err => {
require('../config/env');

const jest = require('jest');
const argv = process.argv.slice(2);
let argv = process.argv.slice(2);

// Watch unless on CI or in coverage mode
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
Expand All @@ -46,5 +46,59 @@ argv.push(
)
)
);

// This is a very dirty workaround for https://github.com/facebook/jest/issues/5913.
// We're trying to resolve the environment ourselves because Jest does it incorrectly.
// TODO: remove this (and the `resolve` dependency) as soon as it's fixed in Jest.
const resolve = require('resolve');
function resolveJestDefaultEnvironment(name) {
const jestDir = path.dirname(
resolve.sync('jest', {
basedir: __dirname,
})
);
const jestCLIDir = path.dirname(
resolve.sync('jest-cli', {
basedir: jestDir,
})
);
const jestConfigDir = path.dirname(
resolve.sync('jest-config', {
basedir: jestCLIDir,
})
);
return resolve.sync(name, {
basedir: jestConfigDir,
});
}
let cleanArgv = [];
let env = 'node';
let next;
do {
next = argv.shift();
if (next === '--env') {
env = argv.shift();
} else if (next.indexOf('--env=') === 0) {
env = next.substring('--env='.length);
} else {
cleanArgv.push(next);
}
} while (argv.length > 0);
argv = cleanArgv;
let resolvedEnv;
try {
resolvedEnv = resolveJestDefaultEnvironment(`jest-environment-${env}`);
} catch (e) {
// ignore
}
if (!resolvedEnv) {
try {
resolvedEnv = resolveJestDefaultEnvironment(env);
} catch (e) {
// ignore
}
}
const testEnvironment = resolvedEnv || env;
argv.push('--env', testEnvironment);
// @remove-on-eject-end
jest.run(argv);
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ module.exports = (resolve, rootDir, isEjecting) => {
},
moduleFileExtensions: [
'web.js',
'mjs',
'js',
'json',
'web.jsx',
'jsx',
'node',
'mjs',
],
};
if (rootDir) {
Expand Down
10 changes: 10 additions & 0 deletions packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2209,6 +2209,16 @@ GitHub Pages doesn’t support routers that use the HTML5 `pushState` history AP
* You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to `hashHistory` for this effect, but the URL will be longer and more verbose (for example, `http://user.github.io/todomvc/#/todos/42?_k=yknaj`). [Read more](https://reacttraining.com/react-router/web/api/Router) about different history implementations in React Router.
* Alternatively, you can use a trick to teach GitHub Pages to handle 404 by redirecting to your `index.html` page with a special redirect parameter. You would need to add a `404.html` file with the redirection code to the `build` folder before deploying your project, and you’ll need to add code handling the redirect parameter to `index.html`. You can find a detailed explanation of this technique [in this guide](https://github.com/rafrex/spa-github-pages).

#### Troubleshooting

##### "/dev/tty: No such a device or address"

If, when deploying, you get `/dev/tty: No such a device or address` or a similar error, try the follwing:

1. Create a new [Personal Access Token](https://github.com/settings/tokens)
2. `git remote set-url origin https://<user>:<token>@github.com/<user>/<repo>` .
3. Try `npm run deploy again`

### [Heroku](https://www.heroku.com/)

Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack).<br>
Expand Down