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

Publish types from packages/components #2004

Merged
merged 10 commits into from
May 9, 2024
Merged

Publish types from packages/components #2004

merged 10 commits into from
May 9, 2024

Conversation

natmegs
Copy link
Contributor

@natmegs natmegs commented Mar 15, 2024

📌 Summary

The main issue this PR attempts to fix is the lack of type declarations being produced for the components package.

The impact of no type declarations is consumers get no type information, and do not get type checking when using components from this package.

Two steps to resolve this:

  • Align our configs with the latest ember blueprint where possible
  • Adjust configs until types and usage outside of package are happy

📸 Screenshots

In packages/components:

  • yarn
  • yarn build
    Build should succeed and you should see a declarations folder (adjacent to dist) with type declarations
Screenshot 2024-03-19 at 3 16 33 PM

In showcase (important: after doing the above):

  • yarn
  • Restart the glint server in your code editor
  • Go to types/global.d.ts
  • You should get types for the HdsComponentRegistry
Screenshot 2024-03-19 at 3 17 31 PM Screenshot 2024-03-19 at 3 17 48 PM

👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented Mar 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview May 9, 2024 11:37am
hds-website ✅ Ready (Inspect) Visit Preview May 9, 2024 11:37am

@aklkv
Copy link
Collaborator

aklkv commented Mar 28, 2024

also blueprint is missing this dep which I had to install manually 681ac01

@natmegs
Copy link
Contributor Author

natmegs commented Mar 28, 2024

blueprint is missing this dep

What is that used for/how do we know we need it? Just curious as checks seem to be ✅ without

@natmegs
Copy link
Contributor Author

natmegs commented Mar 28, 2024

@aklkv thanks for the example usage, I'm still not certain on how to know that we need that? If it's necessary, it makes me wonder if we're missing something in our checks that would signal that to us

Copy link
Member

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

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

I rebased this PR, brought some dev dependencies up to date, and re-checked the code. Thanks both @natmegs and @aklkv!

@alex-ju alex-ju merged commit e8eea71 into main May 9, 2024
16 checks passed
@alex-ju alex-ju deleted the publishtypes branch May 9, 2024 12:52
@hashibot-hds hashibot-hds mentioned this pull request May 9, 2024
alex-ju added a commit that referenced this pull request May 17, 2024
After the refactor in #2004 the HDS code fails in `atlas` with
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants