Skip to content

Commit

Permalink
Switch to pnpm. aeharding#258 (aeharding#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
FitzHawke authored Jul 7, 2023
1 parent df40ecd commit 73fa41e
Show file tree
Hide file tree
Showing 7 changed files with 7,913 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache: pnpm

- name: 📦 Install dependencies
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

# - name: 🧪 Test project
# run: yarn test
# run: pnpm test

- name: 📝 Lint
run: yarn lint
run: pnpm lint

- name: 📝 Prettier formatting
run: yarn lint:formatting
run: pnpm lint:formatting

- name: 💪 Type check
run: yarn test:typecheck
run: pnpm test:typecheck
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist/
dist/
pnpm-lock.yaml
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ RUN apk add git --no-cache

# Prepare build deps ( ignore postinstall scripts for now )
COPY package.json ./
COPY yarn.lock ./
RUN yarn config set network-timeout 300000
RUN yarn --frozen-lockfile --ignore-scripts
COPY pnpm-lock.yaml ./
RUN pnpm config set network-timeout 300000
RUN pnpm install --frozen-lockfile --ignore-scripts

# Copy all source files
COPY . ./

# Build
RUN yarn build
RUN pnpm build

FROM base AS runner

Expand All @@ -31,11 +31,11 @@ ARG GID=911
RUN corepack enable

COPY package.json ./
COPY yarn.lock ./
COPY pnpm-lock.yaml ./
COPY server.mjs ./

RUN yarn config set network-timeout 300000
RUN yarn --prod --frozen-lockfile --ignore-scripts
RUN pnpm config set network-timeout 300000
RUN pnpm install --prod --frozen-lockfile --ignore-scripts

# Create a dedicated user and group
RUN set -eux; \
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ We're really excited that you're interested in contributing to wefwef!
Clone the repository and run on the root folder:

```
yarn
yarn run dev
pnpm install
pnpm run dev
```

`Warning`: you will need `corepack` enabled.
Expand All @@ -130,7 +130,7 @@ yarn run dev
wefwef uses [Vitest](https://vitest.dev). You can run the test suite with:

```
yarn test
pnpm test
```

## 📲 PWA
Expand Down
17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint:formatting": "prettier --check .",
"generate:splash:dark": "pwa-asset-generator --type png --index index.html --dark-mode --splash-only --path-override '/splash' public/splash.html public/splash/ && prettier -w index.html",
"generate:splash:light": "pwa-asset-generator --type png --index index.html --splash-only --path-override '/splash' public/splash.html public/splash/ && prettier -w index.html",
"generate:splash": "yarn generate:splash:dark && yarn generate:splash:light"
"generate:splash": "pnpm generate:splash:dark && pnpm generate:splash:light"
},
"dependencies": {
"express": "^4.18.2",
Expand All @@ -34,8 +34,11 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/history": "^4.7.11",
"@types/jest": "^29.5.2",
"@types/js-cookie": "^3.0.3",
"@types/lodash": "^4.14.195",
"@types/mdast": "^3.0.11",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@types/react-router": "^5.1.20",
Expand All @@ -54,12 +57,19 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"history": "^4.9.0",
"ionicons": "^7.1.2",
"js-cookie": "^3.0.5",
"jsdom": "^22.1.0",
"lemmy-js-client": "0.18.0",
"lodash": "^4.17.21",
"mdast-util-gfm-autolink-literal-lemmy": "^1.0.3",
"mdast-util-gfm-strikethrough": "^1.0.3",
"mdast-util-gfm-table": "^1.0.7",
"micromark": "^3.0.0",
"micromark-extension-gfm-strikethrough": "^1.0.0",
"micromark-extension-gfm-table": "^1.0.0",
"micromark-util-combine-extensions": "^1.0.0",
"photoswipe": "^5.3.7",
"prettier": "^2.8.8",
"pwa-asset-generator": "^6.3.1",
Expand All @@ -77,12 +87,15 @@
"terser": "^5.18.1",
"typescript": "^5.1.3",
"ua-parser-js": "^1.0.35",
"unified": "^10.1.2",
"unist-util-visit": "^4.1.2",
"use-long-press": "^3.1.5",
"usehooks-ts": "^2.9.1",
"uuid": "^9.0.0",
"vite": "^4.3.9",
"vite-plugin-pwa": "^0.16.4",
"vite-plugin-svgr": "^3.2.0",
"vitest": "^0.32.0"
"vitest": "^0.32.4",
"workbox-window": "^7.0.0"
}
}
Loading

0 comments on commit 73fa41e

Please sign in to comment.