Skip to content

Commit 1b90c6a

Browse files
authored
Merge pull request #1 from facebook/master
Master
2 parents ab7cf94 + dfbc71c commit 1b90c6a

File tree

6 files changed

+155
-8
lines changed

6 files changed

+155
-8
lines changed

CHANGELOG.md

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,85 @@
1+
## 1.1.4 (April 3, 2018)
2+
3+
#### :bug: Bug Fix
4+
5+
* `react-dev-utils`
6+
7+
* [#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))
8+
9+
#### Committers: 1
10+
- Joe Haddad ([Timer](https://github.com/Timer))
11+
12+
### Migrating from 1.1.3 to 1.1.4
13+
14+
Inside any created project that has not been ejected, run:
15+
16+
```
17+
npm install --save --save-exact [email protected]
18+
```
19+
20+
or
21+
22+
```
23+
yarn add --exact [email protected]
24+
```
25+
26+
## 1.1.3 (April 3, 2018)
27+
28+
#### :bug: Bug Fix
29+
30+
* `react-scripts`
31+
32+
* [#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))
33+
34+
#### Committers: 1
35+
- Dan Abramov ([gaearon](https://github.com/gaearon))
36+
37+
### Migrating from 1.1.2 to 1.1.3
38+
39+
Inside any created project that has not been ejected, run:
40+
41+
```
42+
npm install --save --save-exact [email protected]
43+
```
44+
45+
or
46+
47+
```
48+
yarn add --exact [email protected]
49+
```
50+
51+
## 1.1.2 (April 3, 2018)
52+
53+
#### :bug: Bug Fix
54+
55+
* `react-scripts`
56+
57+
* [#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))
58+
59+
#### :memo: Documentation
60+
61+
* `react-scripts`
62+
63+
* [#4197](https://github.com/facebook/create-react-app/pull/4197) Add troubleshooting for Github Pages. ([@xnt](https://github.com/xnt))
64+
65+
#### Committers: 2
66+
- Lee Byron ([leebyron](https://github.com/leebyron))
67+
- Vicente Plata ([xnt](https://github.com/xnt))
68+
69+
### Migrating from 1.1.1 to 1.1.2
70+
71+
Inside any created project that has not been ejected, run:
72+
73+
```
74+
npm install --save --save-exact [email protected]
75+
```
76+
77+
or
78+
79+
```
80+
yarn add --exact [email protected]
81+
```
82+
183
## 1.1.1 (February 2, 2018)
284

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

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

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

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

81163
* [#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))

packages/react-dev-utils/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-dev-utils",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"description": "Webpack utilities used by Create React App",
55
"repository": "facebookincubator/create-react-app",
66
"license": "MIT",
@@ -40,7 +40,7 @@
4040
"babel-code-frame": "6.26.0",
4141
"chalk": "1.1.3",
4242
"cross-spawn": "5.1.0",
43-
"detect-port-alt": "1.1.5",
43+
"detect-port-alt": "1.1.6",
4444
"escape-string-regexp": "1.0.5",
4545
"filesize": "3.5.11",
4646
"global-modules": "1.0.0",

packages/react-scripts/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scripts",
3-
"version": "1.1.1",
3+
"version": "1.1.4",
44
"description": "Configuration and scripts for Create React App.",
55
"repository": "facebookincubator/create-react-app",
66
"license": "MIT",
@@ -50,7 +50,8 @@
5050
"postcss-loader": "2.0.8",
5151
"promise": "8.0.1",
5252
"raf": "3.4.0",
53-
"react-dev-utils": "^5.0.0",
53+
"react-dev-utils": "^5.0.1",
54+
"resolve": "1.6.0",
5455
"style-loader": "0.19.0",
5556
"sw-precache-webpack-plugin": "0.11.4",
5657
"url-loader": "0.6.2",

packages/react-scripts/scripts/test.js

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ process.on('unhandledRejection', err => {
2424
require('../config/env');
2525

2626
const jest = require('jest');
27-
const argv = process.argv.slice(2);
27+
let argv = process.argv.slice(2);
2828

2929
// Watch unless on CI or in coverage mode
3030
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
@@ -46,5 +46,59 @@ argv.push(
4646
)
4747
)
4848
);
49+
50+
// This is a very dirty workaround for https://github.com/facebook/jest/issues/5913.
51+
// We're trying to resolve the environment ourselves because Jest does it incorrectly.
52+
// TODO: remove this (and the `resolve` dependency) as soon as it's fixed in Jest.
53+
const resolve = require('resolve');
54+
function resolveJestDefaultEnvironment(name) {
55+
const jestDir = path.dirname(
56+
resolve.sync('jest', {
57+
basedir: __dirname,
58+
})
59+
);
60+
const jestCLIDir = path.dirname(
61+
resolve.sync('jest-cli', {
62+
basedir: jestDir,
63+
})
64+
);
65+
const jestConfigDir = path.dirname(
66+
resolve.sync('jest-config', {
67+
basedir: jestCLIDir,
68+
})
69+
);
70+
return resolve.sync(name, {
71+
basedir: jestConfigDir,
72+
});
73+
}
74+
let cleanArgv = [];
75+
let env = 'node';
76+
let next;
77+
do {
78+
next = argv.shift();
79+
if (next === '--env') {
80+
env = argv.shift();
81+
} else if (next.indexOf('--env=') === 0) {
82+
env = next.substring('--env='.length);
83+
} else {
84+
cleanArgv.push(next);
85+
}
86+
} while (argv.length > 0);
87+
argv = cleanArgv;
88+
let resolvedEnv;
89+
try {
90+
resolvedEnv = resolveJestDefaultEnvironment(`jest-environment-${env}`);
91+
} catch (e) {
92+
// ignore
93+
}
94+
if (!resolvedEnv) {
95+
try {
96+
resolvedEnv = resolveJestDefaultEnvironment(env);
97+
} catch (e) {
98+
// ignore
99+
}
100+
}
101+
const testEnvironment = resolvedEnv || env;
102+
argv.push('--env', testEnvironment);
49103
// @remove-on-eject-end
50104
jest.run(argv);

packages/react-scripts/scripts/utils/createJestConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ module.exports = (resolve, rootDir, isEjecting) => {
4646
},
4747
moduleFileExtensions: [
4848
'web.js',
49-
'mjs',
5049
'js',
5150
'json',
5251
'web.jsx',
5352
'jsx',
5453
'node',
54+
'mjs',
5555
],
5656
};
5757
if (rootDir) {

packages/react-scripts/template/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,6 +2209,16 @@ GitHub Pages doesn’t support routers that use the HTML5 `pushState` history AP
22092209
* 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.
22102210
* 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).
22112211

2212+
#### Troubleshooting
2213+
2214+
##### "/dev/tty: No such a device or address"
2215+
2216+
If, when deploying, you get `/dev/tty: No such a device or address` or a similar error, try the follwing:
2217+
2218+
1. Create a new [Personal Access Token](https://github.com/settings/tokens)
2219+
2. `git remote set-url origin https://<user>:<token>@github.com/<user>/<repo>` .
2220+
3. Try `npm run deploy again`
2221+
22122222
### [Heroku](https://www.heroku.com/)
22132223

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

0 commit comments

Comments
 (0)