Skip to content

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Jul 9, 2024

pipeline. This caused the published packages to ship not just their own types but also all the types they import. This creates a lot of noise and also type identity conflicts between packages. This PR removes most of these rollup tasks, leaving only two:

  • In the @wp-playground/blueprints package for Types->JSON schema generation
  • In the @wp-playground/client package to make it self-contained and dependencyless.

Related to #1577

Testing instructions

Run npm run build and confirm the built packages only export their own types.

pipeline. This caused the published packages to ship not just their own types but also all the types they import. This creates a lot of noise and also type identity conflicts between packages. This PR removes most of these rollup tasks, leaving only two: * In the `@wp-playground/blueprints` package for Types->JSON schema generation * In the `@wp-playground/client` package to make it self-contained and dependencyless. ## Testing instructions Run `npm run build` and confirm the built packages only export their own types.
@adamziel adamziel self-assigned this Jul 9, 2024
Copy link
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

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

This looks good.

I made a small fix to the php-wasm/node build to avoid bulid errors due to a missing directory.

@adamziel adamziel merged commit 56e4b0c into trunk Jul 16, 2024
@adamziel adamziel deleted the publish-raw-types-not-rollups branch July 16, 2024 16:09
adamziel added a commit that referenced this pull request Aug 28, 2024
#1593 caused the `@php-wasm/util` package to be published without the `index.d.ts` type declarations file which causes the following TypeScript error: ``` Could not find a declaration file for module '@php-wasm/node'. ``` This PR adds the missing `dts()` plugin to vite.config.ts and enables publishing the declarations file. Before we can say #1662 is fixed, we'll need to merge this PR, release new packages, and confirm they import cleanly without any TypeScript errors. Ideally we'd have a smoke test for that right in the CI.
adamziel added a commit that referenced this pull request Aug 28, 2024
#1593 caused the `@php-wasm/util` package to be published without the `index.d.ts` type declarations file which causes the following TypeScript error: ``` Could not find a declaration file for module '@php-wasm/node'. ``` This PR adds the missing `dts()` plugin to vite.config.ts and enables publishing the declarations file. I verified all the other packages (aside of `cli`, which is fine) use the `dts()` plugin. However, before we can say #1662 is fixed, we'll need to merge this PR, release new packages, and confirm they import cleanly without any TypeScript errors. Ideally we'd have a smoke test for that right in the CI.
adamziel added a commit that referenced this pull request Aug 28, 2024
#1593 caused the `@php-wasm/util` package to be published without the `index.d.ts` type declarations file which causes the following TypeScript error: ``` Could not find a declaration file for module '@php-wasm/node'. ``` This PR adds a `build:dts` task to the `@php-wasm/node` publishing flow to ensure the type declarations get delivered to npm. To test, we'll need to merge this PR, release new packages, and confirm they import cleanly without any TypeScript errors. Ideally we'd have a smoke test for that right in the CI.
adamziel added a commit that referenced this pull request Aug 28, 2024
#1593 caused the `@php-wasm/util` package to be published without the `index.d.ts` type declarations file which causes the following TypeScript error: ``` Could not find a declaration file for module '@php-wasm/node'. ``` This PR adds a `build:dts` task to the `@php-wasm/node` publishing flow to ensure the type declarations get delivered to npm. To test, we'll need to merge this PR, release new packages, and confirm they import cleanly without any TypeScript errors. Ideally we'd have a smoke test for that right in the CI. Related to #1577
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug An existing feature does not function as intended [Type] Repo / Project Management

2 participants