Skip to content
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

Fix exports, treeshaking, and connect-node/web for react-hooks #7

Merged
merged 12 commits into from
Oct 27, 2023
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
Loading