Skip to content

Commit

Permalink
♻️ chore: Migrate resolutions to Effect (#615)
Browse files Browse the repository at this point in the history
## Description

Migrate resolutions to using effect.ts
Replace solc mocked test with real fixture test

## Testing

Replace solc mocked test with real fixture test in
@evmts/solc/src/compiler

## 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 Oct 29, 2023
1 parent 2984f96 commit 7407776
Show file tree
Hide file tree
Showing 111 changed files with 8,051 additions and 3,092 deletions.
4 changes: 2 additions & 2 deletions blockexplorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
"typecheck": "bun run tsc --noEmit"
},
"dependencies": {
"@effect/schema": "^0.45.5",
"@effect/schema": "^0.46.2",
"@evmts/schemas": "workspace:^",
"effect": "2.0.0-next.50"
"effect": "^2.0.0-next.52"
},
"devDependencies": {
"@evmts/tsconfig": "workspace:^",
Expand Down
Binary file modified bun.lockb
Binary file not shown.
28 changes: 20 additions & 8 deletions bundlers/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@
"version": "0.11.2",
"private": false,
"description": "A bun plugin for evmts",
"contributors": ["Will Cory <[email protected]>"],
"keywords": ["bun", "plugin", "solidity", "sol", "evmts"],
"keywords": [
"bun",
"plugin",
"solidity",
"sol",
"evmts"
],
"repository": {
"type": "git",
"url": "https://github.com/evmts/evmts-monorepo.git",
"directory": "packages/plugin"
},
"license": "MIT",
"contributors": [
"Will Cory <[email protected]>"
],
"type": "module",
"main": "dist/index.cjs",
"module": "src/index.js",
"types": "types/index.d.ts",
"exports": {
".": {
"import": "./src/index.js",
Expand All @@ -24,15 +29,22 @@
},
"./package.json": "./package.json"
},
"files": ["dist", "src", "types"],
"main": "dist/index.cjs",
"module": "src/index.js",
"types": "types/index.d.ts",
"files": [
"dist",
"src",
"types"
],
"scripts": {
"build": "nx run-many --targets=build:dist,build:types --projects=@evmts/bun-plugin ",
"build:dist": "bun run tsup",
"build:types": "bun run tsc --emitDeclarationOnly --declaration --declarationMap",
"clean": "rm -rf node_modules && rm -rf artifacts && rm -rf dist && rm -rf cache",
"generate:docs": "bun run typedoc",
"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",
Expand All @@ -43,7 +55,7 @@
"dependencies": {
"@evmts/bundler": "workspace:^",
"@evmts/config": "workspace:^",
"effect": "^2.0.0-next.50"
"effect": "^2.0.0-next.52"
},
"devDependencies": {
"@evmts/core": "workspace:^",
Expand Down
20 changes: 13 additions & 7 deletions bundlers/bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
"directory": "bundlers/bundler"
},
"license": "MIT",
"contributors": ["Will Cory <[email protected]>"],
"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",
".": {
Expand All @@ -32,7 +31,14 @@
"default": "./dist/index.cjs"
}
},
"files": ["dist", "types", "src"],
"main": "dist/index.cjs",
"module": "src/index.js",
"types": "types/src/index.d.ts",
"files": [
"dist",
"types",
"src"
],
"scripts": {
"build": "nx run-many --targets=build:dist,build:types --projects=@evmts/bundler ",
"build:dist": "bun run tsup",
Expand All @@ -55,16 +61,16 @@
"@evmts/tsconfig": "workspace:^",
"@types/node": "^20.7.2",
"@types/resolve": "^1.20.3",
"effect": "2.0.0-next.50",
"effect": "^2.0.0-next.52",
"glob": "^10.3.10",
"resolve": "^1.22.6",
"solidity-ast": "^0.4.52",
"unplugin": "^1.5.0"
},
"devDependencies": {
"@evmts/core": "workspace:^",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/ui": "^0.34.6",
"@evmts/core": "workspace:^",
"abitype": "^0.9.8",
"rome": "^12.1.3",
"solc": "0.8.21",
Expand Down
97 changes: 0 additions & 97 deletions bundlers/bundler/src/bundler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ contract TestContract {}`,
code: `import { TestContract } from 'module2'
contract TestContract {}`,
importedIds: ['module2'],
resolutions: [
{
id: 'id',
rawCode: 'contract TestContract2 {}',
code: 'contract TestContract2 {}',
importedIds: ['module2'],
resolutions: [],
},
],
},
}

Expand Down Expand Up @@ -314,17 +305,6 @@ describe(bundler.name, () => {
],
"rawCode": "import { TestContract } from 'module2'
contract TestContract {}",
"resolutions": [
{
"code": "contract TestContract2 {}",
"id": "id",
"importedIds": [
"module2",
],
"rawCode": "contract TestContract2 {}",
"resolutions": [],
},
],
},
},
"solcInput": undefined,
Expand Down Expand Up @@ -399,17 +379,6 @@ describe(bundler.name, () => {
],
"rawCode": "import { TestContract } from 'module2'
contract TestContract {}",
"resolutions": [
{
"code": "contract TestContract2 {}",
"id": "id",
"importedIds": [
"module2",
],
"rawCode": "contract TestContract2 {}",
"resolutions": [],
},
],
},
},
"solcInput": {
Expand Down Expand Up @@ -490,17 +459,6 @@ describe(bundler.name, () => {
],
"rawCode": "import { TestContract } from 'module2'
contract TestContract {}",
"resolutions": [
{
"code": "contract TestContract2 {}",
"id": "id",
"importedIds": [
"module2",
],
"rawCode": "contract TestContract2 {}",
"resolutions": [],
},
],
},
},
"solcInput": {
Expand Down Expand Up @@ -581,17 +539,6 @@ describe(bundler.name, () => {
],
"rawCode": "import { TestContract } from 'module2'
contract TestContract {}",
"resolutions": [
{
"code": "contract TestContract2 {}",
"id": "id",
"importedIds": [
"module2",
],
"rawCode": "contract TestContract2 {}",
"resolutions": [],
},
],
},
},
"solcInput": {
Expand Down Expand Up @@ -672,17 +619,6 @@ describe(bundler.name, () => {
],
"rawCode": "import { TestContract } from 'module2'
contract TestContract {}",
"resolutions": [
{
"code": "contract TestContract2 {}",
"id": "id",
"importedIds": [
"module2",
],
"rawCode": "contract TestContract2 {}",
"resolutions": [],
},
],
},
},
"solcInput": {
Expand Down Expand Up @@ -763,17 +699,6 @@ describe(bundler.name, () => {
],
"rawCode": "import { TestContract } from 'module2'
contract TestContract {}",
"resolutions": [
{
"code": "contract TestContract2 {}",
"id": "id",
"importedIds": [
"module2",
],
"rawCode": "contract TestContract2 {}",
"resolutions": [],
},
],
},
},
"solcInput": {
Expand Down Expand Up @@ -854,17 +779,6 @@ describe(bundler.name, () => {
],
"rawCode": "import { TestContract } from 'module2'
contract TestContract {}",
"resolutions": [
{
"code": "contract TestContract2 {}",
"id": "id",
"importedIds": [
"module2",
],
"rawCode": "contract TestContract2 {}",
"resolutions": [],
},
],
},
},
"solcInput": {
Expand Down Expand Up @@ -945,17 +859,6 @@ describe(bundler.name, () => {
],
"rawCode": "import { TestContract } from 'module2'
contract TestContract {}",
"resolutions": [
{
"code": "contract TestContract2 {}",
"id": "id",
"importedIds": [
"module2",
],
"rawCode": "contract TestContract2 {}",
"resolutions": [],
},
],
},
},
"solcInput": {
Expand Down
30 changes: 21 additions & 9 deletions bundlers/esbuild/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
{
"name": "@evmts/esbuild-plugin",
"version": "0.11.2",
"contributors": ["Will Cory <[email protected]>"],
"private": false,
"description": "A esbuild plugin for evmts",
"keywords": ["esbuild", "plugin", "solidity", "sol", "evmts"],
"keywords": [
"esbuild",
"plugin",
"solidity",
"sol",
"evmts"
],
"repository": {
"type": "git",
"url": "https://github.com/evmts/evmts-monorepo.git",
"directory": "plugins/esbuild-plugin"
},
"license": "MIT",
"contributors": [
"Will Cory <[email protected]>"
],
"type": "module",
"main": "dist/index.cjs",
"module": "src/index.js",
"types": "types/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
Expand All @@ -24,7 +29,14 @@
"default": "./dist/index.cjs"
}
},
"files": ["dist", "types", "src"],
"main": "dist/index.cjs",
"module": "src/index.js",
"types": "types/index.d.ts",
"files": [
"dist",
"types",
"src"
],
"scripts": {
"build": "nx run-many --targets=build:dist,build:types --projects=@evmts/@evmts/esbuild-plugin ",
"build:dist": "bun run tsup",
Expand All @@ -36,8 +48,8 @@
"lint": "rome check . --apply-unsafe",
"lint:check": "rome check . --verbose",
"test": "vitest --coverage",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
"test:run": "vitest run",
"test:ui": "vitest --ui"
},
"dependencies": {
Expand All @@ -47,10 +59,10 @@
"@evmts/tsconfig": "workspace:^",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/ui": "^0.34.6",
"typedoc": "^0.25.2",
"typedoc-plugin-markdown": "^3.16.0",
"rome": "^12.1.3",
"tsup": "^7.2.0",
"typedoc": "^0.25.2",
"typedoc-plugin-markdown": "^3.16.0",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
},
Expand Down
Loading

1 comment on commit 7407776

@vercel
Copy link

@vercel vercel bot commented on 7407776 Oct 29, 2023

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-git-main-evmts.vercel.app
evmts.dev
evmts-docs-evmts.vercel.app

Please sign in to comment.