Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2758 from apollographql/release-2.5.0
Browse files Browse the repository at this point in the history
Release 2.5.0
  • Loading branch information
hwillson authored Feb 26, 2019
2 parents e87986b + 4249523 commit 2a330a7
Show file tree
Hide file tree
Showing 47 changed files with 1,960 additions and 2,416 deletions.
27 changes: 5 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,47 +61,31 @@ jobs:
- store_artifacts:
path: reports/junit

Browser:
docker: [{ image: 'circleci/node:8' }]
steps:
- checkout
- run: npm i
- run: npm run compile
- run:
name: Jest suite
command: npm run test:compiled:browser:umd -- --ci --testResultsProcessor="jest-junit"
environment:
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml'
- store_test_results:
path: reports/junit
- store_artifacts:
path: reports/junit

Server:
Commonjs:
docker: [{ image: 'circleci/node:8' }]
steps:
- checkout
- run: npm i
- run: npm run compile
- run:
name: Jest suite
command: npm run test:compiled:server:umd -- --ci --testResultsProcessor="jest-junit"
command: npm run test:compiled:cjs -- --ci --testResultsProcessor="jest-junit"
environment:
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml'
- store_test_results:
path: reports/junit
- store_artifacts:
path: reports/junit

Commonjs:
UMD:
docker: [{ image: 'circleci/node:8' }]
steps:
- checkout
- run: npm i
- run: npm run compile
- run:
name: Jest suite
command: npm run test:compiled:cjs -- --ci --testResultsProcessor="jest-junit"
command: npm run test:compiled:umd -- --ci --testResultsProcessor="jest-junit"
environment:
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml'
- store_test_results:
Expand All @@ -126,7 +110,6 @@ workflows:
- Linting
- Typecheck
- Preact
- Browser
- Server
- UMD
- Commonjs
- Filesize
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
.rpt2_cache

# Logs
logs
Expand Down
25 changes: 22 additions & 3 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Change log

## vNext

### Bug Fixes
## 2.5.0

### Improvements

