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

chore: fix up TS generation and build for npm package [4/6] #80

Merged
merged 9 commits into from
Aug 1, 2023

Conversation

gmaclennan
Copy link
Member

@gmaclennan gmaclennan commented Jul 27, 2023

Needed to jump through a few hoops to make Typescript happy:

  • Uses the rootDirs option so that the src and generated folders appear as merged to Typescript, so that you can import generated code from code in src as if it was in the same folder.
  • Needed to output compiled Typescript into an intermediate folder, and then merge with a separate build step (limitation of Typescript)

This also specifies to only include the dist folder in the npm package, and changes the script to build everything from prepublishOnly to prepack.

@gmaclennan gmaclennan linked an issue Jul 27, 2023 that may be closed by this pull request
@gmaclennan gmaclennan changed the title chore: fix up TS generation and build for npm package chore: fix up TS generation and build for npm package [4/6] Jul 28, 2023
@tomasciccola tomasciccola merged commit 5ab4c6d into feat/encode-type-safety Aug 1, 2023
gmaclennan added a commit that referenced this pull request Aug 1, 2023
* update build steps for ESM compatibility & cleanup

* fix exports

* export json schema types

* fix: remove RETENTION_SOURCE option

* fix build scripts

* sckip building docs

* Release v3.0.0-next.3 (#76)

Co-authored-by: gmaclennan <actions@users.noreply.github.com>

* fix: omit 'version' prop from encode types

* fix: use prepack script, only package dist

---------

Co-authored-by: optic-release-automation[bot] <94357573+optic-release-automation[bot]@users.noreply.github.com>
Co-authored-by: gmaclennan <actions@users.noreply.github.com>
@gmaclennan
Copy link
Member Author

Actual squash-merge commit 146a6fb

@gmaclennan gmaclennan self-assigned this Aug 7, 2023
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.

Re-organize code to fix package publishing with typescript defs
2 participants