Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Turbo #606

Merged
merged 5 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

jobs:
build:
name: Lint
timeout-minutes: 15
runs-on: ubuntu-latest

Expand All @@ -29,3 +28,6 @@ jobs:

- name: Lint
run: yarn lint

- name: Test
run: yarn test
24 changes: 14 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,26 @@ FROM node:lts-alpine AS base

# Assemble a pruned version of the repo containing only what's needed for router
FROM base AS builder
RUN apk add --no-cache libc6-compat
RUN apk update
RUN apk add --no-cache libc6-compat
WORKDIR /app

RUN yarn global add turbo
RUN yarn global add turbo@^2
COPY . .
RUN turbo prune --scope="@fedimint/router" --docker

RUN turbo prune @fedimint/router --docker

# Install dependencies & build the app
FROM base AS installer
RUN apk add --no-cache libc6-compat
RUN apk update
RUN apk add --no-cache libc6-compat
WORKDIR /app

COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/yarn.lock ./yarn.lock
RUN yarn install
RUN yarn install --frozen-lockfile

COPY --from=builder /app/out/full/ .
# TODO: Remove this copy once https://github.com/vercel/turbo/issues/3758 is fixed
COPY ./turbo.json .
RUN yarn build
RUN yarn turbo run build

# Run the built app with a minimal image
FROM base AS runner
Expand All @@ -33,5 +32,10 @@ WORKDIR /app
COPY --from=installer /app/apps/router/build build
COPY scripts/replace-react-env.js scripts/replace-react-env.js
COPY scripts/write-config-from-env.js scripts/write-config-from-env.js
COPY scripts/entrypoint.sh entrypoint.sh
RUN chmod +x entrypoint.sh

RUN yarn global add serve
CMD node scripts/write-config-from-env.js build && serve -s build

ENTRYPOINT ["./entrypoint.sh"]
CMD ["serve", "-s", "build"]
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "fedimint",
"private": true,
"scripts": {
"dev": "turbo run dev",
Expand All @@ -20,7 +21,7 @@
"husky": "^9.0.11",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3",
"turbo": "^1.13.3"
"turbo": "^2.3.4"
},
"packageManager": "[email protected]",
"workspaces": [
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
"eslint-config-prettier": "^8.3.0",
"eslint-config-turbo": "latest",
"eslint-config-turbo": "^2.3.4",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0"
},
Expand Down
7 changes: 7 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

# Run Node script
node ./scripts/write-config-from-env.js build

# Run CMD args
exec "$@"
2 changes: 2 additions & 0 deletions scripts/write-config-from-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ if (!targetDir) {
process.exit(1);
}

console.log('Target dir', targetDir);

