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

Commit 5aa9d1a

Browse files
committed
chore: Merge branch 'deps/upgrade' into dev
2 parents eea2514 + b187b5c commit 5aa9d1a

File tree

13 files changed

+53
-55
lines changed

13 files changed

+53
-55
lines changed

.babelrc

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
2-
"presets": [
3-
["next/babel"]
4-
],
2+
"presets": [["next/babel"]],
53
"env": {
64
"development": {
75
"plugins": ["inline-dotenv"]
86
},
97
"production": {
108
"presets": [
11-
["next/babel", {
12-
"preset-env": {
13-
"targets": {
14-
"ie": "10"
15-
},
16-
"debug": true
9+
[
10+
"next/babel",
11+
{
12+
"preset-env": {
13+
"useBuiltIns": "usage",
14+
"corejs": "3.1.4",
15+
"targets": "> 0.25%, not dead",
16+
"debug": false
17+
}
1718
}
18-
}]
19+
]
1920
]
2021
},
2122
"test": {

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ before_script:
2727
script:
2828
# - codecov
2929
- rm -rf .next
30-
- nvm exec 12.4.0 npm run build.ci
31-
- nvm exec 12.4.0 npm run test:ci
30+
- nvm exec 10.12.0 npm run build.ci
31+
- nvm exec 10.12.0 npm run test:ci
3232

3333
cache:
3434
directories:

containers/CommunitiesBanner/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const CommunitiesBannerContainer = ({ communitiesBanner }) => {
3636
} = communitiesBanner
3737

3838
return (
39-
<BannerContainer>
39+
<BannerContainer testid="communities-banner">
4040
<BannerContentWrapper>
4141
<ContentWrapper>
4242
<SearchBox

containers/CommunitiesBanner/styles/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import styled from 'styled-components'
22

33
import { theme, cs } from '@utils'
44

5-
export const BannerContainer = styled.div`
5+
export const BannerContainer = styled.div.attrs(props => ({
6+
'data-testid': props.testid,
7+
}))`
68
${cs.flexColumn('justify-center')};
79
810
position: relative;

containers/JobsThread/logic.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@ const sr71$ = new SR71({
2424
let store = null
2525
let sub$ = null
2626

27-
export const inAnchor = () => store.setHeaderFix(false)
28-
export const outAnchor = () => store.setHeaderFix(true)
27+
export const inAnchor = () => {
28+
if (store) store.setHeaderFix(false)
29+
}
30+
31+
export const outAnchor = () => {
32+
if (store) store.setHeaderFix(true)
33+
}
2934

3035
export const loadJobs = (page = 1) => {
3136
const { curCommunity } = store

containers/PostsThread/logic.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@ const sr71$ = new SR71({
3838
let store = null
3939
let sub$ = null
4040

41-
export const inAnchor = () => store.setHeaderFix(false)
42-
export const outAnchor = () => store.setHeaderFix(true)
41+
export const inAnchor = () => {
42+
if (store) store.setHeaderFix(false)
43+
}
44+
45+
export const outAnchor = () => {
46+
if (store) store.setHeaderFix(true)
47+
}
4348

4449
export const loadPosts = (page = 1) => {
4550
const { curCommunity } = store
@@ -247,7 +252,6 @@ export const useInit = _store =>
247252
store = _store
248253
// log('effect init')
249254
sub$ = sr71$.data().subscribe($solver(DataSolver, ErrSolver))
250-
251255
/*
252256
NOTE: city communities list is not supported by SSR
253257
need load manully

containers/ReposThread/logic.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@ const sr71$ = new SR71({
2323
let sub$ = null
2424
let store = null
2525

26-
export const inAnchor = () => store.setHeaderFix(false)
27-
export const outAnchor = () => store.setHeaderFix(true)
26+
export const inAnchor = () => {
27+
if (store) store.setHeaderFix(false)
28+
}
29+
30+
export const outAnchor = () => {
31+
if (store) store.setHeaderFix(true)
32+
}
2833

2934
export const loadRepos = (page = 1) => {
3035
const { curCommunity } = store

cypress.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"baseUrl": "http://localhost:3000",
33
"projectId": "w5dkjg",
4-
"pageLoadTimeout": 1000000
4+
"pageLoadTimeout": 6000000
55
}

cypress/integration/layout.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@ describe('basic layout', () => {
1818
cy.id('header-search').should('be.visible')
1919
cy.id('header-search-icon').should('be.visible')
2020
})
21+
22+
it('communities page', () => {
23+
cy.visit('/communities')
24+
cy.id('header-search').should('be.visible')
25+
cy.id('header-search-icon').should('be.visible')
26+
27+
cy.id('communities-banner').should('be.visible')
28+
29+
cy.id('footer').should('be.visible')
30+
})
2131
})

next.config.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,6 @@ const nextConfig = {
4747
)
4848
}
4949

50-
// IE 11 polyfills
51-
const originalEntry = config.entry
52-
config.entry = async () => {
53-
const entries = await originalEntry()
54-
55-
if (
56-
entries['main.js'] &&
57-
!entries['main.js'].includes('./utils/polyfills')
58-
) {
59-
entries['main.js'].unshift('./utils/polyfills')
60-
}
61-
62-
return entries
63-
}
64-
6550
return config
6651
},
6752
}

package-docker.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"chalk": "^2.4.1",
3232
"compatible-debug": "^1.0.0",
3333
"cookie-parser": "^1.4.4",
34-
"core-js": "3.0.1",
34+
"core-js": "3.1.4",
3535
"draft-js": "^0.10.5",
3636
"draft-js-linkify-plugin": "^2.0.1",
3737
"draft-js-mention-plugin": "3.1.3",

travis/install_node.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh |
55
[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh
66
echo "> check nvm"
77
nvm --version
8-
echo "> use node 12.4.0"
9-
nvm install 12.4.0
10-
nvm alias default 12.4.0
8+
echo "> use node 10.12.0"
9+
nvm install 10.12.0
10+
nvm alias default 10.12.0
1111
echo "> install node done"
1212
node --version
1313
pwd

utils/polyfills/index.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)