Skip to content

Commit 909429e

Browse files
authored
Merge pull request #547 from wellyshen/feature/react-v17
Upgrade: support React v17
2 parents bfe2df9 + 320cead commit 909429e

File tree

8 files changed

+217
-176
lines changed

8 files changed

+217
-176
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: "\U0001F41B Bug Report"
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
# Bug Report

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: "\U0001F4A1 Feature Request"
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
# Feature Request

.github/ISSUE_TEMPLATE/question.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: "\U0001F914 Questions and Help"
33
about: This issue tracker is not for questions. Please ask questions at https://stackoverflow.com/questions/tagged/react.
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
GitHub Issues are reserved for Bug reports and Feature requests. Support requests that are created as issues are likely to be closed. We want to make sure you are able to find the help you seek. Please take a look at the following resources.

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

babel.config.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
{
22
"presets": [
3-
[
4-
"@babel/preset-env",
5-
{
6-
"loose": true
7-
}
8-
],
9-
"@babel/typescript",
10-
"@babel/react"
3+
["@babel/preset-env", { "loose": true }],
4+
"@babel/preset-typescript",
5+
"@babel/preset-react"
116
],
127
"plugins": ["@babel/proposal-class-properties"],
138
"env": {

package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -62,49 +62,49 @@
6262
"**/*": "prettier -w -u"
6363
},
6464
"devDependencies": {
65-
"@babel/core": "^7.12.3",
65+
"@babel/core": "^7.12.9",
6666
"@babel/plugin-proposal-class-properties": "^7.12.1",
67-
"@babel/preset-env": "^7.12.1",
68-
"@babel/preset-react": "^7.12.5",
69-
"@babel/preset-typescript": "^7.12.1",
70-
"@emotion/babel-plugin": "^11.0.0",
67+
"@babel/preset-env": "^7.12.7",
68+
"@babel/preset-react": "^7.12.7",
69+
"@babel/preset-typescript": "^7.12.7",
70+
"@emotion/babel-plugin": "^11.1.2",
7171
"@emotion/babel-preset-css-prop": "^11.0.0",
72-
"@emotion/react": "^11.0.0",
73-
"@rollup/plugin-babel": "^5.2.1",
74-
"@rollup/plugin-commonjs": "^16.0.0",
72+
"@emotion/react": "^11.1.2",
73+
"@rollup/plugin-babel": "^5.2.2",
74+
"@rollup/plugin-commonjs": "^17.0.0",
7575
"@rollup/plugin-html": "^0.2.0",
7676
"@rollup/plugin-node-resolve": "^10.0.0",
7777
"@rollup/plugin-replace": "^2.3.4",
78-
"@rollup/plugin-url": "^5.0.1",
79-
"@testing-library/react": "^11.1.2",
80-
"@testing-library/react-hooks": "^3.4.2",
81-
"@types/jest": "^26.0.15",
82-
"@types/react": "^16.9.56",
83-
"@types/react-dom": "^16.9.9",
78+
"@rollup/plugin-url": "^6.0.0",
79+
"@testing-library/react": "^11.2.2",
80+
"@testing-library/react-hooks": "^3.5.0",
81+
"@types/jest": "^26.0.16",
82+
"@types/react": "^17.0.0",
83+
"@types/react-dom": "^17.0.0",
8484
"eslint": "^7.2.0",
85-
"eslint-config-welly": "^1.8.0",
86-
"husky": "^4.3.0",
85+
"eslint-config-welly": "^1.8.5",
86+
"husky": "^4.3.4",
8787
"jest": "^26.6.3",
88-
"lint-staged": "^10.5.1",
88+
"lint-staged": "^10.5.3",
8989
"normalize.css": "^8.0.1",
9090
"npm-run-all": "^4.1.5",
91-
"prettier": "^2.1.2",
92-
"react": "^16.13.1",
93-
"react-dom": "^16.13.1",
94-
"react-test-renderer": "^16.13.1",
91+
"prettier": "^2.2.1",
92+
"react": "^17.0.1",
93+
"react-dom": "^17.0.1",
94+
"react-test-renderer": "^17.0.1",
9595
"rimraf": "^3.0.2",
96-
"rollup": "^2.33.2",
96+
"rollup": "^2.34.2",
9797
"rollup-plugin-copy": "^3.3.0",
9898
"rollup-plugin-livereload": "^2.0.0",
9999
"rollup-plugin-postcss": "^3.1.8",
100100
"rollup-plugin-serve": "^1.1.0",
101101
"rollup-plugin-size-snapshot": "^0.12.0",
102102
"rollup-plugin-terser": "^7.0.2",
103-
"stylelint": "^13.7.2",
103+
"stylelint": "^13.8.0",
104104
"stylelint-config-prettier": "^8.0.2",
105105
"stylelint-config-standard": "^20.0.0",
106106
"ts-jest": "^26.4.4",
107-
"typescript": "^4.0.5"
107+
"typescript": "^4.1.2"
108108
},
109109
"peerDependencies": {
110110
"react": ">= 16.8.0",

src/__tests__/Imager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ describe("Imager", () => {
8282
const image = createImage(new Imager());
8383
const onError = (event: Event) => {
8484
expect(event).toMatchObject(ERROR_EVT);
85+
// @ts-expect-error
8586
done();
8687
};
8788
const onLoad = jest.fn();
@@ -100,6 +101,7 @@ describe("Imager", () => {
100101
const image = createImage(new Imager());
101102
const onError = (event: Event) => {
102103
expect(event).toMatchObject(ERROR_EVT);
104+
// @ts-expect-error
103105
done();
104106
};
105107
const onLoad = jest.fn();
@@ -128,6 +130,7 @@ describe("Imager", () => {
128130
const onError = jest.fn();
129131
const onLoad = (event: Event) => {
130132
expect(event).toMatchObject(LOAD_EVT);
133+
// @ts-expect-error
131134
done();
132135
};
133136

0 commit comments

Comments
 (0)