install pnpm through corepack (#2864)

* install pnpm through corepack

* remove engine from services package.json
This commit is contained in:
Matthieu Sieben 2025-01-03 04:04:43 +01:00 committed by GitHub
parent 3442668194
commit 3365bf8b22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 42 additions and 29 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
node_modules
**/dist
.DS_Store
Dockerfile

View File

@ -19,10 +19,10 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: pnpm/action-setup@v4 - run: corepack enable && corepack prepare --activate
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: 18 node-version-file: package.json
cache: 'pnpm' cache: 'pnpm'
- run: pnpm i --frozen-lockfile - run: pnpm i --frozen-lockfile
- run: pnpm build - run: pnpm build

View File

@ -15,13 +15,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: pnpm/action-setup@v4 - run: corepack enable && corepack prepare --activate
name: Install pnpm
with:
run_install: false
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 18 node-version-file: package.json
cache: 'pnpm' cache: 'pnpm'
- name: Get current month - name: Get current month
run: echo "CURRENT_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV run: echo "CURRENT_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV
@ -48,13 +45,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: pnpm/action-setup@v4 - run: corepack enable && corepack prepare --activate
name: Install pnpm
with:
run_install: false
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 18 node-version-file: package.json
cache: 'pnpm' cache: 'pnpm'
- name: Get current month - name: Get current month
run: echo "CURRENT_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV run: echo "CURRENT_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV
@ -75,13 +69,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: pnpm/action-setup@v4 - run: corepack enable && corepack prepare --activate
name: Install pnpm
with:
run_install: false
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 18 node-version-file: package.json
cache: 'pnpm' cache: 'pnpm'
- name: Get current month - name: Get current month
run: echo "CURRENT_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV run: echo "CURRENT_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV

View File

@ -6,7 +6,7 @@
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"engines": { "engines": {
"node": ">=18" "node": "18"
}, },
"packageManager": "pnpm@8.15.9", "packageManager": "pnpm@8.15.9",
"scripts": { "scripts": {

View File

@ -22,7 +22,6 @@
"default": "./dist/index.js" "default": "./dist/index.js"
} }
}, },
"dependencies": {},
"devDependencies": { "devDependencies": {
"typescript": "^5.6.3" "typescript": "^5.6.3"
}, },

View File

@ -22,7 +22,6 @@
"default": "./dist/index.js" "default": "./dist/index.js"
} }
}, },
"dependencies": {},
"devDependencies": { "devDependencies": {
"typescript": "^5.6.3" "typescript": "^5.6.3"
}, },

View File

@ -1,9 +1,13 @@
FROM node:20.11-alpine as build FROM node:20.11-alpine as build
RUN npm install -g pnpm RUN corepack enable
WORKDIR /app
COPY ./package.json ./
RUN corepack prepare --activate
# Move files into the image and install # Move files into the image and install
WORKDIR /app
COPY ./*.* ./ COPY ./*.* ./
# NOTE bsky's transitive dependencies go here: if that changes, this needs to be updated. # NOTE bsky's transitive dependencies go here: if that changes, this needs to be updated.
COPY ./tsconfig ./tsconfig COPY ./tsconfig ./tsconfig

View File

@ -1,6 +1,7 @@
{ {
"name": "bsky-app-view-service", "name": "bsky-app-view-service",
"private": true, "private": true,
"packageManager": "pnpm@8.15.9",
"dependencies": { "dependencies": {
"@atproto/bsky": "workspace:^", "@atproto/bsky": "workspace:^",
"@atproto/crypto": "workspace:^", "@atproto/crypto": "workspace:^",

View File

@ -1,9 +1,13 @@
FROM node:18-alpine as build FROM node:18-alpine as build
RUN npm install -g pnpm RUN corepack enable
WORKDIR /app
COPY ./package.json ./
RUN corepack prepare --activate
# Move files into the image and install # Move files into the image and install
WORKDIR /app
COPY ./*.* ./ COPY ./*.* ./
# NOTE bsync's transitive dependencies go here: if that changes, this needs to be updated. # NOTE bsync's transitive dependencies go here: if that changes, this needs to be updated.
COPY ./tsconfig ./tsconfig COPY ./tsconfig ./tsconfig

View File

@ -1,6 +1,7 @@
{ {
"name": "bsync-service", "name": "bsync-service",
"private": true, "private": true,
"packageManager": "pnpm@8.15.9",
"dependencies": { "dependencies": {
"@atproto/bsync": "workspace:^", "@atproto/bsync": "workspace:^",
"dd-trace": "3.13.2" "dd-trace": "3.13.2"

View File

@ -1,9 +1,13 @@
FROM node:18-alpine as build FROM node:18-alpine as build
RUN npm install -g pnpm RUN corepack enable
WORKDIR /app
COPY ./package.json ./
RUN corepack prepare --activate
# Move files into the image and install # Move files into the image and install
WORKDIR /app
COPY ./*.* ./ COPY ./*.* ./
# NOTE ozones's transitive dependencies go here: if that changes, this needs to be updated. # NOTE ozones's transitive dependencies go here: if that changes, this needs to be updated.
COPY ./tsconfig ./tsconfig COPY ./tsconfig ./tsconfig

View File

@ -1,6 +1,7 @@
{ {
"name": "ozone-service", "name": "ozone-service",
"private": true, "private": true,
"packageManager": "pnpm@8.15.9",
"dependencies": { "dependencies": {
"@atproto/aws": "workspace:^", "@atproto/aws": "workspace:^",
"@atproto/ozone": "workspace:^", "@atproto/ozone": "workspace:^",

View File

@ -2,10 +2,14 @@
# see additional reference to this image further down. # see additional reference to this image further down.
FROM node:20.11-alpine3.18 as build FROM node:20.11-alpine3.18 as build
RUN npm install -g pnpm RUN corepack enable
WORKDIR /app
COPY ./package.json ./
RUN corepack prepare --activate
# Move files into the image and install # Move files into the image and install
WORKDIR /app
COPY ./*.* ./ COPY ./*.* ./
# NOTE pds's transitive dependencies go here: if that changes, this needs to be updated. # NOTE pds's transitive dependencies go here: if that changes, this needs to be updated.
COPY ./tsconfig ./tsconfig COPY ./tsconfig ./tsconfig

View File

@ -1,6 +1,7 @@
{ {
"name": "plc-service", "name": "plc-service",
"private": true, "private": true,
"packageManager": "pnpm@8.15.9",
"dependencies": { "dependencies": {
"@atproto/pds": "workspace:^", "@atproto/pds": "workspace:^",
"@opentelemetry/instrumentation": "^0.45.0", "@opentelemetry/instrumentation": "^0.45.0",