Skip to content

Commit 9c8d6da

Browse files
committed
Move to the pnpm package manager
Yarn 1, what the project used before, has been deprecated for a while. Updating to Yarn Berry (4) would be possible, but it is not that widespread yet. pnpm is another alternative package manager which many projects have now switched to. It is a lot faster than yarn, and offers safer dependency management
1 parent c13bef1 commit 9c8d6da

File tree

7 files changed

+3363
-2716
lines changed

7 files changed

+3363
-2716
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# See: https://github.com/codespell-project/codespell#using-a-config-file
22
[codespell]
3-
skip = ./node_modules,./build,yarn.lock
3+
skip = ./node_modules,./build,pnpm-lock.yaml
44
contex=6

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
# Maintain dependencies for our yarn packages.
3+
# Maintain dependencies for our npm packages.
44
- package-ecosystem: "npm"
55
directory: "/"
66
schedule:

.github/workflows/ci.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,25 @@ jobs:
1010
env:
1111
NODE_ENV: ${{ matrix.node-env }}
1212
steps:
13-
- name: Checkout
13+
- name: Checkout
1414
uses: actions/checkout@v4
1515

16-
- name: Setup Node
16+
- name: Setup Node
1717
uses: actions/[email protected]
1818
with:
1919
node-version: 18
2020

21-
- run: yarn install
21+
- uses: pnpm/action-setup@v4
22+
with:
23+
version: 9
24+
25+
- run: pnpm install
2226

23-
- run: yarn build
27+
- run: pnpm build
2428

25-
- run: yarn lint
29+
- run: pnpm lint
2630
if: ${{ matrix.node-env == 'development' }}
2731

28-
- run: yarn test
32+
- run: pnpm test
2933
if: ${{ matrix.node-env == 'development' }}
3034

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ repos:
2626
- repo: local
2727
hooks:
2828
- id: lint
29-
name: running yarn lint to ensure changes will pass linting on CI
30-
entry: yarn lint
29+
name: running pnpm lint to ensure changes will pass linting on CI
30+
entry: pnpm lint
3131
language: system
3232
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
3333
types: [file]

README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ This is the source for the SerenityOS Discord Bot.
22

33
### Setup
44

5-
The bot is written in [TypeScript](https://www.typescriptlang.org), `nodejs` and `yarn` are pre-requisites.
5+
The bot is written in [TypeScript](https://www.typescriptlang.org), `nodejs` and `pnpm` are pre-requisites.
66

77
Then setup your environment:
88

99
```
1010
$ git clone https://github.com/SerenityOS/discord-bot
1111
$ cd discord-bot
12-
$ yarn install
13-
$ yarn build
12+
$ pnpm install
13+
$ pnpm build
1414
```
1515

1616
### Configuration
@@ -23,16 +23,7 @@ guild_id=<your-guild-id-goes-here>
2323
```
2424
See: https://www.writebots.com/discord-bot-token/
2525

26-
Now you can run `yarn start:dev` and the bot will startup, and then restart as you save changes to the source files:
27-
```
28-
$ yarn start:dev
29-
[nodemon] 2.0.7
30-
[nodemon] to restart at any time, enter `rs`
31-
[nodemon] watching path(s): src/**/*
32-
[nodemon] watching extensions: ts,js
33-
[nodemon] starting `ts-node ./src/index.ts`
34-
Buggie bot has started
35-
```
26+
Now you can run `pnpm start:dev` and the bot will startup, and then restart as you save changes to the source files.
3627

3728
### Running Tests
3829

0 commit comments

Comments
 (0)