mirror of
https://github.com/SomboChea/ui
synced 2024-11-24 06:54:27 +07:00
build: updated typescript to 3.5.2 (#91)
This commit is contained in:
parent
c667bea33b
commit
6afc2c0e54
@ -89,7 +89,7 @@
|
|||||||
"stylelint-webpack-plugin": "0.10.5",
|
"stylelint-webpack-plugin": "0.10.5",
|
||||||
"supertest": "4.0.2",
|
"supertest": "4.0.2",
|
||||||
"typeface-roboto": "0.0.54",
|
"typeface-roboto": "0.0.54",
|
||||||
"typescript": "3.4.5",
|
"typescript": "3.5.2",
|
||||||
"url-loader": "1.1.2",
|
"url-loader": "1.1.2",
|
||||||
"validator": "10.11.0",
|
"validator": "10.11.0",
|
||||||
"verdaccio": "4.0.3",
|
"verdaccio": "4.0.3",
|
||||||
|
@ -71,7 +71,6 @@ describe('App', () => {
|
|||||||
await handleDoLogin('sam', '1234');
|
await handleDoLogin('sam', '1234');
|
||||||
const result = {
|
const result = {
|
||||||
username: 'sam',
|
username: 'sam',
|
||||||
token: 'TEST_TOKEN',
|
|
||||||
};
|
};
|
||||||
expect(wrapper.state('isUserLoggedIn')).toBeTruthy();
|
expect(wrapper.state('isUserLoggedIn')).toBeTruthy();
|
||||||
expect(wrapper.state('showLoginModal')).toBeFalsy();
|
expect(wrapper.state('showLoginModal')).toBeFalsy();
|
||||||
|
@ -86,7 +86,7 @@ export default class App extends Component<{}, AppStateInterface> {
|
|||||||
this.handleLogout();
|
this.handleLogout();
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
user: { username, token },
|
user: { username },
|
||||||
isUserLoggedIn: true,
|
isUserLoggedIn: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -153,7 +153,6 @@ export default class App extends Component<{}, AppStateInterface> {
|
|||||||
this.setState({
|
this.setState({
|
||||||
user: {
|
user: {
|
||||||
username,
|
username,
|
||||||
token,
|
|
||||||
},
|
},
|
||||||
isUserLoggedIn: true, // close login modal after successful login
|
isUserLoggedIn: true, // close login modal after successful login
|
||||||
showLoginModal: false, // set isUserLoggedIn to true
|
showLoginModal: false, // set isUserLoggedIn to true
|
||||||
|
@ -7,8 +7,8 @@ export interface DetailPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function callDetailPage(packageName): Promise<DetailPage> {
|
export async function callDetailPage(packageName): Promise<DetailPage> {
|
||||||
const readMe = await API.request(`package/readme/${packageName}`, 'GET');
|
const readMe = await API.request<string | {}>(`package/readme/${packageName}`, 'GET');
|
||||||
const packageMeta = await API.request(`sidebar/${packageName}`, 'GET');
|
const packageMeta = await API.request<PackageMetaInterface | {}>(`sidebar/${packageName}`, 'GET');
|
||||||
|
|
||||||
return { readMe, packageMeta };
|
return { readMe, packageMeta };
|
||||||
}
|
}
|
||||||
|
@ -13059,10 +13059,10 @@ typeface-roboto@0.0.54:
|
|||||||
resolved "https://registry.npmjs.org/typeface-roboto/-/typeface-roboto-0.0.54.tgz#8f02c9a18d1cfa7f49381a6ff0d21ff061f38ad2"
|
resolved "https://registry.npmjs.org/typeface-roboto/-/typeface-roboto-0.0.54.tgz#8f02c9a18d1cfa7f49381a6ff0d21ff061f38ad2"
|
||||||
integrity sha512-sOFA1FXgP0gOgBYlS6irwq6hHYA370KE3dPlgYEJHL3PJd5X8gQE0RmL79ONif6fL5JZuGDj+rtOrFeOqz5IZQ==
|
integrity sha512-sOFA1FXgP0gOgBYlS6irwq6hHYA370KE3dPlgYEJHL3PJd5X8gQE0RmL79ONif6fL5JZuGDj+rtOrFeOqz5IZQ==
|
||||||
|
|
||||||
typescript@3.4.5:
|
typescript@3.5.2:
|
||||||
version "3.4.5"
|
version "3.5.2"
|
||||||
resolved "https://registry.verdaccio.org/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"
|
resolved "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
|
||||||
integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==
|
integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
|
||||||
|
|
||||||
ua-parser-js@^0.7.18:
|
ua-parser-js@^0.7.18:
|
||||||
version "0.7.19"
|
version "0.7.19"
|
||||||
|
Loading…
Reference in New Issue
Block a user