Skip to content

Commit c7fe315

Browse files
committed
feat: switch to bun (#371)
1 parent 4d652a1 commit c7fe315

32 files changed

+142
-8363
lines changed

.github/workflows/publish.yaml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,31 @@
11
name: Publish
22

33
on:
4-
release:
5-
types:
6-
- created
4+
push:
5+
branches:
6+
- main
77

88
jobs:
99
publish:
10+
name: Semantic Release
1011
runs-on: ubuntu-latest
1112
steps:
1213
- name: Checkout
1314
uses: actions/checkout@v4
1415

15-
- name: Setup pnpm
16-
uses: pnpm/action-setup@v3
16+
- name: Setup Bun
17+
uses: oven-sh/setup-bun@v1
1718

18-
- name: Setup node and pnpm cache
19+
- name: Setup Node
1920
uses: actions/setup-node@v4
2021
with:
21-
node-version-file: .nvmrc
22-
cache: pnpm
22+
node-version: latest
2323

24-
- name: Install
25-
run: pnpm install
24+
- name: Install Dependencies
25+
run: bun install
2626

27-
- name: Set Version Environment Variable
28-
run: |
29-
VERSION_TAG=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
30-
echo NEW_VERSION="${VERSION_TAG:1}" >> $GITHUB_ENV
31-
32-
- name: Publish
33-
run: |
34-
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} >> .npmrc
35-
pnpm --filter cypress-codegen bump-version
36-
pnpm --filter cypress-codegen publish --no-git-checks
27+
- name: Create Release
28+
run: bunx semantic-release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/test.yaml

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,40 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16-
- name: Setup pnpm
17-
uses: pnpm/action-setup@v3
18-
19-
- name: Setup node and pnpm cache
20-
uses: actions/setup-node@v4
21-
with:
22-
node-version-file: .nvmrc
23-
cache: pnpm
16+
- name: Setup Bun
17+
uses: oven-sh/setup-bun@v1
2418

2519
- name: Install
26-
run: pnpm install
20+
run: bun install
2721

2822
- name: Lint
29-
run: pnpm lint
23+
run: bun lint
24+
25+
- name: Type Check
26+
run: bun tsc
3027

3128
- name: Unit Tests
32-
run: pnpm test
29+
run: bun run test
3330
cli:
3431
name: CLI
3532
runs-on: ubuntu-latest
3633
steps:
3734
- name: Checkout
3835
uses: actions/checkout@v4
3936

40-
- name: Setup pnpm
41-
uses: pnpm/action-setup@v3
37+
- name: Setup Bun
38+
uses: oven-sh/setup-bun@v1
4239

43-
- name: Setup node and pnpm cache
44-
uses: actions/setup-node@v4
45-
with:
46-
node-version-file: .nvmrc
47-
cache: pnpm
40+
- name: Install
41+
run: bun install
4842

49-
- name: Install and setup bin
50-
run: pnpm setup-cli
43+
- name: Build
44+
run: bun run build
5145

5246
- name: Run cypress-codegen
5347
run: |
54-
pnpm cypress-codegen --testingType component
55-
pnpm cypress-codegen --testingType e2e
48+
bun src/cli.ts --testingType component
49+
bun src/cli.ts --testingType e2e
5650
5751
- name: Check generated types match git
5852
run: |
@@ -76,22 +70,16 @@ jobs:
7670
- name: Checkout
7771
uses: actions/checkout@v4
7872

79-
- name: Setup pnpm
80-
uses: pnpm/action-setup@v3
81-
82-
- name: Setup node and pnpm cache
83-
uses: actions/setup-node@v4
84-
with:
85-
node-version-file: .nvmrc
86-
cache: pnpm
73+
- name: Setup Bun
74+
uses: oven-sh/setup-bun@v1
8775

8876
- name: Install
89-
run: pnpm install && pnpm cypress install
77+
run: bun install
9078

9179
- name: Integration Tests
9280
uses: cypress-io/github-action@v6
9381
with:
9482
install: false
95-
build: pnpm build
83+
build: bun run build
9684
browser: chrome
9785
component: ${{ matrix.component }}

.husky/pre-commit

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
pnpm lint && pnpm format && git add .
1+
bun lint && bun format && git add .

.npmrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules
2-
pnpm-lock.yaml
2+
bun.lockb
33
cypress

.releaserc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ plugins:
1212
release: patch
1313
- scope: no-release
1414
release: false
15-
- "@semantic-release/release-notes-generator"
1615
- "@semantic-release/github"
16+
- "@semantic-release/npm"
17+
- "@semantic-release/release-notes-generator"
1718
branches:
1819
- main

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ npm i --save-dev cypress-codegen
2828

2929
## Plugin Usage
3030

31-
Model your Cypress project exactly like [the one in this repository](https://github.com/ExpediaGroup/cypress-codegen/blob/main/cypress.config.ts)!
32-
3331
1. Add the required plugin code to `cypress.config.ts` like so:
3432

3533
```ts

bun.lockb

252 KB
Binary file not shown.

0 commit comments

Comments
 (0)