Skip to content

Commit 1efd33c

Browse files
authored
Monorepo migration (#10)
* chore: scaffold pnpm monorepo with Turborepo * feat: add packages/dappdriver * feat: add packages/wallet * feat: add packages/zerion * feat: add packages/rainbow * feat: add packages/metamask * feat: packages/flask * chore: delete old src * docs: update README.md * ci: add Changesets release workflow * chore: add changeset for next release
1 parent d79741a commit 1efd33c

173 files changed

Lines changed: 6020 additions & 6668 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
3-
"access": "restricted",
3+
"access": "public",
44
"baseBranch": "main",
55
"changelog": "@changesets/cli/changelog",
66
"commit": false,

.changeset/upset-turkeys-deny.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@assert-equals/dappdriver': major
3+
'@assert-equals/dappdriver-metamask': major
4+
'@assert-equals/dappdriver-rainbow': major
5+
'@assert-equals/dappdriver-wallet': major
6+
'@assert-equals/dappdriver-zerion': major
7+
'@assert-equals/dappdriver-flask': major
8+
---
9+
10+
Restructure the repository as a pnpm monorepo.

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,19 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12+
1213
- uses: actions/setup-node@v4
1314
with:
1415
node-version: '20.x'
16+
17+
- name: Enable Corepack
18+
run: corepack enable
19+
1520
- name: Install dependencies
16-
run: yarn
21+
run: pnpm install --frozen-lockfile
22+
1723
- name: Build
18-
run: yarn build
24+
run: pnpm build
25+
1926
- name: Test
20-
run: yarn test
27+
run: pnpm test

.github/workflows/publish-docs.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Publish docs
22

33
on:
4-
push:
5-
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]+'
4+
workflow_run:
5+
workflows: ['Release']
6+
types: [completed]
77

88
permissions:
99
contents: read
@@ -17,15 +17,28 @@ concurrency:
1717
jobs:
1818
build:
1919
runs-on: ubuntu-latest
20+
if: |
21+
github.event.workflow_run.conclusion == 'success' &&
22+
contains(github.event.workflow_run.head_commit.message, 'changeset-release')
2023
steps:
2124
- uses: actions/checkout@v4
25+
2226
- uses: actions/setup-node@v4
2327
with:
2428
node-version: '20.x'
29+
30+
- name: Enable Corepack
31+
run: corepack enable
32+
2533
- name: Install dependencies
26-
run: yarn
27-
- name: Generate documentation
28-
run: yarn docs
34+
run: pnpm install --frozen-lockfile
35+
36+
- name: Build packages
37+
run: pnpm build
38+
39+
- name: Generate docs
40+
run: pnpm run docs
41+
2942
- name: Upload Pages artifact
3043
uses: actions/upload-pages-artifact@v3
3144
with:

.github/workflows/publish-package-npm.yml

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

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish package to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: '20.x'
24+
registry-url: 'https://registry.npmjs.org'
25+
scope: '@assert-equals'
26+
27+
- name: Enable Corepack
28+
run: corepack enable
29+
30+
- name: Install dependencies
31+
run: pnpm install --frozen-lockfile
32+
33+
- name: Build packages
34+
run: pnpm build
35+
36+
- name: Run tests
37+
run: pnpm test
38+
39+
- name: Create Release Pull Request or Publish
40+
uses: changesets/action@v1
41+
with:
42+
title: 'chore: version packages'
43+
commit: 'chore: version packages'
44+
publish: pnpm changeset publish
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ zerion-*
55
dist
66
docs
77
.DS_Store
8-
.vscode
8+
.vscode
9+
.turbo/

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
ignore-scripts=false

.versionrc.json

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

0 commit comments

Comments
 (0)