Skip to content

Commit 4371a71

Browse files
committed
refactor: ♻️ Migrate from pnpm to bun
- Updates DEVELOPMENT.md to use bun instead of pnpm - Updates github actions to use bun instead of pnpm - Removes pnpmDedupe from renovate.json
1 parent 7ab5734 commit 4371a71

File tree

5 files changed

+30
-32
lines changed

5 files changed

+30
-32
lines changed

.github/DEVELOPMENT.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Development
22

3-
After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation):
3+
After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing Bun](https://bun.sh/docs/installation):
44

55
```shell
66
git clone https://github.com/ < your-name-here > /enterprise-ai-recursive-web-scraper
77
cd enterprise-ai-recursive-web-scraper
8-
pnpm install
8+
bun install
99
```
1010

1111
> This repository includes a list of suggested VS Code extensions.
@@ -16,13 +16,13 @@ pnpm install
1616
Run [**tsup**](https://tsup.egoist.dev) locally to build source files from `src/` into output files in `lib/`:
1717

1818
```shell
19-
pnpm build
19+
bun run build
2020
```
2121

2222
Add `--watch` to run the builder in a watch mode that continuously cleans and recreates `lib/` as you save files:
2323

2424
```shell
25-
pnpm build --watch
25+
bun run build --watch
2626
```
2727

2828
## Formatting
@@ -33,43 +33,43 @@ It should be applied automatically when you save files in VS Code or make a Git
3333
To manually reformat all files, you can run:
3434

3535
```shell
36-
pnpm format --write
36+
bun run format --write
3737
```
3838

3939
## Linting
4040

4141
This package includes several forms of linting to enforce consistent code quality and styling.
4242
Each should be shown in VS Code, and can be run manually on the command-line:
4343

44-
- `pnpm lint` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files
45-
- `pnpm lint:knip` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports
46-
- `pnpm lint:md` ([Markdownlint](https://github.com/DavidAnson/markdownlint): Checks Markdown source files
47-
- `pnpm lint:packages` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the `pnpm-lock.yml` file
48-
- `pnpm lint:spelling` ([cspell](https://cspell.org)): Spell checks across all source files
44+
- `bun run lint` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files
45+
- `bun run lint:knip` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports
46+
- `bun run lint:md` ([Markdownlint](https://github.com/DavidAnson/markdownlint): Checks Markdown source files
47+
- `bun run lint:packages` ([bun dedupe --check](https://bun.sh/docs/cli/dedupe)): Checks for unnecessarily duplicated packages in the `bun.lockb` file
48+
- `bun run lint:spelling` ([cspell](https://cspell.org)): Spell checks across all source files
4949

5050
Read the individual documentation for each linter to understand how it can be configured and used best.
5151

5252
For example, ESLint can be run with `--fix` to auto-fix some lint rule complaints:
5353

5454
```shell
55-
pnpm run lint --fix
55+
bun run lint --fix
5656
```
5757

58-
Note that you'll likely need to run `pnpm build` before `pnpm lint` so that lint rules which check the file system can pick up on any built files.
58+
Note that you'll likely need to run `bun run build` before `bun run lint` so that lint rules which check the file system can pick up on any built files.
5959

6060
## Testing
6161

6262
[Vitest](https://vitest.dev) is used for tests.
6363
You can run it locally on the command-line:
6464

6565
```shell
66-
pnpm run test
66+
bun run test
6767
```
6868

6969
Add the `--coverage` flag to compute test coverage and place reports in the `coverage/` directory:
7070

7171
```shell
72-
pnpm run test --coverage
72+
bun run test --coverage
7373
```
7474

7575
Note that [console-fail-test](https://github.com/JoshuaKGoldberg/console-fail-test) is enabled for all test runs.
@@ -87,11 +87,11 @@ You should be able to see suggestions from [TypeScript](https://typescriptlang.o
8787
However, it can be useful to run the TypeScript command-line (`tsc`) to type check all files in `src/`:
8888

8989
```shell
90-
pnpm tsc
90+
bun run tsc
9191
```
9292

9393
Add `--watch` to keep the type checker running in a watch mode that updates the display as you save files:
9494

9595
```shell
96-
pnpm tsc --watch
96+
bun run tsc --watch
9797
```

.github/actions/prepare/action.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ name: Prepare
44

55
runs:
66
steps:
7-
- uses: pnpm/action-setup@v4
7+
- uses: oven-sh/setup-bun@v1
88
with:
9-
version: 9
9+
bun-version: latest
1010
- uses: actions/setup-node@v4
1111
with:
12-
cache: pnpm
1312
node-version: "20"
14-
- run: pnpm install --frozen-lockfile
13+
- run: bun install --frozen-lockfile
1514
shell: bash
1615
using: composite

.github/renovate.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55
"ignoreDeps": ["codecov/codecov-action"],
66
"labels": ["dependencies"],
77
"minimumReleaseAge": "7 days",
8-
"patch": { "enabled": false },
9-
"postUpdateOptions": ["pnpmDedupe"]
8+
"patch": { "enabled": false }
109
}

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,65 +5,65 @@ jobs:
55
steps:
66
- uses: actions/checkout@v4
77
- uses: ./.github/actions/prepare
8-
- run: pnpm build
8+
- run: bun run build
99
- run: node ./lib/index.js
1010
lint:
1111
name: Lint
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
1515
- uses: ./.github/actions/prepare
16-
- run: pnpm lint
16+
- run: bun run lint
1717
lint_knip:
1818
name: Lint Knip
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
2222
- uses: ./.github/actions/prepare
23-
- run: pnpm lint:knip
23+
- run: bun run lint:knip
2424
lint_markdown:
2525
name: Lint Markdown
2626
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v4
2929
- uses: ./.github/actions/prepare
30-
- run: pnpm lint:md
30+
- run: bun run lint:md
3131
lint_packages:
3232
name: Lint Packages
3333
runs-on: ubuntu-latest
3434
steps:
3535
- uses: actions/checkout@v4
3636
- uses: ./.github/actions/prepare
37-
- run: pnpm lint:packages
37+
- run: bun run lint:packages
3838
lint_spelling:
3939
name: Lint Spelling
4040
runs-on: ubuntu-latest
4141
steps:
4242
- uses: actions/checkout@v4
4343
- uses: ./.github/actions/prepare
44-
- run: pnpm lint:spelling
44+
- run: bun run lint:spelling
4545
prettier:
4646
name: Prettier
4747
runs-on: ubuntu-latest
4848
steps:
4949
- uses: actions/checkout@v4
5050
- uses: ./.github/actions/prepare
51-
- run: pnpm format --list-different
51+
- run: bun run format --list-different
5252
test:
5353
name: Test
5454
runs-on: ubuntu-latest
5555
steps:
5656
- uses: actions/checkout@v4
5757
- uses: ./.github/actions/prepare
58-
- run: pnpm run test --coverage
58+
- run: bun run test --coverage
5959
- uses: codecov/codecov-action@v3
6060
type_check:
6161
name: Type Check
6262
runs-on: ubuntu-latest
6363
steps:
6464
- uses: actions/checkout@v4
6565
- uses: ./.github/actions/prepare
66-
- run: pnpm tsc
66+
- run: bun run tsc
6767

6868
name: CI
6969

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fetch-depth: 0
1111
ref: main
1212
- uses: ./.github/actions/prepare
13-
- run: pnpm build
13+
- run: bun run build
1414
- env:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1616
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)