Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/create-react-app
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.2
Choose a base ref
...
head repository: facebook/create-react-app
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.3
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 3, 2018

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d639e90 View commit details
  2. Changelog for 1.1.3

    gaearon committed Apr 3, 2018
    Copy the full SHA
    f040d85 View commit details
  3. Publish

     - react-scripts@1.1.3
    gaearon committed Apr 3, 2018
    Copy the full SHA
    408db51 View commit details
Showing with 82 additions and 2 deletions.
  1. +25 −0 CHANGELOG.md
  2. +2 −1 packages/react-scripts/package.json
  3. +55 −1 packages/react-scripts/scripts/test.js
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
## 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 react-scripts@1.1.3
```

or

```
yarn add --exact react-scripts@1.1.3
```

## 1.1.2 (April 3, 2018)

#### :bug: Bug Fix
3 changes: 2 additions & 1 deletion 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.2",
"version": "1.1.3",
"description": "Configuration and scripts for Create React App.",
"repository": "facebookincubator/create-react-app",
"license": "MIT",
@@ -51,6 +51,7 @@
"promise": "8.0.1",
"raf": "3.4.0",
"react-dev-utils": "^5.0.0",
"resolve": "1.6.0",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
"url-loader": "0.6.2",
56 changes: 55 additions & 1 deletion packages/react-scripts/scripts/test.js
Original file line number Diff line number Diff line change
@@ -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) {
@@ -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);