Restore .d.ts files missing from the published @wp-playground/remote npm package #1949
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
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: