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

properly output esm #1331

Merged
merged 3 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .changeset/funny-schools-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'@penumbra-zone/transport-chrome': minor
'@penumbra-zone/transport-dom': minor
'@penumbra-zone/perspective': minor
'@penumbra-zone/protobuf': minor
'@penumbra-zone/services': minor
'@repo/tsconfig': minor
'@penumbra-zone/bech32m': minor
'@penumbra-zone/getters': minor
'@penumbra-zone/storage': minor
'@penumbra-zone/client': minor
'@penumbra-zone/crypto-web': minor
'@penumbra-zone/query': minor
'@penumbra-zone/types': minor
'@penumbra-zone/wasm': minor
---

properly build esm relative paths
2 changes: 1 addition & 1 deletion .changeset/poor-rabbits-deny.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'minifront': minor
'@penumbra-zone/ui': minor
'@repo/ui': minor
---

UI: add `compact` prop to render a minimalistic version of the AccountSwitcher component.
Expand Down
6 changes: 6 additions & 0 deletions buf-replacer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
exports.default = function ({ orig }) {
if (orig.startsWith("from '@buf/") && !orig.endsWith(".js'")) {
return orig.slice(0, -1) + ".js'";
}
return orig;
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"syncpack": "^12.3.2",
"tailwindcss": "^3.4.3",
"tailwindcss-animate": "^1.0.7",
"tsc-alias": "^1.8.10",
"turbo": "^1.13.3",
"typescript": "5.5.1-rc",
"vite": "^5.2.11",
Expand Down
4 changes: 2 additions & 2 deletions packages/bech32m/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"clean": "rm -rfv dist package penumbra-zone-*.tgz tsconfig.tsbuildinfo",
turbocrime marked this conversation as resolved.
Show resolved Hide resolved
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-*.tgz",
"lint": "tsc --noEmit && eslint src",
"test": "vitest run"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"clean": "rm -rfv dist package penumbra-zone-*.tgz tsconfig.tsbuildinfo",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-*.tgz",
"lint": "eslint src"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"clean": "rm -rfv dist package penumbra-zone-*.tgz tsconfig.tsbuildinfo",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-*.tgz",
"lint": "eslint src",
"test": "vitest run"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/getters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"clean": "rm -rfv dist package penumbra-zone-*.tgz tsconfig.tsbuildinfo",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-*.tgz",
"lint": "eslint src",
"test": "vitest run"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/perspective/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"clean": "rm -rfv dist package penumbra-zone-*.tgz tsconfig.tsbuildinfo",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-*.tgz",
"lint": "eslint src",
"test": "vitest run"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/protobuf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"clean": "rm -rfv dist package penumbra-zone-*.tgz tsconfig.tsbuildinfo",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-*.tgz",
"lint": "eslint src"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"clean": "rm -rfv dist package penumbra-zone-*.tgz tsconfig.tsbuildinfo",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-*.tgz",
"lint": "eslint src",
"test": "vitest run"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"clean": "rm -rfv dist package penumbra-zone-*.tgz tsconfig.tsbuildinfo",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-*.tgz",
"lint": "eslint src",
"test": "vitest run"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-transport-dom-*.tgz",
"lint": "eslint src",
"test": "vitest run"
Expand Down
2 changes: 1 addition & 1 deletion packages/transport-chrome/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-transport-dom-*.tgz",
"lint": "eslint src",
"test": "vitest run"
Expand Down
2 changes: 1 addition & 1 deletion packages/transport-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-transport-dom-*.tgz",
"lint": "eslint src",
"test": "vitest run"
Expand Down
10 changes: 10 additions & 0 deletions packages/tsconfig/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,15 @@
"resolveJsonModule": true,
"target": "ESNext",
"module": "ES2022"
},
"tsc-alias": {
"verbose": true,
"resolveFullPaths": true,
"replacers": {
"buf-js": {
"enabled": true,
"file": "../../buf-replacer.js"
}
}
}
}
4 changes: 2 additions & 2 deletions packages/tsconfig/vite.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"display": "Vite",
"extends": "./base.json",
"compilerOptions": {
"noEmit": true,
"jsx": "react-jsx",
"lib": ["ESNext", "DOM", "DOM.Iterable", "DOM.AsyncIterable"],
"noEmit": true
"lib": ["ESNext", "DOM", "DOM.Iterable", "DOM.AsyncIterable"]
}
}
4 changes: 2 additions & 2 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"clean": "rm -rfv dist package penumbra-zone-*.tgz tsconfig.tsbuildinfo",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist package penumbra-zone-*.tgz",
"lint": "eslint src",
"test": "vitest run"
},
Expand Down
11 changes: 2 additions & 9 deletions packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
{
"extends": "@repo/tsconfig/base.json",
"include": ["components", "lib", "tests-setup.ts"],
"compilerOptions": {
"noEmit": true,
"declarationMap": false,
"declaration": false,
"sourceMap": false,
"jsx": "react-jsx"
}
"extends": "@repo/tsconfig/vite.json",
"include": ["components", "lib", "tests-setup.ts"]
}
2 changes: 1 addition & 1 deletion packages/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"node": ">=22"
},
"scripts": {
"build": "tsc --build",
"build": "tsc --build && tsc-alias",
"clean": "rm -rfv dist wasm package penumbra-zone-wasm-*.tgz",
"clean:rust": "cargo clean --manifest-path ./crate/Cargo.toml",
"compile": "cd crate && wasm-pack build --no-pack --target bundler --out-name index --out-dir ../wasm",
Expand Down
44 changes: 43 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading