Skip to content

Commit

Permalink
Merge pull request #92 from alexbrazier/dep-mar20
Browse files Browse the repository at this point in the history
Update frontend, go, node and alpine versions
  • Loading branch information
alexbrazier committed Mar 7, 2020
2 parents 273a2e7 + 04a95dc commit 94caadc
Show file tree
Hide file tree
Showing 10 changed files with 1,320 additions and 1,152 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.14.1
v12.16.1
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
############################
# Build api
############################
FROM golang:1.13.6-alpine3.10 AS apibuilder
FROM golang:1.14.0-alpine3.11 AS apibuilder
RUN apk update && apk add --no-cache git dep
COPY api $GOPATH/src/github.com/alexbrazier/go-url/api
WORKDIR $GOPATH/src/github.com/alexbrazier/go-url/api
Expand All @@ -15,7 +15,7 @@ RUN go build -o /go/bin/server
############################
# Build frontend
############################
FROM node:12.14.1-alpine AS frontendbuilder
FROM node:12.16.1-alpine AS frontendbuilder

COPY frontend /app
WORKDIR /app
Expand All @@ -26,7 +26,7 @@ RUN yarn --frozen-lockfile --network-timeout 600000 && \
############################
# Build actual image
############################
FROM alpine:3.10
FROM alpine:3.11
# Need to get updated certificates to connect to Slack API
RUN apk update && apk add bash dumb-init ca-certificates && rm -rf /var/cache/apk/*
# Copy our static executable.
Expand Down
46 changes: 23 additions & 23 deletions api/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions api/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

[[constraint]]
name = "github.com/labstack/gommon"
version = "0.2.8"
version = "0.3.0"

[prune]
go-tests = true
Expand All @@ -42,11 +42,11 @@

[[constraint]]
name = "github.com/gorilla/sessions"
version = "1.1.3"
version = "1.2.0"

[[constraint]]
name = "github.com/kelseyhightower/envconfig"
version = "1.3.0"
version = "1.4.0"

[[constraint]]
name = "github.com/go-pg/pg"
Expand All @@ -62,4 +62,4 @@

[[constraint]]
name = "github.com/getsentry/sentry-go"
version = "0.3.0"
version = "0.5.1"
42 changes: 21 additions & 21 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,50 @@
"wait:frontend": "wait-on http-get://localhost:3000/go"
},
"dependencies": {
"@material-ui/core": "^4.9.0",
"@material-ui/icons": "^4.5.1",
"@material-ui/core": "^4.9.5",
"@material-ui/icons": "^4.9.1",
"@material-ui/styles": "^4.9.0",
"@sentry/browser": "^5.11.1",
"@sentry/browser": "^5.13.2",
"axios": "^0.19.2",
"classnames": "^2.2.6",
"http-proxy-middleware": "^0.20.0",
"http-proxy-middleware": "^1.0.1",
"js-cookie": "^2.2.1",
"node-sass": "^4.13.1",
"prop-types": "^15.7.2",
"qs": "^6.9.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-redux": "^7.1.3",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-redux": "^7.2.0",
"react-router-dom": "^5.1.2",
"react-scripts": "3.3.0",
"react-scripts": "3.4.0",
"recompose": "^0.30.0",
"redux": "^4.0.5",
"typeface-roboto": "^0.0.75"
},
"devDependencies": {
"@cypress/webpack-preprocessor": "^4.1.1",
"@types/classnames": "^2.2.9",
"@types/faker": "^4.1.9",
"@types/js-cookie": "^2.2.4",
"@types/qs": "^6.9.0",
"@types/react": "^16.9.19",
"@cypress/webpack-preprocessor": "^4.1.3",
"@types/classnames": "^2.2.10",
"@types/faker": "^4.1.10",
"@types/js-cookie": "^2.2.5",
"@types/qs": "^6.9.1",
"@types/react": "^16.9.23",
"@types/react-dom": "^16.9.5",
"@types/react-redux": "^7.1.7",
"@types/react-router-dom": "^5.1.3",
"@types/recompose": "^0.30.7",
"babel-eslint": "^10.0.3",
"cypress": "^3.8.3",
"babel-eslint": "^10.1.0",
"cypress": "^4.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-cypress": "^2.8.1",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.18.0",
"eslint-plugin-react": "^7.19.0",
"faker": "^4.1.0",
"prettier": "^1.19.1",
"ts-loader": "^6.2.1",
"typescript": "^3.7.5",
"wait-on": "^4.0.0"
"typescript": "^3.8.3",
"wait-on": "^4.0.1"
},
"resolutions": {
"set-value": "^3.0.1"
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
type="application/opensearchdescription+xml"
/>
<title>Go</title>
<script src="/config.js"></script>
<script src="%PUBLIC_URL%/config.js"></script>
</head>
<body>
<noscript>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Modal: React.FC<ModalProps> = ({
}) => {
const [urlKey, setKey] = useState(initialKey);
const [url, setUrl] = useState(initialUrl);
const [query, submit] = useState();
const [query, submit] = useState<{ urlKey: string; url: string }>();
const classes = useStyles({});

useEffect(() => {
Expand Down
21 changes: 11 additions & 10 deletions frontend/src/setupProxy.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
const proxy = require('http-proxy-middleware');
const { createProxyMiddleware } = require('http-proxy-middleware');

const excludedTypes = ['.js', '.css', '.json', '.ico', '.map', 'png', 'svg'];
const filter = pathname =>
!pathname.startsWith('/go') &&
!excludedTypes.some(type => pathname.endsWith(type));

module.exports = function setupProxy(app) {
app.use('/', (req, res, next) => {
if (
req.path.startsWith('/go') ||
excludedTypes.some(type => req.path.endsWith(type))
) {
return next();
}
return proxy({ target: 'http://localhost:1323' })(req, res, next);
});
app.use(
'/',
createProxyMiddleware(filter, {
target: 'http://localhost:1323',
}),
);
};
2 changes: 1 addition & 1 deletion frontend/src/views/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Layout: React.FC<LayoutProps> = ({
location,
}) => {
const [addOpen, setAddOpen] = useState(false);
const [query, onSearch] = useState();
const [query, onSearch] = useState<string>();
const classes = useStyles({});
const hideAdd = useCallback(() => setAddOpen(false), []);
// Pre-populate field if not found
Expand Down
Loading

0 comments on commit 94caadc

Please sign in to comment.