diff --git a/.github/workflows/build-and-publish-pr.yml b/.github/workflows/build-and-publish-pr.yml index d03576b..c43acc0 100644 --- a/.github/workflows/build-and-publish-pr.yml +++ b/.github/workflows/build-and-publish-pr.yml @@ -21,11 +21,8 @@ jobs: - name: Install dependencies run: npm ci - - name: Run test build - run: npm run build-debug - - - name: Run build - run: npm run build + - name: Run CI + run: npm run ci - id: current-version name: Get current version diff --git a/package.json b/package.json index a134e9a..6fe4ce7 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,12 @@ ], "scripts": { "test": "jest", - "build-debug": "npm run clean && webpack --mode development", - "build": "npm run clean && tsup src/index.ts --format esm --dts", - "build:watch": "npm run clean && tsup src/index.ts --format esm --dts --watch", - "clean": "rimraf dist", - "lint": "prettier --write .", + "build": "tsup", + "build:watch": "tsup --watch", + "check-types": "tsc --noEmit", + "check-format": "prettier --check .", + "format": "prettier --write .", + "ci": "npm run check-types && npm run check-format && npm run build", "prepare": "husky install" }, "lint-staged": { @@ -45,9 +46,7 @@ "tsup": "^8.0.2", "typescript": "5.4.5", "util": "^0.12.4", - "vm-browserify": "^1.1.2", - "webpack": "^5.74.0", - "webpack-cli": "^4.10.0" + "vm-browserify": "^1.1.2" }, "repository": { "type": "git", diff --git a/src/request/types/walletMethods.ts b/src/request/types/walletMethods.ts index 875d238..cf9c596 100644 --- a/src/request/types/walletMethods.ts +++ b/src/request/types/walletMethods.ts @@ -2,7 +2,7 @@ import { MethodParamsAndResult, rpcRequestMessageSchema } from '../../types'; import * as v from 'valibot'; import { walletTypeSchema } from './common'; import { permissions } from '@secretkeylabs/xverse-core'; -import { addressSchema } from 'src/addresses'; +import { addressSchema } from '../../addresses'; /** * Permissions with the clientId field omitted and optional actions. Used for diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..82b88a4 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entryPoints: ['src/index.ts'], + format: ['cjs', 'esm'], + dts: true, + outDir: 'dist', + clean: true, +});