Skip to content

Conversation

cmwhited
Copy link
Collaborator

Description

This PR involves a few quality of life improvements after the tsconfig fixes in #55, #57.

  • created a test directory in each package and moved all *.test.ts files out of src and into the test directories
  • created a tsconfig.test.json for these test files
  • installed the @effect/build-utils pkg for running builds
  • added an MIT LICENSE file and created a README (where missing)
  • updated the build script for each package
    • @nikgraf @fubhy note here, I did not add the cjs build. figured we could add that later when/if we want

Resolves #56

@cmwhited cmwhited requested review from fubhy and nikgraf November 28, 2024 16:47
Copy link
Collaborator

@nikgraf nikgraf left a comment

Choose a reason for hiding this comment

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

looks great! 👍

Comment on lines +17 to +40
"./utils": {
"default": "./build/esm/exports/utils.js",
"types": "./build/dts/exports/utils.d.ts"
},
"./schema": {
"default": "./build/esm/exports/schema.js",
"types": "./build/dts/exports/schema.d.ts"
},
"./identity": {
"default": "./build/esm/exports/identity.js",
"types": "./build/dts/exports/identity.d.ts"
},
"./space-events": {
"default": "./build/esm/exports/space-events.js",
"types": "./build/dts/exports/space-events.d.ts"
},
"./key": {
"default": "./build/esm/exports/key.js",
"types": "./build/dts/exports/key.d.ts"
},
"./messages": {
"default": "./build/esm/exports/messages.js",
"types": "./build/dts/exports/messages.d.ts"
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't have to keep this, I just moved the reexports into src/exports/{pkg}. That way, the compiled code has these sub-directories, and we can then import from those directly.
Example:

import { generateId  } from '@graphprotocol/graph-framework/utils'

I think this aligns with what Yaniv was suggesting in our last WG call.

@cmwhited cmwhited merged commit 1567ede into main Nov 29, 2024
1 check passed
@cmwhited cmwhited deleted the chris.whited/feat-extract-test-files branch November 29, 2024 14:13
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.

Improve build setup

3 participants