Skip to content
This repository was archived by the owner on Oct 19, 2022. It is now read-only.

Commit 2ce6433

Browse files
author
Dominik Rowicki
authored
Merge pull request #43 from netguru/facebookincubator-master
Merge changes from upstream v.1.1.4
2 parents 4b995bc + 13d43c3 commit 2ce6433

File tree

6 files changed

+164
-9
lines changed

6 files changed

+164
-9
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": "@netguru/react-scripts",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Netguru configuration and scripts for Create React App",
55
"repository": "netguru/create-react-app",
66
"license": "MIT",
@@ -63,7 +63,8 @@
6363
"promise": "8.0.1",
6464
"raf": "3.4.0",
6565
"raw-loader": "^0.5.1",
66-
"react-dev-utils": "^5.0.0",
66+
"react-dev-utils": "^5.0.1",
67+
"resolve": "1.6.0",
6768
"style-loader": "0.19.0",
6869
"svg-react-loader": "0.4.5",
6970
"sw-precache-webpack-plugin": "0.11.4",

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: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,19 @@ module.exports = (resolve, rootDir, isEjecting) => {
4242
'^react-native$': 'react-native-web',
4343
"^.+\\.s?css$": "identity-obj-proxy",
4444
},
45-
"moduleDirectories": [
45+
moduleDirectories: [
4646
"node_modules",
4747
"<rootDir>/src"
4848
],
49-
moduleFileExtensions: ['web.js', 'mjs', 'js', 'json', 'web.jsx', 'jsx', 'node'],
49+
moduleFileExtensions: [
50+
'web.js',
51+
'js',
52+
'json',
53+
'web.jsx',
54+
'jsx',
55+
'node',
56+
'mjs',
57+
],
5058
};
5159
if (rootDir) {
5260
config.rootDir = 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)