Skip to content

Commit

Permalink
disabled yarn PnP 🥏
Browse files Browse the repository at this point in the history
  • Loading branch information
dysbulic committed Jul 10, 2024
1 parent 0207ed4 commit d725c5c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ services:
context: .
dockerfile: ./docker/backend/Dockerfile
target: base
args:
CACHEBUST: ${CACHEBUST:-$(date +%s)}
command: yarn backend:dev
ports:
- 4000:4000
Expand Down
15 changes: 12 additions & 3 deletions docker/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
FROM node:20-slim as base
WORKDIR /usr/src/app

# varying arg to prevent caching
ARG CACHEBUST
ARG DEBUG

# Install dependencies not included in the slim image
RUN apt-get update && \
apt-get install -y --no-install-recommends g++ make python3 git openssl && \
apt-get install -y --no-install-recommends --reinstall ca-certificates

# Install dependencies for dev and prod
COPY package.json ./
COPY lerna.json ./
COPY yarn.lock ./
Expand All @@ -18,9 +21,12 @@ COPY packages/discord-bot/*.json ./packages/discord-bot/

RUN corepack enable
RUN yarn set version berry
RUN yarn config set nodeLinker node-modules
RUN yarn install # --immutable

# Dev environment doesn't run this stage or beyond
# RUN set -x && echo $CACHEBUST && ls -la

# Dev environment doesn't run beyond here
FROM base as build

# Copy source files
Expand All @@ -43,7 +49,10 @@ ENV THE_GRAPH_API_TOKEN $THE_GRAPH_API_TOKEN
RUN yarn backend:build

# Delete devDependencies
RUN yarn install --pure-lockfile --production --ignore-scripts --prefer-offline
RUN corepack enable
RUN yarn set version berry
RUN yarn install # --immutable
# RUN yarn install --pure-lockfile --production --ignore-scripts --prefer-offline

# Create completely new stage including only necessary files
FROM node:20-slim as app
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test": "lerna run test --parallel --",
"test:full": "yarn lint && yarn typecheck && yarn test",
"clean": "lerna clean",
"clean:libndist": "CMD='rm -rf node_modules/ packages/*/node_modules/ packages/*/dist/ packages/web/.next/' && echo \"$CMD\" && eval $CMD",
"clean:libndist": "CMD='rm -rf node_modules/ packages/*/node_modules/ packages/*/dist/ packages/web/.next/' && echo \"$CMD\" && sh -c \"eval $CMD\"",
"clean:autogen": "find -type d -name autogen -exec rm -rfv '{}' \\; || true",
"clean:full": "yarn clean:libndist && yarn clean:autogen",
"format": "prettier --write \"{*,**/*}.{ts,tsx,js,jsx,json,yml,yaml,md}\"",
Expand All @@ -51,6 +51,11 @@
"workspaces": [
"packages/*"
],
"dependencies": {
"dag-jose": "^4.0.0",
"tslib": "^2.4.0",
"uuid": "8.3.2"
},
"devDependencies": {
"@apollo/rover": "^0.23.0",
"@composedb/cli": "^0.7.1",
Expand Down Expand Up @@ -105,10 +110,5 @@
"defaults",
"not IE 11"
],
"dependencies": {
"dag-jose": "^4.0.0",
"tslib": "^2.4.0",
"uuid": "8.3.2"
},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scripts": {
"start": "node --trace-warnings dist/index.js",
"build": "yarn generate && tsc -b",
"dev": "tsc --build && concurrently 'tsc --watch --preserveWatchOutput' nodemon",
"dev": "nodemon",
"typecheck": "tsc --noEmit --pretty",
"precommit": "yarn typecheck",
"generate": "graphql-code-generator --debug && yarn fix:daohaus-types",
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/lib/daoHausClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function getClient(chain: string): Sdk {
const gqlClient = clients.get(chain);
if (!gqlClient) {
throw new Error(
`The '${chain}' chain is unrecognized, unable to create GQL Client`,
`The '${chain}' chain is unrecognized, unable to create GQL Client.`,
);
}

Expand Down
1 change: 0 additions & 1 deletion packages/discord-bot/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ generates:
- add:
content:
- '/* eslint-disable */'
# - 'import type { DocumentNode } from "graphql/language/ast";'
config:
immutableTypes: true
scalars:
Expand Down

0 comments on commit d725c5c

Please sign in to comment.