Skip to content

Commit

Permalink
👷 Chore: Switch package manager back to pnpm from bun (#676)
Browse files Browse the repository at this point in the history
## Description

Switching package manager back to pnpm for following reasons:

1. The feature pnpm has of forcing packages to be extra explicit with
dependencies. With bun there is a risk of packages depending on hoisting
and failing to work once published to npm without the hoisted packages.
It also makes unexpected changes between package dependencies possible.
2. Changesets don't support bun very well it seems
3. Small bugs with bun slow down development. For example, moving a
workspace package often requires a rm -rf bun.lockb to fix

## Testing

Explain the quality checks that have been done on the code changes

## Additional Information

- [ ] I read the [contributing docs](../docs/contributing.md) (if this
is your first contribution)

Your ENS/address:

Co-authored-by: Will Cory <[email protected]>
  • Loading branch information
roninjin10 and Will Cory authored Nov 17, 2023
1 parent 15eb752 commit 93cab84
Show file tree
Hide file tree
Showing 83 changed files with 17,481 additions and 1,876 deletions.
23 changes: 23 additions & 0 deletions .changeset/famous-bats-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
"@evmts/resolutions": patch
"@evmts/ts-plugin": patch
"@evmts/experimental-solc": patch
"@evmts/ethers": patch
"@evmts/unplugin": patch
"@evmts/schemas": patch
"@evmts/esbuild-plugin": patch
"@evmts/runtime": patch
"@evmts/webpack-plugin": patch
"@evmts/effect": patch
"@evmts/config": patch
"@evmts/rollup-plugin": patch
"@evmts/rspack-plugin": patch
"@evmts/core": patch
"@evmts/solc": patch
"@evmts/vite-plugin": patch
"@evmts/bun-plugin": patch
"@evmts/bundler": patch
"@evmts/vm": patch
---

Switched package manager to pnpm from bun
23 changes: 21 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ runs:
with:
bun-version: 1.0.9

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8.10.2
run_install: false

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
Expand All @@ -23,8 +29,21 @@ runs:
shell: bash
run: forge build

- name: Install node modules
run: bun install # --frozen-lockfile
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
shell: bash

- name: Derive appropriate SHAs for base and head for `nx affected` commands
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Run tests
# using node because bun nx run-many is not doing coverage correctly in ci for some reason
run: bun i && npx nx run-many --target=test:coverage
run: pnpm i && npx nx run-many --target=test:coverage
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
RPC_URL_MAINNET: ${{ secrets.RPC_URL_MAINNET }}
Expand Down
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Quick start

1. Install bun
1. Install bun

```bash
npm i bun --global && bun --version
Expand All @@ -15,7 +15,7 @@ git submodule update --init --recursive

3. Run everything

`bun all` will run everything
`bun all` will run everything

```
bun all
Expand All @@ -26,7 +26,7 @@ This includes
- linting source code
- generated docs
- building all .d.ts types for all packages
- building all cjs for all packages
- building all cjs for all packages
- running all tests
- running all dev fixtures

Expand Down Expand Up @@ -100,14 +100,14 @@ bun build:types
bun run test
```

`@evmts/config` has >99% test coverage. Run the tests with `bun run test`
`@evmts/config` has >99% test coverage. Run the tests with `bun run test`

Note `bun test` will run bun instead of [vitest](https://vitest.dev) resulting in errors


## Fixtures

Fixtures in [src/fixtures](./src/fixtures/) exist both for the vitest tests and also can be loaded in watch mode.
Fixtures in [src/fixtures](./src/fixtures/) exist both for the vitest tests and also can be loaded in watch mode.

Best way to debug a bug or implement a new feature is to first add a new fixture to use in test or dev server

Expand All @@ -134,7 +134,7 @@ Valid names include any of the folder names in [src/fixtures](./fixtures). The d
2. update your fixture
3. Load your fixture `bun fixture myNewFixture`

Now you can implement your feature or use your fixture to write a test.
Now you can implement your feature or use your fixture to write a test.

## Running linter

Expand Down Expand Up @@ -273,13 +273,13 @@ Since documentation is generated from jsdoc it is recomended to add jsdoc docume
* )
*/
export const loadConfig = (configFilePath) => {
...
...
}
```

## Generated docs

Docs are generated via the [typedoc.json](./typedoc.json)
Docs are generated via the [typedoc.json](./typedoc.json)

```
bun generate:docs
Expand All @@ -290,7 +290,7 @@ bun generate:docs
To run everything including linter and tests run `bun all`

```
bun i && bun build && bun all
pnpm i && bun build && bun all
```

Running bun all from context of repo will run all checks. It is recomended to run this before pushing your changes
Expand All @@ -304,7 +304,7 @@ cd ..
2. Run install and bun all

```
bun i && bun all
pnpm i && bun all
```

## Bun Clean
Expand All @@ -320,7 +320,7 @@ cd ..
2. Run bun clean and then fresh build and upgraded bun

```
bun upgrade && bun clean && bun i && bun all
bun upgrade && bun clean && pnpm i && bun all
```

If it's still broken for you consider opening an issue.
2 changes: 1 addition & 1 deletion apps/docs/configuration/bun.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A bun plugin for importing solidity files.
Install build dependencies

```typescript
bun install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc
pnpm install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc
```

### Setup
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/reference/bun-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A bun plugin for importing solidity files.
Install build dependencies

```typescript
bun install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc
pnpm install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc
```

### Setup
Expand Down
Binary file removed bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion bundler/bun/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
Install build dependencies

```typescript
bun install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc
pnpm install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc
```

### Setup
Expand Down
2 changes: 1 addition & 1 deletion bundler/bun/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A bun plugin for importing solidity files.
Install build dependencies

```typescript
bun install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc
pnpm install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc
```

### Setup
Expand Down
2 changes: 1 addition & 1 deletion bundler/bun/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A bun plugin for importing solidity files.
Install build dependencies

```typescript
bun install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc
pnpm install -D bun-types @evmts/bun-plugin @evmts/ts-plugin @evmts/core solc
```

### Setup
Expand Down
18 changes: 9 additions & 9 deletions bundler/config/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ bun upgrade
```

```install node modules
bun i
pnpm i
```

## Run everything
Expand Down Expand Up @@ -76,14 +76,14 @@ bun build:types
bun run test
```

`@evmts/config` has >99% test coverage. Run the tests with `bun run test`
`@evmts/config` has >99% test coverage. Run the tests with `bun run test`

Note `bun test` will run bun instead of [vitest](https://vitest.dev) resulting in errors


## Fixtures

Fixtures in [src/fixtures](./src/fixtures/) exist both for the vitest tests and also can be loaded in watch mode.
Fixtures in [src/fixtures](./src/fixtures/) exist both for the vitest tests and also can be loaded in watch mode.

Best way to debug a bug or implement a new feature is to first add a new fixture to use in test or dev server

Expand All @@ -110,7 +110,7 @@ Valid names include any of the folder names in [src/fixtures](./fixtures). The d
2. update your fixture
3. Load your fixture `bun fixture myNewFixture`

Now you can implement your feature or use your fixture to write a test.
Now you can implement your feature or use your fixture to write a test.

## Running linter

Expand Down Expand Up @@ -249,13 +249,13 @@ Since documentation is generated from jsdoc it is recomended to add jsdoc docume
* )
*/
export const loadConfig = (configFilePath) => {
...
...
}
```

## Generated docs

Docs are generated via the [typedoc.json](./typedoc.json)
Docs are generated via the [typedoc.json](./typedoc.json)

```
bun generate:docs
Expand All @@ -266,7 +266,7 @@ bun generate:docs
To run everything including linter and tests run `bun all`

```
bun i && bun build && bun all
pnpm i && bun build && bun all
```

Running bun all from context of repo will run all checks. It is recomended to run this before pushing your changes
Expand All @@ -280,7 +280,7 @@ cd ..
2. Run install and bun all

```
bun i && bun all
pnpm i && bun all
```

## Bun Clean
Expand All @@ -296,7 +296,7 @@ cd ..
2. Run bun clean and then fresh build and upgraded bun

```
bun upgrade && bun clean && bun i && bun all
bun upgrade && bun clean && pnpm i && bun all
```

If it's still broken for you consider opening an issue.
12 changes: 6 additions & 6 deletions bundler/config/docs/classes/defineConfig.DefineConfigError.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Error.cause

#### Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:24
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:24

___

Expand All @@ -93,7 +93,7 @@ Error.message

#### Defined in

node_modules/typescript/lib/lib.es5.d.ts:1068
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1068

___

Expand Down Expand Up @@ -121,7 +121,7 @@ Error.stack

#### Defined in

node_modules/typescript/lib/lib.es5.d.ts:1069
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1069

___

Expand Down Expand Up @@ -156,7 +156,7 @@ Error.prepareStackTrace

#### Defined in

node_modules/@types/node/globals.d.ts:11
node_modules/.pnpm/@types[email protected]/node_modules/@types/node/globals.d.ts:11

___

Expand All @@ -170,7 +170,7 @@ Error.stackTraceLimit

#### Defined in

node_modules/@types/node/globals.d.ts:13
node_modules/.pnpm/@types[email protected]/node_modules/@types/node/globals.d.ts:13

## Methods

Expand All @@ -197,4 +197,4 @@ Error.captureStackTrace

#### Defined in

node_modules/@types/node/globals.d.ts:4
node_modules/.pnpm/@types[email protected]/node_modules/@types/node/globals.d.ts:4
12 changes: 6 additions & 6 deletions bundler/config/docs/classes/loadConfig.LoadConfigError.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Error.cause

#### Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:24
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:24

___

Expand All @@ -93,7 +93,7 @@ Error.message

#### Defined in

node_modules/typescript/lib/lib.es5.d.ts:1068
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1068

___

Expand Down Expand Up @@ -121,7 +121,7 @@ Error.stack

#### Defined in

node_modules/typescript/lib/lib.es5.d.ts:1069
node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1069

___

Expand Down Expand Up @@ -156,7 +156,7 @@ Error.prepareStackTrace

#### Defined in

node_modules/@types/node/globals.d.ts:11
node_modules/.pnpm/@types[email protected]/node_modules/@types/node/globals.d.ts:11

___

Expand All @@ -170,7 +170,7 @@ Error.stackTraceLimit

#### Defined in

node_modules/@types/node/globals.d.ts:13
node_modules/.pnpm/@types[email protected]/node_modules/@types/node/globals.d.ts:13

## Methods

Expand All @@ -197,4 +197,4 @@ Error.captureStackTrace

#### Defined in

node_modules/@types/node/globals.d.ts:4
node_modules/.pnpm/@types[email protected]/node_modules/@types/node/globals.d.ts:4
Loading

0 comments on commit 93cab84

Please sign in to comment.