-
Notifications
You must be signed in to change notification settings - Fork 374
Restore .d.ts files missing from the published @wp-playground/remote npm package #1949
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
Conversation
e55b046 to
a791708
Compare
a791708 to
41b3102
Compare
I learned something new. 😄 |
|
The changes look good to me. @psrpinto would you mind sharing the full testing instructions? |
Test-publishing npm packages sounds really useful. Would you please document your process in some place the next person would likely look at? One option would be contributor docs, another would be contextually somewhere you have to look before publishing (I don't have any specific location in mind). |
Sorry for not providing full test instructions, I will make sure to do so in future PRs. Part of the reason I didn't share the test instructions was that the procedure to test publishing packages locally is not straightforward, so I thought "no one is actually gonna follow these instructions" :D (In the description of #1924 you can see more or less what is involved, though I did manage to simplify it a bit.)
I would be happy to document the process. Incidentally, I noticed that lerna also uses verdaccio:
I will take inspiration from lerna's docs, and document something similar for playground. |
Even if no one followed them, they'd be super helpful when preparing the next similar PR. Perhaps you would even come back to this PR at one point thinking oh, I've done that once and I think I documented the testing steps somewhere – that happens to me all the time :) |
|
Great point Adam, writing documentation for oneself makes a lot of sense. |
I love this so much. Everybody wins. |
Fixes #1951
The reason why type definitions were not being published was that
lernawas using./packages/playground/remote/as the source directory, instead of./dist/packages/playground/remote/. Since the type definitions are only present indist/, they were not being published.In #1924 I did test that the published package contained the type definitions, but I did not test it using
lerna. Instead, I tested usingnpm publishdirectly from thedist/directory. Now I have tested this PR usinglernaand can confirm that the published package will contain the type definitions.I learned my lesson, from now on I'll always test publishing packages with
lernainstead ofnpm publish:)Here's the relevant
lernalogs that show the type definitions will now be included in the published package: