Skip to content

Commit 2703ebd

Browse files
authored
🚀 release: v1.1.1
Merge pull request #102 from wgtechlabs/dev
2 parents 04a433b + beceaf7 commit 2703ebd

File tree

17 files changed

+4021
-3101
lines changed

17 files changed

+4021
-3101
lines changed

‎.github/workflows/patch-build.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
- 'src/**'
99
- 'Dockerfile'
1010
- 'package.json'
11-
- 'yarn.lock'
11+
- 'pnpm-lock.yaml'
12+
- '.npmrc'
1213
- '.github/workflows/**'
1314
- 'docker-compose.yml'
1415

‎.github/workflows/pr-build.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
- 'src/**'
99
- 'Dockerfile'
1010
- 'package.json'
11-
- 'yarn.lock'
11+
- 'pnpm-lock.yaml'
12+
- '.npmrc'
1213
- '.github/workflows/pr-build.yml'
1314

1415
env:

‎.github/workflows/security.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88
- 'src/**'
99
- 'Dockerfile'
1010
- 'package.json'
11-
- 'yarn.lock'
11+
- 'pnpm-lock.yaml'
12+
- '.npmrc'
1213
- '.github/workflows/security.yml'
1314
pull_request:
1415
branches: [main]

‎.github/workflows/test.yml‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
paths:
88
- 'src/**'
99
- 'package.json'
10-
- 'yarn.lock'
10+
- 'pnpm-lock.yaml'
11+
- '.npmrc'
1112
- 'tsconfig.json'
1213
- 'vitest.config.ts'
1314
- '.github/workflows/test.yml'
@@ -16,7 +17,8 @@ on:
1617
paths:
1718
- 'src/**'
1819
- 'package.json'
19-
- 'yarn.lock'
20+
- 'pnpm-lock.yaml'
21+
- '.npmrc'
2022
- 'tsconfig.json'
2123
- 'vitest.config.ts'
2224
- '.github/workflows/test.yml'
@@ -33,26 +35,31 @@ jobs:
3335
- name: Checkout code
3436
uses: actions/checkout@v4
3537

38+
- name: Setup pnpm
39+
uses: pnpm/action-setup@v4
40+
with:
41+
version: 9.15.9
42+
3643
- name: Setup Node.js
3744
uses: actions/setup-node@v4
3845
with:
3946
node-version: ${{ env.NODE_VERSION }}
40-
cache: 'yarn'
47+
cache: 'pnpm'
4148

4249
- name: Install dependencies
43-
run: yarn install --frozen-lockfile
50+
run: pnpm install --frozen-lockfile
4451

4552
- name: Run linter
46-
run: yarn lint
53+
run: pnpm lint
4754

4855
- name: Run type checking
49-
run: yarn build
56+
run: pnpm build
5057

5158
- name: Run tests (fast feedback)
52-
run: yarn test:run
59+
run: pnpm test
5360

5461
- name: Run tests with coverage (detailed analysis)
55-
run: yarn test:coverage
62+
run: pnpm test:coverage
5663
if: success()
5764

5865
- name: Upload coverage to Codecov

‎.github/workflows/validate.yml‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,25 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323

24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 9.15.9
28+
2429
- name: Setup Node.js
2530
uses: actions/setup-node@v4
2631
with:
2732
node-version: ${{ env.NODE_VERSION }}
28-
cache: 'yarn'
33+
cache: 'pnpm'
2934

3035
- name: Install dependencies
31-
run: yarn install --frozen-lockfile
36+
run: pnpm install --frozen-lockfile
3237

3338
- name: Run type checking
34-
run: yarn build
39+
run: pnpm build
3540

3641
- name: Run linter
37-
run: yarn lint
42+
run: pnpm lint
3843

3944
- name: Run Trivy security scan
4045
uses: aquasecurity/[email protected]

‎.github/workflows/wip-build.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
- 'src/**'
88
- 'Dockerfile'
99
- 'package.json'
10-
- 'yarn.lock'
10+
- 'pnpm-lock.yaml'
11+
- '.npmrc'
1112
- '.github/workflows/wip-build.yml'
1213

1314
env:

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ dist/
7575
# Yarn Integrity file
7676
.yarn-integrity
7777

78+
# pnpm debug logs
79+
.pnpm-debug.log*
80+
7881
# dotenv environment variable files
7982
.env
8083
.env.development.local

