mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-05-16 01:00:14 +00:00
refactor: replace bun with pnpm (#870)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: "bun"
|
- package-ecosystem: "npm"
|
||||||
directory: "/frontend"
|
directory: "/frontend"
|
||||||
groups:
|
groups:
|
||||||
minor-patch:
|
minor-patch:
|
||||||
|
|||||||
+12
-15
@@ -15,8 +15,10 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Setup bun
|
- name: Setup pnpm
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
||||||
|
with:
|
||||||
|
package_json_file: ./frontend/package.json
|
||||||
|
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
||||||
@@ -27,27 +29,22 @@ jobs:
|
|||||||
run: go mod download
|
run: go mod download
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm ci
|
||||||
bun install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Set version
|
- name: Set version
|
||||||
run: |
|
run: echo testing > internal/assets/version
|
||||||
echo testing > internal/assets/version
|
|
||||||
|
|
||||||
- name: Lint frontend
|
- name: Lint frontend
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm run lint
|
||||||
bun run lint
|
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm run build
|
||||||
bun run build
|
|
||||||
|
|
||||||
- name: Copy frontend
|
- name: Copy frontend
|
||||||
run: |
|
run: cp -r frontend/dist internal/assets/dist
|
||||||
cp -r frontend/dist internal/assets/dist
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: go test -coverprofile=coverage.txt -v ./...
|
run: go test -coverprofile=coverage.txt -v ./...
|
||||||
|
|||||||
@@ -59,8 +59,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: nightly
|
ref: nightly
|
||||||
|
|
||||||
- name: Install bun
|
- name: Setup pnpm
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
||||||
|
with:
|
||||||
|
package_json_file: ./frontend/package.json
|
||||||
|
|
||||||
- name: Install go
|
- name: Install go
|
||||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
||||||
@@ -68,18 +70,15 @@ jobs:
|
|||||||
go-version: "^1.26.0"
|
go-version: "^1.26.0"
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm ci
|
||||||
bun install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Install backend dependencies
|
- name: Install backend dependencies
|
||||||
run: |
|
run: go mod download
|
||||||
go mod download
|
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm run build
|
||||||
bun run build
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
@@ -105,8 +104,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: nightly
|
ref: nightly
|
||||||
|
|
||||||
- name: Install bun
|
- name: Setup pnpm
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
||||||
|
with:
|
||||||
|
package_json_file: ./frontend/package.json
|
||||||
|
|
||||||
- name: Install go
|
- name: Install go
|
||||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
||||||
@@ -114,18 +115,15 @@ jobs:
|
|||||||
go-version: "^1.26.0"
|
go-version: "^1.26.0"
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm ci
|
||||||
bun install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Install backend dependencies
|
- name: Install backend dependencies
|
||||||
run: |
|
run: go mod download
|
||||||
go mod download
|
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm run build
|
||||||
bun run build
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -35,8 +35,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Install bun
|
- name: Setup pnpm
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
||||||
|
with:
|
||||||
|
package_json_file: ./frontend/package.json
|
||||||
|
|
||||||
- name: Install go
|
- name: Install go
|
||||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
||||||
@@ -44,18 +46,15 @@ jobs:
|
|||||||
go-version: "^1.26.0"
|
go-version: "^1.26.0"
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm ci
|
||||||
bun install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Install backend dependencies
|
- name: Install backend dependencies
|
||||||
run: |
|
run: go mod download
|
||||||
go mod download
|
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm run build
|
||||||
bun run build
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
@@ -78,8 +77,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Install bun
|
- name: Setup pnpm
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
||||||
|
with:
|
||||||
|
package_json_file: ./frontend/package.json
|
||||||
|
|
||||||
- name: Install go
|
- name: Install go
|
||||||
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
|
||||||
@@ -87,18 +88,15 @@ jobs:
|
|||||||
go-version: "^1.26.0"
|
go-version: "^1.26.0"
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- name: Install frontend dependencies
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm ci
|
||||||
bun install --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Install backend dependencies
|
- name: Install backend dependencies
|
||||||
run: |
|
run: go mod download
|
||||||
go mod download
|
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
run: |
|
working-directory: ./frontend
|
||||||
cd frontend
|
run: pnpm run build
|
||||||
bun run build
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+2
-2
@@ -7,7 +7,7 @@ Contributing to Tinyauth is straightforward. Follow the steps below to set up a
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Bun
|
- pnpm
|
||||||
- Golang v1.24.0 or later
|
- Golang v1.24.0 or later
|
||||||
- Git
|
- Git
|
||||||
- Docker
|
- Docker
|
||||||
@@ -34,7 +34,7 @@ Frontend dependencies can be installed as follows:
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd frontend/
|
cd frontend/
|
||||||
bun install
|
pnpm ci
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create the `.env` file
|
## Create the `.env` file
|
||||||
|
|||||||
+7
-5
@@ -1,12 +1,14 @@
|
|||||||
# Site builder
|
# Site builder
|
||||||
FROM oven/bun:1.3.13-alpine AS frontend-builder
|
FROM node:26.1-alpine3.23 AS frontend-builder
|
||||||
|
|
||||||
WORKDIR /frontend
|
WORKDIR /frontend
|
||||||
|
|
||||||
COPY ./frontend/package.json ./
|
RUN npm install -g pnpm@11.1.2
|
||||||
COPY ./frontend/bun.lock ./
|
|
||||||
|
|
||||||
RUN bun install --frozen-lockfile
|
COPY ./frontend/package.json ./
|
||||||
|
COPY ./frontend/pnpm-lock.yaml ./
|
||||||
|
|
||||||
|
RUN pnpm ci
|
||||||
|
|
||||||
COPY ./frontend/public ./public
|
COPY ./frontend/public ./public
|
||||||
COPY ./frontend/src ./src
|
COPY ./frontend/src ./src
|
||||||
@@ -17,7 +19,7 @@ COPY ./frontend/tsconfig.app.json ./
|
|||||||
COPY ./frontend/tsconfig.node.json ./
|
COPY ./frontend/tsconfig.node.json ./
|
||||||
COPY ./frontend/vite.config.ts ./
|
COPY ./frontend/vite.config.ts ./
|
||||||
|
|
||||||
RUN bun run build
|
RUN pnpm run build
|
||||||
|
|
||||||
# Builder
|
# Builder
|
||||||
FROM golang:1.26-alpine3.23 AS builder
|
FROM golang:1.26-alpine3.23 AS builder
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ COPY go.sum ./
|
|||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
RUN go install github.com/air-verse/air@v1.61.7
|
RUN go install github.com/air-verse/air@v1.61.7
|
||||||
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
RUN go install github.com/go-delve/delve/cmd/dlv@v1.26.3
|
||||||
|
|
||||||
COPY ./cmd ./cmd
|
COPY ./cmd ./cmd
|
||||||
COPY ./internal ./internal
|
COPY ./internal ./internal
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
# Site builder
|
# Site builder
|
||||||
FROM oven/bun:1.3.13-alpine AS frontend-builder
|
FROM node:26.1-alpine3.23 AS frontend-builder
|
||||||
|
|
||||||
WORKDIR /frontend
|
WORKDIR /frontend
|
||||||
|
|
||||||
COPY ./frontend/package.json ./
|
RUN npm install -g pnpm@11.1.2
|
||||||
COPY ./frontend/bun.lock ./
|
|
||||||
|
|
||||||
RUN bun install --frozen-lockfile
|
COPY ./frontend/package.json ./
|
||||||
|
COPY ./frontend/pnpm-lock.yaml ./
|
||||||
|
|
||||||
|
RUN pnpm ci
|
||||||
|
|
||||||
COPY ./frontend/public ./public
|
COPY ./frontend/public ./public
|
||||||
COPY ./frontend/src ./src
|
COPY ./frontend/src ./src
|
||||||
@@ -17,7 +19,7 @@ COPY ./frontend/tsconfig.app.json ./
|
|||||||
COPY ./frontend/tsconfig.node.json ./
|
COPY ./frontend/tsconfig.node.json ./
|
||||||
COPY ./frontend/vite.config.ts ./
|
COPY ./frontend/vite.config.ts ./
|
||||||
|
|
||||||
RUN bun run build
|
RUN pnpm run build
|
||||||
|
|
||||||
# Builder
|
# Builder
|
||||||
FROM golang:1.26-alpine3.23 AS builder
|
FROM golang:1.26-alpine3.23 AS builder
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ PROD_COMPOSE := $(shell test -f "docker-compose.test.prod.yml" && echo "docker-c
|
|||||||
|
|
||||||
# Deps
|
# Deps
|
||||||
deps:
|
deps:
|
||||||
bun install --frozen-lockfile --cwd frontend
|
cd frontend && pnpm ci
|
||||||
go mod download
|
go mod download
|
||||||
|
|
||||||
# Clean data
|
# Clean data
|
||||||
@@ -31,7 +31,7 @@ clean-webui:
|
|||||||
|
|
||||||
# Build the web UI
|
# Build the web UI
|
||||||
webui: clean-webui
|
webui: clean-webui
|
||||||
bun run --cwd frontend build
|
cd frontend && pnpm run build
|
||||||
cp -r frontend/dist internal/assets
|
cp -r frontend/dist internal/assets
|
||||||
|
|
||||||
# Build the binary
|
# Build the binary
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# Ignore artifacts:
|
|
||||||
dist
|
|
||||||
node_modules
|
|
||||||
bun.lock
|
|
||||||
package.json
|
|
||||||
src/lib/i18n/locales
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
FROM oven/bun:1.2.16-alpine
|
FROM node:26.1-alpine3.23
|
||||||
|
|
||||||
|
RUN npm install -g pnpm@11.1.2
|
||||||
|
|
||||||
WORKDIR /frontend
|
WORKDIR /frontend
|
||||||
|
|
||||||
COPY ./frontend/package.json ./
|
COPY ./frontend/package.json ./
|
||||||
COPY ./frontend/bun.lock ./
|
COPY ./frontend/pnpm-lock.yaml ./
|
||||||
|
|
||||||
RUN bun install --frozen-lockfile
|
RUN pnpm ci
|
||||||
|
|
||||||
COPY ./frontend/public ./public
|
COPY ./frontend/public ./public
|
||||||
COPY ./frontend/src ./src
|
COPY ./frontend/src ./src
|
||||||
@@ -19,4 +21,4 @@ COPY ./frontend/vite.config.ts ./
|
|||||||
|
|
||||||
EXPOSE 5173
|
EXPOSE 5173
|
||||||
|
|
||||||
ENTRYPOINT ["bun", "run", "dev"]
|
ENTRYPOINT ["pnpm", "run", "dev"]
|
||||||
|
|||||||
-1107
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@
|
|||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"tsc": "tsc -b"
|
"tsc": "tsc -b"
|
||||||
},
|
},
|
||||||
|
"packageManager": "pnpm@11.1.2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^5.2.2",
|
"@hookform/resolvers": "^5.2.2",
|
||||||
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
||||||
|
|||||||
Generated
+5072
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
|||||||
|
dangerouslyAllowAllBuilds: false
|
||||||
|
blockExoticSubdeps: true
|
||||||
|
minimumReleaseAge: 1440 # 1 day
|
||||||
|
trustPolicy: no-downgrade
|
||||||
Reference in New Issue
Block a user