Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Commit ee98c1b

Browse files
authored
Update react-toastify to v7 (#18)
* Update react-toastify to v7 * Upgrade dependencies
1 parent 254c574 commit ee98c1b

File tree

3 files changed

+5223
-711
lines changed

3 files changed

+5223
-711
lines changed

packages/jupyterlab_toastify/README.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,42 +19,42 @@ jlpm add jupyterlab_toastify
1919
## Usage
2020

2121
```javascript
22-
import { INotification } from "jupyterlab_toastify";
22+
import { INotification } from 'jupyterlab_toastify';
2323

2424
// Error message notification - do not close automatically
25-
INotification.error("Error");
25+
INotification.error('Error');
2626
// Warning message notification - do not close automatically
27-
INotification.warning("Warning");
27+
INotification.warning('Warning');
2828
// Info message notification
29-
INotification.info("Info");
29+
INotification.info('Info');
3030
// Success message notification
31-
INotification.success("Success");
31+
INotification.success('Success');
3232

3333
// Background task with progression animation
34-
let id = await INotification.inProgress("Task in progress!");
34+
let id = await INotification.inProgress('Task in progress!');
3535
// -> Update text
3636
INotification.update({
3737
toastId: id,
38-
message: "Updating task..."
38+
message: 'Updating task...'
3939
});
4040
// -> Update text, status and set closing delay (in ms)
4141
INotification.update({
4242
toastId: id,
43-
message: "Task succeed",
44-
type: "success",
43+
message: 'Task succeed',
44+
type: 'success',
4545
autoClose: 3000
4646
});
4747

4848
// Notification with two buttons
49-
INotification.error("Error with button", {
49+
INotification.error('Error with button', {
5050
buttons: [
5151
{
52-
label: "Action1",
53-
callback: () => alert("Action1 was clicked")
52+
label: 'Action1',
53+
callback: () => alert('Action1 was clicked')
5454
},
5555
{
56-
label: "Action2",
57-
callback: () => alert("Action2 was clicked")
56+
label: 'Action2',
57+
callback: () => alert('Action2 was clicked')
5858
}
5959
]
6060
});
@@ -67,15 +67,15 @@ INotification.dismiss();
6767

6868
// Default call using `toast` function
6969
// See https://github.com/fkhadra/react-toastify
70-
INotification.notify("Default");
70+
INotification.notify('Default');
7171
```
7272

7373
To close a notification, click on the close button.
7474

7575
## Prerequisites
7676

7777
- [react](https://reactjs.org/) ^16.0 || ^17.0
78-
- [react-toastify](https://github.com/fkhadra/react-toastify) ^6.0
78+
- [react-toastify](https://github.com/fkhadra/react-toastify) ^7.0
7979

8080
## Installation
8181

@@ -87,6 +87,18 @@ The toast container will be added to the DOM automatically by `react-toastify`.
8787
8888
## Changelog
8989

90+
### v4.2.0
91+
92+
- Update to [`react-toastify` v7](https://github.com/fkhadra/react-toastify/releases/tag/v7.0.0)
93+
- Security updates:
94+
- Bump ini from 1.3.5 to 1.3.8 (#14)
95+
- Bump ssri from 8.0.0 to 8.0.1 (#15)
96+
- Bump hosted-git-info from 2.8.8 to 2.8.9 (#16)
97+
- Bump lodash from 4.17.20 to 4.17.21 (#17)
98+
- Bump ws from 7.4.5 to 7.4.6 (#19)
99+
- Bump normalize-url from 4.5.0 to 4.5.1 (#20)
100+
- Bump tar from 6.1.0 to 6.1.5 (#21)
101+
90102
### v4.1.2
91103

92104
- New feature:

packages/jupyterlab_toastify/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jupyterlab_toastify",
3-
"version": "4.1.3",
3+
"version": "4.2.0",
44
"description": "Integrate 'react-toastify' nicely in JupyterLab.",
55
"keywords": [
66
"jupyter",
@@ -35,7 +35,7 @@
3535
"@fortawesome/fontawesome-svg-core": "^1.2.30",
3636
"@fortawesome/free-solid-svg-icons": "^5.14.0",
3737
"@fortawesome/react-fontawesome": "^0.1.11",
38-
"react-toastify": "^6.0.5"
38+
"react-toastify": "^7.0.4"
3939
},
4040
"peerDependencies": {
4141
"react": "^16.0.0 || ^17.0.0",

0 commit comments

Comments
 (0)