‎.npmrc‎

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# =============================================================================
2+
# PNPM Configuration
3+
# =============================================================================
4+
# This configuration file defines pnpm settings for optimal performance,
5+
# security, and development experience.
6+
#
7+
# For more information: https://pnpm.io/npmrc
8+
# =============================================================================
9+
10+
# Node.js version management
11+
# Use the Node.js version specified in package.json engines field
12+
# use-node-version=20.0.0
13+
14+
# Strict peer dependencies
15+
# Fail installation if peer dependencies are not met
16+
strict-peer-dependencies=true
17+
18+
# Auto-install peers
19+
# Disabled to prevent local lockfile mutations and ensure deterministic builds
20+
auto-install-peers=false
21+
22+
# Shamefully hoist
23+
# Disabled - use pnpm's default isolated node_modules structure
24+
shamefully-hoist=false
25+
26+
# Public hoist pattern
27+
# Hoist only necessary packages to root for compatibility
28+
public-hoist-pattern[]=*eslint*
29+
public-hoist-pattern[]=*prettier*
30+
31+
# Node linker
32+
# Use isolated mode for better dependency management
33+
node-linker=isolated
34+
35+
# Enable lockfile
36+
# Always generate and use pnpm-lock.yaml
37+
lockfile=true
38+
39+
# Package import method
40+
# Use hardlinks for faster installation and disk efficiency
41+
package-import-method=auto
42+
43+
# Engine strict
44+
# Enforce Node.js version from package.json engines field
45+
engine-strict=true
46+
47+
# Save exact
48+
# Save exact versions in package.json for predictable builds
49+
save-exact=true
50+
51+
# Store directory
52+
# Use default pnpm store location
53+
# store-dir=~/.pnpm-store
54+
55+
# Verify store integrity
56+
# Check store integrity before installation
57+
verify-store-integrity=true
58+
59+
# Prefer frozen lockfile
60+
# Use frozen lockfile in CI environments
61+
# frozen-lockfile is set via CLI in CI/CD
62+
63+
# Ignore workspace root check
64+
# Allow running pnpm in workspace root
65+
ignore-workspace-root-check=false
66+
67+
# Dedupe peer dependents
68+
# Deduplicate peer dependents for smaller node_modules
69+
dedupe-peer-dependents=true
70+
71+
# =============================================================================
72+
# Security Settings
73+
# =============================================================================
74+
75+
# Registry
76+
registry=https://registry.npmjs.org/
77+
78+
# Side effects cache
79+
# Enable for better performance
80+
side-effects-cache=true
81+
82+
# Side effects cache readonly
83+
# Allow writing to cache
84+
side-effects-cache-readonly=false
85+
86+
# =============================================================================
87+
# Performance Settings
88+
# =============================================================================
89+
90+
# Network concurrency
91+
# Number of concurrent network requests (reduced for CI stability)
92+
network-concurrency=8
93+
94+
# Fetch retries
95+
# Number of times to retry failed network requests
96+
fetch-retries=2
97+
98+
# Fetch retry factor
99+
# Exponential backoff factor for retries
100+
fetch-retry-factor=10
101+
102+
# Fetch retry mintimeout
103+
# Minimum time before first retry
104+
fetch-retry-mintimeout=10000
105+
106+
# Fetch retry maxtimeout
107+
# Maximum time before retry
108+
fetch-retry-maxtimeout=60000
109+
110+
# =============================================================================
111+
# Development Settings
112+
# =============================================================================
113+
114+
# Recursive install
115+
# Enable recursive installation
116+
recursive-install=true

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To get started with development:
2626

2727
2. **Install dependencies**
2828
```bash
29-
yarn install
29+
pnpm install
3030
```
3131

3232
3. **Set up environment variables**
@@ -35,12 +35,12 @@ To get started with development:
3535

3636
4. **Start the bot in development mode**
3737
```bash
38-
yarn dev
38+
pnpm dev
3939
```
4040

4141
5. **Deploy commands when needed**
4242
```bash
43-
yarn deploycommand
43+
pnpm deploycommand
4444
```
4545

4646
Please refer to the [README](./README.md) for more detailed setup instructions, including Discord application setup and webhook configuration.

‎Dockerfile‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@
1515

1616
# syntax=docker/dockerfile:1
1717

18-
# Use Node.js 22.16 LTS Alpine with security patches
19-
ARG NODE_VERSION=22.16-alpine3.21
18+
# Use Node.js 24 LTS Alpine with security patches
19+
ARG NODE_VERSION=24-alpine3.21
2020

2121
# =============================================================================
2222
# STAGE 1: Base Image
2323
# =============================================================================
2424
# Alpine Linux 3.21 base for minimal image size with latest security updates
2525
FROM node:${NODE_VERSION} AS base
2626

27-
# Install security updates for Alpine packages
27+
# Install security updates for Alpine packages and enable Corepack for pnpm
2828
RUN apk update && apk upgrade && \
2929
apk add --no-cache dumb-init && \
30-
rm -rf /var/cache/apk/*
30+
rm -rf /var/cache/apk/* && \
31+
corepack enable && \
32+
corepack prepare [email protected] --activate
3133

3234
# Set working directory for all subsequent stages
3335
WORKDIR /usr/src/app
@@ -39,11 +41,11 @@ WORKDIR /usr/src/app
3941
FROM base AS deps
4042

4143
# Copy package management files for dependency installation
42-
COPY package.json yarn.lock ./
44+
COPY package.json pnpm-lock.yaml .npmrc ./
4345

44-
# Install only production dependencies
45-
RUN yarn install --production --frozen-lockfile && \
46-
yarn cache clean
46+
# Install only production dependencies using pnpm
47+
RUN pnpm install --prod --frozen-lockfile && \
48+
pnpm store prune
4749

4850
# =============================================================================
4951
# STAGE 3: Build Application
@@ -52,14 +54,14 @@ RUN yarn install --production --frozen-lockfile && \
5254
FROM base AS build
5355

5456
# Copy package management files
55-
COPY package.json yarn.lock ./
57+
COPY package.json pnpm-lock.yaml .npmrc ./
5658

5759
# Install all dependencies (including devDependencies for building)
58-
RUN yarn install --frozen-lockfile
60+
RUN pnpm install --frozen-lockfile
5961

6062
# Copy source code and build the application
6163
COPY . .
62-
RUN yarn run build
64+
RUN pnpm run build
6365

6466
# Copy non-TypeScript files that need to be in the final build
6567
RUN mkdir -p dist/database && cp src/database/schema.sql dist/database/schema.sql

0 commit comments

Comments
 (0)