From 38d1588bada11dd74fdd8712f534281132ba849c Mon Sep 17 00:00:00 2001 From: Matthew Herbst Date: Tue, 27 Aug 2019 12:08:15 -0700 Subject: [PATCH] Version 2.4.0 --- CHANGELOG.md | 8 +++++++- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c23be64..cbd17ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ # CHANGELOG +## 2.4.0 (August 27th, 2019) + +- FEATURE [161](https://github.com/gregnb/react-to-print/pull/161): add a new callback method `onPrintError`. This method is called when `react-to-print` catches a Promise rejection in either `onBeforeGetContent` or `onBeforePrint`. The API docs were also cleaned up to better explain which method to use when. + +- FEATURE [158](https://github.com/gregnb/react-to-print/pull/158)/[160](https://github.com/gregnb/react-to-print/pull/160): add new callback method `onBeforeGetContent`. Currently, `onBeforePrint` is called before the print window is opened but after `react-to-print` has gathered the content of the page. This new method is fired before `react-to-print` gathers the content of the page, meaning it can be used to change the content of the page before printing. It can optionally return a `Promise`. Thanks [@andfs](https://github.com/andfs) + ## 2.3.2 (August 6th, 2019) -- FEATURE [156](https://github.com/gregnb/react-to-print/pull/156): dependency upgrades. All listed dependencies were manually upgraded to their latest versions. `npm audit fix` was then run to give us a clean audit. Finally, `npm dedupe` was run to reduce package bloat. +- CHORE [156](https://github.com/gregnb/react-to-print/pull/156): dependency upgrades. All listed dependencies were manually upgraded to their latest versions. `npm audit fix` was then run to give us a clean audit. Finally, `npm dedupe` was run to reduce package bloat. - FIX [156](https://github.com/gregnb/react-to-print/pull/156): a stylesheet that no longer exists but that was being required by the local example has been removed diff --git a/package-lock.json b/package-lock.json index 773dace..6cd5695 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-to-print", - "version": "2.3.2", + "version": "2.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index da94cb6..82fe28a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-to-print", - "version": "2.3.2", + "version": "2.4.0", "description": "Print React components in the browser", "main": "lib/index.js", "types": "lib/index.d.ts",