-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Esm support #435
Open
polarker
wants to merge
9
commits into
master
Choose a base branch
from
esm-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Esm support #435
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d6174c1
Add ESM support for web3
polarker dcf09c6
Add ESM support for web3-wallet
polarker ff09d14
Add ESM support for web3-test
polarker 1cd53a6
Add ESM support for cli
polarker a5e563e
Introduce umd folder
polarker 95c0196
Fix pnpm install warnings
polarker 92448af
Run pnpm build sequentially
polarker 2c0cd88
Fix tests
polarker 6d9d0fa
Fix codegen
polarker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
}, | ||
"scripts": { | ||
"clean": "rm -rf .parcel-cache && pnpm -r run clean", | ||
"build": "pnpm --stream -r run build", | ||
"build": "pnpm run --sequential -r build", | ||
"codegen": "ts-node --swc gen.ts", | ||
"test": "jest -i --config ./jest-config.json --forceExit", | ||
"lint": "eslint . --ext ts,.tsx", | ||
|
@@ -60,5 +60,9 @@ | |
"micromatch@<4.0.8": ">=4.0.8" | ||
} | ||
}, | ||
"resolutions": { | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0" | ||
}, | ||
"packageManager": "[email protected]+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca" | ||
} |
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 |
---|---|---|
|
@@ -2,6 +2,10 @@ | |
"name": "@alephium/cli", | ||
"version": "1.8.2", | ||
"description": "Alephium command line tool", | ||
"keywords": [ | ||
"alephium", | ||
"web3" | ||
], | ||
"license": "GPL", | ||
"repository": { | ||
"type": "git", | ||
|
@@ -12,15 +16,24 @@ | |
"url": "https://github.com/alephium/alephium-web3/issues" | ||
}, | ||
"author": "Alephium dev <[email protected]>", | ||
"main": "dist/index.js", | ||
"main": "dist/_cjs/index.js", | ||
"module": "dist/_esm/index.js", | ||
"types": "dist/_types/index.d.ts", | ||
"exports": { | ||
".": "./dist/index.js" | ||
".": { | ||
"types": "./dist/_types/index.d.ts", | ||
"require": "./dist/_cjs/index.js", | ||
"import": "./dist/_esm/index.js" | ||
} | ||
}, | ||
"type": "commonjs", | ||
"scripts": { | ||
"build": "rm -rf dist/* && npx tsc --build ." | ||
"build": "rm -rf dist/* && npm run build:cjs && npm run build:esm && npm run build:dts", | ||
"build:esm": "tsc --module esnext --outDir dist/_esm --declaration false --declarationMap false --sourceMap true", | ||
"build:cjs": "tsc --module commonjs --outDir dist/_cjs --declaration false --declarationMap false --sourceMap true", | ||
"build:dts": "tsc --module esnext --outDir dist/_types --declaration true --declarationMap true --sourceMap false --emitDeclarationOnly" | ||
}, | ||
"bin": "cli.js", | ||
"type": "commonjs", | ||
"dependencies": { | ||
"@alephium/web3": "workspace:^", | ||
"@alephium/web3-wallet": "workspace:^", | ||
|
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 |
---|---|---|
|
@@ -7,12 +7,6 @@ | |
"web3" | ||
], | ||
"license": "GPL", | ||
"main": "dist/src/index.js", | ||
"browser": "dist/alephium-web3.min.js", | ||
"types": "dist/src/index.d.ts", | ||
"exports": { | ||
".": "./dist/src/index.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:alephium/alephium-web3.git" | ||
|
@@ -22,11 +16,25 @@ | |
"url": "https://github.com/alephium/alephium-web3/issues" | ||
}, | ||
"author": "Alephium dev <[email protected]>", | ||
"main": "dist/_cjs/index.js", | ||
"module": "dist/_esm/index.js", | ||
"browser": "dist/alephium-web3-wallet.min.js", | ||
"types": "dist/_types/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/_types/index.d.ts", | ||
"require": "./dist/_cjs/index.js", | ||
"import": "./dist/_esm/index.js" | ||
} | ||
}, | ||
"type": "module", | ||
"scripts": { | ||
"build": "rm -rf dist/* && npx tsc --build .", | ||
"build": "rm -rf dist/* && npm run build:cjs && npm run build:esm && npm run build:dts", | ||
"build:esm": "tsc --module esnext --outDir dist/_esm --declaration false --declarationMap false --sourceMap true", | ||
"build:cjs": "tsc --module commonjs --outDir dist/_cjs --declaration false --declarationMap false --sourceMap true", | ||
"build:dts": "tsc --module esnext --outDir dist/_types --declaration true --declarationMap true --sourceMap false --emitDeclarationOnly", | ||
"test": "jest -i --config ./jest-config.json" | ||
}, | ||
"type": "commonjs", | ||
"dependencies": { | ||
"@alephium/web3": "workspace:^", | ||
"@alephium/web3-wallet": "workspace:^" | ||
|
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 |
---|---|---|
|
@@ -7,19 +7,6 @@ | |
"web3" | ||
], | ||
"license": "GPL", | ||
"main": "dist/src/index.js", | ||
"browser": "dist/alephium-web3-wallet.min.js", | ||
"types": "dist/src/index.d.ts", | ||
"exports": { | ||
"node": { | ||
"types": "./dist/src/index.d.ts", | ||
"default": "./dist/src/index.js" | ||
}, | ||
"default": { | ||
"types": "./dist/src/index.d.ts", | ||
"default": "./dist/alephium-web3-wallet.min.js" | ||
} | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:alephium/alephium-web3.git" | ||
|
@@ -29,11 +16,25 @@ | |
"url": "https://github.com/alephium/alephium-web3/issues" | ||
}, | ||
"author": "Alephium dev <[email protected]>", | ||
"main": "dist/_cjs/index.js", | ||
"module": "dist/_esm/index.js", | ||
"browser": "dist/_umd/alephium-web3-wallet.min.js", | ||
"types": "dist/_types/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/_types/index.d.ts", | ||
"require": "./dist/_cjs/index.js", | ||
"import": "./dist/_esm/index.js" | ||
} | ||
}, | ||
"type": "module", | ||
"scripts": { | ||
"build": "rm -rf dist/* && npx tsc --build . && webpack", | ||
"build": "rm -rf dist/* && npm run build:cjs && npm run build:esm && npm run build:dts && webpack", | ||
"build:esm": "tsc --module esnext --outDir dist/_esm --declaration false --declarationMap false --sourceMap true", | ||
"build:cjs": "tsc --module commonjs --outDir dist/_cjs --declaration false --declarationMap false --sourceMap true", | ||
"build:dts": "tsc --module esnext --outDir dist/_types --declaration true --declarationMap true --sourceMap false --emitDeclarationOnly", | ||
"test": "jest -i --config ./jest-config.json" | ||
}, | ||
"type": "commonjs", | ||
"dependencies": { | ||
"@alephium/web3": "workspace:^", | ||
"@noble/secp256k1": "1.7.1", | ||
|
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 |
---|---|---|
|
@@ -2,27 +2,11 @@ | |
"name": "@alephium/web3", | ||
"version": "1.8.2", | ||
"description": "A JS/TS library to interact with the Alephium platform", | ||
"keywords": [ | ||
"alephium", | ||
"web3" | ||
], | ||
"license": "GPL", | ||
"main": "dist/src/index.js", | ||
"browser": "dist/alephium-web3.min.js", | ||
"types": "dist/src/index.d.ts", | ||
"exports": { | ||
"node": { | ||
"types": "./dist/src/index.d.ts", | ||
"default": "./dist/src/index.js" | ||
}, | ||
"default": { | ||
"types": "./dist/src/index.d.ts", | ||
"default": "./dist/alephium-web3.min.js" | ||
} | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"test": [ | ||
"dist/src/test/" | ||
] | ||
} | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:alephium/alephium-web3.git" | ||
|
@@ -32,19 +16,33 @@ | |
"url": "https://github.com/alephium/alephium-web3/issues" | ||
}, | ||
"author": "Alephium dev <[email protected]>", | ||
"main": "dist/_cjs/src/index.js", | ||
"module": "dist/_esm/src/index.js", | ||
"browser": "dist/_umd/alephium-web3.min.js", | ||
"types": "dist/_types/src/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/_types/src/index.d.ts", | ||
"require": "./dist/_cjs/src/index.js", | ||
"import": "./dist/_esm/src/index.js" | ||
} | ||
}, | ||
"type": "module", | ||
"config": { | ||
"alephium_version": "3.8.1", | ||
"explorer_backend_version": "2.2.3" | ||
}, | ||
"scripts": { | ||
"build": "rm -rf dist/* && npx tsc --build . && webpack", | ||
"build": "rm -rf dist/* && npm run build:cjs && npm run build:esm && npm run build:dts && webpack", | ||
"build:esm": "tsc --module esnext --outDir dist/_esm --declaration false --declarationMap false --sourceMap true", | ||
"build:cjs": "tsc --module commonjs --outDir dist/_cjs --declaration false --declarationMap false --sourceMap true", | ||
"build:dts": "tsc --module esnext --outDir dist/_types --declaration true --declarationMap true --sourceMap false --emitDeclarationOnly", | ||
"test": "jest -i --config ./jest-config.json", | ||
"update-schemas": "npm run update-schema:alephium && npm run update-schema:explorer", | ||
"update-schema:alephium": "npx swagger-typescript-api --disable-throw-on-error -t ./configs -o ./src/api -n api-alephium.ts -p https://raw.githubusercontent.com/alephium/alephium/v${npm_package_config_alephium_version}/api/src/main/resources/openapi.json", | ||
"update-schema:explorer": "npx swagger-typescript-api --disable-throw-on-error -t ./configs -o ./src/api -n api-explorer.ts -p https://raw.githubusercontent.com/alephium/explorer-backend/v${npm_package_config_explorer_backend_version}/app/src/main/resources/explorer-backend-openapi.json", | ||
"check-versions": "node scripts/check-versions.js ${npm_package_config_alephium_version} ${npm_package_config_explorer_backend_version}" | ||
}, | ||
"type": "commonjs", | ||
"dependencies": { | ||
"@noble/secp256k1": "1.7.1", | ||
"base-x": "4.0.0", | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is the package.json of the web3-test package but web3-wallet is referenced in this line. Is this correct?
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.
Nice catch! I will fix it
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.
It's removed since there is not build for browser for this package.