Migrate from yarn to bun

This commit is contained in:
Zoe Roux 2024-10-30 18:36:26 +01:00
parent dc3aa20feb
commit 97fb5053c1
No known key found for this signature in database
8 changed files with 16 additions and 15230 deletions

View File

@ -69,7 +69,6 @@ services:
dockerfile: Dockerfile.dev
volumes:
- ./front:/app
- /app/.yarn
- /app/node_modules
- /app/apps/mobile/node_modules
- /app/apps/web/.next/

View File

@ -1,24 +0,0 @@
nodeLinker: node-modules
packageExtensions:
"@expo/cli@*":
dependencies:
expo-modules-autolinking: "*"
babel-preset-expo@*:
dependencies:
"@babel/core": "*"
expo-asset@*:
dependencies:
expo: "*"
react-native-codegen@*:
peerDependenciesMeta:
"@babel/preset-env":
optional: true
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
yarnPath: .yarn/releases/yarn-3.2.4.cjs

View File

@ -1,19 +1,17 @@
FROM node:18-alpine AS builder
WORKDIR /app
COPY .yarn ./.yarn
COPY .yarnrc.yml ./
COPY package.json yarn.lock ./
COPY package.json bun.lockb ./
COPY apps/web/package.json apps/web/package.json
COPY apps/mobile/package.json apps/mobile/package.json
COPY packages/ui/package.json packages/ui/package.json
COPY packages/primitives/package.json packages/primitives/package.json
COPY packages/models/package.json packages/models/package.json
RUN yarn --immutable
RUN bun --frozen-lockfile
COPY . .
ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_ENV=production
RUN yarn build:web
RUN bun run build:web
FROM node:18-alpine

View File

@ -1,17 +1,15 @@
FROM node:18-alpine
RUN apk add git bash
WORKDIR /app
COPY .yarn ./.yarn
COPY .yarnrc.yml ./
COPY package.json yarn.lock ./
COPY package.json bun.lockb ./
COPY apps/web/package.json apps/web/package.json
COPY apps/mobile/package.json apps/mobile/package.json
COPY packages/ui/package.json packages/ui/package.json
COPY packages/primitives/package.json packages/primitives/package.json
COPY packages/models/package.json packages/models/package.json
RUN yarn --immutable
RUN bun install --frozen-lockfile
ENV NEXT_TELEMETRY_DISABLED=1
EXPOSE 3000
EXPOSE 8081
ENTRYPOINT ["yarn", "dev"]
ENTRYPOINT ["bun", "dev"]

BIN
front/bun.lockb Executable file

Binary file not shown.

View File

@ -2,14 +2,14 @@
"name": "kyoo",
"private": true,
"scripts": {
"dev": "yarn workspaces foreach -pi run dev",
"web": "yarn workspace web dev",
"mobile": "yarn workspace mobile dev",
"build:web": "yarn workspace web build",
"build:mobile": "yarn workspace mobile build",
"build:mobile:apk": "yarn workspace mobile build:apk",
"build:mobile:dev": "yarn workspace mobile build:dev",
"update": "yarn workspace mobile update",
"dev": "bun --filter '*' run dev",
"web": "bun --cwd apps/web dev",
"mobile": "bun --cwd apps/mobile dev",
"build:web": "bun --cwd apps/web build",
"build:mobile": "bun --cwd apps/mobile build",
"build:mobile:apk": "bun --cwd apps/mobile build:apk",
"build:mobile:dev": "bun --cwd apps/mobile build:dev",
"update": "bun --cwd apps/mobile update",
"lint": "biome lint .",
"lint:fix": "biome lint . --apply",
"format": "biome format .",
@ -22,6 +22,5 @@
"devDependencies": {
"@biomejs/biome": "1.9.4",
"typescript": "5.6.3"
},
"packageManager": "yarn@3.2.4"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,6 @@ in
pkgs.mkShell {
packages = with pkgs; [
nodejs-18_x
nodePackages.yarn
nodePackages.eas-cli
nodePackages.expo-cli
dotnet
@ -44,6 +43,7 @@ in
sqlc
go-swag
robotframework-tidy
bun
];
DOTNET_ROOT = "${dotnet}";