Skip to content

Commit

Permalink
refine sdk bundling and improve treeshaking
Browse files Browse the repository at this point in the history
  • Loading branch information
zaidarain1 committed Dec 3, 2024
1 parent 31bb9d1 commit 5d73bda
Show file tree
Hide file tree
Showing 52 changed files with 3,191 additions and 1,402 deletions.
2 changes: 1 addition & 1 deletion examples/blockchain-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@imtbl/sdk": "1.70.0"
"@imtbl/sdk": "workspace:*"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/checkout/commerce-widget-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@biom3/react": "^0.25.21",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "^1.62.0",
"@imtbl/sdk": "workspace:*",
"next": "14.2.7",
"react": "^18",
"react-dom": "^18"
Expand Down
2 changes: 1 addition & 1 deletion examples/checkout/sdk-connect-with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@biom3/react": "^0.25.21",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"next": "14.2.7",
"react": "^18",
"react-dom": "^18"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@biom3/react": "^0.25.21",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"next": "14.2.7",
"react": "^18",
"react-dom": "^18"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@biom3/react": "^0.25.21",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"next": "14.2.7",
"react": "^18",
"react-dom": "^18"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@biom3/react": "^0.25.21",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"next": "14.2.10",
"react": "^18",
"react-dom": "^18"
Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"dependencies": {
"@imtbl/contracts": "latest",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"viem": "^2.7.13"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/orderbook/create-bid-with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@biom3/react": "^0.27.10",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"ethers": "^5.7.2",
"next": "14.2.10",
"react": "^18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@biom3/react": "^0.27.10",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"ethers": "^5.7.2",
"next": "14.2.10",
"react": "^18",
Expand Down
2 changes: 1 addition & 1 deletion examples/orderbook/create-listing-with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@biom3/react": "^0.27.10",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"ethers": "^5.7.2",
"next": "14.2.7",
"react": "^18",
Expand Down
2 changes: 1 addition & 1 deletion examples/orderbook/fulfill-bid-with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@biom3/react": "^0.27.10",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"ethers": "^5.7.2",
"next": "14.2.10",
"react": "^18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@biom3/react": "^0.27.10",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"ethers": "^5.7.2",
"next": "14.2.10",
"react": "^18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@biom3/react": "^0.27.10",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"ethers": "^5.7.2",
"next": "14.2.7",
"react": "^18",
Expand Down
2 changes: 1 addition & 1 deletion examples/passport/identity-with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@examples/identity-with-nextjs",
"version": "0.1.0",
"dependencies": {
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"ethers": "^5.7.2",
"next": "14.2.5",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/passport/telegram-mini-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@biom3/design-tokens": "^0.4.4",
"@biom3/react": "^0.27.12",
"@emotion/react": "^11.11.3",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"@twa-dev/sdk": "^7.8.0",
"ethers": "^5.7.2",
"next": "14.2.5",
Expand Down
2 changes: 1 addition & 1 deletion examples/passport/wallets-connect-with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@biom3/react": "^0.27.12",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"@tanstack/react-query": "^5.51.11",
"ethers": "^5.7.2",
"next": "14.2.10",
Expand Down
2 changes: 1 addition & 1 deletion examples/passport/wallets-signing-with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@biom3/design-tokens": "^0.4.4",
"@biom3/react": "^0.27.12",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"@tanstack/react-query": "^5.51.11",
"ethers": "^5.7.2",
"next": "14.2.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@examples/wallets-transactions-with-nextjs",
"version": "0.1.0",
"dependencies": {
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"ethers": "^5.7.2",
"next": "14.2.10",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/x-to-zkevm-migration-app/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"dependencies": {
"@fastify/cors": "^8.0.0",
"@imtbl/sdk": "latest",
"@imtbl/sdk": "workspace:*",
"@types/pg": "^8.11.6",
"@types/uuid": "^9.0.8",
"fastify": "^4.27.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/x-to-zkevm-migration-app/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@biom3/react": "^0.27.25",
"@imtbl/sdk": "^1.52.0",
"@imtbl/sdk": "workspace:*",
"dotenv": "^16.4.5",
"next": "14.2.10",
"react": "^18",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"process": "^0.11.10",
"string_decoder": "^1.3.0",
"syncpack": "^13.0.0",
"tsup": "^8.2.4",
"tsup": "^8.3.5",
"typedoc": "^0.26.5",
"wsrun": "^5.2.4"
},
Expand All @@ -52,7 +52,7 @@
"build": "nx run-many -p @imtbl/sdk,@imtbl/checkout-widgets -t build",
"build:examples": "pnpm --recursive --filter '@examples/**' build",
"build:onlysdk": "NODE_OPTIONS=--max-old-space-size=14366 nx run-many --target=build --projects=@imtbl/sdk && pnpm syncpack:format",
"dev": "FORCE_COLOR=1 pnpm --filter @imtbl/sdk... --filter @imtbl/checkout-widgets... run d && pnpm --parallel --filter @imtbl/sdk... --filter @imtbl/checkout-widgets... run d --watch",
"dev": "FORCE_COLOR=1 pnpm --filter @imtbl/sdk... --filter @imtbl/checkout-widgets... run transpile && pnpm --parallel --filter @imtbl/sdk... --filter @imtbl/checkout-widgets... run transpile --watch",
"dev:test": "FORCE_COLOR=1 pnpm --stream --parallel --filter @imtbl/sdk... --filter @imtbl/checkout-widgets... run test:watch",
"docs:build": "typedoc",
"docs:serve": "http-server ./docs --cors -p 8080 -c-1",
Expand Down
30 changes: 16 additions & 14 deletions packages/blockchain-data/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,41 @@
"eslint": "^8.40.0",
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.4.3",
"tsup": "^8.2.4",
"tsup": "^8.3.5",
"typescript": "^5.6.2"
},
"exports": {
"development": {
"types": "./src/index.ts",
"browser": "./dist/index.browser.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
"browser": "./dist/browser/index.js",
"require": "./dist/node/index.cjs",
"default": "./dist/node/index.js"
},
"default": {
"types": "./dist/index.d.ts",
"browser": "./dist/index.browser.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
"types": "./dist/types/index.d.ts",
"browser": "./dist/browser/index.js",
"require": "./dist/node/index.cjs",
"default": "./dist/node/index.js"
}
},
"files": [
"dist"
],
"homepage": "https://github.com/immutable/ts-immutable-sdk#readme",
"license": "Apache-2.0",
"main": "dist/index.cjs",
"module": "dist/index.js",
"browser": "dist/index.browser.js",
"main": "dist/node/index.cjs",
"module": "dist/node/index.js",
"browser": "dist/browser/index.js",
"repository": "immutable/ts-immutable-sdk.git",
"scripts": {
"build": "tsup --config ../../../tsup.base.js && tsup --config ../../../tsup.browser.js && tsc --customConditions default --emitDeclarationOnly",
"d": "tsup --config ../../../tsup.base.js",
"build": "pnpm transpile && pnpm typegen",
"transpile": "tsup src/index.ts --config ../../../tsup.config.js",
"typegen": "tsc --customConditions default --emitDeclarationOnly --outDir dist/types",
"lint": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0",
"test": "jest",
"test:watch": "jest --watch",
"typecheck": "tsc --customConditions default --noEmit --jsx preserve"
},
"type": "module"
"type": "module",
"types": "./dist/types/index.d.ts"
}
29 changes: 15 additions & 14 deletions packages/checkout/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.4.3",
"text-encoding": "^0.7.0",
"tsup": "^8.2.4",
"tsup": "^8.3.5",
"typedoc": "^0.26.5",
"typedoc-plugin-markdown": "^4.2.3",
"typescript": "^5.6.2"
},
"exports": {
"development": {
"types": "./src/index.ts",
"browser": "./dist/index.browser.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
"browser": "./dist/browser/index.js",
"require": "./dist/node/index.cjs",
"default": "./dist/node/index.js"
},
"default": {
"types": "./dist/index.d.ts",
"browser": "./dist/index.browser.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
"types": "./dist/types/index.d.ts",
"browser": "./dist/browser/index.js",
"require": "./dist/node/index.cjs",
"default": "./dist/node/index.js"
}
},
"files": [
Expand All @@ -58,14 +58,15 @@
"immutablex"
],
"license": "Apache-2.0",
"main": "dist/index.cjs",
"module": "dist/index.js",
"browser": "dist/index.browser.js",
"main": "dist/node/index.cjs",
"module": "dist/node/index.js",
"browser": "dist/browser/index.js",
"repository": "immutable/ts-immutable-sdk.git",
"scripts": {
"build": "tsup --config ./tsup.config.js && tsup --config ./tsup.browser.js && tsc --customConditions default --emitDeclarationOnly",
"build": "pnpm transpile && pnpm typegen",
"transpile": "tsup src/index.ts --config ./tsup.config.js",
"typegen": "tsc --customConditions default --emitDeclarationOnly --outDir dist/types",
"build:dev": "CHECKOUT_DEV_MODE=true pnpm build",
"d": "tsup --config ./tsup.config.js",
"docs": "typedoc --plugin typedoc-plugin-markdown --skipErrorChecking --disableSources --out docs src/index.ts",
"lint": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0",
"lint:fix": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0 --fix",
Expand All @@ -78,5 +79,5 @@
},
"source": "src/index.ts",
"type": "module",
"types": "dist/index.d.ts"
"types": "./dist/types/index.d.ts"
}
27 changes: 0 additions & 27 deletions packages/checkout/sdk/tsup.browser.js

This file was deleted.

Loading

0 comments on commit 5d73bda

Please sign in to comment.