Skip to content

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Aug 22, 2025

Closes #6643

Update the tsconfig.build.json exclude list so that our types are generated in the correct location for @primer/styled-react. This also adds a new task, lint:npm, to hopefully avoid these types of issues with publishing in the future 😅

Changelog

New

  • Add lint:npm task to turbo and to packages/styled-react
  • Update tsconfig.build.json so types are emitted to correct paths in dist folder

Changed

Removed

Rollout strategy

  • Patch release

@joshblack joshblack requested review from jonrohan and Copilot August 22, 2025 15:39
@joshblack joshblack requested a review from a team as a code owner August 22, 2025 15:39
Copy link

changeset-bot bot commented Aug 22, 2025

🦋 Changeset detected

Latest commit: 9085989

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/styled-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the staff Author is a staff member label Aug 22, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes TypeScript type generation for the @primer/styled-react package and adds npm package linting to prevent similar issues in the future. The main issue was that types were not being emitted to the correct location in the dist folder due to test files being included in the TypeScript compilation.

  • Update TypeScript build configuration to exclude test files and config directories from type generation
  • Add publint tool for npm package validation with a new lint:npm task
  • Integrate npm package linting into the CI pipeline

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
turbo.json Adds new lint:npm task configuration to the build pipeline
packages/styled-react/tsconfig.build.json Excludes test files and config directories from TypeScript compilation
packages/styled-react/package.json Adds lint:npm script and publint dependency
.github/workflows/ci.yml Integrates npm package linting into CI workflow
.changeset/salty-geese-own.md Documents the patch release for the styled-react package

Copy link
Contributor

github-actions bot commented Aug 22, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.13 KB (0%)
packages/react/dist/browser.umd.js 90.31 KB (0%)

@github-actions github-actions bot requested a deployment to storybook-preview-6649 August 22, 2025 15:43 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6649 August 22, 2025 15:53 Inactive
@joshblack joshblack enabled auto-merge August 22, 2025 16:40
@joshblack joshblack added this pull request to the merge queue Aug 22, 2025
Merged via the queue into main with commit 4e1c740 Aug 22, 2025
44 checks passed
@joshblack joshblack deleted the fix/update-types-output-for-styled-react branch August 22, 2025 16:54
@primer primer bot mentioned this pull request Aug 22, 2025
pksjce pushed a commit that referenced this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type definition bug when trying to use the package @primer/styled-react
2 participants