Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 5f630a8

Browse files
authored
Merge pull request #3249 from withspectrum/2.4.5
2.4.5
2 parents d2ce1f4 + 6047aa4 commit 5f630a8

File tree

9 files changed

+126
-90
lines changed

9 files changed

+126
-90
lines changed

config-overrides.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ module.exports = function override(config, env) {
8585
}
8686
config = injectBabelPlugin('react-loadable/babel', config);
8787
config = transpileShared(config);
88-
config.plugins.push(
89-
new webpack.optimize.CommonsChunkPlugin({
90-
names: ['bootstrap'],
91-
filename: 'static/js/[name].js',
92-
minChunks: Infinity,
93-
})
94-
);
9588
// Filter the default serviceworker plugin, add offline plugin instead
9689
config.plugins = config.plugins.filter(
9790
plugin => !isServiceWorkerPlugin(plugin)
@@ -141,12 +134,11 @@ module.exports = function override(config, env) {
141134
})
142135
);
143136
}
144-
config.plugins.push(
137+
config.plugins.unshift(
145138
new webpack.optimize.CommonsChunkPlugin({
146-
minChunks: 3,
147-
name: 'main',
148-
async: 'commons',
149-
children: true,
139+
names: ['bootstrap'],
140+
filename: 'static/js/[name].js',
141+
minChunks: Infinity,
150142
})
151143
);
152144
if (process.env.NODE_ENV === 'production') {

hyperion/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ app.use(
131131
);
132132
app.get('/static/js/:name', (req: express$Request, res, next) => {
133133
if (!req.params.name) return next();
134+
const existingFile = jsFiles.find(file => file.startsWith(req.params.name));
135+
if (existingFile)
136+
return res.sendFile(
137+
path.resolve(__dirname, '..', 'build', 'static', 'js', req.params.name)
138+
);
134139
const match = req.params.name.match(/(\w+?)\.(\w+?\.)?js/i);
135140
if (!match) return next();
136141
const actualFilename = jsFiles.find(file => file.startsWith(match[1]));

hyperion/renderer/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,19 @@ const renderer = (req: express$Request, res: express$Response) => {
7070
cache,
7171
});
7272
// Define the initial redux state
73+
const { t } = req.query;
74+
7375
const initialReduxState = {
7476
users: {
7577
currentUser: req.user ? req.user : null,
7678
},
79+
dashboardFeed: {
80+
activeThread: t ? t : '',
81+
mountedWithActiveThread: t ? t : '',
82+
search: {
83+
isOpen: false,
84+
},
85+
},
7786
};
7887
// Create the Redux store
7988
const store = initStore(initialReduxState);

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Spectrum",
3-
"version": "2.4.4",
3+
"version": "2.4.5",
44
"license": "BSD-3-Clause",
55
"devDependencies": {
66
"babel-cli": "^6.24.1",
@@ -41,7 +41,7 @@
4141
"uuid": "^3.0.1",
4242
"wait-on": "^2.1.0",
4343
"webpack-bundle-analyzer": "^2.9.1",
44-
"write-file-webpack-plugin": "^4.1.0"
44+
"write-file-webpack-plugin": "^4.3.2"
4545
},
4646
"dependencies": {
4747
"abab": "^1.0.4",
@@ -138,24 +138,24 @@
138138
"query-string": "^5.0.0",
139139
"raven": "^2.0.2",
140140
"raven-js": "^3.18.1",
141-
"react": "16.2.0",
141+
"react": "^16.4.0",
142142
"react-apollo": "2.x",
143143
"react-app-rewire-styled-components": "^3.0.0",
144-
"react-app-rewired": "^1.0.5",
145-
"react-clipboard.js": "^1.1.3",
146-
"react-dom": "16.2.0",
147-
"react-flip-move": "^2.10.1",
148-
"react-helmet-async": "^0.0.4",
144+
"react-app-rewired": "^1.5.2",
145+
"react-clipboard.js": "^2.0.0",
146+
"react-dom": "^16.4.0",
147+
"react-flip-move": "^3.0.2",
148+
"react-helmet-async": "^0.1.0",
149149
"react-infinite-scroller-with-scroll-element": "2.0.2",
150-
"react-loadable": "5.3.1",
150+
"react-loadable": "^5.4.0",
151151
"react-modal": "3.x",
152152
"react-popper": "^1.0.0-beta.5",
153153
"react-redux": "^5.0.2",
154154
"react-router": "^4.0.0-beta.7",
155-
"react-router-dom": "^4.0.0-beta.7",
155+
"react-router-dom": "^4.3.1",
156156
"react-stripe-checkout": "^2.2.5",
157157
"react-stripe-elements": "^1.4.1",
158-
"react-textarea-autosize": "^4.0.5",
158+
"react-textarea-autosize": "^6.1.0",
159159
"react-transition-group": "^2.2.0",
160160
"react-trend": "^1.2.4",
161161
"recompose": "0.26.x",

src/components/buttons/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import { Spinner } from '../globals';
1313
import Icon from '../icons';
1414

15-
type ButtonProps = {
15+
type ButtonProps = {|
1616
loading?: boolean,
1717
disabled?: boolean,
1818
large?: boolean,
@@ -21,7 +21,7 @@ type ButtonProps = {
2121
icon?: string,
2222
children?: any,
2323
dataCy?: string,
24-
};
24+
|};
2525

2626
type IconProps = {
2727
glyph: string,

src/components/infiniteScroll/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export default class InfiniteScroll extends React.Component<Props> {
2828
useWindow: true,
2929
isReverse: false,
3030
scrollElement: null,
31-
scrollComponent: null,
3231
};
3332

3433
scrollListener: Function;

src/components/upsell/joinChannel.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ class JoinChannel extends React.Component<Props, State> {
105105
loading={isLoading}
106106
onClick={this.toggleSubscription}
107107
icon="plus"
108-
label
109108
dataCy="thread-join-channel-upsell-button"
110109
>
111110
Join

src/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ if (t && (!existingUser || !existingUser.currentUser)) {
6161

6262
const store = initStore(window.__SERVER_STATE__ || initialState);
6363

64-
// eslint-disable-next-line
6564
const renderMethod = !!window.__SERVER_STATE__
6665
? // $FlowIssue
6766
ReactDOM.hydrate
@@ -83,7 +82,11 @@ function render() {
8382
);
8483
}
8584

86-
Loadable.preloadReady().then(render);
85+
Loadable.preloadReady()
86+
.then(render)
87+
.catch(err => {
88+
console.error(err);
89+
});
8790

8891
OfflinePluginRuntime.install({
8992
// Apply new updates immediately

0 commit comments

Comments
 (0)