- Ready to be used with Apollo Client 2.5 and its new local state management
features, as well as many overall code improvements to help reduce the React
Apollo bundle size. <br/>
[#2758](https://github.com/apollographql/react-apollo/pull/2758)
- A function can now be set as a `MockedResponse` `result` when using
`MockedProvider`, such that every time the mocked result is returned,
the function is run to calculate the result. This opens up new testing
Expand Down Expand Up @@ -37,6 +39,23 @@

### Improvements

- The `walkTree` function has been deprecated, since there's no way to
make its behavior consistent with the latest versions of React. To save
bundle size, `walkTree` is no longer exported from `react-apollo`,
though you can still access it as follows:
```js
import { walkTree } from "react-apollo/walkTree"
```

## 2.4.0

### Bug Fixes

- Invoke `onCompleted`/`onError` even if `Mutation` unmounts. <br/>
[PR #2710](https://github.com/apollographql/react-apollo/pull/2710)

### Improvements

- Update the typescript example app to use the raw Query component directly,
with generics, to avoid generating the extra object that's created (in the
compiled code) when extending the Query component as a class. <br/>
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ React Apollo makes use of `Object.assign`, which is not supported in certain bro
import 'core-js/fn/object/assign';
```

## Building for production

The `react-apollo` package is designed to be effectively consumed by bundlers that understand either CommonJS `require` syntax or ECMASCript `import` and `export` syntax, such as [Rollup](https://rollupjs.org), [Webpack](https://webpack.js.org), or [Parcel](https://parceljs.org). If your bundler supports tree-shaking, it should be able to eliminate unused code from the `react-apollo` package, regardless of which module syntax you're using.

You should (almost) never need to reach into the `react-apollo/...` internals to import specific modules. The only supported exceptions are `react-apollo/test-links`, `react-apollo/test-utils`, and `react-apollo/walkTree` (deprecated).

When minifying your application, you can make the `react-apollo` package noticeably smaller by configuring your minifier to replace the expression `process.env.NODE_ENV` with a string literal (typically `"production"`). Other packages such as [React](https://reactjs.org) use the same convention, so there's a good chance you already have your minifier configured in this way.

## Documentation

For a complete React Apollo API reference visit the documentation website at: [https://www.apollographql.com/docs/react/api/react-apollo.html](https://www.apollographql.com/docs/react/api/react-apollo.html)
Expand Down
4 changes: 2 additions & 2 deletions examples/ssr/.meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ static-html # Define static page content in .html files
reactive-var@1.0.11 # Reactive variable for tracker
tracker@1.2.0 # Meteor's client-side reactive programming library

standard-minifier-css@1.5.0 # CSS minifier run for production mode
standard-minifier-css@1.5.2 # CSS minifier run for production mode
standard-minifier-js@2.4.0 # JS minifier run for production mode
es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers
ecmascript@0.12.0 # Enable ECMAScript2015+ syntax in app code
ecmascript@0.12.4 # Enable ECMAScript2015+ syntax in app code
shell-server@0.4.0 # Server-side component of the `meteor shell` command
server-render@0.3.1
underscore@1.0.10
2 changes: 1 addition & 1 deletion examples/ssr/.meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.8
METEOR@1.8.0.2
20 changes: 10 additions & 10 deletions examples/ssr/.meteor/versions
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
allow-deny@1.1.0
autoupdate@1.5.0
babel-compiler@7.2.1
babel-compiler@7.2.4
babel-runtime@1.3.0
base64@1.0.11
binary-heap@1.0.11
blaze-tools@1.0.10
boilerplate-generator@1.6.0
caching-compiler@1.2.0
caching-compiler@1.2.1
caching-html-compiler@1.1.3
callback-hook@1.1.0
check@1.3.1
Expand All @@ -15,9 +15,9 @@ ddp-client@2.3.3
ddp-common@1.4.0
ddp-server@2.2.0
deps@1.0.12
diff-sequence@1.1.0
dynamic-import@0.5.0
ecmascript@0.12.1
diff-sequence@1.1.1
dynamic-import@0.5.1
ecmascript@0.12.4
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.8.0
ecmascript-runtime-server@0.7.1
Expand All @@ -35,12 +35,12 @@ livedata@1.0.18
logging@1.1.20
meteor@1.9.2
meteor-base@1.4.0
minifier-css@1.4.0
minifier-css@1.4.1
minifier-js@2.4.0
minimongo@1.4.5
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modern-browsers@0.1.2
modern-browsers@0.1.3
modules@0.13.0
modules-runtime@0.10.3
mongo@1.6.0
Expand All @@ -49,7 +49,7 @@ mongo-dev-server@1.1.0
mongo-id@1.0.7
npm-mongo@3.1.1
ordered-dict@1.1.0
promise@0.11.1
promise@0.11.2
random@1.1.0
reactive-var@1.0.11
reload@1.2.0
Expand All @@ -59,11 +59,11 @@ server-render@0.3.1
shell-server@0.4.0
socket-stream-client@0.2.2
spacebars-compiler@1.1.3
standard-minifier-css@1.5.1
standard-minifier-css@1.5.2
standard-minifier-js@2.4.0
static-html@1.2.2
templating-tools@1.1.2
tracker@1.2.0
underscore@1.0.10
webapp@1.7.0
webapp@1.7.2
webapp-hashing@1.0.9
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"meteor-node-stubs": "^0.4.1",
"node-fetch": "^2.2.0",
"react": "^16.5.2",
"react-apollo": "^2.3.1",
"react-apollo": "^2.5.0-beta.0",
"react-dom": "^16.5.2"
},
"devDependencies": {
Expand Down
16 changes: 0 additions & 16 deletions jest.browser.umd.config.js

This file was deleted.

10 changes: 8 additions & 2 deletions jest.cjs.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
const { jest } = require('./package.json');

jest.moduleNameMapper = {
'\\.\\./src$': '<rootDir>/lib/index.js',
'\\.\\./src/(.*)': '<rootDir>/lib/$1.js',
'\\.\\./src$': '<rootDir>/lib/react-apollo.cjs.js',
'\\.\\./src/test-utils': '<rootDir>/lib/test-utils.js',
'\\.\\./src/walkTree': '<rootDir>/lib/walkTree.js',
// Force other imports to /src/whatever to fail
'\\.\\./src': '<rootDir>/test/fail-no-entry-point.js',
};

// Ignore tests that don't go against the public API
jest.modulePathIgnorePatterns.push('<rootDir>/test/internal-api');

module.exports = jest;
1 change: 1 addition & 0 deletions jest.server.umd.config.js → jest.umd.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { jest } = require('./package.json');
jest.moduleNameMapper = {
'\\.\\./src$': '<rootDir>/lib/react-apollo.umd.js',
'\\.\\./src/test-utils': '<rootDir>/lib/test-utils.js',
'\\.\\./src/walkTree': '<rootDir>/lib/walkTree.js',
// Force other imports to /src/whatever to fail
'\\.\\./src': '<rootDir>/test/fail-no-entry-point.js',
};
Expand Down
Loading

0 comments on commit 2a330a7

Please sign in to comment.