Skip to content

Commit

Permalink
Merge pull request #7 from valorem-labs-inc/fix-exports-treeshake
Browse files Browse the repository at this point in the history
Fix exports, treeshaking, and connect-node/web for react-hooks
  • Loading branch information
0xAlcibiades authored Oct 27, 2023
2 parents e411770 + 0dca1fc commit 6052c2e
Show file tree
Hide file tree
Showing 44 changed files with 844 additions and 558 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = {
},
ignorePatterns: [
'*.config.*',
'tsup*',
'node_modules',
'dist',
'build',
Expand Down
7 changes: 2 additions & 5 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
version: v1
plugins:
- plugin: es
opt: target=ts+js+dts # ,import_extension=none
opt: target=ts+js+dts
out: src/lib/codegen
- plugin: connect-es
opt: target=ts+js+dts # ,import_extension=none
out: src/lib/codegen
- name: connect-query
opt: target=ts+js+dts # ,import_extension=none
opt: target=ts+js+dts
out: src/lib/codegen
28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@valorem-labs-inc/sdk",
"version": "0.0.1",
"version": "0.0.2-alpha.0",
"repository": {
"type": "git",
"url": "https://github.com/valorem-labs-inc/typescript-sdk.git"
Expand All @@ -10,40 +10,44 @@
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"types": "./dist/_esm/index.d.ts",
"import": "./dist/_esm/index.js",
"default": "./dist/_cjs/index.js"
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "./dist/_cjs/index.js",
"module": "./dist/_esm/index.js",
"types": "./dist/_esm/index.d.ts",
"typings": "./dist/_esm/index.d.ts",
"files": [
"/dist"
"./dist"
],
"scripts": {
"build": "pnpm clean && pnpm codegen && pnpm tsup",
"build": "pnpm clean && pnpm codegen && pnpm build:cjs && pnpm build:esm",
"build:cjs": "pnpm tsup --config tsup.cjs.ts",
"build:esm": "pnpm tsup --config tsup.esm.ts",
"clean": "rm -rf ./dist",
"codegen": "rm -rf ./src/lib/codegen && npx buf generate",
"format": "prettier --write \"**/*.{ts,tsx,md,json}\"",
"gen-docs": "typedoc",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prepare": "git submodule update --init --recursive",
"prepublish": "pnpm build",
"test": "vitest run --coverage"
},
"prettier": "@vercel/style-guide/prettier",
"dependencies": {
"@bufbuild/buf": "^1.27.0",
"@bufbuild/protobuf": "^1.3.3",
"@bufbuild/protobuf": "^1.4.0",
"@connectrpc/connect": "^1.1.2",
"@connectrpc/connect-node": "^1.1.2",
"@wagmi/core": "^1.4.4"
},
"devDependencies": {
"@bufbuild/protoc-gen-es": "^1.3.3",
"@bufbuild/protoc-gen-es": "^1.4.0",
"@connectrpc/connect-node": "^1.1.2",
"@connectrpc/connect-web": "^1.1.2",
"@connectrpc/protoc-gen-connect-es": "^1.1.2",
"@connectrpc/protoc-gen-connect-query": "^0.5.3",
"@types/node": "^20.8.7",
"@vercel/style-guide": "^5.0.1",
"@vitest/coverage-v8": "^0.34.6",
Expand Down
Loading

0 comments on commit 6052c2e

Please sign in to comment.