Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 73bdbd9

Browse files
author
Jeff Moore
committed
Releasing v0.6.0
1 parent 0bbb408 commit 73bdbd9

File tree

88 files changed

+6672
-4671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+6672
-4671
lines changed

package-lock.json

Lines changed: 5387 additions & 3926 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
{
22
"name": "team-chat",
3-
"version": "0.5.4",
3+
"version": "0.6.0",
44
"description": "Team Chat - A Reference Application for PubNub with Typescript, React and Redux",
55
"license": "MIT",
66
"private": true,
77
"dependencies": {
88
"@types/emoji-mart": "^2.11.0",
9-
"@types/pubnub": "^4.0.7",
10-
"@types/react": "^16.9.4",
9+
"@types/invariant": "^2.2.31",
10+
"@types/pubnub": "^4.27.2",
11+
"@types/react": "^16.9.23",
1112
"@types/react-dom": "^16.9.1",
1213
"@types/react-redux": "^7.1.2",
13-
"@types/styled-components": "^4.1.19",
14+
"@types/styled-components": "^5.0.1",
1415
"emoji-mart": "^2.11.1",
16+
"framer-motion": "^1.8.4",
17+
"invariant": "^2.2.4",
1518
"polished": "^3.4.1",
16-
"pubnub": "^4.27.0",
17-
"pubnub-react": "^2.0.0-beta.4",
18-
"pubnub-redux": "^0.0.2-beta",
19-
"react": "^16.9.0",
20-
"react-dom": "^16.9.0",
21-
"react-pose": "^4.0.8",
22-
"react-redux": "^7.1.0",
19+
"pubnub": "^4.27.3",
20+
"pubnub-react": "^2.0.0",
21+
"pubnub-redux": "^0.0.5-beta",
22+
"react": "^16.13.0",
23+
"react-dom": "^16.13.0",
24+
"react-redux": "^7.2.0",
2325
"redux": "^4.0.4",
2426
"redux-thunk": "^2.3.0",
2527
"reselect": "^4.0.0",
26-
"styled-components": "^4.4.0"
28+
"styled-components": "^5.0.1"
2729
},
2830
"scripts": {
2931
"start": "node setup/populate.js --quick-test && react-scripts start",
@@ -53,8 +55,7 @@
5355
},
5456
"lint-staged": {
5557
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
56-
"prettier --write",
57-
"git add"
58+
"prettier --write"
5859
]
5960
},
6061
"babelMacros": {
@@ -64,19 +65,19 @@
6465
"node": ">=8.0.0"
6566
},
6667
"devDependencies": {
67-
"@testing-library/jest-dom": "^4.0.0",
68-
"@testing-library/react": "^9.1.4",
69-
"@types/jest": "24.0.18",
70-
"@types/node": "^12.7.5",
68+
"@testing-library/jest-dom": "^5.1.1",
69+
"@testing-library/react": "^9.4.1",
70+
"@types/jest": "25.1.3",
71+
"@types/node": "^13.7.7",
7172
"cli-progress": "^3.3.1",
72-
"eslint-plugin-react-hooks": "^2.1.1",
73+
"eslint-plugin-react-hooks": "^2.5.0",
7374
"file-system": "^2.2.2",
74-
"husky": "^3.0.8",
75-
"lint-staged": "^9.4.1",
75+
"husky": "^4.2.3",
76+
"lint-staged": "^10.0.8",
7677
"prettier": "^1.18.2",
77-
"react-scripts": "3.2.0",
78+
"react-scripts": "3.4.0",
7879
"readline": "^1.3.0",
7980
"requirejs": "^2.3.6",
80-
"typescript": "3.6.3"
81+
"typescript": "3.8.3"
8182
}
8283
}

public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="theme-color" content="#000000" />
88
<meta
99
name="description"
10-
content="Web site created using create-react-app"
10+
content="This is an example of creating a chat application using PubNub"
1111
/>
1212
<link rel="apple-touch-icon" href="logo192.png" />
1313
<!--
@@ -29,7 +29,7 @@
2929
work correctly both with client-side routing and a non-root public URL.
3030
Learn how to configure a non-root public URL by running `npm run build`.
3131
-->
32-
<title>React App</title>
32+
<title>Team Chat Powered by PubNub</title>
3333
</head>
3434
<body>
3535
<noscript>You need to enable JavaScript to run this app.</noscript>

setup/populate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const PubNub = require('pubnub');
2-
const data = require('./input_data.json');
2+
const data = require('./team-chat-initialization-data.json');
33
const _cliProgress = require('cli-progress');
44
const readline = require("readline");
55
const fs = require('file-system');
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"conversationId": "space_ac4e67b98b34b44c4a39466e93e"
3+
}
File renamed without changes.

src/features/authentication/Login/Login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { login } from "../loginCommand";
1212
import { isLoggingIn } from "../authenticationModel";
1313
import { isUserLoggedIn } from "features/authentication/authenticationModel";
1414
import { useSelector } from "react-redux";
15-
import KnownIds from "./knownUserIds.json";
15+
import KnownIds from "config/knownUserIds.json";
1616

1717
const Login = () => {
1818
const dispatch = useDispatch();

src/features/authentication/authenticationModel.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { AppState } from "main/storeTypes";
21
import { createSelector } from "reselect";
2+
import invariant from "invariant";
3+
import { AppState } from "main/storeTypes";
34
import { AppActions } from "main/AppActions";
5+
46
export const LOGGING_IN = "LOGGIN_IN";
57
export const LOGIN_SUCCEEDED = "LOGIN_SUCCEEDED";
68

@@ -62,9 +64,10 @@ const getAuthenticationStateSlice = (state: AppState) => state.authentication;
6264
export const getLoggedInUserId = createSelector(
6365
[getAuthenticationStateSlice],
6466
(authenticationState: AuthenticationState): string => {
65-
if (authenticationState.loggedInUserId === undefined) {
66-
throw new Error("Requires loggedInUserId");
67-
}
67+
invariant(
68+
authenticationState.loggedInUserId !== undefined,
69+
"getLoggedInUserId should not be used in components of the application that are rendered while there is no logged in user"
70+
);
6871
return authenticationState.loggedInUserId;
6972
}
7073
);

src/features/chat/Chat/Chat.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import { Wrapper } from "./ChatUI.style";
33
import { Menu } from "features/chat/Menu/Menu";
44
import { CurrentConversation } from "features/currentConversation/CurrentConversation/CurrentConversation";
55
import { ConversationMembers } from "features/conversationMembers/ConversationMembers/ConversationMembers";
6-
import { JoinConversationModal } from "features/joinedConversations/JoinConversationModal/JoinConversationModal";
6+
import { JoinConversationDialog } from "features/joinedConversations/JoinConversationDialog/JoinConversationDialog";
77

88
const ChatUI = () => {
99
return (
1010
<Wrapper>
1111
<Menu />
1212
<CurrentConversation />
1313
<ConversationMembers />
14-
<JoinConversationModal />
14+
<JoinConversationDialog />
1515
</Wrapper>
1616
);
1717
};

0 commit comments

Comments
 (0)