-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ chore: Refactor bundler into smaller packages (#598)
## Description Break up bundler into smaller packages so it can build more incrementally and be easier to navigate. Bundler is currently the biggest package and the only package I struggle finding stuff in. - [x] keep bundler specific code in @evmts/bundler - [x] move runtime generation code to @evmts/runtime - [x] move solc compiler code and solidity resolution code to @evmts/solc - [ ] move unplugin to a seperate package from bundler ## 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
1 parent
fda19bf
commit b610ae3
Showing
122 changed files
with
2,285 additions
and
790 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export { esbuildPluginEvmts } from '@evmts/bundler' | ||
import { createUnplugin, evmtsUnplugin } from '@evmts/unplugin' | ||
|
||
export const { esbuild: esbuildPluginEvmts } = createUnplugin(evmtsUnplugin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export { rollupPluginEvmts } from '@evmts/bundler' | ||
import { createUnplugin, evmtsUnplugin } from '@evmts/unplugin' | ||
|
||
export const { rollup: rollupPluginEvmts } = createUnplugin(evmtsUnplugin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export { rspackPluginEvmts } from '@evmts/bundler' | ||
import { createUnplugin, evmtsUnplugin } from '@evmts/unplugin' | ||
|
||
export const { rspack: rspackPluginEvmts } = createUnplugin(evmtsUnplugin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.env | ||
|
||
cache | ||
forge-artifacts | ||
broadcast | ||
types | ||
|
||
# compiled output | ||
dist | ||
packages/*/dist | ||
tmp | ||
/out-tsc | ||
**/tsconfig.tsbuildinfo | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
**/lcov.info | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
testem.log | ||
/typings | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# My personal files | ||
.zshrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(The MIT License) | ||
|
||
Copyright 2020-2022 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<p align="center"> | ||
<a href="https://evmts.dev/"> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/35039927/218812217-92f0f784-cb85-43b9-9ca6-e2b9effd9eb2.png"> | ||
<img alt="wagmi logo" src="https://user-images.githubusercontent.com/35039927/218812217-92f0f784-cb85-43b9-9ca6-e2b9effd9eb2.png" width="auto" height="300"> | ||
</picture> | ||
</a> | ||
</p> | ||
|
||
<p align="center"> | ||
Execute solidity scripts in browser | ||
</p> | ||
|
||
[![CI](https://github.com/evmts/evmts-monorepo/actions/workflows/e2e.yml/badge.svg)](https://github.com/evmts/evmts-monorepo/actions/workflows/e2e.yml) | ||
[![CI](https://github.com/evmts/evmts-monorepo/actions/workflows/unit.yml/badge.svg)](https://github.com/evmts/evmts-monorepo/actions/workflows/unit.yml) | ||
<a href="https://www.npmjs.com/package/@evmts/core" target="\_parent"> | ||
<img alt="" src="https://img.shields.io/npm/dm/@evmts/core.svg" /> | ||
</a> | ||
<a href="https://bundlephobia.com/package/@evmts/core@latest" target="\_parent"> | ||
<img alt="" src="https://badgen.net/bundlephobia/minzip/@evmts/core" /> | ||
</a> | ||
|
||
# @evmts/unplugin | ||
|
||
[unplugin](https://github.com/unjs/unplugin) plugin for EVMts. Unplugin allows us to build a rollup plugin once and reuse it for many different bundlers. | ||
|
||
Used in following packages | ||
|
||
- [@evmts/esbuild](https://github.com/evmts/evmts-monorepo/tree/main/bundlers/esbuild) | ||
- [@evmts/rollup](https://github.com/evmts/evmts-monorepo/tree/main/bundlers/rollup) | ||
- [@evmts/rspack](https://github.com/evmts/evmts-monorepo/tree/main/bundlers/rspack) | ||
- [@evmts/vite](https://github.com/evmts/evmts-monorepo/tree/main/bundlers/vite) | ||
- [@evmts/webpack](https://github.com/evmts/evmts-monorepo/tree/main/bundlers/webpack) | ||
|
||
## License 📄 | ||
|
||
<a href="./LICENSE"><img src="https://user-images.githubusercontent.com/35039927/231030761-66f5ce58-a4e9-4695-b1fe-255b1bceac92.png" width="200" /></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"name": "@evmts/unplugin", | ||
"version": "0.11.2", | ||
"private": false, | ||
"description": "Internal unplugin for Evmts", | ||
"keywords": [ | ||
"solidity", | ||
"forge", | ||
"foundry", | ||
"sol", | ||
"typescript", | ||
"web3", | ||
"blockchain" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/evmts/evmts-monorepo.git", | ||
"directory": "bundlers/unplugin" | ||
}, | ||
"license": "MIT", | ||
"contributors": ["Will Cory <[email protected]>"], | ||
"type": "module", | ||
"main": "dist/index.cjs", | ||
"module": "src/index.js", | ||
"types": "types/src/index.d.ts", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"import": "./src/index.js", | ||
"require": "./dist/index.cjs", | ||
"types": "./types/src/index.d.ts", | ||
"default": "./dist/index.cjs" | ||
} | ||
}, | ||
"files": ["dist", "types", "src"], | ||
"scripts": { | ||
"build": "nx run-many --targets=build:dist,build:types --projects=@evmts/unplugin ", | ||
"build:dist": "bun run tsup", | ||
"build:types": "bun run tsc --emitDeclarationOnly", | ||
"clean": "rm -rf node_modules && rm -rf artifacts && rm -rf dist && rm -rf cache", | ||
"format": "rome format . --write", | ||
"format:check": "rome format .", | ||
"generate:docs": "bun run typedoc", | ||
"lint": "rome check . --apply-unsafe", | ||
"lint:check": "rome check . --verbose", | ||
"test": "vitest --coverage", | ||
"test:coverage": "vitest run --coverage", | ||
"test:run": "vitest run", | ||
"test:ui": "vitest --ui" | ||
}, | ||
"dependencies": { | ||
"@evmts/config": "workspace:^", | ||
"@evmts/runtime": "workspace:^", | ||
"@evmts/solc": "workspace:^", | ||
"@evmts/tsconfig": "workspace:^", | ||
"@types/node": "^20.7.2", | ||
"@types/resolve": "^1.20.3", | ||
"effect": "2.0.0-next.50", | ||
"glob": "^10.3.10", | ||
"resolve": "^1.22.6", | ||
"solidity-ast": "^0.4.52", | ||
"unplugin": "^1.5.0" | ||
}, | ||
"devDependencies": { | ||
"@vitest/coverage-v8": "^0.34.6", | ||
"@vitest/ui": "^0.34.6", | ||
"@evmts/core": "workspace:^", | ||
"@evmts/bundler": "workspace:^", | ||
"abitype": "^0.9.8", | ||
"rome": "^12.1.3", | ||
"solc": "0.8.21", | ||
"tsup": "^7.2.0", | ||
"typedoc": "^0.25.2", | ||
"typedoc-plugin-markdown": "^3.16.0", | ||
"typescript": "^5.2.2", | ||
"vitest": "^0.34.6", | ||
"wagmi": "^1.4.2", | ||
"zod": "^3.22.2" | ||
}, | ||
"peerDependencies": { | ||
"solc": ">0.8.10" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
Oops, something went wrong.
b610ae3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
evmts-docs – ./
evmts-docs-evmts.vercel.app
evmts.dev
evmts-docs-git-main-evmts.vercel.app