Skip to content

Conversation

cmwhited
Copy link
Collaborator

@cmwhited cmwhited commented Nov 8, 2024

Description

Moved to using better tsconfigs with paths, references, etc for "builds".

This came from this comment on #22.

Notes

I basically ended up copying the structure that effect uses for tsconfigs and builds. It seems to mostly work within the packages, but the apps/events is broken saying Cannot find module 'graph-framework' or its corresponding type declarations.. I could use some help with this as I am not sure what I am missing?? cc @nikgraf @fubhy (who still needs repo access). Maybe we can chat Monday on it and go through some options.

@nikgraf nikgraf force-pushed the chris.whited/feat-ts-builds branch from 7eb6b0b to 8d5bbb4 Compare November 9, 2024 11:20
@nikgraf
Copy link
Collaborator

nikgraf commented Nov 9, 2024

@fubhy is not available next week afaik

one more thing we need to fix is pnpm build since I get:

apps/server build: src/handlers/createSpace.ts(1,39): error TS2307: Cannot find module 'graph-framework-space-events' or its corresponding type declarations.
apps/server build: src/index.ts(5,39): error TS2307: Cannot find module 'graph-framework-space-events' or its corresponding type declarations.
apps/server build: src/index.ts(6,28): error TS2307: Cannot find module 'graph-framework-space-events' or its corresponding type declarations.
apps/server build: src/index.ts(36,11): error TS18046: 'data' is of type 'unknown'.
apps/server build:  ELIFECYCLE  Command failed with exit code 2.
apps/server build: Failed

export default defineConfig({
plugins: [react()],
test: {
globals: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the globals here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also suggest to not use globals.

Comment on lines +2 to 4
return JSON.parse(data, (__key, value) => {
if (typeof value === 'object' && value !== null && value.type === 'Uint8Array') {
return new Uint8Array(value.data);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤮🤮🤮🤮

Comment on lines +3 to 5
return JSON.stringify(data, (_key, value) => {
if (value instanceof Uint8Array) {
return { type: 'Uint8Array', data: Array.from(value) };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤮🤮🤮🤮

const connectWallet = async () => {
let newSigner = null;
let provider;
let provider: ethers.AbstractProvider | ethers.BrowserProvider;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use Viem instead of Ethers? https://github.com/wevm/viem
Or maybe even go as low as Ox? https://github.com/wevm/ox

export default defineConfig({
plugins: [react()],
test: {
globals: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also suggest to not use globals.

},
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll also need to remember to add the changeset patches. Otherwise every minor or patch bump of a dependent package will cause a major version increment.

@cmwhited
Copy link
Collaborator Author

Closing in favor of new tsconfig PR created by Nik

@cmwhited cmwhited closed this Nov 26, 2024
@cmwhited cmwhited deleted the chris.whited/feat-ts-builds branch January 18, 2025 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants