Skip to content

Commit 59be482

Browse files
committed
setup @thirdweb-dev/nexus package
1 parent 6c318f8 commit 59be482

24 files changed

+3238
-1446
lines changed

.changeset/neat-squids-go.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/nexus": minor
3+
---
4+
5+
initial release

.changeset/witty-spies-know.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
expose some useful erc20 extensions

.github/workflows/CI.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,16 @@ jobs:
188188
- name: Build Packages
189189
run: pnpm build
190190

191-
- name: Report bundle size
191+
- name: Report bundle size (thirdweb)
192192
uses: andresz1/size-limit-action@94bc357df29c36c8f8d50ea497c3e225c3c95d1d # v1.8.0
193193
with:
194194
github_token: ${{ secrets.GITHUB_TOKEN }}
195195
package_manager: pnpm
196-
directory: packages/thirdweb
196+
directory: packages/thirdweb
197+
198+
- name: Report bundle size (nexus)
199+
uses: andresz1/size-limit-action@94bc357df29c36c8f8d50ea497c3e225c3c95d1d # v1.8.0
200+
with:
201+
github_token: ${{ secrets.GITHUB_TOKEN }}
202+
package_manager: pnpm
203+
directory: packages/nexus

packages/nexus/.size-limit.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[
2+
{
3+
"import": "*",
4+
"limit": "110 kB",
5+
"name": "@thirdweb-dev/nexus (esm)",
6+
"path": "./dist/esm/exports/nexus.js"
7+
},
8+
{
9+
"limit": "350 kB",
10+
"name": "@thirdweb-dev/nexus (cjs)",
11+
"path": "./dist/cjs/exports/nexus.js"
12+
}
13+
]

packages/nexus/biome.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
3+
"extends": "//",
4+
"overrides": [
5+
{
6+
"assist": {
7+
"actions": {
8+
"source": {
9+
"useSortedKeys": "off"
10+
}
11+
}
12+
},
13+
"includes": ["package.json"]
14+
}
15+
]
16+
}

packages/nexus/knip.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@5/schema.json",
3+
"entry": ["src/exports/**"],
4+
"ignore": ["src/**/__generated__/**", "**/*.bench.ts"],
5+
"ignoreBinaries": ["printf"],
6+
"ignoreDependencies": ["tslib"],
7+
"project": ["src/**/*.{ts,tsx}"],
8+
"rules": {
9+
"enumMembers": "off",
10+
"optionalPeerDependencies": "off"
11+
}
12+
}

packages/nexus/package.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"author": "thirdweb eng <[email protected]>",
3+
"browser": {
4+
"crypto": false
5+
},
6+
"bugs": {
7+
"url": "https://github.com/thirdweb-dev/js/issues"
8+
},
9+
"dependencies": {
10+
"x402": "0.7.0",
11+
"zod": "3.25.75"
12+
},
13+
"devDependencies": {
14+
"@biomejs/biome": "2.0.6",
15+
"@size-limit/preset-small-lib": "11.2.0",
16+
"knip": "5.60.2",
17+
"rimraf": "6.0.1",
18+
"size-limit": "11.2.0",
19+
"typescript": "5.8.3"
20+
},
21+
"engines": {
22+
"node": ">=22"
23+
},
24+
"exports": {
25+
".": {
26+
"types": "./dist/types/exports/nexus.d.ts",
27+
"import": "./dist/esm/exports/nexus.js",
28+
"default": "./dist/cjs/exports/nexus.js"
29+
}
30+
},
31+
"files": [
32+
"dist/*",
33+
"src/*",
34+
"!**/*.tsbuildinfo",
35+
"!**/*.test.ts",
36+
"!**/*.test.tsx",
37+
"!**/*.test.ts.snap",
38+
"!**/*.test-d.ts",
39+
"!**/*.bench.ts",
40+
"!tsconfig.build.json"
41+
],
42+
"license": "Apache-2.0",
43+
"main": "./dist/cjs/exports/nexus.js",
44+
"module": "./dist/esm/exports/nexus.js",
45+
"name": "@thirdweb-dev/nexus",
46+
"peerDependencies": {
47+
"typescript": ">=5.0.4"
48+
},
49+
"peerDependenciesMeta": {
50+
"typescript": {
51+
"optional": true
52+
}
53+
},
54+
"repository": {
55+
"type": "git",
56+
"url": "git+https://github.com/thirdweb-dev/js.git#main"
57+
},
58+
"scripts": {
59+
"build": "pnpm clean && pnpm build:types && pnpm build:cjs && pnpm build:esm",
60+
"build:cjs": "tsc --noCheck --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json",
61+
"build:esm": "tsc --noCheck --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json",
62+
"build:types": "tsc --project ./tsconfig.build.json --module nodenext --moduleResolution nodenext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
63+
"clean": "rimraf dist",
64+
"dev": "tsc --project ./tsconfig.build.json --module nodenext --moduleResolution nodenext --outDir ./dist/esm --watch",
65+
"dev:cjs": "printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json && tsc --noCheck --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false --watch",
66+
"dev:esm": "printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json && tsc --noCheck --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm --watch",
67+
"fix": "biome check ./src --fix",
68+
"format": "biome format ./src --write",
69+
"knip": "knip",
70+
"lint": "knip && biome check ./src && tsc --project ./tsconfig.build.json --module nodenext --moduleResolution nodenext --noEmit",
71+
"size": "size-limit",
72+
"typecheck": "tsc --project ./tsconfig.build.json --module nodenext --moduleResolution nodenext --noEmit"
73+
},
74+
"sideEffects": false,
75+
"type": "module",
76+
"types": "./dist/types/exports/nexus.d.ts",
77+
"typings": "./dist/types/exports/nexus.d.ts",
78+
"version": "0.0.0"
79+
}

0 commit comments

Comments
 (0)