function write_config(filePath) {
let config = {
baseUrl: process.env.REACT_APP_FM_CONFIG_API,
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"packages/eslint-config/*.json",
"packages/tsconfig/*.json"
],
"pipeline": {
"tasks": {
"build": {
"outputs": ["build/**", "dist/**"],
"dependsOn": ["^build"]
Expand Down
105 changes: 56 additions & 49 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5038,6 +5038,11 @@ dotenv-expand@^5.1.0:
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0"
integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==

[email protected]:
version "16.0.3"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07"
integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==

dotenv@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
Expand Down Expand Up @@ -5408,12 +5413,12 @@ eslint-config-react-app@^7.0.1:
eslint-plugin-react-hooks "^4.3.0"
eslint-plugin-testing-library "^5.0.1"

eslint-config-turbo@latest:
version "1.9.3"
resolved "https://registry.yarnpkg.com/eslint-config-turbo/-/eslint-config-turbo-1.9.3.tgz#17299666393d5060d4b894c1e869fc8ef6e3dd8f"
integrity sha512-QG6jxFQkrGSpQqlFKefPdtgUfr20EbU0s4tGGIuGFOcPuJEdsY6VYZpZUxNJvmMcTGqPgMyOPjAFBKhy/DPHLA==
eslint-config-turbo@^2.3.4:
version "2.3.4"
resolved "https://registry.yarnpkg.com/eslint-config-turbo/-/eslint-config-turbo-2.3.4.tgz#a36fa783819230d62fd87fdb6d5d24ba0be1b0ed"
integrity sha512-MxPl+IKkR7mRGcHoiZAMHYl+RZnjqBsxTLf+IGnx8BrJQe9/CoLT7oBlUxXGvh9bsd5MTaqCxly5h8BE1v/7AA==
dependencies:
eslint-plugin-turbo "1.9.3"
eslint-plugin-turbo "2.3.4"

eslint-import-resolver-node@^0.3.7:
version "0.3.7"
Expand Down Expand Up @@ -5522,10 +5527,12 @@ eslint-plugin-testing-library@^5.0.1:
dependencies:
"@typescript-eslint/utils" "^5.58.0"

[email protected]:
version "1.9.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-turbo/-/eslint-plugin-turbo-1.9.3.tgz#b2c21d849bf4a395e92fcc7705bb612af6fbe6e8"
integrity sha512-ZsRtksdzk3v+z5/I/K4E50E4lfZ7oYmLX395gkrUMBz4/spJlYbr+GC8hP9oVNLj9s5Pvnm9rLv/zoj5PVYaVw==
[email protected]:
version "2.3.4"
resolved "https://registry.yarnpkg.com/eslint-plugin-turbo/-/eslint-plugin-turbo-2.3.4.tgz#17d3e7048200eecb21d7de189abf62a53af934f0"
integrity sha512-9ncoUJkQGkC28NmlQiS17oB9mrE8XaSulRZiB5pv9vmRbYjOfUwyGhY3EIcoBRdww81igxOzXmAmvNNd6GFBPg==
dependencies:
dotenv "16.0.3"

[email protected], eslint-scope@^5.1.1:
version "5.1.1"
Expand Down Expand Up @@ -10422,47 +10429,47 @@ tsutils@^3.21.0:
dependencies:
tslib "^1.8.1"

turbo-darwin-64@1.13.3:
version "1.13.3"
resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.13.3.tgz#01d750e0f9ce4fced510357f1a9f7fe6312756ba"
integrity sha512-glup8Qx1qEFB5jerAnXbS8WrL92OKyMmg5Hnd4PleLljAeYmx+cmmnsmLT7tpaVZIN58EAAwu8wHC6kIIqhbWA==

turbo-darwin-arm64@1.13.3:
version "1.13.3"
resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.13.3.tgz#a99950c8aff83d14070eeca987b0ee53dc881b2d"
integrity sha512-/np2xD+f/+9qY8BVtuOQXRq5f9LehCFxamiQnwdqWm5iZmdjygC5T3uVSYuagVFsZKMvX3ycySwh8dylGTl6lg==

turbo-linux-64@1.13.3:
version "1.13.3"
resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.13.3.tgz#a8ea12c3d79f5bbc78b2ef37f47019edb8928219"
integrity sha512-G+HGrau54iAnbXLfl+N/PynqpDwi/uDzb6iM9hXEDG+yJnSJxaHMShhOkXYJPk9offm9prH33Khx2scXrYVW1g==

turbo-linux-arm64@1.13.3:
version "1.13.3"
resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.13.3.tgz#e8691ebfab0e31e276020deee83b3866b4eb966f"
integrity sha512-qWwEl5VR02NqRyl68/3pwp3c/olZuSp+vwlwrunuoNTm6JXGLG5pTeme4zoHNnk0qn4cCX7DFrOboArlYxv0wQ==

turbo-windows-64@1.13.3:
version "1.13.3"
resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.13.3.tgz#6629174c8f654e75c342a0e1b826620cb6e2795b"
integrity sha512-Nudr4bRChfJzBPzEmpVV85VwUYRCGKecwkBFpbp2a4NtrJ3+UP1VZES653ckqCu2FRyRuS0n03v9euMbAvzH+Q==

turbo-windows-arm64@1.13.3:
version "1.13.3"
resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.13.3.tgz#327b8c87d8a01533deb3b7c3a108855aa7b6611d"
integrity sha512-ouJCgsVLd3icjRLmRvHQDDZnmGzT64GBupM1Y+TjtYn2LVaEBoV6hicFy8x5DUpnqdLy+YpCzRMkWlwhmkX7sQ==

turbo@^1.13.3:
version "1.13.3"
resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.13.3.tgz#afb7bee4fa9f5b6041dac5b4a7d35fb98f279827"
integrity sha512-n17HJv4F4CpsYTvKzUJhLbyewbXjq1oLCi90i5tW1TiWDz16ML1eDG7wi5dHaKxzh5efIM56SITnuVbMq5dk4g==
turbo-darwin-64@2.3.4:
version "2.3.4"
resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-2.3.4.tgz#023d3428c44bce21121602b28dff947c06a61d3c"
integrity sha512-uOi/cUIGQI7uakZygH+cZQ5D4w+aMLlVCN2KTGot+cmefatps2ZmRRufuHrEM0Rl63opdKD8/JIu+54s25qkfg==

turbo-darwin-arm64@2.3.4:
version "2.3.4"
resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-2.3.4.tgz#1497facead80cab0b821cd11decb0d2b35de78f5"
integrity sha512-IIM1Lq5R+EGMtM1YFGl4x8Xkr0MWb4HvyU8N4LNoQ1Be5aycrOE+VVfH+cDg/Q4csn+8bxCOxhRp5KmUflrVTQ==

turbo-linux-64@2.3.4:
version "2.3.4"
resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-2.3.4.tgz#46b8bd34052a497025ddb196e86981796cfbed4d"
integrity sha512-1aD2EfR7NfjFXNH3mYU5gybLJEFi2IGOoKwoPLchAFRQ6OEJQj201/oNo9CDL75IIrQo64/NpEgVyZtoPlfhfA==

turbo-linux-arm64@2.3.4:
version "2.3.4"
resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-2.3.4.tgz#11561edbff55b2ce85328001b489278134a97001"
integrity sha512-MxTpdKwxCaA5IlybPxgGLu54fT2svdqTIxRd0TQmpRJIjM0s4kbM+7YiLk0mOh6dGqlWPUsxz/A0Mkn8Xr5o7Q==

turbo-windows-64@2.3.4:
version "2.3.4"
resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-2.3.4.tgz#6430d05cede33a713814128ea562fddbee550e15"
integrity sha512-yyCrWqcRGu1AOOlrYzRnizEtdkqi+qKP0MW9dbk9OsMDXaOI5jlWtTY/AtWMkLw/czVJ7yS9Ex1vi9DB6YsFvw==

turbo-windows-arm64@2.3.4:
version "2.3.4"
resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-2.3.4.tgz#59fa6de24ff1c92a96de87168a3a5dd142ba16c2"
integrity sha512-PggC3qH+njPfn1PDVwKrQvvQby8X09ufbqZ2Ha4uSu+5TvPorHHkAbZVHKYj2Y+tvVzxRzi4Sv6NdHXBS9Be5w==

turbo@^2.3.4:
version "2.3.4"
resolved "https://registry.yarnpkg.com/turbo/-/turbo-2.3.4.tgz#c73e49b7644db347e07c0d7ba37b4d06f08b147f"
integrity sha512-1kiLO5C0Okh5ay1DbHsxkPsw9Sjsbjzm6cF85CpWjR0BIyBFNDbKqtUyqGADRS1dbbZoQanJZVj4MS5kk8J42Q==
optionalDependencies:
turbo-darwin-64 "1.13.3"
turbo-darwin-arm64 "1.13.3"
turbo-linux-64 "1.13.3"
turbo-linux-arm64 "1.13.3"
turbo-windows-64 "1.13.3"
turbo-windows-arm64 "1.13.3"
turbo-darwin-64 "2.3.4"
turbo-darwin-arm64 "2.3.4"
turbo-linux-64 "2.3.4"
turbo-linux-arm64 "2.3.4"
turbo-windows-64 "2.3.4"
turbo-windows-arm64 "2.3.4"

type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
Expand Down