Closed psrpinto closed 3 weeks ago
I learned my lesson, from now on I'll always test publishing packages with lerna instead of npm publish :)
I learned something new. š
The changes look good to me.
@psrpinto would you mind sharing the full testing instructions?
I learned my lesson, from now on I'll always test publishing packages with lerna instead of npm publish :)
Here's the relevant lerna logs that show the type definitions will now be included in the published package:
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).
would you mind sharing the full testing instructions?
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.)
Test-publishing npm packages sounds really useful. Would you please document your process in some place the next person would likely look at?
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.
no one is actually gonna follow these instructions
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.
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 :)
I love this so much. Everybody wins.
Fixes #1951
The reason why type definitions were not being published was that
lerna
was 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 publish
directly from thedist/
directory. Now I have tested this PR usinglerna
and 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
lerna
instead ofnpm publish
:)Here's the relevant
lerna
logs that show the type definitions will now be included in the published package: