Skip to content

Commit

Permalink
Update deps May 2023 (#1199)
Browse files Browse the repository at this point in the history
* root dep update

* backend major/minor/patch deps update

* frontend minor/patch deps

* frontend major deps

* fix study module editor headers

* fix react component generics somehow breaking

* don't specify docker-compose version in circleci

* fix backend Dockerfile

* build librdkafka until alpine is upgraded in node image
  • Loading branch information
mipyykko committed May 29, 2023
1 parent b9fcaea commit 45334c9
Show file tree
Hide file tree
Showing 18 changed files with 7,045 additions and 5,177 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1
orbs:
helm: circleci/[email protected]
docker: circleci/docker@1.7.0
docker: circleci/docker@2.2.0
jq: circleci/[email protected]
node: circleci/[email protected]
# codecov: codecov/[email protected]
Expand Down Expand Up @@ -192,8 +192,7 @@ jobs:
- setup_remote_docker:
docker_layer_caching: true
- jq/install
- docker/install-docker-tools:
docker-compose-version: 1.29.2
- docker/install-docker-tools
- run:
name: patch-package hash
command: md5sum backend/patches/* > backend/patches.hash
Expand Down
7 changes: 1 addition & 6 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module.exports = {
trailingComma: "all",
bracketSpacing: true,
importOrder: [
"<BUILTIN_MODULES>",
"^react(-dom)?$",
"^node:",
"",
"<THIRD_PARTY_MODULES>",
"",
Expand All @@ -17,11 +17,6 @@ module.exports = {
"",
"^/graphql",
],
// plugins: [require.resolve("@ianvs/prettier-plugin-sort-imports")],
importOrderBuiltinModulesToTop: true,
importOrderSortSpecifiers: true,
importOrderCaseInsensitive: true,
importOrderSeparation: true,
importOrderParserPlugins: [
"typescript",
"jsx",
Expand Down
28 changes: 21 additions & 7 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
FROM node:18.16.0-alpine

RUN apk update && \
apk add --no-cache build-base libpng-dev postgresql-client libpq redis git jq bash python3

RUN wget https://github.com/edenhill/librdkafka/archive/v2.0.2.tar.gz -O - | tar -xz \
&& cd librdkafka-2.0.2 \
apk --no-cache add \
build-base \
libpng-dev \
postgresql-client \
libpq \
redis \
git \
jq \
bash \
python3

RUN wget https://github.com/edenhill/librdkafka/archive/v2.1.1.tar.gz -O - | tar -xz \
&& cd librdkafka-2.1.1 \
&& ./configure --prefix=/usr \
&& make && make install \
&& cd ..
# when node image incorporates alpine 3.18
# RUN apk --no-cache add \
# librdkafka=2.1.1-r0 \
# librdkafka-dev=2.1.1-r0

RUN mkdir -p /app && chown -R node /app

Expand All @@ -19,7 +32,10 @@ COPY --chown=node package.json /app/
COPY --chown=node package-lock.json /app/
COPY --chown=node patches /app/patches

RUN env BUILD_LIBRDKAFKA=0 npm ci
ARG BUILD_LIBRDKAFKA=0
RUN npm ci
# when node image incorporates alpine 3.18
# RUN rm -rf /node_modules/node-rdkafka/deps

COPY --chown=node . /app

Expand All @@ -29,8 +45,6 @@ RUN cp .env.example .env \
&& npm run generate \
&& env NODE_ENV=production GOOGLE_CLOUD_STORAGE_BUCKET=x npm run build
RUN npm run build-sourcemap
# && cp -R sourcemap/bin dist/bin \
# && rm .env
RUN npm run copy-env

ENV NODE_ENV=production
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import {
getTierProgress,
hasRuleConditions,
} from "../BAI/progress"
import { TierInfo, TierProgressMap } from "../interfaces"
import { ExerciseCompletionPart } from "../interfaces"
import {
ExerciseCompletionPart,
TierInfo,
TierProgressMap,
} from "../interfaces"

const env = require(__dirname + "/../../../../../config/env.json")

Expand Down
2 changes: 1 addition & 1 deletion backend/graphql/Tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const TagCreateInput = inputObjectType({
export const TagUpsertInput = inputObjectType({
name: "TagUpsertInput",
definition(t) {
t.nonNull.id("id")
t.nonNull.string("id")
t.list.nonNull.field("tag_translations", {
type: "TagTranslationCreateOrUpdateInput",
})
Expand Down
Loading

0 comments on commit 45334c9

Please sign in to comment.